# Optimization (Mathematical)

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

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

**Page:** 12

---

## [How to add volt/var curve to PowerModels.jl](https://discourse.julialang.org/t/how-to-add-volt-var-curve-to-powermodels-jl/127611)

<div class="topic-metadata">

**Author:** [@Glon](https://discourse.julialang.org/u/Glon)\
**Replies:** 1\
**Last updated:** [April 2, 2025, 7:40pm UTC](https://discourse.julialang.org/t/how-to-add-volt-var-curve-to-powermodels-jl/127611 "2025-04-02T19:40:06Z")

</div>

Hello, How can I add the volt/var curve as a non-linear expression to powermodels.jl?

---

## [Error with Ipopt.jl and ipopt.out file](https://discourse.julialang.org/t/error-with-ipopt-jl-and-ipopt-out-file/127596)

<div class="topic-metadata">

**Author:** [@nico](https://discourse.julialang.org/u/nico)\
**Replies:** 3\
**Last updated:** [April 2, 2025, 7:16pm UTC](https://discourse.julialang.org/t/error-with-ipopt-jl-and-ipopt-out-file/127596 "2025-04-02T19:16:29Z")

</div>

Hi, I have a simple test code, that used to work and now gives an error. When I run the code the first time, Ipopt manages to solve the toy problem and print the output to a .txt file. The second time I run the code, …

---

## [Performance drop from HiGHS 1.14.0 to HiGHS 1.15.0](https://discourse.julialang.org/t/performance-drop-from-highs-1-14-0-to-highs-1-15-0/127522)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 9\
**Last updated:** [April 1, 2025, 10:39pm UTC](https://discourse.julialang.org/t/performance-drop-from-highs-1-14-0-to-highs-1-15-0/127522 "2025-04-01T22:39:21Z")

</div>

Hi, I am trying to reduce allocations using JuMP and HiGHS for solving numerous small LPs and I just noticed that these allocations have increased dramatically (x2) by updating HiGHS 1.14 to 1.15.0: 1.14 \[ Info: Launc…

---

## [Why \_removing\_ unused variables makes ipopt taking longer?](https://discourse.julialang.org/t/why-removing-unused-variables-makes-ipopt-taking-longer/127541)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [March 31, 2025, 8:22pm UTC](https://discourse.julialang.org/t/why-removing-unused-variables-makes-ipopt-taking-longer/127541 "2025-03-31T20:22:08Z")

</div>

I have a model that was originally global and making it multi-regional, I transformed all my variables adding a regional dimension, created the equivalent “global” version for each of them defined mostly as the sum, test…

---

## [Add an "optimize\_assert\_optimal" functionality in JuMP would be handier?](https://discourse.julialang.org/t/add-an-optimize-assert-optimal-functionality-in-jump-would-be-handier/124458)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 5\
**Last updated:** [March 31, 2025, 2:33am UTC](https://discourse.julialang.org/t/add-an-optimize-assert-optimal-functionality-in-jump-would-be-handier/124458 "2025-03-31T02:33:56Z")

</div>

Compared with the current “is\_solved\_and\_feasible” functionality, I think the one suggested in the title would be more convenient sometimes. In practice ((Mi)LP context particularly), we almostly certainly want our mode…

---

## [ANN: seeking feedback on experimental support for vector-valued user-defined functions](https://discourse.julialang.org/t/ann-seeking-feedback-on-experimental-support-for-vector-valued-user-defined-functions/127523)

<div class="topic-metadata">

**Author:** [@odow](https://discourse.julialang.org/u/odow)\
**Replies:** 0\
**Last updated:** [March 30, 2025, 8:12pm UTC](https://discourse.julialang.org/t/ann-seeking-feedback-on-experimental-support-for-vector-valued-user-defined-functions/127523 "2025-03-30T20:12:10Z")

</div>

Dear all, a fairly common feature request is for vector-valued user defined functions. Ipopt.jl v1.8.0 adds experimental support for Ipopt.\_VectorNonlinearOracle. Please see this issue for example usage and future plans…

---

## [Can I query is\_continuous about a JuMP model?](https://discourse.julialang.org/t/can-i-query-is-continuous-about-a-jump-model/127484)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 6\
**Last updated:** [March 30, 2025, 7:16pm UTC](https://discourse.julialang.org/t/can-i-query-is-continuous-about-a-jump-model/127484 "2025-03-30T19:16:50Z")

</div>

We can learn from the print(model) (🍅) that if a model has a variable which is not purely continuous (e.g. Integer/binary/semi~). julia\> model A JuMP Model ├ solver: Gurobi ├ objective\_sense: FEASIBILITY\_SENSE ├ num\_var…

---

## [Gurobi LP solver's cut-off behavior---an example](https://discourse.julialang.org/t/gurobi-lp-solvers-cut-off-behavior-an-example/127454)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 6\
**Last updated:** [March 28, 2025, 11:05pm UTC](https://discourse.julialang.org/t/gurobi-lp-solvers-cut-off-behavior-an-example/127454 "2025-03-28T23:05:03Z")

</div>

I find an interesting example about Gurobi’s LP solver. There are 2 linear constraints in my LP, named fixed and cut. The outcomes for the following 2 schemes are different: Add Both constraints, and solve only once A…

---

## [Blog post on the “IJKLM model” with AlgebraicJulia tools](https://discourse.julialang.org/t/blog-post-on-the-ijklm-model-with-algebraicjulia-tools/121562)

<div class="topic-metadata">

**Author:** [@slwu89](https://discourse.julialang.org/u/slwu89)\
**Replies:** 1\
**Last updated:** [March 27, 2025, 2:52pm UTC](https://discourse.julialang.org/t/blog-post-on-the-ijklm-model-with-algebraicjulia-tools/121562 "2025-03-27T14:52:10Z")

</div>

Hi all, I recently wrote a blog post at the AlgebraicJulia blog: JuMP-ing with AlgebraicJulia I: The IJKLM model – AlgebraicJulia blog, which explores how to use some of the tools in the AlgebraicJulia ecosystem to addr…

---

## [Efficient optimization of objective with cos and sin terms](https://discourse.julialang.org/t/efficient-optimization-of-objective-with-cos-and-sin-terms/126990)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 25\
**Last updated:** [March 27, 2025, 1:12am UTC](https://discourse.julialang.org/t/efficient-optimization-of-objective-with-cos-and-sin-terms/126990 "2025-03-27T01:12:03Z")

</div>

Given the following objective: J(t) = ||z\_1 \\cos(t) + z\_2 \\sin(t) - d||\_2^2 with t \\in \[0,2\\pi\] and z\_1,z\_2,d \\in \\mathbb{R}^n. How would you minimize this objective efficiently? I am trying to derive an analytical so…

---

## [Approaching a Linear Program Correctly](https://discourse.julialang.org/t/approaching-a-linear-program-correctly/127354)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 15\
**Last updated:** [March 27, 2025, 12:37am UTC](https://discourse.julialang.org/t/approaching-a-linear-program-correctly/127354 "2025-03-27T00:37:32Z")

</div>

Let’s see the Proposition 5.2.1 of the 2009 Bertsekas’s convex optimization theory: (Linear Programming Duality Theorem) (a) If any one of the 2 programs (primal and dual) has a finite optimal objective value, then th…

---

## [Getting JuMP model variables and containers in order of creation](https://discourse.julialang.org/t/getting-jump-model-variables-and-containers-in-order-of-creation/127245)

<div class="topic-metadata">

**Author:** [@brunompacheco](https://discourse.julialang.org/u/brunompacheco)\
**Replies:** 9\
**Last updated:** [March 26, 2025, 10:20pm UTC](https://discourse.julialang.org/t/getting-jump-model-variables-and-containers-in-order-of-creation/127245 "2025-03-26T22:20:28Z")

</div>

Hi! I want to get all variables in my model organized in containers, whenever possible. I am currently using object\_dictionary for that, which seems quite satisfactory, but the order does not follow the creation order, …

---

## [User defined operator in JuMP when one of the arguments is data](https://discourse.julialang.org/t/user-defined-operator-in-jump-when-one-of-the-arguments-is-data/127200)

<div class="topic-metadata">

**Author:** [@miguelborrero](https://discourse.julialang.org/u/miguelborrero)\
**Replies:** 5\
**Last updated:** [March 26, 2025, 9:50pm UTC](https://discourse.julialang.org/t/user-defined-operator-in-jump-when-one-of-the-arguments-is-data/127200 "2025-03-26T21:50:04Z")

</div>

Hi there, I need to solve for a MLE problem where the likelihood function I defined reads in an Array{Obs{Float64}} where Obs{Float64} is an immutable struct containing a bunch of numbers. Since my problem involves a c…

---

## [How to install DSDP.jl](https://discourse.julialang.org/t/how-to-install-dsdp-jl/33033)

<div class="topic-metadata">

**Author:** [@tdp](https://discourse.julialang.org/u/tdp)\
**Replies:** 3\
**Last updated:** [March 26, 2025, 1:30pm UTC](https://discourse.julialang.org/t/how-to-install-dsdp-jl/33033 "2025-03-26T13:30:47Z")

</div>

Hi, When trying to install DSDP.jl using the command below, I get the error below about incompatible versions for MathOptInterface. How would I resolve this? I have version 0.99 of MathOptInterface and version 1.3.0 of…

---

## [Question on programmatically defining a nonlinear expression involving product and sum](https://discourse.julialang.org/t/question-on-programmatically-defining-a-nonlinear-expression-involving-product-and-sum/127330)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 9\
**Last updated:** [March 25, 2025, 7:12pm UTC](https://discourse.julialang.org/t/question-on-programmatically-defining-a-nonlinear-expression-involving-product-and-sum/127330 "2025-03-25T19:12:58Z")

</div>

I have a n-dimensional vector m, a set of JuMP variables defined by \\{x\_{i,k\_{i}}\\}\_{i\\in\\{1,2,\\ldots,n\\},k\_{i}\\in\\{1,2,\\ldots,m\_{i}\\}}=\\{x\_{1,1},x\_{1,2},\\ldots,x\_{1,m\_{1}},x\_{2,1},x\_{2,2},\\ldots,x\_{2,m\_{2}},\\ldots,x\_{…

---

## [BilevelJuMP: Symmetric variables not supported?](https://discourse.julialang.org/t/bileveljump-symmetric-variables-not-supported/127346)

<div class="topic-metadata">

**Author:** [@HSt](https://discourse.julialang.org/u/HSt)\
**Replies:** 1\
**Last updated:** [March 25, 2025, 6:58pm UTC](https://discourse.julialang.org/t/bileveljump-symmetric-variables-not-supported/127346 "2025-03-25T18:58:47Z")

</div>

I’ve build functions to add specific variables and constraints one after another, to modularize model creation. Some of the variables should be symmetric, which is fine in regular JuMP when constrained on creation. How…

---

## [Minimum Spanning Tree Problem - Constrained by total edge sum](https://discourse.julialang.org/t/minimum-spanning-tree-problem-constrained-by-total-edge-sum/127351)

<div class="topic-metadata">

**Author:** [@mast-lfl](https://discourse.julialang.org/u/mast-lfl)\
**Replies:** 2\
**Last updated:** [March 25, 2025, 3:32pm UTC](https://discourse.julialang.org/t/minimum-spanning-tree-problem-constrained-by-total-edge-sum/127351 "2025-03-25T15:32:21Z")

</div>

Assume that I have an undirected graph. Several of the vertices in the graph serve as waste disposal sites, while the other vertices produce the waste. Producing vertices have a weight (corresponding to the amount of was…

---

## [A naive explanation of infeasibility and unboundedness](https://discourse.julialang.org/t/a-naive-explanation-of-infeasibility-and-unboundedness/127343)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 1\
**Last updated:** [March 25, 2025, 12:37pm UTC](https://discourse.julialang.org/t/a-naive-explanation-of-infeasibility-and-unboundedness/127343 "2025-03-25T12:37:48Z")

</div>

I demo the process “From unboundedness to an infeasibility system” Say, let’s employ y \\in \\mathbb{R} as our decision variable. We know +\\infty = \\sup \\{y | y \\ge 0\\} Given any y \\ge 0, we know 0 = \\inf \\{yx |x \\g…

---

## [Solving large scale NLP problem on HPC cluster](https://discourse.julialang.org/t/solving-large-scale-nlp-problem-on-hpc-cluster/127134)

<div class="topic-metadata">

**Author:** [@J-Holger](https://discourse.julialang.org/u/J-Holger)\
**Replies:** 5\
**Last updated:** [March 25, 2025, 8:50am UTC](https://discourse.julialang.org/t/solving-large-scale-nlp-problem-on-hpc-cluster/127134 "2025-03-25T08:50:42Z")

</div>

Hello, I’m trying to solve a maximization problem for maximizing profit in river hydroelectricity power production. The problem is non-linear and non-convex. I’m using the solution from a simplified, linear and convex, …

---

## [Update optimization model by changing variables to coefficients](https://discourse.julialang.org/t/update-optimization-model-by-changing-variables-to-coefficients/124642)

<div class="topic-metadata">

**Author:** [@max](https://discourse.julialang.org/u/max)\
**Replies:** 11\
**Last updated:** [March 24, 2025, 4:52am UTC](https://discourse.julialang.org/t/update-optimization-model-by-changing-variables-to-coefficients/124642 "2025-03-24T04:52:45Z")

</div>

Hi there, :slight\_smile: I am trying to extract shadow prices out of a MIQP model. In order to do this I want to “fix” the mixed integer variables after a first solving and then extract the duals. Here’s a minimal work…

---

## [Nested Benders with MIP/LP solvers](https://discourse.julialang.org/t/nested-benders-with-mip-lp-solvers/126831)

<div class="topic-metadata">

**Author:** [@PffTahsan](https://discourse.julialang.org/u/PffTahsan)\
**Replies:** 11\
**Last updated:** [March 23, 2025, 2:13pm UTC](https://discourse.julialang.org/t/nested-benders-with-mip-lp-solvers/126831 "2025-03-23T14:13:03Z")

</div>

I want to solve a nested optimization problem using Benders decomposition, where the first stage relies on the second stage, and the second stage relies on the third stage. The challenge is that the second stage is updat…

---

## [Ipopt's "local" optimum can be very substandard](https://discourse.julialang.org/t/ipopts-local-optimum-can-be-very-substandard/127217)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 8\
**Last updated:** [March 23, 2025, 12:15am UTC](https://discourse.julialang.org/t/ipopts-local-optimum-can-be-very-substandard/127217 "2025-03-23T00:15:15Z")

</div>

Continuing the discussion from The solution deteriorates if the domain of decisions is improperly set when using Ipopt: The title is expounded with 3 examples, where the result of the first one is completely unaccepta…

---

## [Enzyme computing the Hessian(?)](https://discourse.julialang.org/t/enzyme-computing-the-hessian/127197)

<div class="topic-metadata">

**Author:** [@miguelborrero](https://discourse.julialang.org/u/miguelborrero)\
**Replies:** 6\
**Last updated:** [March 22, 2025, 7:26am UTC](https://discourse.julialang.org/t/enzyme-computing-the-hessian/127197 "2025-03-22T07:26:07Z")

</div>

Hi there! It seems like the (fantastic!) package Enzyme supports the computation of the Hessian times a vector but not the Hessian itself. Is this just a matter of time? or is the Hessian too expensive as to implement i…

---

## [Is it possible to use HiGHS multi-objective optimization from JuMP?](https://discourse.julialang.org/t/is-it-possible-to-use-highs-multi-objective-optimization-from-jump/126913)

<div class="topic-metadata">

**Author:** [@qwedsad](https://discourse.julialang.org/u/qwedsad)\
**Replies:** 5\
**Last updated:** [March 21, 2025, 11:10am UTC](https://discourse.julialang.org/t/is-it-possible-to-use-highs-multi-objective-optimization-from-jump/126913 "2025-03-21T11:10:46Z")

</div>

HiGHS v1.9. supports multiple objectives by either blending using weights, or performing lexicographic optimization. I couldn’t find how to implement it using JuMP. Is it yet possible or not?

---

## [How to use Mosek 11 beta in JuMP](https://discourse.julialang.org/t/how-to-use-mosek-11-beta-in-jump/123821)

<div class="topic-metadata">

**Author:** [@CaG21](https://discourse.julialang.org/u/CaG21)\
**Replies:** 4\
**Last updated:** [March 21, 2025, 7:55am UTC](https://discourse.julialang.org/t/how-to-use-mosek-11-beta-in-jump/123821 "2025-03-21T07:55:35Z")

</div>

I’d like to use Mosek 11 beta in JuMP.jl. In order to do so, I have installed Mosek 11.0.1 binaries from the website, and created the environment variable MOSEKBINDIR to point to the bin directory of Mosek 11. Then, I tr…

---

## [Timeseries power model without forecast - ACOPF](https://discourse.julialang.org/t/timeseries-power-model-without-forecast-acopf/126846)

<div class="topic-metadata">

**Author:** [@PB-vines](https://discourse.julialang.org/u/PB-vines)\
**Replies:** 5\
**Last updated:** [March 21, 2025, 6:03am UTC](https://discourse.julialang.org/t/timeseries-power-model-without-forecast-acopf/126846 "2025-03-21T06:03:31Z")

</div>

Hello, I have a model in PowerSystems.jl that looks like this: I just want to run an acopf and dcopf with the data I have imported - I do not want to do any forecasting. However, I cannot get past the DecisionModel(…

---

## ["Error building 'Mosek' " in Windows 10](https://discourse.julialang.org/t/error-building-mosek-in-windows-10/98469)

<div class="topic-metadata">

**Author:** [@zakos22](https://discourse.julialang.org/u/zakos22)\
**Replies:** 4\
**Last updated:** [March 20, 2025, 11:14pm UTC](https://discourse.julialang.org/t/error-building-mosek-in-windows-10/98469 "2025-03-20T23:14:06Z")

</div>

Dear All, I would deeply appreciate some help in troubleshooting why my MOSEK package installation attempts are failing. I am using Julia 1.8.5, VSCode and Windows 10 and I am trying to install Mosek.jl . While runnin…

---

## [JuMP re-solving Model after equivalently reformulating objective gives different results](https://discourse.julialang.org/t/jump-re-solving-model-after-equivalently-reformulating-objective-gives-different-results/125210)

<div class="topic-metadata">

**Author:** [@phK3](https://discourse.julialang.org/u/phK3)\
**Replies:** 2\
**Last updated:** [March 20, 2025, 11:11pm UTC](https://discourse.julialang.org/t/jump-re-solving-model-after-equivalently-reformulating-objective-gives-different-results/125210 "2025-03-20T23:11:38Z")

</div>

Disclaimer: This is a repost/extension of this github issue. The “output variables” of my problem are the entries in some specific place of a SDP matrix (P\[1,4:5\]) in the code below). When I directly optimize an object…

---

## [Feasibility cut from HiGHS and Mosek are different (Benders decomposition)](https://discourse.julialang.org/t/feasibility-cut-from-highs-and-mosek-are-different-benders-decomposition/125630)

<div class="topic-metadata">

**Author:** [@saikrishna-nadella](https://discourse.julialang.org/u/saikrishna-nadella)\
**Replies:** 7\
**Last updated:** [March 20, 2025, 11:08pm UTC](https://discourse.julialang.org/t/feasibility-cut-from-highs-and-mosek-are-different-benders-decomposition/125630 "2025-03-20T23:08:35Z")

</div>

Hi, I am implementing bender’s decomposition using JuMP in Julia. I am investigating generation of feasibility cuts using “dual\_objective\_value” and “reduced\_cost” of fixing constraint as detailed in JuMP documentation. …

---

## [Setting maximum number of function calls in GA Metaheuristics](https://discourse.julialang.org/t/setting-maximum-number-of-function-calls-in-ga-metaheuristics/127166)

<div class="topic-metadata">

**Author:** [@JM\_Beckers](https://discourse.julialang.org/u/JM_Beckers)\
**Replies:** 2\
**Last updated:** [March 20, 2025, 10:37pm UTC](https://discourse.julialang.org/t/setting-maximum-number-of-function-calls-in-ga-metaheuristics/127166 "2025-03-20T22:37:23Z")

</div>

Probably a stupid question, but I cannot manage to pass the maximum number of function calls f\_calls\_limit to the optimizer since the following does not seem to have any effect using Metaheuristics function gogo() c…

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

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