# Optimization (Mathematical)

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

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

**Page:** 3

---

## [(JuMP) Best way to implement sequential convex (or quadratic) programming](https://discourse.julialang.org/t/jump-best-way-to-implement-sequential-convex-or-quadratic-programming/135669)

<div class="topic-metadata">

**Author:** [@jackyarndley](https://discourse.julialang.org/u/jackyarndley)\
**Replies:** 4\
**Last updated:** [February 17, 2026, 2:43am UTC](https://discourse.julialang.org/t/jump-best-way-to-implement-sequential-convex-or-quadratic-programming/135669 "2026-02-17T02:43:39Z")

</div>

Hi all, I work with sequential convex programming (SCP) for trajectory optimization, which is where a nonlinear programming problem is approximated by a sequence of convex linearizations. The structure of the problem do…

---

## [Problems with complex values in optimization objective (JuMP)](https://discourse.julialang.org/t/problems-with-complex-values-in-optimization-objective-jump/135504)

<div class="topic-metadata">

**Author:** [@dnldlg](https://discourse.julialang.org/u/dnldlg)\
**Replies:** 5\
**Last updated:** [February 9, 2026, 12:35am UTC](https://discourse.julialang.org/t/problems-with-complex-values-in-optimization-objective-jump/135504 "2026-02-09T00:35:33Z")

</div>

When using complex valued numbers in the objective function, get an error that I struggle to understand. This minimal example illustrates it very well. Let’s say we want to find parameters of a parametrised unitay matrix…

---

## [Is there a reason to use \`@expression\`? I think it's redundant](https://discourse.julialang.org/t/is-there-a-reason-to-use-expression-i-think-its-redundant/131829)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 14\
**Last updated:** [February 8, 2026, 1:04am UTC](https://discourse.julialang.org/t/is-there-a-reason-to-use-expression-i-think-its-redundant/131829 "2026-02-08T01:04:58Z")

</div>

Sometimes I build incorrect expressions obliviously, but JuMP won’t throw an ERROR. Is this good? import JuMP, Gurobi model1 = JuMP.Model(Gurobi.Optimizer); JuMP.@variable(model1, x1 \>= 1); JuMP.@objective(model1, Min, …

---

## [Dynamic optimization over a step function in MTK and InfiniteOpt](https://discourse.julialang.org/t/dynamic-optimization-over-a-step-function-in-mtk-and-infiniteopt/135496)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 1\
**Last updated:** [February 6, 2026, 3:07pm UTC](https://discourse.julialang.org/t/dynamic-optimization-over-a-step-function-in-mtk-and-infiniteopt/135496 "2026-02-06T15:07:00Z")

</div>

After watching the inspiring Optimal Control in Julia: SciML’s newest tooling | Rackauckas | Paris 2025, I’d like to use the dynamic optimization interface. While InfiniteOpt is made to work with “infinite parameters”, c…

---

## [HiGHS (via JuMP) decides MIP solution to be infeasible](https://discourse.julialang.org/t/highs-via-jump-decides-mip-solution-to-be-infeasible/135421)

<div class="topic-metadata">

**Author:** [@asprionj](https://discourse.julialang.org/u/asprionj)\
**Replies:** 13\
**Last updated:** [February 6, 2026, 9:41am UTC](https://discourse.julialang.org/t/highs-via-jump-decides-mip-solution-to-be-infeasible/135421 "2026-02-06T09:41:08Z")

</div>

As part of an optimisation-based control algorithm I solve a series of equally structured problems that only differ by the numerical values. For some “random” instances, I get output such as the following: MIP has 7 row…

---

## [Solving optimization problems involving orthogonal matrices](https://discourse.julialang.org/t/solving-optimization-problems-involving-orthogonal-matrices/135431)

<div class="topic-metadata">

**Author:** [@HMegh](https://discourse.julialang.org/u/HMegh)\
**Replies:** 4\
**Last updated:** [February 3, 2026, 7:13pm UTC](https://discourse.julialang.org/t/solving-optimization-problems-involving-orthogonal-matrices/135431 "2026-02-03T19:13:20Z")

</div>

I am working on an optimization problem on the set of orthogonal matrices O\_n=\\{A \\text{ is } n\\times n \\text{ and }AA^T=I\_n\\}. Basically, it is a minimization problem of the form \\min\_{(A,\\mathbf{x})\\in O\_n\\times \\mat…

---

## [Flexible linear constraints for MPC and codegen](https://discourse.julialang.org/t/flexible-linear-constraints-for-mpc-and-codegen/135285)

<div class="topic-metadata">

**Author:** [@franckgaga](https://discourse.julialang.org/u/franckgaga)\
**Replies:** 10\
**Last updated:** [January 29, 2026, 4:19pm UTC](https://discourse.julialang.org/t/flexible-linear-constraints-for-mpc-and-codegen/135285 "2026-01-29T16:19:39Z")

</div>

Following the subject \[ANN\] ModelPredictiveControl.jl with @langestefan and @darnstrom: The expressiveness of the linear MPC framework is already very limited and the current syntax limits it further. As long as my exp…

---

## [Sometimes no objective\_bound info from an LP solve, by Gurobi](https://discourse.julialang.org/t/sometimes-no-objective-bound-info-from-an-lp-solve-by-gurobi/135080)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 13\
**Last updated:** [January 29, 2026, 7:35am UTC](https://discourse.julialang.org/t/sometimes-no-objective-bound-info-from-an-lp-solve-by-gurobi/135080 "2026-01-29T07:35:35Z")

</div>

I solved an LP by Gurobi using Non-default parameters: Method 6 Crossover 0 PDHGGPU 1 And here’s the result julia\> model A JuMP Model ├ mode: DIRECT ├ solver: Gurobi ├ objective\_sense: MIN\_SENSE │ └ objective\_funct…

---

## [Debugging Container of Constraints in JuMP](https://discourse.julialang.org/t/debugging-container-of-constraints-in-jump/122509)

<div class="topic-metadata">

**Author:** [@lamont](https://discourse.julialang.org/u/lamont)\
**Replies:** 9\
**Last updated:** [January 28, 2026, 7:56am UTC](https://discourse.julialang.org/t/debugging-container-of-constraints-in-jump/122509 "2026-01-28T07:56:50Z")

</div>

I’m trying to debug a container of constraints built using the vectorized linear algebra syntax and trying to go in through the MOI interface to check the constraint value based on the start\_value of the variables. I’ve…

---

## [How to create a standalone \`JuMP.Containers.SparseAxisArray{Float64, n, Tuple{Int, ...}}\`?](https://discourse.julialang.org/t/how-to-create-a-standalone-jump-containers-sparseaxisarray-float64-n-tuple-int/135253)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 2\
**Last updated:** [January 26, 2026, 12:02am UTC](https://discourse.julialang.org/t/how-to-create-a-standalone-jump-containers-sparseaxisarray-float64-n-tuple-int/135253 "2026-01-26T00:02:02Z")

</div>

I’m interested in the X per se, as a container of a set of Float64 numbers (not depending on some JuMP variable x built beforehand). julia\> import JuMP, Gurobi julia\> model = JuMP.direct\_model(Gurobi.Optimizer()); jul…

---

## [ANN: JuMP-dev 2026](https://discourse.julialang.org/t/ann-jump-dev-2026/133524)

<div class="topic-metadata">

**Author:** [@odow](https://discourse.julialang.org/u/odow)\
**Replies:** 2\
**Last updated:** [January 19, 2026, 2:42am UTC](https://discourse.julialang.org/t/ann-jump-dev-2026/133524 "2026-01-19T02:42:03Z")

</div>

Dear all, We are pleased to announce that JuMP-dev 2026 will take place in Edinburgh, Scotland on May 31 and June 1st (just before SIAM OP26). More details here: JuMP-dev 2026 | JuMP Cheers, Oscar

---

## [To what extent can JuMP's macro identify input expression and generate optimized backend codes?](https://discourse.julialang.org/t/to-what-extent-can-jumps-macro-identify-input-expression-and-generate-optimized-backend-codes/134983)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 12\
**Last updated:** [January 13, 2026, 6:24am UTC](https://discourse.julialang.org/t/to-what-extent-can-jumps-macro-identify-input-expression-and-generate-optimized-backend-codes/134983 "2026-01-13T06:24:05Z")

</div>

JuMP’s macros are like magic black boxes to me. I’ve learned that one should generally make use of @variable, @constraints and @objective when constructing a model from scratch. But I have some small but nontrivial quest…

---

## [Specifying objective coefficient when creating a JuMP variable](https://discourse.julialang.org/t/specifying-objective-coefficient-when-creating-a-jump-variable/134923)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 5\
**Last updated:** [January 12, 2026, 3:36am UTC](https://discourse.julialang.org/t/specifying-objective-coefficient-when-creating-a-jump-variable/134923 "2026-01-12T03:36:47Z")

</div>

What about adding a kwarg option obj in JuMP.@variable so that we can specify objective coefficients? just like the existing lower\_bound? julia\> import JuMP julia\> model = JuMP.Model(); julia\> JuMP.set\_objective\_sense…

---

## [HiGHS OTHER\_ERROR](https://discourse.julialang.org/t/highs-other-error/134521)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 16\
**Last updated:** [January 8, 2026, 9:49pm UTC](https://discourse.julialang.org/t/highs-other-error/134521 "2026-01-08T21:49:17Z")

</div>

What does this mean? Is it infeasible, is it solved? Thx Running HiGHS 1.12.0 (git hash: 755a8e027a): Copyright (c) 2025 HiGHS under MIT licence terms LP has 4246 rows; 3330 cols; 15361 nonzeros Coefficient ranges: Ma…

---

## [Arbitrary/High-precision optimisation of NLP](https://discourse.julialang.org/t/arbitrary-high-precision-optimisation-of-nlp/133973)

<div class="topic-metadata">

**Author:** [@arnerob](https://discourse.julialang.org/u/arnerob)\
**Replies:** 13\
**Last updated:** [January 5, 2026, 4:59pm UTC](https://discourse.julialang.org/t/arbitrary-high-precision-optimisation-of-nlp/133973 "2026-01-05T16:59:15Z")

</div>

I have solved a non-linear program with JuMP and IPopt. I want to refine the solution, but am limited by the Float64 precision. Therefore, I tried MadNLP and ExaModels, as they say that they support AbstarctFloat, see h…

---

## [Creating efficient MOI wrapper for different cones and ordering them by types](https://discourse.julialang.org/t/creating-efficient-moi-wrapper-for-different-cones-and-ordering-them-by-types/130031)

<div class="topic-metadata">

**Author:** [@yuwenchen95](https://discourse.julialang.org/u/yuwenchen95)\
**Replies:** 4\
**Last updated:** [January 5, 2026, 4:19pm UTC](https://discourse.julialang.org/t/creating-efficient-moi-wrapper-for-different-cones-and-ordering-them-by-types/130031 "2026-01-05T16:19:12Z")

</div>

I’m considering to create a MOI wrapper for CuClarabel, where users can input different types of cones in arbitrary order while the MOI wrapper is able to order them in a predefined order and then pass it to CuClarabel. …

---

## [A tight formulation of a specific kind of convex PWL curve](https://discourse.julialang.org/t/a-tight-formulation-of-a-specific-kind-of-convex-pwl-curve/134822)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 3\
**Last updated:** [January 5, 2026, 3:56am UTC](https://discourse.julialang.org/t/a-tight-formulation-of-a-specific-kind-of-convex-pwl-curve/134822 "2026-01-05T03:56:25Z")

</div>

I’ve read some piecewise linear (PWL)-related stuff from JuMP’s doc. It appears that I haven’t seen the particular formulation below, which I think is worth mentioning. It’s from the generation cost curve of generators …

---

## [DifferentiationInterface not generating correct shadow](https://discourse.julialang.org/t/differentiationinterface-not-generating-correct-shadow/131868)

<div class="topic-metadata">

**Author:** [@alexl123](https://discourse.julialang.org/u/alexl123)\
**Replies:** 11\
**Last updated:** [January 4, 2026, 9:01am UTC](https://discourse.julialang.org/t/differentiationinterface-not-generating-correct-shadow/131868 "2026-01-04T09:01:42Z")

</div>

Hello! I am trying to play with the Sophia optimization algorthim. I am storing my parameters as a ComponentArray since some parameters are scalar and others are vectors. When I use a first order method (Adam) I have no…

---

## [RFC: Reverse Communication (ask/tell) adapter for function-style optimizers in Julia?](https://discourse.julialang.org/t/rfc-reverse-communication-ask-tell-adapter-for-function-style-optimizers-in-julia/134803)

<div class="topic-metadata">

**Author:** [@karei](https://discourse.julialang.org/u/karei)\
**Replies:** 1\
**Last updated:** [December 30, 2025, 7:44pm UTC](https://discourse.julialang.org/t/rfc-reverse-communication-ask-tell-adapter-for-function-style-optimizers-in-julia/134803 "2025-12-30T19:44:02Z")

</div>

Hi all, I’d like to start a discussion on a generic Reverse Communication Interface (RCI), i.e. an ask/tell-style session API, for Julia’s optimization ecosystem. The idea is to sit on top of existing “function-style” o…

---

## [Problem with concurrent calls to HiGHS solver (via JuMP) on Windows](https://discourse.julialang.org/t/problem-with-concurrent-calls-to-highs-solver-via-jump-on-windows/134631)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 2\
**Last updated:** [December 18, 2025, 9:16pm UTC](https://discourse.julialang.org/t/problem-with-concurrent-calls-to-highs-solver-via-jump-on-windows/134631 "2025-12-18T21:16:43Z")

</div>

Hi, I wanted to report some crashes observed when solving concurrently (multi-thread) different LP problems via JuMP with HiGHS solver: EXCEPTION\_ACCESS\_VIOLATION dans HighsTaskExecutor… No crashes observed on Linu…

---

## [Sparse variables in JuMP](https://discourse.julialang.org/t/sparse-variables-in-jump/134630)

<div class="topic-metadata">

**Author:** [@Marc\_Sevaux](https://discourse.julialang.org/u/Marc_Sevaux)\
**Replies:** 2\
**Last updated:** [December 18, 2025, 7:56pm UTC](https://discourse.julialang.org/t/sparse-variables-in-jump/134630 "2025-12-18T19:56:19Z")

</div>

Hi all, I’m facing a nice large problem and I would like to reduce the model by creating only the needed variables. Is there anything close to: @variable(model, x\[u in 1:n, v in 1:n; if c\[u,v\] \> 0.0\], Bin) I get the …

---

## [Markovian SDDP: is a finite and concrete scenario tree necessary?](https://discourse.julialang.org/t/markovian-sddp-is-a-finite-and-concrete-scenario-tree-necessary/134317)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 12\
**Last updated:** [December 13, 2025, 3:27am UTC](https://discourse.julialang.org/t/markovian-sddp-is-a-finite-and-concrete-scenario-tree-necessary/134317 "2025-12-13T03:27:14Z")

</div>

(I kinda forget these knowledge) I asked chatGPT this question is it a prerequisite to restrict the number of uncertainty realizations in each stage to be finite, if I adopt a Markov-SDDP algorithm to tackle a multist…

---

## [Retrieve current solution when termination\_status is TIME\_LIMIT](https://discourse.julialang.org/t/retrieve-current-solution-when-termination-status-is-time-limit/134464)

<div class="topic-metadata">

**Author:** [@marilena](https://discourse.julialang.org/u/marilena)\
**Replies:** 7\
**Last updated:** [December 12, 2025, 10:02am UTC](https://discourse.julialang.org/t/retrieve-current-solution-when-termination-status-is-time-limit/134464 "2025-12-12T10:02:56Z")

</div>

Hello to the community! I am using Julia v1.9.3 , with packages JuMP v1.23.2 and Gurobi v1.3.1. I am solving an LP using Barrier, and I specify a time limit. gurobi\_env = Gurobi.Env() Solver = optimizer\_with\_attributes…

---

## [Is ParametricOptInterface needed to define and use parameters in JuMP?](https://discourse.julialang.org/t/is-parametricoptinterface-needed-to-define-and-use-parameters-in-jump/134498)

<div class="topic-metadata">

**Author:** [@zdenek\_hurak](https://discourse.julialang.org/u/zdenek_hurak)\
**Replies:** 4\
**Last updated:** [December 11, 2025, 11:12pm UTC](https://discourse.julialang.org/t/is-parametricoptinterface-needed-to-define-and-use-parameters-in-jump/134498 "2025-12-11T23:12:58Z")

</div>

I feel puzzled when it comes to the role of ParametricOptInterface.jl (POI). I think I understand its general mission (in fact the motivating tutorial example Rolling horizon problems · JuMP directed me to it). But it ap…

---

## [ANN: JuMP-dev 2025 videos](https://discourse.julialang.org/t/ann-jump-dev-2025-videos/134442)

<div class="topic-metadata">

**Author:** [@odow](https://discourse.julialang.org/u/odow)\
**Replies:** 0\
**Last updated:** [December 8, 2025, 7:50pm UTC](https://discourse.julialang.org/t/ann-jump-dev-2025-videos/134442 "2025-12-08T19:50:52Z")

</div>

Dear all, The JuMP-dev 2025 videos are now on YouTube. Check them out here: https://www.youtube.com/playlist?list=PLP8iPy9hna6RLvzHeEVCwkUkZV3aChElQ Cheers, Oscar

---

## [Is there an equivalent to Optim.jl's only\_fg! in Optimization.jl?](https://discourse.julialang.org/t/is-there-an-equivalent-to-optim-jls-only-fg-in-optimization-jl/134320)

<div class="topic-metadata">

**Author:** [@anthony-meza](https://discourse.julialang.org/u/anthony-meza)\
**Replies:** 1\
**Last updated:** [December 8, 2025, 7:48pm UTC](https://discourse.julialang.org/t/is-there-an-equivalent-to-optim-jls-only-fg-in-optimization-jl/134320 "2025-12-08T19:48:54Z")

</div>

Optim.jl implements an only\_fg! function that allows calculations made in the objective function, f, to be passed to the gradient, g. By constructing an fg! function, you can avoid redundant calculations that are require…

---

## [StackOverflowError when using PRIMA.jl on Ubuntu (works fine on macOS and Windows)](https://discourse.julialang.org/t/stackoverflowerror-when-using-prima-jl-on-ubuntu-works-fine-on-macos-and-windows/131012)

<div class="topic-metadata">

**Author:** [@pclins](https://discourse.julialang.org/u/pclins)\
**Replies:** 5\
**Last updated:** [December 7, 2025, 3:29pm UTC](https://discourse.julialang.org/t/stackoverflowerror-when-using-prima-jl-on-ubuntu-works-fine-on-macos-and-windows/131012 "2025-12-07T15:29:12Z")

</div>

Hi everyone, I’m running into a strange StackOverflowError when using Julia on Ubuntu. The same code runs without any issues on macOS and Windows. I’m using PRIMA.jl (via OptimizationPRIMA.jl) to optimize a function. M…

---

## [Policy Graph in SDDP.jl package](https://discourse.julialang.org/t/policy-graph-in-sddp-jl-package/100062)

<div class="topic-metadata">

**Author:** [@Sorooshsa](https://discourse.julialang.org/u/Sorooshsa)\
**Replies:** 3\
**Last updated:** [December 3, 2025, 4:59am UTC](https://discourse.julialang.org/t/policy-graph-in-sddp-jl-package/100062 "2025-12-03T04:59:08Z")

</div>

Hi, I know that there are a few options for making the graph of our problem while we use SDDP.jl e.g. linear policy graph, Markov policy graph. I have two questions: What is the difference between the Linear and Mark…

---

## [Modeling min() in JuMP at scale: SOS1 stops converging, Big-M is numerically unstable](https://discourse.julialang.org/t/modeling-min-in-jump-at-scale-sos1-stops-converging-big-m-is-numerically-unstable/134251)

<div class="topic-metadata">

**Author:** [@Bhanuprakash\_Bahoju](https://discourse.julialang.org/u/Bhanuprakash_Bahoju)\
**Replies:** 11\
**Last updated:** [December 2, 2025, 11:13am UTC](https://discourse.julialang.org/t/modeling-min-in-jump-at-scale-sos1-stops-converging-big-m-is-numerically-unstable/134251 "2025-12-02T11:13:52Z")

</div>

I’m implementing a formula engine in JuMP where users can define expressions like: z = min(x, y) and I translate these automatically into JuMP constraints. I have tried two formulations: 1. SOS1 formulation function…

---

## [Adaptive barrier method for constrained optimization](https://discourse.julialang.org/t/adaptive-barrier-method-for-constrained-optimization/134150)

<div class="topic-metadata">

**Author:** [@slwu89](https://discourse.julialang.org/u/slwu89)\
**Replies:** 6\
**Last updated:** [December 1, 2025, 8:57am UTC](https://discourse.julialang.org/t/adaptive-barrier-method-for-constrained-optimization/134150 "2025-12-01T08:57:32Z")

</div>

Hi all, I’m refactoring some old R code into Julia. In R I was using constrOptim: Linearly Constrained Optimization which lets us use constraints like U \\theta - c \\geq 0, where \\theta is our parameters to be optimized, U…

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

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