# Optimization (Mathematical)

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

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

**Page:** 2

---

## [Jump, MultiObjectiveAlgorithms - How do manuelly set priorities of objectives](https://discourse.julialang.org/t/jump-multiobjectivealgorithms-how-do-manuelly-set-priorities-of-objectives/136823)

<div class="topic-metadata">

**Author:** [@Caroline](https://discourse.julialang.org/u/Caroline)\
**Replies:** 2\
**Last updated:** [April 22, 2026, 8:40pm UTC](https://discourse.julialang.org/t/jump-multiobjectivealgorithms-how-do-manuelly-set-priorities-of-objectives/136823 "2026-04-22T20:40:49Z")

</div>

Hi everyone! I’m new to Julia and trying to use it to implement a MILP with multiple objectives. I haven’t been able to find how to set the priorities for the different objectives. Here objective 1 is x+5 and objective 2…

---

## [90% of Ipopt run time is spent in Hessian/constraints evaluation, very little time in linear solver. Is it normal?](https://discourse.julialang.org/t/90-of-ipopt-run-time-is-spent-in-hessian-constraints-evaluation-very-little-time-in-linear-solver-is-it-normal/136708)

<div class="topic-metadata">

**Author:** [@Ceserik](https://discourse.julialang.org/u/Ceserik)\
**Replies:** 11\
**Last updated:** [April 18, 2026, 7:55am UTC](https://discourse.julialang.org/t/90-of-ipopt-run-time-is-spent-in-hessian-constraints-evaluation-very-little-time-in-linear-solver-is-it-normal/136708 "2026-04-18T07:55:51Z")

</div>

Hello, I have been trying to improve my solve time for nonlinear optimal control problem , it is a tool for solving minimum lap time for a race car GitHub - ceserik/SLapSim.jl: Scalable laptime simulator · GitHub. I am…

---

## [Bottleneck of JuMP](https://discourse.julialang.org/t/bottleneck-of-jump/136609)

<div class="topic-metadata">

**Author:** [@ttx002000](https://discourse.julialang.org/u/ttx002000)\
**Replies:** 24\
**Last updated:** [April 15, 2026, 8:38pm UTC](https://discourse.julialang.org/t/bottleneck-of-jump/136609 "2026-04-15T20:38:55Z")

</div>

I am solving a SDP problem using JuMP and the associated MosekTools. The basic pattern is this:\` NQ=9 Nk=9 nred=4 Dmatrix = Vector{Any}(undef, 3) Dmatrix\[1\] = Vector{Any}(undef, NQ) # uuuu channel Dmatr…

---

## [Is JuMP.@variable slow when the number gets large?](https://discourse.julialang.org/t/is-jump-variable-slow-when-the-number-gets-large/136430)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 12\
**Last updated:** [April 5, 2026, 12:47am UTC](https://discourse.julialang.org/t/is-jump-variable-slow-when-the-number-gets-large/136430 "2026-04-05T00:47:13Z")

</div>

I have a Unit commitment (24 hours, 5000 scenarios, IEEE118) problem, that has these two lines @time JuMP.@variable(m, pA\[i=\_2(t,T,1), \_0(i,t,S), agi\]) @time JuMP.@variable(m, pf\[i=\_2(t,T,0), \_0(i,t,S), 1:size(F,1)\]) w…

---

## [Can I create a null JuMP.VariableRef?](https://discourse.julialang.org/t/can-i-create-a-null-jump-variableref/136492)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 5\
**Last updated:** [April 3, 2026, 1:33am UTC](https://discourse.julialang.org/t/can-i-create-a-null-jump-variableref/136492 "2026-04-03T01:33:50Z")

</div>

I can pre-allocate a JuMP.AffExpr(0.). But can I create a dumb x = JuMP.VariableRef(undef)? Then I can write something like v = JuMP.Containers.@container(\[i=1:3\], x) for i = 1:3 if i !== 3 v\[i\] = JuMP.@var…

---

## [Julia not using the most recent version of Gurobi](https://discourse.julialang.org/t/julia-not-using-the-most-recent-version-of-gurobi/65539)

<div class="topic-metadata">

**Author:** [@ZHEN\_LIN](https://discourse.julialang.org/u/ZHEN_LIN)\
**Replies:** 10\
**Last updated:** [April 1, 2026, 3:24pm UTC](https://discourse.julialang.org/t/julia-not-using-the-most-recent-version-of-gurobi/65539 "2026-04-01T15:24:38Z")

</div>

I have been using Gurobi 9.0.1 in Julia with JuMP. Now I have installed Gurobi 9.1.2, but the output of Gurobi in Julia indicates that it is still using 9.0.1. How do I make it use the most recent version of Gurobi? I c…

---

## [MadNLP.jl in JuMP](https://discourse.julialang.org/t/madnlp-jl-in-jump/136380)

<div class="topic-metadata">

**Author:** [@nico](https://discourse.julialang.org/u/nico)\
**Replies:** 2\
**Last updated:** [March 26, 2026, 8:59am UTC](https://discourse.julialang.org/t/madnlp-jl-in-jump/136380 "2026-03-26T08:59:17Z")

</div>

Hi All, I am trying to change some settings in MadNLP.jl when used via JuMP.jl. I would like to change the barrier strategy from the default monotone to adaptive. I just do not manage to change those settings. Does anyon…

---

## [Using warmstart using Clp.jl](https://discourse.julialang.org/t/using-warmstart-using-clp-jl/136375)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 4\
**Last updated:** [March 26, 2026, 8:35am UTC](https://discourse.julialang.org/t/using-warmstart-using-clp-jl/136375 "2026-03-26T08:35:35Z")

</div>

Hi, Is it possible to accelerate the solution of several similar lp problems by passing the simplex basis using Julia and the Clp.jl package ? Laurent

---

## [ERROR: MethodError: similar(::JuMP.Containers.DenseAxisArray) is ambiguous](https://discourse.julialang.org/t/error-methoderror-similar-jump-containers-denseaxisarray-is-ambiguous/136359)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 1\
**Last updated:** [March 24, 2026, 7:50pm UTC](https://discourse.julialang.org/t/error-methoderror-similar-jump-containers-denseaxisarray-is-ambiguous/136359 "2026-03-24T19:50:31Z")

</div>

I’m on my Windows laptop. And the GLMakie reports an Error. julia\> f = Figure(); julia\> # do some plots to f, without ERROR here, but next: julia\> f Error showing value of type Figure: SYSTEM (REPL): showing an erro…

---

## [Difference in output with change in variable structure](https://discourse.julialang.org/t/difference-in-output-with-change-in-variable-structure/136321)

<div class="topic-metadata">

**Author:** [@Gagan\_Meena](https://discourse.julialang.org/u/Gagan_Meena)\
**Replies:** 8\
**Last updated:** [March 23, 2026, 8:12am UTC](https://discourse.julialang.org/t/difference-in-output-with-change-in-variable-structure/136321 "2026-03-23T08:12:38Z")

</div>

I am solving a day ahead optimization problem. I am using the same set of variables and constraint and the same objective function in two cases, but I am getting a different outcome. The first case considers a single hyd…

---

## [\`dual\_objective\_value\` in JuMP.solution\_summary](https://discourse.julialang.org/t/dual-objective-value-in-jump-solution-summary/134556)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 12\
**Last updated:** [March 23, 2026, 1:06am UTC](https://discourse.julialang.org/t/dual-objective-value-in-jump-solution-summary/134556 "2026-03-23T01:06:09Z")

</div>

I have a question: what is the dual\_objective\_value below julia\> JuMP.solution\_summary(model) solution\_summary(; result = 1, verbose = false) ├ solver\_name : Gurobi ├ Termination │ ├ termination\_status : OPTIMA…

---

## [Automatic differentiation of function using \`LinearProblem\`](https://discourse.julialang.org/t/automatic-differentiation-of-function-using-linearproblem/136063)

<div class="topic-metadata">

**Author:** [@NoFishLikeIan](https://discourse.julialang.org/u/NoFishLikeIan)\
**Replies:** 8\
**Last updated:** [March 22, 2026, 2:08pm UTC](https://discourse.julialang.org/t/automatic-differentiation-of-function-using-linearproblem/136063 "2026-03-22T14:08:42Z")

</div>

I am trying to optimise a function f: \\mathbb{R}^n \\to \\mathbb{R} which internally solves a linear problem, informally something like f(w) = g(x) where x solves A(w) x= b(x). To do this I am using LinearSolve and automa…

---

## [Warm-starting DAQP with JuMP](https://discourse.julialang.org/t/warm-starting-daqp-with-jump/136134)

<div class="topic-metadata">

**Author:** [@kziliask](https://discourse.julialang.org/u/kziliask)\
**Replies:** 5\
**Last updated:** [March 18, 2026, 1:58pm UTC](https://discourse.julialang.org/t/warm-starting-daqp-with-jump/136134 "2026-03-18T13:58:57Z")

</div>

Hi, Is it possible to warm-start the DAQP solver for perturbed solutions through JuMP, or can I only do it through the cumbersome sense interface? I see there’s a warm-start tutorial for SCS but I wasn’t sure if it appli…

---

## [New package: NewtonCQK.jl](https://discourse.julialang.org/t/new-package-newtoncqk-jl/136254)

<div class="topic-metadata">

**Author:** [@pjssilva](https://discourse.julialang.org/u/pjssilva)\
**Replies:** 0\
**Last updated:** [March 18, 2026, 1:49pm UTC](https://discourse.julialang.org/t/new-package-newtoncqk-jl/136254 "2026-03-18T13:49:34Z")

</div>

Hi, I would like to announce a new Julia package named NewtonCQK.jl. It implements a semismooth Newton method to solve the Continuous Quadratick Knapsack problem \\min\_x \\frac{1}{2}x^tDx - a^tx \\quad \\text{s.t.} \\quad …

---

## [Do JuMP Variable ensure contiguous memory to Gurobi?](https://discourse.julialang.org/t/do-jump-variable-ensure-contiguous-memory-to-gurobi/136177)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 7\
**Last updated:** [March 18, 2026, 6:17am UTC](https://discourse.julialang.org/t/do-jump-variable-ensure-contiguous-memory-to-gurobi/136177 "2026-03-18T06:17:38Z")

</div>

The motivation is that I notices Gurobi exposes the 3 APIs. GRBsetdblattrelement GRBsetdblattrarray GRBsetdblattrlist Allegedly, using GRBsetdblattrarray should be the fastest (than using the list counterpart, than us…

---

## [MathOptInterface and MultiObjectiveAlgorithms functionality to implement a multiobjective algorithm (AUGMECON)](https://discourse.julialang.org/t/mathoptinterface-and-multiobjectivealgorithms-functionality-to-implement-a-multiobjective-algorithm-augmecon/136243)

<div class="topic-metadata">

**Author:** [@Josa9321](https://discourse.julialang.org/u/Josa9321)\
**Replies:** 1\
**Last updated:** [March 17, 2026, 8:39pm UTC](https://discourse.julialang.org/t/mathoptinterface-and-multiobjectivealgorithms-functionality-to-implement-a-multiobjective-algorithm-augmecon/136243 "2026-03-17T20:39:48Z")

</div>

Hi. I’m currently working on adapting an AUGMECON implementation in JuMP to use the MultiObjectiveAlgorithms module as its base. As part of this process, I’m adjusting AUGMECON to follow the MOA structure and implementi…

---

## [OptimizationState in Optim.jl does not have expected fields](https://discourse.julialang.org/t/optimizationstate-in-optim-jl-does-not-have-expected-fields/136212)

<div class="topic-metadata">

**Author:** [@pjssilva](https://discourse.julialang.org/u/pjssilva)\
**Replies:** 3\
**Last updated:** [March 16, 2026, 11:33pm UTC](https://discourse.julialang.org/t/optimizationstate-in-optim-jl-does-not-have-expected-fields/136212 "2026-03-16T23:33:03Z")

</div>

Hello. I am trying to use the callback functionality Optim.jl’s solvers (CG and LBFGS). However, the state passed to the callback function does not seem to have the expected fields. In fact, the state only has the fields…

---

## [Polynomial optimization on a domain](https://discourse.julialang.org/t/polynomial-optimization-on-a-domain/135755)

<div class="topic-metadata">

**Author:** [@geo](https://discourse.julialang.org/u/geo)\
**Replies:** 4\
**Last updated:** [March 11, 2026, 8:31am UTC](https://discourse.julialang.org/t/polynomial-optimization-on-a-domain/135755 "2026-03-11T08:31:47Z")

</div>

As I understand polynomial optimization on a domain is based on the use of Putinar’s Positivestellensatz. Does this imply that the domain needs to be compact? Or am I misunderstanding something? The SumOfSquares manuals …

---

## [Does AmplNLWriter support most of the functionalities that jump natively provides through MathOptInterface?](https://discourse.julialang.org/t/does-amplnlwriter-support-most-of-the-functionalities-that-jump-natively-provides-through-mathoptinterface/135939)

<div class="topic-metadata">

**Author:** [@Mihir\_V146](https://discourse.julialang.org/u/Mihir_V146)\
**Replies:** 7\
**Last updated:** [March 6, 2026, 2:00am UTC](https://discourse.julialang.org/t/does-amplnlwriter-support-most-of-the-functionalities-that-jump-natively-provides-through-mathoptinterface/135939 "2026-03-06T02:00:53Z")

</div>

I am trying to decide if I should start making some kind of MathOptInterface for my solver to make jump interface directly with it or should i just use the AmplNLWriter to indirectly talk to jump. The solver I have alrea…

---

## [Conditioning stochastic inflows on lagged state variables in SDDP.jl (PAR(p) model)](https://discourse.julialang.org/t/conditioning-stochastic-inflows-on-lagged-state-variables-in-sddp-jl-par-p-model/135757)

<div class="topic-metadata">

**Author:** [@MagnoOcarlos](https://discourse.julialang.org/u/MagnoOcarlos)\
**Replies:** 9\
**Last updated:** [March 4, 2026, 11:35pm UTC](https://discourse.julialang.org/t/conditioning-stochastic-inflows-on-lagged-state-variables-in-sddp-jl-par-p-model/135757 "2026-03-04T23:35:46Z")

</div>

Conditioning stochastic inflows on lagged state variables in SDDP.jl (PAR(p) model) Hi all, I’m implementing a hydrothermal dispatch model (similar to the Brazilian NEWAVE) using SDDP.jl. The inflow process follows a Pe…

---

## [Discount factor on graph edges and padding stages in SDDP.jl (NEWAVE-style)](https://discourse.julialang.org/t/discount-factor-on-graph-edges-and-padding-stages-in-sddp-jl-newave-style/135863)

<div class="topic-metadata">

**Author:** [@MagnoOcarlos](https://discourse.julialang.org/u/MagnoOcarlos)\
**Replies:** 1\
**Last updated:** [February 27, 2026, 12:49am UTC](https://discourse.julialang.org/t/discount-factor-on-graph-edges-and-padding-stages-in-sddp-jl-newave-style/135863 "2026-02-27T00:49:52Z")

</div>

Hi all, Following up on my previous question about Conditioning stochastic inflows on lagged state variables in SDDP.jl (PAR(p) model), I now have a question about applying the discount factor in the cost-to-go function…

---

## [Seeking low rank solution for two PSD matrices via \`SDPLR.jl\` in \`JuMP\`](https://discourse.julialang.org/t/seeking-low-rank-solution-for-two-psd-matrices-via-sdplr-jl-in-jump/135823)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 9\
**Last updated:** [February 26, 2026, 2:24pm UTC](https://discourse.julialang.org/t/seeking-low-rank-solution-for-two-psd-matrices-via-sdplr-jl-in-jump/135823 "2026-02-26T14:24:46Z")

</div>

I am trying the SDPLR.jl solver in JuMP for finding low-rank solutions to SDPs and it is working quite nicely when the underlying semidefinite optimization problem has only one PSD variable X. How do I apply SDPLR.jl in J…

---

## [Should NonlinearLeastSquaresProblem be used for deep learning?](https://discourse.julialang.org/t/should-nonlinearleastsquaresproblem-be-used-for-deep-learning/135793)

<div class="topic-metadata">

**Author:** [@dmetivie](https://discourse.julialang.org/u/dmetivie)\
**Replies:** 11\
**Last updated:** [February 24, 2026, 4:03pm UTC](https://discourse.julialang.org/t/should-nonlinearleastsquaresproblem-be-used-for-deep-learning/135793 "2026-02-24T16:03:28Z")

</div>

From this JuliaCon talk Fast and Robust Least Squares / Curve Fitting by @ChrisRackauckas, I gathered that if you have a L2 loss function then you should be using NonlinearLeastSquaresProblem from the NonlinearSolve.jl p…

---

## [Need assistance PowerModelDistribution. jl](https://discourse.julialang.org/t/need-assistance-powermodeldistribution-jl/135785)

<div class="topic-metadata">

**Author:** [@Curtis96](https://discourse.julialang.org/u/Curtis96)\
**Replies:** 8\
**Last updated:** [February 24, 2026, 1:40am UTC](https://discourse.julialang.org/t/need-assistance-powermodeldistribution-jl/135785 "2026-02-24T01:40:04Z")

</div>

Hello everyone, I need your help. I am currently modelling a distribution network (13 buses) using Julia software via PowerModelDistribution with a MATHEMATICAL model. The problem I am encountering is that when calculati…

---

## [Mooncake+ODE gradient error](https://discourse.julialang.org/t/mooncake-ode-gradient-error/135797)

<div class="topic-metadata">

**Author:** [@johnb](https://discourse.julialang.org/u/johnb)\
**Replies:** 1\
**Last updated:** [February 23, 2026, 6:35pm UTC](https://discourse.julialang.org/t/mooncake-ode-gradient-error/135797 "2026-02-23T18:35:47Z")

</div>

I’m trying out Mooncake.jl to obtain gradients through ODEs, but I keep getting uninitialized tangent issues and I’m not sure how to fix it. I’ve attached a small example problem below. Using DifferentiationInterface.jl…

---

## [LinearSolveCUDAExt fails to compile](https://discourse.julialang.org/t/linearsolvecudaext-fails-to-compile/131693)

<div class="topic-metadata">

**Author:** [@sob](https://discourse.julialang.org/u/sob)\
**Replies:** 23\
**Last updated:** [February 20, 2026, 2:01pm UTC](https://discourse.julialang.org/t/linearsolvecudaext-fails-to-compile/131693 "2026-02-20T14:01:40Z")

</div>

As a dependency of DiffEqGPU (version 3.8,0), it fails to compile on Julia 1.11.6 (Linux). (Test) pkg\> precompile Precompiling project... ✗ LinearSolve → LinearSolveCUDAExt 33 dependencies successfully precompiled i…

---

## [Get varRefs of whole container](https://discourse.julialang.org/t/get-varrefs-of-whole-container/135726)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 4\
**Last updated:** [February 19, 2026, 7:44pm UTC](https://discourse.julialang.org/t/get-varrefs-of-whole-container/135726 "2026-02-19T19:44:16Z")

</div>

Is there a way to get the variable refs of the whole container? julia\> @variable(model, u\[1:2\]) 2-element Vector{VariableRef}: u\[1\] u\[2\] julia\> variable\_by\_name(model, "u\[2\]") u\[2\] How do I get all u as Vector{Varia…

---

## [Unsupported constraint only in infeasibility analysis](https://discourse.julialang.org/t/unsupported-constraint-only-in-infeasibility-analysis/135721)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 5\
**Last updated:** [February 18, 2026, 7:39pm UTC](https://discourse.julialang.org/t/unsupported-constraint-only-in-infeasibility-analysis/135721 "2026-02-18T19:39:32Z")

</div>

I have a JuMP.jl model that I solve using Gurobi. For some cases (data) it is infeasible. I am using MathOptAnalyzer.jl to generate an infeasibility report: MathOptAnalyzer.analyze(MathOptAnalyzer.Infeasibility.Analyze…

---

## [Why does \`JuMP.set\_objective\_coefficient(m, x, c::Float64)\` have allocations?](https://discourse.julialang.org/t/why-does-jump-set-objective-coefficient-m-x-c-float64-have-allocations/135717)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 7\
**Last updated:** [February 18, 2026, 1:31pm UTC](https://discourse.julialang.org/t/why-does-jump-set-objective-coefficient-m-x-c-float64-have-allocations/135717 "2026-02-18T13:31:43Z")

</div>

I’m very curious here. Where can this API lead to allocations so that it has even more allocations that @objective (in number of allocations, though not in total memory size) when I want to reset the objective function? …

---

## [Double sum over two identical variables](https://discourse.julialang.org/t/double-sum-over-two-identical-variables/135703)

<div class="topic-metadata">

**Author:** [@Saki](https://discourse.julialang.org/u/Saki)\
**Replies:** 3\
**Last updated:** [February 17, 2026, 10:39pm UTC](https://discourse.julialang.org/t/double-sum-over-two-identical-variables/135703 "2026-02-17T22:39:06Z")

</div>

I am trying to implement a mathematical model in JuMP but cant seem to figure out how i should write this constraint because i needs to be in both A and P @constraint(m, \[(i,j) in data.A, i in data.P\], sum(xs\[(i, j), …

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

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