# Optimization (Mathematical)

**URL:** https://discourse.julialang.org/c/domain/opt/13.md?page=5

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 6

---

## [Putting non linear optimization in a real-time closed-loop](https://discourse.julialang.org/t/putting-non-linear-optimization-in-a-real-time-closed-loop/131753)

<div class="topic-metadata">

**Author:** [@daro.slai](https://discourse.julialang.org/u/daro.slai)\
**Replies:** 1\
**Last updated:** [August 21, 2025, 6:20pm UTC](https://discourse.julialang.org/t/putting-non-linear-optimization-in-a-real-time-closed-loop/131753 "2025-08-21T18:20:35Z")

</div>

Hi, I’m trying to implement an Energy Management Algorithm (QCP) I built using InfiniteOpt.jl. The algo gets measurements from a WebSocket connection. My main scripting function goes as: function oneStepOpt\_test1(set…

---

## [Optimisation over grid of parameters with \`Optimization.jl\`](https://discourse.julialang.org/t/optimisation-over-grid-of-parameters-with-optimization-jl/131571)

<div class="topic-metadata">

**Author:** [@NoFishLikeIan](https://discourse.julialang.org/u/NoFishLikeIan)\
**Replies:** 7\
**Last updated:** [August 18, 2025, 10:28pm UTC](https://discourse.julialang.org/t/optimisation-over-grid-of-parameters-with-optimization-jl/131571 "2025-08-18T22:28:49Z")

</div>

I am trying to solve a low dimensional (box-)constrained optimisation problem over a large grid of parameters. Both the optimisation problem and the constraints depend on the parameters. I can assume that the optimisatio…

---

## [Solving a Shifted Linear System of 2 Symmetric Positive Semi Definite (SPSD) Matrices](https://discourse.julialang.org/t/solving-a-shifted-linear-system-of-2-symmetric-positive-semi-definite-spsd-matrices/131636)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 31\
**Last updated:** [August 18, 2025, 6:20pm UTC](https://discourse.julialang.org/t/solving-a-shifted-linear-system-of-2-symmetric-positive-semi-definite-spsd-matrices/131636 "2025-08-18T18:20:18Z")

</div>

I have the following linear system: \\left( \\boldsymbol{A} + \\lambda \\boldsymbol{C} \\right) \\boldsymbol{x} = \\boldsymbol{A}^{T} \\boldsymbol{b} Where \\boldsymbol{A}, \\boldsymbol{C} \\in \\mathcal{S}\_{+}^{n} are Symmetric …

---

## [Strange dependence on domain for polar coordinates in optimization over disk](https://discourse.julialang.org/t/strange-dependence-on-domain-for-polar-coordinates-in-optimization-over-disk/131676)

<div class="topic-metadata">

**Author:** [@JADekker](https://discourse.julialang.org/u/JADekker)\
**Replies:** 4\
**Last updated:** [August 18, 2025, 4:20pm UTC](https://discourse.julialang.org/t/strange-dependence-on-domain-for-polar-coordinates-in-optimization-over-disk/131676 "2025-08-18T16:20:19Z")

</div>

Hi, I’m trying to optimize a function over a disk using a transformation to polar coordinates. When I restrict the radius to non-negative values, there is no problem, but when I allow it to be negative, I get that the al…

---

## [Running Cplex.jl on HPC cluster](https://discourse.julialang.org/t/running-cplex-jl-on-hpc-cluster/131601)

<div class="topic-metadata">

**Author:** [@Ely](https://discourse.julialang.org/u/Ely)\
**Replies:** 2\
**Last updated:** [August 16, 2025, 4:43am UTC](https://discourse.julialang.org/t/running-cplex-jl-on-hpc-cluster/131601 "2025-08-16T04:43:16Z")

</div>

Hi everyone, Any idea please why my julia script on HPC can’t build or add the cplex package on the hpc cluster ? If i already have the Cplex path on the server, how can i properly export it in my sh (bash) file ? Th…

---

## [HiGHS multi-objective optimization stuck in infinite loop](https://discourse.julialang.org/t/highs-multi-objective-optimization-stuck-in-infinite-loop/131559)

<div class="topic-metadata">

**Author:** [@BdeKoning](https://discourse.julialang.org/u/BdeKoning)\
**Replies:** 8\
**Last updated:** [August 14, 2025, 12:13am UTC](https://discourse.julialang.org/t/highs-multi-objective-optimization-stuck-in-infinite-loop/131559 "2025-08-14T00:13:07Z")

</div>

I’m refactoring my code to go from custom multi objective optimization to using MultiObjectiveAlgorithms.jl with Lexicographic. When I run my optimization it never stops, with this repeated log message: So it looks l…

---

## [NonlinearSolve: how to pass parameters including a mutable workspace array](https://discourse.julialang.org/t/nonlinearsolve-how-to-pass-parameters-including-a-mutable-workspace-array/131421)

<div class="topic-metadata">

**Author:** [@Audrius-St](https://discourse.julialang.org/u/Audrius-St)\
**Replies:** 5\
**Last updated:** [August 10, 2025, 8:00am UTC](https://discourse.julialang.org/t/nonlinearsolve-how-to-pass-parameters-including-a-mutable-workspace-array/131421 "2025-08-10T08:00:06Z")

</div>

I would like to solve a 1D equation using NonlinearSolve. Appended below is a toy MNWE followed by the error message generated. The issue I’m encountering is that in the actual problem I need to pass a workspace array w…

---

## [Combining \`Optim\` and \`FieldVector\` from \`StaticArrays\`](https://discourse.julialang.org/t/combining-optim-and-fieldvector-from-staticarrays/131472)

<div class="topic-metadata">

**Author:** [@NoFishLikeIan](https://discourse.julialang.org/u/NoFishLikeIan)\
**Replies:** 3\
**Last updated:** [August 9, 2025, 10:15am UTC](https://discourse.julialang.org/t/combining-optim-and-fieldvector-from-staticarrays/131472 "2025-08-09T10:15:56Z")

</div>

I’m getting a MethodError in LBFGS when trying to use a custom mutable struct that inherits from FieldVector for an optimization problem. using StaticArrays using Optimization, OptimizationOptimJL mutable struct Point{…

---

## [Downgrading NonlinearExpr to QuadExpr or AffExpr](https://discourse.julialang.org/t/downgrading-nonlinearexpr-to-quadexpr-or-affexpr/131462)

<div class="topic-metadata">

**Author:** [@brunompacheco](https://discourse.julialang.org/u/brunompacheco)\
**Replies:** 6\
**Last updated:** [August 8, 2025, 3:14am UTC](https://discourse.julialang.org/t/downgrading-nonlinearexpr-to-quadexpr-or-affexpr/131462 "2025-08-08T03:14:48Z")

</div>

Hi! My question is related to Evaluating nonlinear expressions with variable references · Issue #4044 · jump-dev/JuMP.jl · GitHub TL;DR: I want to take a JuMP expression and replace some of the VariableRef by numerical…

---

## [CI integration failed with Gurobi.jl in environment](https://discourse.julialang.org/t/ci-integration-failed-with-gurobi-jl-in-environment/126236)

<div class="topic-metadata">

**Author:** [@Betristor](https://discourse.julialang.org/u/Betristor)\
**Replies:** 13\
**Last updated:** [August 7, 2025, 8:40am UTC](https://discourse.julialang.org/t/ci-integration-failed-with-gurobi-jl-in-environment/126236 "2025-08-07T08:40:01Z")

</div>

I have a Julia package in development which has Gurobi.jl in environment as an available solver. Somehow, the github CI integration is against the Gurobi.jl pre-compilation since no license could be found on github actio…

---

## [How do I set up Gurobi solver for JuMP with Web License Service (WLS) license?](https://discourse.julialang.org/t/how-do-i-set-up-gurobi-solver-for-jump-with-web-license-service-wls-license/131409)

<div class="topic-metadata">

**Author:** [@leonie25](https://discourse.julialang.org/u/leonie25)\
**Replies:** 6\
**Last updated:** [August 7, 2025, 2:20am UTC](https://discourse.julialang.org/t/how-do-i-set-up-gurobi-solver-for-jump-with-web-license-service-wls-license/131409 "2025-08-07T02:20:22Z")

</div>

How do I set up Gurobi solver for JuMP with Web License Service (WLS) license?

---

## [An idea to explain a drastic difference in computation times for optimizing a JuMP model, and the unexpected ranking of solvers used?](https://discourse.julialang.org/t/an-idea-to-explain-a-drastic-difference-in-computation-times-for-optimizing-a-jump-model-and-the-unexpected-ranking-of-solvers-used/131253)

<div class="topic-metadata">

**Author:** [@XavierG](https://discourse.julialang.org/u/XavierG)\
**Replies:** 8\
**Last updated:** [August 6, 2025, 11:47pm UTC](https://discourse.julialang.org/t/an-idea-to-explain-a-drastic-difference-in-computation-times-for-optimizing-a-jump-model-and-the-unexpected-ranking-of-solvers-used/131253 "2025-08-06T23:47:11Z")

</div>

I have to solve a basic parametric MILP.: \\begin{equation} \\begin{split} \\mbox{maximize} & \\quad \\alpha \\\\ \\mbox{s.t.} & \\quad \\alpha \\leq - \\lambda\_j(\\psi)(r\_{\*j} - z\_j(x)), \\,\\, j=1,\\dots,d \\\\ & \\qua…

---

## [Julia crashed when using Gurobi](https://discourse.julialang.org/t/julia-crashed-when-using-gurobi/131402)

<div class="topic-metadata">

**Author:** [@Z\_M](https://discourse.julialang.org/u/Z_M)\
**Replies:** 3\
**Last updated:** [August 6, 2025, 11:45pm UTC](https://discourse.julialang.org/t/julia-crashed-when-using-gurobi/131402 "2025-08-06T23:45:12Z")

</div>

I used JuMP and use Gurobi. But julia crashed, and the log is as follows: Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks. Exception: EXCEPT…

---

## [Trinary/Ternary Variables](https://discourse.julialang.org/t/trinary-ternary-variables/87679)

<div class="topic-metadata">

**Author:** [@chelseas](https://discourse.julialang.org/u/chelseas)\
**Replies:** 4\
**Last updated:** [August 6, 2025, 11:43pm UTC](https://discourse.julialang.org/t/trinary-ternary-variables/87679 "2025-08-06T23:43:56Z")

</div>

I am looking to efficiently implement trinary/ternary variables in a JuMP model. I am considering the following options: An integer variable with lb=-1, ub=1 (set of values {-1,0,1}) A semi-integer variable…(can take 0…

---

## [New package: SimplexTableaux](https://discourse.julialang.org/t/new-package-simplextableaux/131422)

<div class="topic-metadata">

**Author:** [@scheinerman](https://discourse.julialang.org/u/scheinerman)\
**Replies:** 0\
**Last updated:** [August 6, 2025, 7:49pm UTC](https://discourse.julialang.org/t/new-package-simplextableaux/131422 "2025-08-06T19:49:53Z")

</div>

Primarily for educational purposes, announcing SimplexTableaux: a package for creating and working with linear programming tableaux. Users can create a tableau for a linear program, specify a basis (or have the computer …

---

## [Optimization-based PI controller tuning for a delay system](https://discourse.julialang.org/t/optimization-based-pi-controller-tuning-for-a-delay-system/131405)

<div class="topic-metadata">

**Author:** [@VPBML](https://discourse.julialang.org/u/VPBML)\
**Replies:** 3\
**Last updated:** [August 6, 2025, 2:06pm UTC](https://discourse.julialang.org/t/optimization-based-pi-controller-tuning-for-a-delay-system/131405 "2025-08-06T14:06:28Z")

</div>

Hi, I am trying to find a good tuning for a PI controler on a first-order-plus-delay system using Optimization. A naive first try combining ControlSystems.jl and Optimization.jl did not work and gave some errors. I wond…

---

## [Lollipopt project (Probably not working so don't take it seriously.)](https://discourse.julialang.org/t/lollipopt-project-probably-not-working-so-dont-take-it-seriously/131199)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 4\
**Last updated:** [August 1, 2025, 11:51am UTC](https://discourse.julialang.org/t/lollipopt-project-probably-not-working-so-dont-take-it-seriously/131199 "2025-08-01T11:51:19Z")

</div>

You have a mixed-integer linear programming problem. You’re tired of free solvers being like 100x slower than commercial solvers, right? I think I found the culprit. It’s hard to contribute to free solvers despite them…

---

## [How to get all the registered variable names of a \`JuMP\` model?](https://discourse.julialang.org/t/how-to-get-all-the-registered-variable-names-of-a-jump-model/113837)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 3\
**Last updated:** [July 30, 2025, 2:39am UTC](https://discourse.julialang.org/t/how-to-get-all-the-registered-variable-names-of-a-jump-model/113837 "2025-07-30T02:39:45Z")

</div>

Is there any method to obtaining all the registered variable names (symbols) of a JuMP model? And, if the variables have been set String names, how to get their original symbolic names?

---

## [Finding a region of attraction using sum of squares optimization](https://discourse.julialang.org/t/finding-a-region-of-attraction-using-sum-of-squares-optimization/131067)

<div class="topic-metadata">

**Author:** [@lieskjur](https://discourse.julialang.org/u/lieskjur)\
**Replies:** 10\
**Last updated:** [July 28, 2025, 5:46pm UTC](https://discourse.julialang.org/t/finding-a-region-of-attraction-using-sum-of-squares-optimization/131067 "2025-07-28T17:46:18Z")

</div>

Out of interest I decided to explore sum of squares optimization in the context of Lyapunov functions. Right now I’d like to use it to find the region of attraction for the value function (viewed as a Lyapunov function) …

---

## [Some question on column generation, branch and price, Coluna](https://discourse.julialang.org/t/some-question-on-column-generation-branch-and-price-coluna/131084)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 2\
**Last updated:** [July 27, 2025, 3:55am UTC](https://discourse.julialang.org/t/some-question-on-column-generation-branch-and-price-coluna/131084 "2025-07-27T03:55:10Z")

</div>

Since I’m studying this topic recently. I wonder if there is anyone who is interested and can hence discuss with me. Benders I don’t think this structure is going to be handled by Benders decomposition. For this str…

---

## [Gurobi fails to properly report an ERROR, when NonConvex is 0](https://discourse.julialang.org/t/gurobi-fails-to-properly-report-an-error-when-nonconvex-is-0/130932)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 5\
**Last updated:** [July 27, 2025, 3:15am UTC](https://discourse.julialang.org/t/gurobi-fails-to-properly-report-an-error-when-nonconvex-is-0/130932 "2025-07-27T03:15:45Z")

</div>

I discover this behavior of Gurobi, which I think is not exactly expected. According to Gurobi’s doc, if NonConvex is set to 0, then Gurobi should ERROR when a nonconvex quadratic constraint is present. julia\> import J…

---

## [Second-order cone constraint in JuMP](https://discourse.julialang.org/t/second-order-cone-constraint-in-jump/130927)

<div class="topic-metadata">

**Author:** [@Z\_M](https://discourse.julialang.org/u/Z_M)\
**Replies:** 9\
**Last updated:** [July 24, 2025, 3:14am UTC](https://discourse.julialang.org/t/second-order-cone-constraint-in-jump/130927 "2025-07-24T03:14:58Z")

</div>

Hi guys! How to solve this constraint in Julia in JuMP, where the Q is a 2×2 Hessian matrix of a convex function, so it is a positive semidefinite matrix. I know it can be reformulated as a second-order cone constraint…

---

## [An infeasibility that seems to be dependent on the state of HiGHS (or JuMP)](https://discourse.julialang.org/t/an-infeasibility-that-seems-to-be-dependent-on-the-state-of-highs-or-jump/130969)

<div class="topic-metadata">

**Author:** [@BdeKoning](https://discourse.julialang.org/u/BdeKoning)\
**Replies:** 5\
**Last updated:** [July 23, 2025, 12:52pm UTC](https://discourse.julialang.org/t/an-infeasibility-that-seems-to-be-dependent-on-the-state-of-highs-or-jump/130969 "2025-07-23T12:52:12Z")

</div>

Hi all, I’m working on a water allocation optimization code with JuMP + HiGHS, and I came across an infeasibility. The weird thing is: HiGHS concludes that my model is infeasible when it runs embedded in my code, but whe…

---

## [Rigorous establishment of the feasibility of the trained policies in SDDP.jl using constraint violation penalties in the objective function](https://discourse.julialang.org/t/rigorous-establishment-of-the-feasibility-of-the-trained-policies-in-sddp-jl-using-constraint-violation-penalties-in-the-objective-function/130961)

<div class="topic-metadata">

**Author:** [@Engr\_Moiz\_Ahmad](https://discourse.julialang.org/u/Engr_Moiz_Ahmad)\
**Replies:** 10\
**Last updated:** [July 23, 2025, 8:32am UTC](https://discourse.julialang.org/t/rigorous-establishment-of-the-feasibility-of-the-trained-policies-in-sddp-jl-using-constraint-violation-penalties-in-the-objective-function/130961 "2025-07-23T08:32:16Z")

</div>

I am working with a multi-stage mixed-integer stochastic global supply chain optimization problem. In this regard, under realistic parameter settings, some constraints are making the instances violate the relatively com…

---

## [KKT condition not satisfied in DCOPF](https://discourse.julialang.org/t/kkt-condition-not-satisfied-in-dcopf/130902)

<div class="topic-metadata">

**Author:** [@simoni0](https://discourse.julialang.org/u/simoni0)\
**Replies:** 4\
**Last updated:** [July 21, 2025, 6:33pm UTC](https://discourse.julialang.org/t/kkt-condition-not-satisfied-in-dcopf/130902 "2025-07-21T18:33:41Z")

</div>

I wanted to evaluate whether the KKT condition \\lambda\_i - \\lambda\_j = \\mu^{+}\_{ij} - \\mu^{-}\_{ij} holds for standard DC-OPF. I made a small test on the 5-bus case. using PowerModels using GLPK result = PowerModels.sol…

---

## [Why are the entries identical in \`zeros(JuMP.AffExpr, N)\`](https://discourse.julialang.org/t/why-are-the-entries-identical-in-zeros-jump-affexpr-n/130860)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 9\
**Last updated:** [July 19, 2025, 8:04am UTC](https://discourse.julialang.org/t/why-are-the-entries-identical-in-zeros-jump-affexpr-n/130860 "2025-07-19T08:04:07Z")

</div>

My understanding about the zeros function in julia is that it has independent entries. But today I find a weird behavior which I cannot explain why. Compare the following unexpected outcome 🔴 and the expected outcome ✅ …

---

## [JuMP : Vector version of set\_lower\_bound and set\_upper\_bound?](https://discourse.julialang.org/t/jump-vector-version-of-set-lower-bound-and-set-upper-bound/130703)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 13\
**Last updated:** [July 18, 2025, 10:05am UTC](https://discourse.julialang.org/t/jump-vector-version-of-set-lower-bound-and-set-upper-bound/130703 "2025-07-18T10:05:14Z")

</div>

Hi, I work on a project involving the resolution of numerous (10K) linear optimization problems. JuMP is very expressive and convenient allowing to work with different backend solvers : many thanks to the JuMP devs for…

---

## [How to define a variable with specific values from a set using JuMP](https://discourse.julialang.org/t/how-to-define-a-variable-with-specific-values-from-a-set-using-jump/130808)

<div class="topic-metadata">

**Author:** [@Luiz\_Monteiro](https://discourse.julialang.org/u/Luiz_Monteiro)\
**Replies:** 3\
**Last updated:** [July 18, 2025, 1:21am UTC](https://discourse.julialang.org/t/how-to-define-a-variable-with-specific-values-from-a-set-using-jump/130808 "2025-07-18T01:21:56Z")

</div>

Hi, I’m using JuMP and I would like to define a variable that can only assume specific values from a predefined set, for example: allowed\_values = \[10.0, 10.5, 11.0, 11.5, 12.0\] Is there a way to define a variable in …

---

## [Is KNITRO.jl thread-safe](https://discourse.julialang.org/t/is-knitro-jl-thread-safe/130717)

<div class="topic-metadata">

**Author:** [@CeterisPartybus](https://discourse.julialang.org/u/CeterisPartybus)\
**Replies:** 3\
**Last updated:** [July 14, 2025, 11:14pm UTC](https://discourse.julialang.org/t/is-knitro-jl-thread-safe/130717 "2025-07-14T23:14:14Z")

</div>

Hi everyone, is it save to launch multiple instances of Knitro with JuMP at the same time? I aim to solve a couple of problems at the same time for different parameter combinations on multiple Julia threads. I would de…

---

## [Early optimizer termination](https://discourse.julialang.org/t/early-optimizer-termination/130710)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 6\
**Last updated:** [July 14, 2025, 9:16pm UTC](https://discourse.julialang.org/t/early-optimizer-termination/130710 "2025-07-14T21:16:07Z")

</div>

Hi I am using NLOP and MMA for optimization. The optimizer stops the optimization and reach the Xtol\_rel while I have large gradients which should make optimizer keep going. Could you please help me understand what is th…

[Previous page](https://discourse.julialang.org/c/domain/opt/13.md?page=4)

[Next page](https://discourse.julialang.org/c/domain/opt/13.md?page=6)
