# Optimization (Mathematical)

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

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

**Page:** 70

---

## [Large - Scale Nonlinear Convex Optimization - Performance](https://discourse.julialang.org/t/large-scale-nonlinear-convex-optimization-performance/74676)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 8\
**Last updated:** [January 15, 2022, 9:50pm UTC](https://discourse.julialang.org/t/large-scale-nonlinear-convex-optimization-performance/74676 "2022-01-15T21:50:22Z")

</div>

Hi everybody, I am trying to solve a large-scale nonlinear problem that is convex and has linear inequality constraints. There are 550 unknowns and 25000 linear inequality constraints. I want to get your recommendations …

---

## [Performance of Linear Programming Problem](https://discourse.julialang.org/t/performance-of-linear-programming-problem/74569)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 1\
**Last updated:** [January 13, 2022, 8:03pm UTC](https://discourse.julialang.org/t/performance-of-linear-programming-problem/74569 "2022-01-13T20:03:10Z")

</div>

Hi everybody! I am trying to improve the performance of a conventional Linear Programming Problem which I am solving by calling Gurobi through JuMP. A MWE is the following using JuMP, Ipopt, Optim, LinearAlgebra, Random…

---

## [MathOptInterface and Symbolics.jl](https://discourse.julialang.org/t/mathoptinterface-and-symbolics-jl/74575)

<div class="topic-metadata">

**Author:** [@sidpatil](https://discourse.julialang.org/u/sidpatil)\
**Replies:** 1\
**Last updated:** [January 13, 2022, 7:53pm UTC](https://discourse.julialang.org/t/mathoptinterface-and-symbolics-jl/74575 "2022-01-13T19:53:20Z")

</div>

In the announcement for Symbolics.jl, JuMP is mentioned due to its independent implementation of symbolic variables and expressions. Is it feasible to refactor/rewrite MathOptInterface to use Symbolics.jl variables and …

---

## [PolyJuMP: constraints on an arbitrarily large multinomial](https://discourse.julialang.org/t/polyjump-constraints-on-an-arbitrarily-large-multinomial/74479)

<div class="topic-metadata">

**Author:** [@jnlindsay](https://discourse.julialang.org/u/jnlindsay)\
**Replies:** 0\
**Last updated:** [January 12, 2022, 11:49am UTC](https://discourse.julialang.org/t/polyjump-constraints-on-an-arbitrarily-large-multinomial/74479 "2022-01-12T11:49:04Z")

</div>

Hi everyone! In using DynamicPolynomials, SumOfSquares, and CSDP, I have set up my objective function and constraints like so: m = 2 @polyvar x\[1:m\] p = x\[1\]^2 + x\[2\]^2 S = @set x\[1\] \>= 0 && x\[1\] \<= 1 && …

---

## [\[Ipopt+HSL\] Error: no BLAS/LAPACK library loaded!](https://discourse.julialang.org/t/ipopt-hsl-error-no-blas-lapack-library-loaded/74409)

<div class="topic-metadata">

**Author:** [@SingingKim](https://discourse.julialang.org/u/SingingKim)\
**Replies:** 8\
**Last updated:** [January 12, 2022, 3:19am UTC](https://discourse.julialang.org/t/ipopt-hsl-error-no-blas-lapack-library-loaded/74409 "2022-01-12T03:19:19Z")

</div>

Happy New Year! I’m having an error with Ipopt and HSL library. With a toy example: using JuMP, Ipopt m = Model(Ipopt.Optimizer) set\_optimizer\_attribute(m, "linear\_solver", "ma86") @variable(m, x \<= 5) @variable(m, y \<…

---

## [Visualising loss/objective function value with iterations using \`Convex\` + \`SCS\`](https://discourse.julialang.org/t/visualising-loss-objective-function-value-with-iterations-using-convex-scs/74374)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 3\
**Last updated:** [January 11, 2022, 8:00am UTC](https://discourse.julialang.org/t/visualising-loss-objective-function-value-with-iterations-using-convex-scs/74374 "2022-01-11T08:00:46Z")

</div>

Anyone worked with Convex.jl + SCS.jl ? How do I plot loss values/objective function values vs iteration during training process? (Naive way, that comes to my mind is allowing verbose=true in the solver and copypasting…

---

## [Wrong answer with NonLinear Optimization in JuMP](https://discourse.julialang.org/t/wrong-answer-with-nonlinear-optimization-in-jump/74304)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 13\
**Last updated:** [January 10, 2022, 6:19pm UTC](https://discourse.julialang.org/t/wrong-answer-with-nonlinear-optimization-in-jump/74304 "2022-01-10T18:19:05Z")

</div>

Hi, I am trying to maximize a very simple function in JuMP which I can solve analytically. I am getting an optimal solution which is different from what I should get. I was hoping someone could point me to my error. Her…

---

## [Application of Julia in Operation Research and Supply Chain](https://discourse.julialang.org/t/application-of-julia-in-operation-research-and-supply-chain/74300)

<div class="topic-metadata">

**Author:** [@jaafar\_ballout](https://discourse.julialang.org/u/jaafar_ballout)\
**Replies:** 4\
**Last updated:** [January 10, 2022, 12:21am UTC](https://discourse.julialang.org/t/application-of-julia-in-operation-research-and-supply-chain/74300 "2022-01-10T00:21:29Z")

</div>

Here, I am attaching the links for some posts that I found helpful to introduce Julia to Supply chain and operation research in general. Any books that cover this topic in a more detailed way?

---

## [Is JuMP the right package for large square models?](https://discourse.julialang.org/t/is-jump-the-right-package-for-large-square-models/74214)

<div class="topic-metadata">

**Author:** [@MartinBonde](https://discourse.julialang.org/u/MartinBonde)\
**Replies:** 3\
**Last updated:** [January 8, 2022, 8:43am UTC](https://discourse.julialang.org/t/is-jump-the-right-package-for-large-square-models/74214 "2022-01-08T08:43:10Z")

</div>

Is there a well defined ‘domain boundary’ between ModelingToolkit and JuMP? I currently use GAMS and the Conopt solver to solve very large square systems of non-linear equations. I.e. exactly as many constraints as free…

---

## [NLParameter](https://discourse.julialang.org/t/nlparameter/74163)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 2\
**Last updated:** [January 6, 2022, 11:12pm UTC](https://discourse.julialang.org/t/nlparameter/74163 "2022-01-06T23:12:17Z")

</div>

Is there any way to register an NLParameter as part of a Model? For example, I would like to create a model model = Model(Ipopt.Optimizer) @variable(model, x) @NLParameter(model, p == 0) @NLobjective(model, Min, (x + p)…

---

## [Julia adding an older version of my updated Gurobi Solber](https://discourse.julialang.org/t/julia-adding-an-older-version-of-my-updated-gurobi-solber/74034)

<div class="topic-metadata">

**Author:** [@konsath](https://discourse.julialang.org/u/konsath)\
**Replies:** 17\
**Last updated:** [January 6, 2022, 12:14am UTC](https://discourse.julialang.org/t/julia-adding-an-older-version-of-my-updated-gurobi-solber/74034 "2022-01-06T00:14:35Z")

</div>

Hi! I’m working with Julia 1.6.5 and Gurobi 9.5.0 on Visual Studio. I’ve acquired an academic license and have uninstall and reinstall everything twice. I can’t figure out why when adding Gurobi, Julia chooses a previous…

---

## [Is there a findmin(A) that uses local search instead of visiting all elements of matrix A?](https://discourse.julialang.org/t/is-there-a-findmin-a-that-uses-local-search-instead-of-visiting-all-elements-of-matrix-a/74045)

<div class="topic-metadata">

**Author:** [@NiclasMattsson](https://discourse.julialang.org/u/NiclasMattsson)\
**Replies:** 8\
**Last updated:** [January 5, 2022, 7:29am UTC](https://discourse.julialang.org/t/is-there-a-findmin-a-that-uses-local-search-instead-of-visiting-all-elements-of-matrix-a/74045 "2022-01-05T07:29:47Z")

</div>

I have a large matrix that contains sampled values of a convex 2D function. I want to find the minimum efficiently without visiting all elements, given indexes for a good starting guess close to the minimum. For example…

---

## [Bounded sciml\_train problem error, ArgumentError: Initial x is not in](https://discourse.julialang.org/t/bounded-sciml-train-problem-error-argumenterror-initial-x-is-not-in/73710)

<div class="topic-metadata">

**Author:** [@willsharpless](https://discourse.julialang.org/u/willsharpless)\
**Replies:** 1\
**Last updated:** [January 5, 2022, 6:09pm UTC](https://discourse.julialang.org/t/bounded-sciml-train-problem-error-argumenterror-initial-x-is-not-in/73710 "2022-01-05T18:09:48Z")

</div>

Hi, I have been getting this initialization error when I try to do iterative box optimization with DiffEqFlux.sciml\_train. I am attempting to optimize sets of parameters for which the loss function slightly varies for d…

---

## [JuMP constraint: how to use more than one filter elements in the sets](https://discourse.julialang.org/t/jump-constraint-how-to-use-more-than-one-filter-elements-in-the-sets/73928)

<div class="topic-metadata">

**Author:** [@Luiz\_Monteiro](https://discourse.julialang.org/u/Luiz_Monteiro)\
**Replies:** 2\
**Last updated:** [January 5, 2022, 12:53am UTC](https://discourse.julialang.org/t/jump-constraint-how-to-use-more-than-one-filter-elements-in-the-sets/73928 "2022-01-05T00:53:39Z")

</div>

Hi, In JuMP, I need to implement a constraint that uses more than one filter elements in the sets. It seems that JuMP accepts only one filter. The error message is:“There can be at most one filtering condition, which i…

---

## [JuMP, one constraint with two inequalities in the expression, is it possible?](https://discourse.julialang.org/t/jump-one-constraint-with-two-inequalities-in-the-expression-is-it-possible/73843)

<div class="topic-metadata">

**Author:** [@Luiz\_Monteiro](https://discourse.julialang.org/u/Luiz_Monteiro)\
**Replies:** 4\
**Last updated:** [January 5, 2022, 12:52am UTC](https://discourse.julialang.org/t/jump-one-constraint-with-two-inequalities-in-the-expression-is-it-possible/73843 "2022-01-05T00:52:45Z")

</div>

Hi, I am having trouble to implement the following constraint (with two inequalities). Does JuMP accept this kind of expression? @constraint(model, con4\[i in Vtotal, j in Vcustomer; i != j\], x\[i,j\] \* Menergy\[i,j\] - (1-x…

---

## [ERROR: LoadError: Unable to locate Gurobi installation](https://discourse.julialang.org/t/error-loaderror-unable-to-locate-gurobi-installation/74051)

<div class="topic-metadata">

**Author:** [@konsath](https://discourse.julialang.org/u/konsath)\
**Replies:** 2\
**Last updated:** [January 4, 2022, 8:09pm UTC](https://discourse.julialang.org/t/error-loaderror-unable-to-locate-gurobi-installation/74051 "2022-01-04T20:09:50Z")

</div>

I’m using Julia 1.6.5 and Gurobi 9.5.0 but right now Julia is adding an outdated version of Gurobi that doesn’t match my Path (9.5.0). Could anyone provide some insight maybe? :slight\_smile: ‘’’ julia\> Pkg.build(“Gurob…

---

## [LP Warm Starts - using Gurobi with JuMP](https://discourse.julialang.org/t/lp-warm-starts-using-gurobi-with-jump/73840)

<div class="topic-metadata">

**Author:** [@bjr221](https://discourse.julialang.org/u/bjr221)\
**Replies:** 6\
**Last updated:** [January 3, 2022, 11:48pm UTC](https://discourse.julialang.org/t/lp-warm-starts-using-gurobi-with-jump/73840 "2022-01-03T23:48:32Z")

</div>

Is there any way to warm start (choose initial vertex for dual simplex algorithm) for a linear program that you’ve created? I have tried using the “PStart” attribute for LPs to no avail, and the “.start” attribute is for…

---

## [Syntax for indicator constraints](https://discourse.julialang.org/t/syntax-for-indicator-constraints/73716)

<div class="topic-metadata">

**Author:** [@JohnZ](https://discourse.julialang.org/u/JohnZ)\
**Replies:** 4\
**Last updated:** [January 3, 2022, 7:41pm UTC](https://discourse.julialang.org/t/syntax-for-indicator-constraints/73716 "2022-01-03T19:41:37Z")

</div>

I have a model with two constraints. The first constraint is a big M constraint, which I am trying to reformulate as an indictor constraint. I have tried to follow the syntax given in the documentation, but I don’t get a…

---

## [JuMP: constraint to use a value only \`n\` times](https://discourse.julialang.org/t/jump-constraint-to-use-a-value-only-n-times/73930)

<div class="topic-metadata">

**Author:** [@Sushant-Padha](https://discourse.julialang.org/u/Sushant-Padha)\
**Replies:** 5\
**Last updated:** [January 3, 2022, 7:38pm UTC](https://discourse.julialang.org/t/jump-constraint-to-use-a-value-only-n-times/73930 "2022-01-03T19:38:41Z")

</div>

I am trying to solve a problem using ConstraintSolver.jl which uses JuMP. I want to define a constraint for a group of variables, such that certain values are only chosen certain times. For eg: if the variables are 1 \<=…

---

## [Is it possible that numerical optimisation solve time decreases for some range of dimensions from low to moderate levels?](https://discourse.julialang.org/t/is-it-possible-that-numerical-optimisation-solve-time-decreases-for-some-range-of-dimensions-from-low-to-moderate-levels/73857)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 11\
**Last updated:** [January 3, 2022, 4:07am UTC](https://discourse.julialang.org/t/is-it-possible-that-numerical-optimisation-solve-time-decreases-for-some-range-of-dimensions-from-low-to-moderate-levels/73857 "2022-01-03T04:07:00Z")

</div>

Hi, I encountered a weird phenomenon of solve time calculation in numerical optimisation. Backgrounds There is a bunch of approximators, \\{ f\_j \\}\_{j \\in J}. For example, f\_1 is a feedforward (dense) neural network, an…

---

## [Optimize many non linear functions](https://discourse.julialang.org/t/optimize-many-non-linear-functions/73761)

<div class="topic-metadata">

**Author:** [@jmmshn](https://discourse.julialang.org/u/jmmshn)\
**Replies:** 4\
**Last updated:** [January 2, 2022, 8:44pm UTC](https://discourse.julialang.org/t/optimize-many-non-linear-functions/73761 "2022-01-02T20:44:06Z")

</div>

I’m tying optimize the sum of series objective functions in funcs using the Ipot optimizer A minimal example shown below show result in an optimal objective value of 5. However it current returns objective\_value(model)…

---

## [(JuMP+NLopt) Only initial value returned without error warning](https://discourse.julialang.org/t/jump-nlopt-only-initial-value-returned-without-error-warning/73074)

<div class="topic-metadata">

**Author:** [@RunguangLi](https://discourse.julialang.org/u/RunguangLi)\
**Replies:** 7\
**Last updated:** [January 2, 2022, 8:40pm UTC](https://discourse.julialang.org/t/jump-nlopt-only-initial-value-returned-without-error-warning/73074 "2022-01-02T20:40:31Z")

</div>

For a nonlinear optimization problem with 9 parameters, calling Ipopt works well, while calling NLopt only returns the initial value without any error warning. Could someone tell me how to correct it? Using NLopt: usin…

---

## [Adding a few variables and constraints makes the model nearly unsolvable](https://discourse.julialang.org/t/adding-a-few-variables-and-constraints-makes-the-model-nearly-unsolvable/70401)

<div class="topic-metadata">

**Author:** [@fksayaci](https://discourse.julialang.org/u/fksayaci)\
**Replies:** 11\
**Last updated:** [December 28, 2021, 1:52am UTC](https://discourse.julialang.org/t/adding-a-few-variables-and-constraints-makes-the-model-nearly-unsolvable/70401 "2021-12-28T01:52:40Z")

</div>

Hi all, I know that this has nothing to do with Julia, but although I asked the following question in Gurobi community, I have not received a response yet. Could you please help me with the following issue? I have a po…

---

## [Consistent way to suppress solver output](https://discourse.julialang.org/t/consistent-way-to-suppress-solver-output/20437)

<div class="topic-metadata">

**Author:** [@ndinsmore](https://discourse.julialang.org/u/ndinsmore)\
**Replies:** 8\
**Last updated:** [December 26, 2021, 9:17pm UTC](https://discourse.julialang.org/t/consistent-way-to-suppress-solver-output/20437 "2021-12-26T21:17:56Z")

</div>

Is there a consistent way to suppress the solver output in JuMP v0.19 or MOI? It isn’t clear to me if there is.

---

## [EAGO.jl: LoadError: Invalid upper bound value NaN](https://discourse.julialang.org/t/eago-jl-loaderror-invalid-upper-bound-value-nan/73403)

<div class="topic-metadata">

**Author:** [@mvsoom](https://discourse.julialang.org/u/mvsoom)\
**Replies:** 4\
**Last updated:** [December 22, 2021, 11:19am UTC](https://discourse.julialang.org/t/eago-jl-loaderror-invalid-upper-bound-value-nan/73403 "2021-12-22T11:19:12Z")

</div>

I’ve been trying to solve the following nonlinear optimization program with EAGO.jl in order to find a global solution: using JuMP using EAGO model = Model(EAGO.Optimizer) n = 2 r = 0.15 @variable(model, 0 \<= e…

---

## [Defining a lower triangular matrix as the decision variable in JuMP](https://discourse.julialang.org/t/defining-a-lower-triangular-matrix-as-the-decision-variable-in-jump/73372)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 5\
**Last updated:** [December 21, 2021, 9:36pm UTC](https://discourse.julialang.org/t/defining-a-lower-triangular-matrix-as-the-decision-variable-in-jump/73372 "2021-12-21T21:36:35Z")

</div>

Dear All, I am trying to define a decision variable L \\in \\mathbb{R}^{n\\times n} in JuMP, which is lower triangular. As of now, I am defining this matrix as follows. @variable(my\_model, L\_mat\[1:n, 1:n\]) # upper off-di…

---

## [Plural macros (e.g. @variables) should return collection of the defined objects](https://discourse.julialang.org/t/plural-macros-e-g-variables-should-return-collection-of-the-defined-objects/73397)

<div class="topic-metadata">

**Author:** [@MartinBonde](https://discourse.julialang.org/u/MartinBonde)\
**Replies:** 4\
**Last updated:** [December 21, 2021, 8:08pm UTC](https://discourse.julialang.org/t/plural-macros-e-g-variables-should-return-collection-of-the-defined-objects/73397 "2021-12-21T20:08:42Z")

</div>

When working on a large model it is extremely useful to be able to manipulate large groups of variables or constraints. To avoid repeating long lists of variable names or equations, it would be very useful if the the ‘p…

---

## [Lazy constraints with callback in gurobi](https://discourse.julialang.org/t/lazy-constraints-with-callback-in-gurobi/73367)

<div class="topic-metadata">

**Author:** [@ahmad88](https://discourse.julialang.org/u/ahmad88)\
**Replies:** 1\
**Last updated:** [December 20, 2021, 7:17pm UTC](https://discourse.julialang.org/t/lazy-constraints-with-callback-in-gurobi/73367 "2021-12-20T19:17:59Z")

</div>

Hi I have a model and when of model’s constraints is corresponding to cycles in the graph, so I am trying to add these cycle constraints as lazy constraints within the callback, so in each iteration, I am solving the mo…

---

## [Invalid index error using EAGO solver](https://discourse.julialang.org/t/invalid-index-error-using-eago-solver/73302)

<div class="topic-metadata">

**Author:** [@FH96](https://discourse.julialang.org/u/FH96)\
**Replies:** 3\
**Last updated:** [December 19, 2021, 5:45am UTC](https://discourse.julialang.org/t/invalid-index-error-using-eago-solver/73302 "2021-12-19T05:45:57Z")

</div>

Trying to solve a QP with EAGO I face this error LoadError: The index MathOptInterface.ConstraintIndex{MathOptInterface.SingleVariable, MathOptInterface.GreaterThan{Float64}}(-1) is invalid. Note that an index become…

---

## [Log determinant objective](https://discourse.julialang.org/t/log-determinant-objective/23927)

<div class="topic-metadata">

**Author:** [@Ksun46](https://discourse.julialang.org/u/Ksun46)\
**Replies:** 6\
**Last updated:** [December 16, 2021, 10:31pm UTC](https://discourse.julialang.org/t/log-determinant-objective/23927 "2021-12-16T22:31:38Z")

</div>

Any recommendations on how to formulate a log determinant objective in JuMP? Thanks.

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

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