# Optimization (Mathematical)

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

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

**Page:** 5

---

## [Coloring in JuMP with start values](https://discourse.julialang.org/t/coloring-in-jump-with-start-values/133106)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 7\
**Last updated:** [October 14, 2025, 12:47am UTC](https://discourse.julialang.org/t/coloring-in-jump-with-start-values/133106 "2025-10-14T00:47:59Z")

</div>

Hi there, I am tinkering with an optimal coloring algorithm for sparse autodiff. Here is the most basic constraint programming formulation I could find for partial distance-2 column coloring. Problem statement: color a…

---

## [Minimizing losses in OPF](https://discourse.julialang.org/t/minimizing-losses-in-opf/81097)

<div class="topic-metadata">

**Author:** [@gaadis](https://discourse.julialang.org/u/gaadis)\
**Replies:** 4\
**Last updated:** [October 13, 2025, 6:11am UTC](https://discourse.julialang.org/t/minimizing-losses-in-opf/81097 "2025-10-13T06:11:50Z")

</div>

I have been working on a distribution system where I was minimizing the fuel cost in the objective function using \_PMD.solve\_mc\_opf. However, I currently switched my data to solar generated data using PV panels. This dat…

---

## [JuMP : how to read a lp problem from file (lp FORMAT) with variables names?](https://discourse.julialang.org/t/jump-how-to-read-a-lp-problem-from-file-lp-format-with-variables-names/133008)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 2\
**Last updated:** [October 9, 2025, 7:17pm UTC](https://discourse.julialang.org/t/jump-how-to-read-a-lp-problem-from-file-lp-format-with-variables-names/133008 "2025-10-09T19:17:49Z")

</div>

Hi, I read a linear problem: my\_model = JuMP.read\_from\_file("toto.lp") but it seems that the variable names used in the file are lost and I wonder how to display the solution: A JuMP Model ├ solver: none ├ objective\_…

---

## [CPLEX ignores a Initial feasible solution](https://discourse.julialang.org/t/cplex-ignores-a-initial-feasible-solution/132898)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 3\
**Last updated:** [October 8, 2025, 2:47am UTC](https://discourse.julialang.org/t/cplex-ignores-a-initial-feasible-solution/132898 "2025-10-08T02:47:00Z")

</div>

Dear all, I am solving a MILP with CPLEX 22.1. I have multiple objectives, and I minimize z1 first. I save the binary variables (called y\[j,ℓ,t,τ\]). Let Y0 the matriz with all y’s produced in the first stage. I the sec…

---

## [Does the order of the constraint list matter?](https://discourse.julialang.org/t/does-the-order-of-the-constraint-list-matter/132955)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 1\
**Last updated:** [October 7, 2025, 9:30pm UTC](https://discourse.julialang.org/t/does-the-order-of-the-constraint-list-matter/132955 "2025-10-07T21:30:03Z")

</div>

I moved a group of constraints within a list to a different position for “aesthetic” reasons. Instead, I noticed, with surprise, that the resulting solution differed in the values ​​of the x\[ …\] matrix of the variables. …

---

## [Parameterization of a set of constraints](https://discourse.julialang.org/t/parameterization-of-a-set-of-constraints/132885)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 8\
**Last updated:** [October 5, 2025, 9:21pm UTC](https://discourse.julialang.org/t/parameterization-of-a-set-of-constraints/132885 "2025-10-05T21:21:42Z")

</div>

I would like, if possible, to parameterize the following set of constraints. I would like to replace the fixed values ​​4 in 4:ng; 3 in g-3:g; and 1 in … \<=1 with parameters external to the function that define the mo…

---

## [Non-convergent "weighted" objective function](https://discourse.julialang.org/t/non-convergent-weighted-objective-function/132785)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 16\
**Last updated:** [October 1, 2025, 7:17am UTC](https://discourse.julialang.org/t/non-convergent-weighted-objective-function/132785 "2025-10-01T07:17:44Z")

</div>

I need to find a way to allocate a pool of resources to perform a series of daily services over the course of a month. There are obviously a long series of general (for all resources) and specific (for individual resour…

---

## [Problem about solution of Gurobi in Julia in JUMP](https://discourse.julialang.org/t/problem-about-solution-of-gurobi-in-julia-in-jump/130926)

<div class="topic-metadata">

**Author:** [@Z\_M](https://discourse.julialang.org/u/Z_M)\
**Replies:** 5\
**Last updated:** [September 29, 2025, 7:52pm UTC](https://discourse.julialang.org/t/problem-about-solution-of-gurobi-in-julia-in-jump/130926 "2025-09-29T19:52:18Z")

</div>

​Hi guys! I use Gurobi in Julia in JUMP. The model has linear constraints and second-order cone constraints. However, the “termination\_status” is：locally\_solved, sometimes is numerous error. Why and how to solve this p…

---

## [How to model an implication](https://discourse.julialang.org/t/how-to-model-an-implication/132617)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 24\
**Last updated:** [September 28, 2025, 9:17pm UTC](https://discourse.julialang.org/t/how-to-model-an-implication/132617 "2025-09-28T21:17:31Z")

</div>

Suppose we have a two-dimensional binary variable x. Let, for example, be two-dimensional with n x m rows and columns. a) How can I express, in linear terms, a constraint of the following type? # sum(x\[1,:\])== 5 =\> su…

---

## [Is there a functional substitute for JuMP.@variable?](https://discourse.julialang.org/t/is-there-a-functional-substitute-for-jump-variable/132669)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 7\
**Last updated:** [September 27, 2025, 1:17am UTC](https://discourse.julialang.org/t/is-there-a-functional-substitute-for-jump-variable/132669 "2025-09-27T01:17:52Z")

</div>

I think there is a basic criterion: macros should yield to functions whenever possible I know it is necessary to have macros build expressions, e.g. JuMP.@expression(m, sum(c\[i\]x\[i\] for i = 1:I)) since the last arg …

---

## [MadIPM: A GPU-accelerated interior-point solver for large-scale LPs](https://discourse.julialang.org/t/madipm-a-gpu-accelerated-interior-point-solver-for-large-scale-lps/132630)

<div class="topic-metadata">

**Author:** [@amontoison](https://discourse.julialang.org/u/amontoison)\
**Replies:** 4\
**Last updated:** [September 25, 2025, 9:45am UTC](https://discourse.julialang.org/t/madipm-a-gpu-accelerated-interior-point-solver-for-large-scale-lps/132630 "2025-09-25T09:45:51Z")

</div>

We have released MadIPM, a GPU-accelerated interior-point solver for large-scale linear programming. :tada: This work is done in collaboration with @sshin23 and @frapac. MadIPM is built on top of MadNLP. It implements …

---

## [StackOverflowError, MutableArithmetics jump variables](https://discourse.julialang.org/t/stackoverflowerror-mutablearithmetics-jump-variables/132629)

<div class="topic-metadata">

**Author:** [@Ceserik](https://discourse.julialang.org/u/Ceserik)\
**Replies:** 5\
**Last updated:** [September 25, 2025, 7:40am UTC](https://discourse.julialang.org/t/stackoverflowerror-mutablearithmetics-jump-variables/132629 "2025-09-25T07:40:10Z")

</div>

Hello, I am making a tool to find fastest possible lap time for racing car, I am trying to use same function for initial value problem solving and also for optimisation in julia. The function describes behavior of a car.…

---

## [Solving Optimization of Least Squares Term with Quadratic Term with Memory Infeasible Matrix](https://discourse.julialang.org/t/solving-optimization-of-least-squares-term-with-quadratic-term-with-memory-infeasible-matrix/132599)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 2\
**Last updated:** [September 24, 2025, 2:41pm UTC](https://discourse.julialang.org/t/solving-optimization-of-least-squares-term-with-quadratic-term-with-memory-infeasible-matrix/132599 "2025-09-24T14:41:15Z")

</div>

I want to solve: \\arg \\min\_{\\boldsymbol{x}} \\frac{\\lambda}{2} \\boldsymbol{x}^{T} \\boldsymbol{E}^{T} \\boldsymbol{K} \\boldsymbol{E} \\boldsymbol{x} + \\frac{\\rho}{2} {\\left\\| \\boldsymbol{A} \\boldsymbol{x} - \\boldsymbol{y} …

---

## [VRP in cuOpt](https://discourse.julialang.org/t/vrp-in-cuopt/132546)

<div class="topic-metadata">

**Author:** [@KSepetanc](https://discourse.julialang.org/u/KSepetanc)\
**Replies:** 3\
**Last updated:** [September 23, 2025, 9:53am UTC](https://discourse.julialang.org/t/vrp-in-cuopt/132546 "2025-09-23T09:53:51Z")

</div>

First I want to thank the Authors that they implemented cuOpt API in Julia. I also wish to encourage to bundle cuOpt\_jll so that installation is easier. I would like to solve VRP’s with cuOpt, but the documentation only…

---

## [MWE for directly calling libhighs (using HiGHS\_jll)](https://discourse.julialang.org/t/mwe-for-directly-calling-libhighs-using-highs-jll/132573)

<div class="topic-metadata">

**Author:** [@asprionj](https://discourse.julialang.org/u/asprionj)\
**Replies:** 4\
**Last updated:** [September 23, 2025, 9:51am UTC](https://discourse.julialang.org/t/mwe-for-directly-calling-libhighs-using-highs-jll/132573 "2025-09-23T09:51:59Z")

</div>

Hi everyone, I want to directly call into libhighs in HiGHS\_jll.jl, bypassing JuMP.jl and HiGHS.jl. First was to come up with a simple toy MILP-problem, to test if it basically works. The idea is to minimize 0.3x + 0.5y,…

---

## [Min max Ipopt opti : error in step computation](https://discourse.julialang.org/t/min-max-ipopt-opti-error-in-step-computation/132429)

<div class="topic-metadata">

**Author:** [@baroqueuse](https://discourse.julialang.org/u/baroqueuse)\
**Replies:** 6\
**Last updated:** [September 22, 2025, 12:40pm UTC](https://discourse.julialang.org/t/min-max-ipopt-opti-error-in-step-computation/132429 "2025-09-22T12:40:06Z")

</div>

Hello everybody. I want to solve a min max problem with Ipopt solver. I used the trick described in JuMP documentation (section tips and tricks). I managed to write my problem but the optimization do not work. I hade t…

---

## [Compact form of a set of constraints](https://discourse.julialang.org/t/compact-form-of-a-set-of-constraints/129220)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 9\
**Last updated:** [September 21, 2025, 9:31pm UTC](https://discourse.julialang.org/t/compact-form-of-a-set-of-constraints/129220 "2025-09-21T21:31:31Z")

</div>

I have the following script that works for the case N=4. using JuMP import HiGHS m = Model(HiGHS.Optimizer); @variable(m, x\[1:4,1:8\], Bin) @variable(m, y\[1:4,1:6\], Bin) @constraints(m, begin \[j in 1:8\], sum(x\[r,j\]…

---

## [Slow model construction and solving with parameters](https://discourse.julialang.org/t/slow-model-construction-and-solving-with-parameters/132470)

<div class="topic-metadata">

**Author:** [@chensunn](https://discourse.julialang.org/u/chensunn)\
**Replies:** 1\
**Last updated:** [September 17, 2025, 9:54pm UTC](https://discourse.julialang.org/t/slow-model-construction-and-solving-with-parameters/132470 "2025-09-17T21:54:05Z")

</div>

I am trying to solve a problem where I wish to parameterize certain constants in my model for use in DiffOpt.jl. I use the constants to recursively generate a signal that I use elsewhere in the model. Formulating this pr…

---

## [Gurobi reports UNKNOWN\_RESULT\_STATUS when Solution count = 10](https://discourse.julialang.org/t/gurobi-reports-unknown-result-status-when-solution-count-10/132311)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 3\
**Last updated:** [September 12, 2025, 6:26am UTC](https://discourse.julialang.org/t/gurobi-reports-unknown-result-status-when-solution-count-10/132311 "2025-09-12T06:26:38Z")

</div>

I cannot figure out why the JuMP.primal\_status(model) is UNKNOWN\_RESULT\_STATUS here julia\> model # a model that is solved before and modified A JuMP Model ├ solver: Gurobi ├ objective\_sense: MIN\_SENSE │ └ objective\_func…

---

## [Optimization on Stiefel manifold with auto-differentiation](https://discourse.julialang.org/t/optimization-on-stiefel-manifold-with-auto-differentiation/132072)

<div class="topic-metadata">

**Author:** [@Yue-Zhengyuan](https://discourse.julialang.org/u/Yue-Zhengyuan)\
**Replies:** 14\
**Last updated:** [September 8, 2025, 3:06pm UTC](https://discourse.julialang.org/t/optimization-on-stiefel-manifold-with-auto-differentiation/132072 "2025-09-08T15:06:12Z")

</div>

I want to minimize the energy E of some quantum state, which is a real-valued function ultimately depending on a square real orthogonal matrix X (i.e. matrices in the Stiefel manifold). The (Euclidean) gradients of the e…

---

## [Quickest way to build solution sensitivity information from Ipopt (sIpopt)](https://discourse.julialang.org/t/quickest-way-to-build-solution-sensitivity-information-from-ipopt-sipopt/132144)

<div class="topic-metadata">

**Author:** [@chensunn](https://discourse.julialang.org/u/chensunn)\
**Replies:** 1\
**Last updated:** [September 6, 2025, 7:31pm UTC](https://discourse.julialang.org/t/quickest-way-to-build-solution-sensitivity-information-from-ipopt-sipopt/132144 "2025-09-06T19:31:36Z")

</div>

I’m trying to use JuMP and Ipopt to get sensitivity information of the optimal solution to certain parameters. This is functionality that already exists in sIpopt (doi:10.1007/s12532-012-0043-2), but I don’t believe that…

---

## [Quadratic objective function in JuMP.jl and Xpress.jl](https://discourse.julialang.org/t/quadratic-objective-function-in-jump-jl-and-xpress-jl/132117)

<div class="topic-metadata">

**Author:** [@Diego](https://discourse.julialang.org/u/Diego)\
**Replies:** 1\
**Last updated:** [September 5, 2025, 10:19pm UTC](https://discourse.julialang.org/t/quadratic-objective-function-in-jump-jl-and-xpress-jl/132117 "2025-09-05T22:19:35Z")

</div>

Is there a way that the Xpress.jl wrapper would anytime accept quadratic objective functions (e.g. using “mmquad”)? OF := x \* y Thank you! See: Quadratic objective function · Issue #290 · jump-dev/Xpress.jl

---

## [Root finding for (possibly) complex valued functions with Nonlinearsolve.jl](https://discourse.julialang.org/t/root-finding-for-possibly-complex-valued-functions-with-nonlinearsolve-jl/97784)

<div class="topic-metadata">

**Author:** [@theplatters](https://discourse.julialang.org/u/theplatters)\
**Replies:** 5\
**Last updated:** [September 4, 2025, 3:49pm UTC](https://discourse.julialang.org/t/root-finding-for-possibly-complex-valued-functions-with-nonlinearsolve-jl/97784 "2025-09-04T15:49:08Z")

</div>

Hello. I need to translate some matlab code into Julia, where i need to find the roots in X of the function: function problem(X :: AbstractVector{T}, A, β, Ω, α, ε, θ, σ,L) where T N = length(α) p = @view X\[1:…

---

## [Sensitivity analysis in simulation phase of SDDP.jl](https://discourse.julialang.org/t/sensitivity-analysis-in-simulation-phase-of-sddp-jl/132085)

<div class="topic-metadata">

**Author:** [@Sorooshsa](https://discourse.julialang.org/u/Sorooshsa)\
**Replies:** 1\
**Last updated:** [September 4, 2025, 1:06am UTC](https://discourse.julialang.org/t/sensitivity-analysis-in-simulation-phase-of-sddp-jl/132085 "2025-09-04T01:06:46Z")

</div>

Hello, I trained a hydropower model using SDDP.jl with a given set of parameters. To check the robustness of the trained policy, I would now like to run simulations where one of the parameters is changed — for example, …

---

## [Optimization on unit sphere?](https://discourse.julialang.org/t/optimization-on-unit-sphere/130720)

<div class="topic-metadata">

**Author:** [@ForceBru](https://discourse.julialang.org/u/ForceBru)\
**Replies:** 12\
**Last updated:** [September 3, 2025, 6:01pm UTC](https://discourse.julialang.org/t/optimization-on-unit-sphere/130720 "2025-09-03T18:01:45Z")

</div>

Random question about Differential Evolution: do you happen to know if there’s a variant of DE that keeps all vectors of the population on the unit sphere or on the unit simplex? My optimization problem is of the form: …

---

## [Using CPLEX Piecewise Linear function](https://discourse.julialang.org/t/using-cplex-piecewise-linear-function/28403)

<div class="topic-metadata">

**Author:** [@Codzilla](https://discourse.julialang.org/u/Codzilla)\
**Replies:** 8\
**Last updated:** [September 1, 2025, 10:48am UTC](https://discourse.julialang.org/t/using-cplex-piecewise-linear-function/28403 "2025-09-01T10:48:51Z")

</div>

I’m trying to solve a MILP with an piecewise linear function in the cost function. At the moment, i’m using a binairy variable per linear piece wich is not the state of the art (see for example http://www.mit.edu/~jvielm…

---

## [Write .NL file containing JuMP model](https://discourse.julialang.org/t/write-nl-file-containing-jump-model/101113)

<div class="topic-metadata">

**Author:** [@Luca](https://discourse.julialang.org/u/Luca)\
**Replies:** 6\
**Last updated:** [September 1, 2025, 8:28am UTC](https://discourse.julialang.org/t/write-nl-file-containing-jump-model/101113 "2025-09-01T08:28:25Z")

</div>

Dear all, I would ask you if there exists an easy way to write the .nl file corresponding to a JuMP problem. I already checked the solution proposed in https://discourse.julialang.org/t/how-to-write-nl-file-containing-j…

---

## [Optimization Based Kalman Filters](https://discourse.julialang.org/t/optimization-based-kalman-filters/131937)

<div class="topic-metadata">

**Author:** [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Replies:** 6\
**Last updated:** [August 29, 2025, 12:19pm UTC](https://discourse.julialang.org/t/optimization-based-kalman-filters/131937 "2025-08-29T12:19:03Z")

</div>

I was wondering if we have any reference implementations or packages that implement (convex) optimization based kalman filters. Such as discussed in this paper by Boyd: Real-Time Convex Optimization in Signal Processing …

---

## [CPLEX Root node processing (before b&c) CPU Time extremely higher than JuMP Time Limit](https://discourse.julialang.org/t/cplex-root-node-processing-before-b-c-cpu-time-extremely-higher-than-jump-time-limit/109920)

<div class="topic-metadata">

**Author:** [@K5Julien](https://discourse.julialang.org/u/K5Julien)\
**Replies:** 2\
**Last updated:** [August 28, 2025, 3:57pm UTC](https://discourse.julialang.org/t/cplex-root-node-processing-before-b-c-cpu-time-extremely-higher-than-jump-time-limit/109920 "2025-08-28T15:57:00Z")

</div>

I have recently switched from Gurobi to CPLEX and am very surprised I found several instances where all ticks and CPU time is spent at Root node processing and more disconcerting the total time (before B&C and root node)…

---

## [State of DCP (Disciplined Convex Programming)](https://discourse.julialang.org/t/state-of-dcp-disciplined-convex-programming/131743)

<div class="topic-metadata">

**Author:** [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Replies:** 17\
**Last updated:** [August 27, 2025, 12:25pm UTC](https://discourse.julialang.org/t/state-of-dcp-disciplined-convex-programming/131743 "2025-08-27T12:25:23Z")

</div>

Lately I have been switching back between CVXPY and JuMP.jl a lot (mainly for work). One of the many nice features CVXPY has, is that it can automatically reformulate problems which are DCP-compliant through reductions.…

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

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