# Optimization (Mathematical)

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

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

**Page:** 109

---

## [JuMP: Piecewise linear cost function](https://discourse.julialang.org/t/jump-piecewise-linear-cost-function/27269)

<div class="topic-metadata">

**Author:** [@uwechsler](https://discourse.julialang.org/u/uwechsler)\
**Replies:** 3\
**Last updated:** [August 10, 2019, 9:43pm UTC](https://discourse.julialang.org/t/jump-piecewise-linear-cost-function/27269 "2019-08-10T21:43:58Z")

</div>

I am trying to solve an optimization problem with a piecewise linear cost function, which writes as: \\ell^{max}(z) := \\max\_{\\omega\\in\\Omega} \\ell(z+\\omega) where the cost function is piecewise continous, e.g. \\ell(z) =…

---

## [Optim constrained optimization issues](https://discourse.julialang.org/t/optim-constrained-optimization-issues/27333)

<div class="topic-metadata">

**Author:** [@ys3636](https://discourse.julialang.org/u/ys3636)\
**Replies:** 8\
**Last updated:** [August 9, 2019, 5:43pm UTC](https://discourse.julialang.org/t/optim-constrained-optimization-issues/27333 "2019-08-09T17:43:09Z")

</div>

Hi, Apologies, Julia newcomer. I’m trying to use Optim.jl to fit the parameters of a particular custom noise model by minimizing negative log-likelihood, but I’m running into some issues where methods that exist in prev…

---

## [Obtain and print IIS using Gurobi](https://discourse.julialang.org/t/obtain-and-print-iis-using-gurobi/27116)

<div class="topic-metadata">

**Author:** [@lgo](https://discourse.julialang.org/u/lgo)\
**Replies:** 2\
**Last updated:** [August 3, 2019, 6:21pm UTC](https://discourse.julialang.org/t/obtain-and-print-iis-using-gurobi/27116 "2019-08-03T18:21:15Z")

</div>

Hello, Gurobi has a function to obtain a Irreducible Inconsistent Subsystem (ISS), which refers to a subset of equations causing infeasibility. This obviously comes in very handy when debugging your problem. I succeede…

---

## [Workaround for modifying coefficients in constraints in JuMP?](https://discourse.julialang.org/t/workaround-for-modifying-coefficients-in-constraints-in-jump/27123)

<div class="topic-metadata">

**Author:** [@torgo](https://discourse.julialang.org/u/torgo)\
**Replies:** 9\
**Last updated:** [August 6, 2019, 8:09pm UTC](https://discourse.julialang.org/t/workaround-for-modifying-coefficients-in-constraints-in-jump/27123 "2019-08-06T20:09:34Z")

</div>

In the 0.19 documentation on this page it says: Modifying a constant term Most often, modifications involve changing the “right-hand side” of a linear constraint. This presents a challenge for JuMP because it leads to …

---

## [Difficulty building JuMP SparseAxisArrays for network problems](https://discourse.julialang.org/t/difficulty-building-jump-sparseaxisarrays-for-network-problems/27227)

<div class="topic-metadata">

**Author:** [@pulsipher](https://discourse.julialang.org/u/pulsipher)\
**Replies:** 1\
**Last updated:** [August 6, 2019, 4:51pm UTC](https://discourse.julialang.org/t/difficulty-building-jump-sparseaxisarrays-for-network-problems/27227 "2019-08-06T16:51:32Z")

</div>

I am trying to model a network flow problem via JuMP and I am having difficulty building the flow variables with the correct indexing using @variable. For example, let’s suppose I have a network with 2 flow variables x\_…

---

## [Trouble with nested summations in objective funtion](https://discourse.julialang.org/t/trouble-with-nested-summations-in-objective-funtion/27215)

<div class="topic-metadata">

**Author:** [@Natedogg373](https://discourse.julialang.org/u/Natedogg373)\
**Replies:** 3\
**Last updated:** [August 6, 2019, 1:22pm UTC](https://discourse.julialang.org/t/trouble-with-nested-summations-in-objective-funtion/27215 "2019-08-06T13:22:02Z")

</div>

Hello, I’m a beginner with julia and working on a MIP optimization problem and I’ve been having trouble finishing my objective. Below is the portion of the objective I have traced the error to. sum(sum(3\*t\[i,j,l\]+v1\[i…

---

## [Error with building NLexpression in JuMP 0.19.2](https://discourse.julialang.org/t/error-with-building-nlexpression-in-jump-0-19-2/26998)

<div class="topic-metadata">

**Author:** [@pulsipher](https://discourse.julialang.org/u/pulsipher)\
**Replies:** 4\
**Last updated:** [August 3, 2019, 10:23pm UTC](https://discourse.julialang.org/t/error-with-building-nlexpression-in-jump-0-19-2/26998 "2019-08-03T22:23:53Z")

</div>

I ran into this unexpected error when trying to build a nonlinear expression. julia\> mean\_vs = @NLexpression(model, \[i = 1:num\_buses\], sum(prod2.get(\[m-1, m-1\]) \* (vre\_coeffs\[i, m\]^2 + vim…

---

## [Multiple amount of summations in JuMP](https://discourse.julialang.org/t/multiple-amount-of-summations-in-jump/27083)

<div class="topic-metadata">

**Author:** [@newjuliauser](https://discourse.julialang.org/u/newjuliauser)\
**Replies:** 1\
**Last updated:** [August 3, 2019, 8:39am UTC](https://discourse.julialang.org/t/multiple-amount-of-summations-in-jump/27083 "2019-08-03T08:39:53Z")

</div>

Hello, I’m wondering If it is possible to pass a multi summation expression into setNLobjective. Currently I have a for loop to compute summation, but, I was wondering if it is possible to optimize with JuMP on this fron…

---

## [Solving a cplex model via JuMP and java](https://discourse.julialang.org/t/solving-a-cplex-model-via-jump-and-java/26646)

<div class="topic-metadata">

**Author:** [@healyp](https://discourse.julialang.org/u/healyp)\
**Replies:** 10\
**Last updated:** [August 2, 2019, 9:55am UTC](https://discourse.julialang.org/t/solving-a-cplex-model-via-jump-and-java/26646 "2019-08-02T09:55:24Z")

</div>

A colleague and I both implemented a model we have been working on, him using a java interface to cplex and me using JuMP. After spending some time to reconcile the .lp outputs of the two models I genuinely believe that…

---

## [Using sparse matrix in NLoptimization](https://discourse.julialang.org/t/using-sparse-matrix-in-nloptimization/27046)

<div class="topic-metadata">

**Author:** [@Dota](https://discourse.julialang.org/u/Dota)\
**Replies:** 3\
**Last updated:** [August 1, 2019, 6:09am UTC](https://discourse.julialang.org/t/using-sparse-matrix-in-nloptimization/27046 "2019-08-01T06:09:21Z")

</div>

Hi, I’m new to julia, nowadays I’m trying to use JuMP to do NLoptimization, which I used to use fmincon() in matlab. In my problem I will have a 1\*144 matrix as input: model=Model(with\_optimizer(Ipopt.Optimizer)) @…

---

## [Assigning JuMP VariableRef to an array position](https://discourse.julialang.org/t/assigning-jump-variableref-to-an-array-position/26216)

<div class="topic-metadata">

**Author:** [@MuadhF](https://discourse.julialang.org/u/MuadhF)\
**Replies:** 6\
**Last updated:** [July 31, 2019, 4:56pm UTC](https://discourse.julialang.org/t/assigning-jump-variableref-to-an-array-position/26216 "2019-07-31T16:56:37Z")

</div>

Hi, Is it possible to assign a decision variable to an array position? For example: using JuMP m = Model() @variable(m, x) arr = zeros(100) arr\[1\] = x x is a decision variable which will be decided by the model whe…

---

## [Help with JuMP 0.19 upgrade and performance hits](https://discourse.julialang.org/t/help-with-jump-0-19-upgrade-and-performance-hits/21214)

<div class="topic-metadata">

**Author:** [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Replies:** 8\
**Last updated:** [July 30, 2019, 4:00pm UTC](https://discourse.julialang.org/t/help-with-jump-0-19-upgrade-and-performance-hits/21214 "2019-07-30T16:00:52Z")

</div>

Hi all, I’m having some issues with Ipopt not finding a solution with a script I’m updating to Julia 1.1 / JuMP 0.19 from a functioning one on Julia 0.64 / JuMP 0.18. Unsure exactly where the problem is, so I’ve put th…

---

## [Difference in sparsity pattern caused by @NLconstraint and @constraint in JuMP](https://discourse.julialang.org/t/difference-in-sparsity-pattern-caused-by-nlconstraint-and-constraint-in-jump/26919)

<div class="topic-metadata">

**Author:** [@Ksun46](https://discourse.julialang.org/u/Ksun46)\
**Replies:** 4\
**Last updated:** [July 30, 2019, 1:48am UTC](https://discourse.julialang.org/t/difference-in-sparsity-pattern-caused-by-nlconstraint-and-constraint-in-jump/26919 "2019-07-30T01:48:32Z")

</div>

Hi all, I am solving a nonlinear problem using JuMP and IPOPT. All my constraints are linear or degree 2 polynomials. I firstly try to add nonlinear constraints using @NLconstraint and here is the summary of IPOPT Thi…

---

## [Couenne no results - seems stuck](https://discourse.julialang.org/t/couenne-no-results-seems-stuck/26879)

<div class="topic-metadata">

**Author:** [@Raminel](https://discourse.julialang.org/u/Raminel)\
**Replies:** 2\
**Last updated:** [July 28, 2019, 6:27pm UTC](https://discourse.julialang.org/t/couenne-no-results-seems-stuck/26879 "2019-07-28T18:27:52Z")

</div>

Hi all, I am using Couenne for my MINLP problem. I have a problem using Couenne when I add a nonlinear term to the objective. I have tried different options in the couenne.opt file based on different posts here, still n…

---

## [JuMP Parameters params depend on the Optimizer?](https://discourse.julialang.org/t/jump-parameters-params-depend-on-the-optimizer/26725)

<div class="topic-metadata">

**Author:** [@remi-garcia](https://discourse.julialang.org/u/remi-garcia)\
**Replies:** 4\
**Last updated:** [July 28, 2019, 9:38am UTC](https://discourse.julialang.org/t/jump-parameters-params-depend-on-the-optimizer/26725 "2019-07-28T09:38:41Z")

</div>

Hi, With JuMP we can pass parameters to the solver in with\_optimizer. What I understood is that the parameter depend on the used Optimizer. If I want a Time Limit with GLPK I’ll use tm\_lim while with CPLEX it’ll be CPX\_…

---

## [A new JuMPTutorials.jl package](https://discourse.julialang.org/t/a-new-jumptutorials-jl-package/26900)

<div class="topic-metadata">

**Author:** [@Arpit\_Bhatia](https://discourse.julialang.org/u/Arpit_Bhatia)\
**Replies:** 0\
**Last updated:** [July 28, 2019, 3:06am UTC](https://discourse.julialang.org/t/a-new-jumptutorials-jl-package/26900 "2019-07-28T03:06:30Z")

</div>

Hi, I am Arpit, a GSoC student working under @chriscoey, @joaquimg and Lea Kapelevich to create a new JuMPTutorials.jl package, which will contain tidied, updated, and more-consistent versions of many of the notebooks i…

---

## [Setting constraints as lazy with JuMP 0.19 and Gurobi](https://discourse.julialang.org/t/setting-constraints-as-lazy-with-jump-0-19-and-gurobi/24516)

<div class="topic-metadata">

**Author:** [@fa-bien](https://discourse.julialang.org/u/fa-bien)\
**Replies:** 7\
**Last updated:** [July 27, 2019, 7:15pm UTC](https://discourse.julialang.org/t/setting-constraints-as-lazy-with-jump-0-19-and-gurobi/24516 "2019-07-27T19:15:04Z")

</div>

I build a mixed-integer model with JuMP and Gurobi. I want to set certain constraints as lazy. With JuMP 0.18 I was using the solution described here: Lazy constraints at root node? · Issue #1226 · jump-dev/JuMP.jl · Git…

---

## [Global optimization: Simulated Method of Moments](https://discourse.julialang.org/t/global-optimization-simulated-method-of-moments/23844)

<div class="topic-metadata">

**Author:** [@drarnau](https://discourse.julialang.org/u/drarnau)\
**Replies:** 9\
**Last updated:** [July 26, 2019, 4:36pm UTC](https://discourse.julialang.org/t/global-optimization-simulated-method-of-moments/23844 "2019-07-26T16:36:12Z")

</div>

I work with non-linear models that need to be calibrated to match data moments. The setup is simple. I have a function that takes a set of parameters as input (for example, a vector of floats), solves the model, and retu…

---

## [Variable reference in a function created by a macro](https://discourse.julialang.org/t/variable-reference-in-a-function-created-by-a-macro/26722)

<div class="topic-metadata">

**Author:** [@bocc](https://discourse.julialang.org/u/bocc)\
**Replies:** 7\
**Last updated:** [July 25, 2019, 3:56pm UTC](https://discourse.julialang.org/t/variable-reference-in-a-function-created-by-a-macro/26722 "2019-07-25T15:56:31Z")

</div>

Hello, I am trying to use IntervalConstraintProgramming & associated packages to solve a geometric feasibility problem. In order to be able to use functions in constraints, the ICP package provides a macro for function …

---

## [Looped optimization model](https://discourse.julialang.org/t/looped-optimization-model/26600)

<div class="topic-metadata">

**Author:** [@MuadhF](https://discourse.julialang.org/u/MuadhF)\
**Replies:** 4\
**Last updated:** [July 23, 2019, 5:19am UTC](https://discourse.julialang.org/t/looped-optimization-model/26600 "2019-07-23T05:19:15Z")

</div>

Hi, I created a JuMP optimization model that reads input from CSV files. However, I want the program to go through more than one set of input files, so that I would have the objective values and solutions to all the mod…

---

## [How to derive the dual formulation with JuMP?](https://discourse.julialang.org/t/how-to-derive-the-dual-formulation-with-jump/26639)

<div class="topic-metadata">

**Author:** [@dourouc05](https://discourse.julialang.org/u/dourouc05)\
**Replies:** 6\
**Last updated:** [July 23, 2019, 2:17am UTC](https://discourse.julialang.org/t/how-to-derive-the-dual-formulation-with-jump/26639 "2019-07-23T02:17:07Z")

</div>

Hi all, The dual formulation is useful for many things (robust reformulation, column generation, and so many others). Is there a way in JuMP to generate the dual of a model? (Not getting the dual values for each constra…

---

## [How to feed initial solution to solver?](https://discourse.julialang.org/t/how-to-feed-initial-solution-to-solver/26577)

<div class="topic-metadata">

**Author:** [@Qun](https://discourse.julialang.org/u/Qun)\
**Replies:** 2\
**Last updated:** [July 21, 2019, 12:08pm UTC](https://discourse.julialang.org/t/how-to-feed-initial-solution-to-solver/26577 "2019-07-21T12:08:20Z")

</div>

I am keen to learn how to feed an initial solution to a solver. I use the following example and I got the above warning when I used CPLEX, Cbc, Gurobi, GLPK. Could any one point me in the right direction to solve this is…

---

## [Multi-Objective Optimization Support](https://discourse.julialang.org/t/multi-objective-optimization-support/16731)

<div class="topic-metadata">

**Author:** [@PastelBelem8](https://discourse.julialang.org/u/PastelBelem8)\
**Replies:** 3\
**Last updated:** [July 19, 2019, 7:09pm UTC](https://discourse.julialang.org/t/multi-objective-optimization-support/16731 "2019-07-19T19:09:19Z")

</div>

I’m working on my master thesis on Multi-Objective Optimization (MOO) and I found JuMP to be a clean and elegant framework. However, JuMP does not currently support Multi-Objective optimization. Are you planning to suppo…

---

## [How to solve large sparse LPs in Gurobi](https://discourse.julialang.org/t/how-to-solve-large-sparse-lps-in-gurobi/26402)

<div class="topic-metadata">

**Author:** [@wenqi\_kou](https://discourse.julialang.org/u/wenqi_kou)\
**Replies:** 7\
**Last updated:** [July 17, 2019, 5:20pm UTC](https://discourse.julialang.org/t/how-to-solve-large-sparse-lps-in-gurobi/26402 "2019-07-17T17:20:00Z")

</div>

Hi, I have a question about solving large sparse matrix LP problem. It really confused me for a long time. If I have a form like this: I have all Fi data, which are in sparse form. How can I build a LP model to solv…

---

## [Global constraints in functions](https://discourse.julialang.org/t/global-constraints-in-functions/26341)

<div class="topic-metadata">

**Author:** [@MuadhF](https://discourse.julialang.org/u/MuadhF)\
**Replies:** 7\
**Last updated:** [July 17, 2019, 6:00am UTC](https://discourse.julialang.org/t/global-constraints-in-functions/26341 "2019-07-17T06:00:24Z")

</div>

Hi, I declared some constraints in a function because I needed an if condition, and wanted to know if I can somehow make these constraints defined outside the function as well. Here’s part of the function: function amo…

---

## [Julia's processing capacity](https://discourse.julialang.org/t/julias-processing-capacity/26251)

<div class="topic-metadata">

**Author:** [@RaquelSantos](https://discourse.julialang.org/u/RaquelSantos)\
**Replies:** 12\
**Last updated:** [July 17, 2019, 4:02am UTC](https://discourse.julialang.org/t/julias-processing-capacity/26251 "2019-07-17T04:02:22Z")

</div>

Julia provides information of type: number of iterations, solution time, gap, number of variables, number of constraints

---

## [Parametrize NLsolve function](https://discourse.julialang.org/t/parametrize-nlsolve-function/11886)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 4\
**Last updated:** [July 16, 2019, 10:28pm UTC](https://discourse.julialang.org/t/parametrize-nlsolve-function/11886 "2019-07-16T22:28:04Z")

</div>

Hello, I want to solve a function using NLsolve, which has parameters. I do not want to pass them using global variables. Simplified example: using NLsolve function f!(F, x) global a, b F\[1\] = a \* sin(x\[1\]) + …

---

## [Second order conic constraints with CPLEX](https://discourse.julialang.org/t/second-order-conic-constraints-with-cplex/26413)

<div class="topic-metadata">

**Author:** [@giadasp](https://discourse.julialang.org/u/giadasp)\
**Replies:** 5\
**Last updated:** [July 16, 2019, 2:16pm UTC](https://discourse.julialang.org/t/second-order-conic-constraints-with-cplex/26413 "2019-07-16T14:16:52Z")

</div>

I have to solve a MISOCP problem with JuMP and CPLEX but I really didn’t understand how to write the constraints with the new syntax in SecondOrderCone(). I need to minimize the squared norm of a vector in which I have …

---

## [VariablePrimalStart() is not supported by the model and LazyBridgeOptimizer](https://discourse.julialang.org/t/variableprimalstart-is-not-supported-by-the-model-and-lazybridgeoptimizer/25447)

<div class="topic-metadata">

**Author:** [@Alxg](https://discourse.julialang.org/u/Alxg)\
**Replies:** 3\
**Last updated:** [July 14, 2019, 11:14am UTC](https://discourse.julialang.org/t/variableprimalstart-is-not-supported-by-the-model-and-lazybridgeoptimizer/25447 "2019-07-14T11:14:31Z")

</div>

I’m trying to do a MIP-start on a multicommodity capacitated fixed-charge network design problem using JuMP 0.19 and CPLEX 12.8 with the set\_start\_value function, but I keep getting the following error : MathOptInterfac…

---

## [Issues install Coluna.jl oj Julia 1.1](https://discourse.julialang.org/t/issues-install-coluna-jl-oj-julia-1-1/26298)

<div class="topic-metadata">

**Author:** [@rakesh\_gupta](https://discourse.julialang.org/u/rakesh_gupta)\
**Replies:** 1\
**Last updated:** [July 12, 2019, 10:59pm UTC](https://discourse.julialang.org/t/issues-install-coluna-jl-oj-julia-1-1/26298 "2019-07-12T22:59:59Z")

</div>

Hi - I am having a lot of trouble installing Coluna.jl on the 1.04 version of Julia. The command I am using is: add GitHub - atoptima/Coluna.jl: Branch-and-Price-and-Cut in Julia Which should ostensibly work out of the…

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

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