# Optimization (Mathematical)

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

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

**Page:** 127

---

## [How to speed up AffineExpr generation?](https://discourse.julialang.org/t/how-to-speed-up-affineexpr-generation/3865)

<div class="topic-metadata">

**Author:** [@abulak](https://discourse.julialang.org/u/abulak)\
**Replies:** 9\
**Last updated:** [May 30, 2017, 6:34pm UTC](https://discourse.julialang.org/t/how-to-speed-up-affineexpr-generation/3865 "2017-05-30T18:34:20Z")

</div>

I have a problem with 3000×3000 matrix of JuMP variables, and several millions of constraints in those. In the naive formulation the size is what obstructs solving the problem in reasonable time; I decided to play smart…

---

## [Infeasibility Testing](https://discourse.julialang.org/t/infeasibility-testing/3910)

<div class="topic-metadata">

**Author:** [@gopal2017](https://discourse.julialang.org/u/gopal2017)\
**Replies:** 3\
**Last updated:** [May 24, 2017, 6:47pm UTC](https://discourse.julialang.org/t/infeasibility-testing/3910 "2017-05-24T18:47:07Z")

</div>

In CPLEX we have option to detect conflicting equations and/ check infeasibility of the model,if any. I am using Clp solver. Is there any option to do aforementioned task?

---

## [Change of variable and constraint name](https://discourse.julialang.org/t/change-of-variable-and-constraint-name/3860)

<div class="topic-metadata">

**Author:** [@gopal2017](https://discourse.julialang.org/u/gopal2017)\
**Replies:** 5\
**Last updated:** [May 24, 2017, 1:19pm UTC](https://discourse.julialang.org/t/change-of-variable-and-constraint-name/3860 "2017-05-24T13:19:19Z")

</div>

Please let me know the way to change variable name and constraint name. We usually do it in CPLEX to change default name of variables and constraints to make it more meaningful and to give better understanding of .lp fil…

---

## [Rotated cone constraint, how to include it?](https://discourse.julialang.org/t/rotated-cone-constraint-how-to-include-it/3879)

<div class="topic-metadata">

**Author:** [@rayset](https://discourse.julialang.org/u/rayset)\
**Replies:** 2\
**Last updated:** [May 24, 2017, 12:13pm UTC](https://discourse.julialang.org/t/rotated-cone-constraint-how-to-include-it/3879 "2017-05-24T12:13:01Z")

</div>

I’ve been trying for a few days to add the following constraint in jump: @NLconstraint(mod, R\[i,j,h\]^2 + T\[i,j,h\]^2 - 2\*u\_ijk\[i,i,j,h\]\*u\_ijk\[j,j,i,h\]\<=0) I tried every academic solver, but none is able to recognize t…

---

## [JuMP variable definition](https://discourse.julialang.org/t/jump-variable-definition/920)

<div class="topic-metadata">

**Author:** [@ashefa](https://discourse.julialang.org/u/ashefa)\
**Replies:** 12\
**Last updated:** [May 20, 2017, 4:13pm UTC](https://discourse.julialang.org/t/jump-variable-definition/920 "2017-05-20T16:13:22Z")

</div>

how i can defined different bounds or fixed values to elements of a vector variable?

---

## [Syntax Error while running MPC with Ipopt](https://discourse.julialang.org/t/syntax-error-while-running-mpc-with-ipopt/3817)

<div class="topic-metadata">

**Author:** [@Angshuman\_Goswami](https://discourse.julialang.org/u/Angshuman_Goswami)\
**Replies:** 1\
**Last updated:** [May 20, 2017, 12:26pm UTC](https://discourse.julialang.org/t/syntax-error-while-running-mpc-with-ipopt/3817 "2017-05-20T12:26:26Z")

</div>

I am working with the simulator with a 3DOF-bicycle model. I am having a problem when I use the dynamic model in the MPC. When I am using the kinematic model, it works. I have uploaded the files here. (https://github.co…

---

## [Gurobi SOC Constraint](https://discourse.julialang.org/t/gurobi-soc-constraint/3683)

<div class="topic-metadata">

**Author:** [@ahassansan](https://discourse.julialang.org/u/ahassansan)\
**Replies:** 12\
**Last updated:** [May 13, 2017, 1:43am UTC](https://discourse.julialang.org/t/gurobi-soc-constraint/3683 "2017-05-13T01:43:32Z")

</div>

I am having issues using Gurobi Solver for my SOC formulation. Following are my constraints: I am getting an error ERROR: LoadError: MethodError: no method matching NonlinearModel(::Gurobi.GurobiSolver) The mathematic…

---

## [Non-monotonic equations and \`mcpsolver\` from \`NLsolve\`](https://discourse.julialang.org/t/non-monotonic-equations-and-mcpsolver-from-nlsolve/3493)

<div class="topic-metadata">

**Author:** [@HugoLhuillier](https://discourse.julialang.org/u/HugoLhuillier)\
**Replies:** 2\
**Last updated:** [May 11, 2017, 8:17am UTC](https://discourse.julialang.org/t/non-monotonic-equations-and-mcpsolver-from-nlsolve/3493 "2017-05-11T08:17:02Z")

</div>

Dear all, Working on some related topics, I’ve realized that the mcpsolver provided by the NLsolve package is struggling to find the solution(s) to non-monotonic functions. As an example, say we are looking for the x’…

---

## [Multi-Objective Combinatorial Optimization](https://discourse.julialang.org/t/multi-objective-combinatorial-optimization/3604)

<div class="topic-metadata">

**Author:** [@KrishnaKanhaiya](https://discourse.julialang.org/u/KrishnaKanhaiya)\
**Replies:** 4\
**Last updated:** [May 10, 2017, 9:24pm UTC](https://discourse.julialang.org/t/multi-objective-combinatorial-optimization/3604 "2017-05-10T21:24:43Z")

</div>

I have a problem statement where I have to maximize multiple (2 or more than 2) objective functions simultaneously and the some of the variables involved are discrete whereas the remaining are continuous. Is there any ju…

---

## [Mixing models between JuMP.jl and Convex.jl](https://discourse.julialang.org/t/mixing-models-between-jump-jl-and-convex-jl/3633)

<div class="topic-metadata">

**Author:** [@adowling2](https://discourse.julialang.org/u/adowling2)\
**Replies:** 2\
**Last updated:** [May 10, 2017, 9:21pm UTC](https://discourse.julialang.org/t/mixing-models-between-jump-jl-and-convex-jl/3633 "2017-05-10T21:21:51Z")

</div>

I have been using JuMP for the last 2 years. I am now rather comfortable with the syntax and I have successfully solved some very complex models. For these reasons, JuMP is my preferred modeling environment. I often solv…

---

## [Derivative of variable with respect to constraint?](https://discourse.julialang.org/t/derivative-of-variable-with-respect-to-constraint/1733)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 5\
**Last updated:** [May 10, 2017, 4:34pm UTC](https://discourse.julialang.org/t/derivative-of-variable-with-respect-to-constraint/1733 "2017-05-10T16:34:26Z")

</div>

I have a Linear Programming problem that I am modeling using JuMP. If I understand correctly, JuMP.getdual(cons) evaluated on a constrain gives the rate of change of the objective if the RHS of the constrain is slightly …

---

## [Has anyone gotten SCIP 4.0 to work with Julia?](https://discourse.julialang.org/t/has-anyone-gotten-scip-4-0-to-work-with-julia/3014)

<div class="topic-metadata">

**Author:** [@Frank\_Kampas](https://discourse.julialang.org/u/Frank_Kampas)\
**Replies:** 11\
**Last updated:** [May 10, 2017, 4:25pm UTC](https://discourse.julialang.org/t/has-anyone-gotten-scip-4-0-to-work-with-julia/3014 "2017-05-10T16:25:18Z")

</div>

I tried following the instructions on my MacBookAir, but it fails testing.

---

## [Ipopt built with MKL not resolving dependencies when called from Julia](https://discourse.julialang.org/t/ipopt-built-with-mkl-not-resolving-dependencies-when-called-from-julia/3436)

<div class="topic-metadata">

**Author:** [@iaravena](https://discourse.julialang.org/u/iaravena)\
**Replies:** 3\
**Last updated:** [April 30, 2017, 10:56pm UTC](https://discourse.julialang.org/t/ipopt-built-with-mkl-not-resolving-dependencies-when-called-from-julia/3436 "2017-04-30T22:56:26Z")

</div>

Hi all, I have been trying to make Ipopt.jl to work with my Ipopt built against MKL using ICC (which is working without errors, all test passing). Following this topic I modified the file ~/.julia/v0.5/Ipopt/deps/deps.j…

---

## [SOC constraint using Gurobi](https://discourse.julialang.org/t/soc-constraint-using-gurobi/3438)

<div class="topic-metadata">

**Author:** [@ahassansan](https://discourse.julialang.org/u/ahassansan)\
**Replies:** 3\
**Last updated:** [April 30, 2017, 7:38pm UTC](https://discourse.julialang.org/t/soc-constraint-using-gurobi/3438 "2017-04-30T19:38:59Z")

</div>

what is the proper syntax to add second order cone constraints? I am using Gurobi solver with JuMP.

---

## [Calculate slacks for quadratic constraints](https://discourse.julialang.org/t/calculate-slacks-for-quadratic-constraints/3425)

<div class="topic-metadata">

**Author:** [@adowling2](https://discourse.julialang.org/u/adowling2)\
**Replies:** 2\
**Last updated:** [April 29, 2017, 5:45pm UTC](https://discourse.julialang.org/t/calculate-slacks-for-quadratic-constraints/3425 "2017-04-29T17:45:37Z")

</div>

I’d like to calculate the slacks for a quadratic constraint. Using MathProgBase.getconstrmatrix (see old Google Groups post) does not work for quadratic constraints. Any suggestions?

---

## [Partially blackbox optimization with JuMP?](https://discourse.julialang.org/t/partially-blackbox-optimization-with-jump/3335)

<div class="topic-metadata">

**Author:** [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Replies:** 1\
**Last updated:** [April 22, 2017, 12:23pm UTC](https://discourse.julialang.org/t/partially-blackbox-optimization-with-jump/3335 "2017-04-22T12:23:36Z")

</div>

I have a problem which I have been using NLopt to solve, but am interested in converting it into a JuMP model to try other solvers and also get some autodifferentiation. The problem is that the objective function is a bl…

---

## [Memory using in a for loop](https://discourse.julialang.org/t/memory-using-in-a-for-loop/3305)

<div class="topic-metadata">

**Author:** [@Yankai\_Cao](https://discourse.julialang.org/u/Yankai_Cao)\
**Replies:** 3\
**Last updated:** [April 21, 2017, 1:58am UTC](https://discourse.julialang.org/t/memory-using-in-a-for-loop/3305 "2017-04-21T01:58:16Z")

</div>

I find that if I create and solve models in a for loop, then the memory usage will increase dramatically. I would expect the memory allocated keeps constant. Here is the test code: using JuMP, SCIP #,Gurobi function …

---

## [Problem with Julia Ipopt](https://discourse.julialang.org/t/problem-with-julia-ipopt/3223)

<div class="topic-metadata">

**Author:** [@Angshuman\_Goswami](https://discourse.julialang.org/u/Angshuman_Goswami)\
**Replies:** 4\
**Last updated:** [April 18, 2017, 9:29pm UTC](https://discourse.julialang.org/t/problem-with-julia-ipopt/3223 "2017-04-18T21:29:02Z")

</div>

I am trying to do vehicle control. I am trying to use the magic formula which is given by @defNLExpr(mdl, FyR\[i = 1:N\] , Dsin(Catan(B \* (atan((v\_y\[i\] - b\*r\[i\])/v\_x\[i\])))) ) Now when i run the code i am …

---

## [Scipy using PyCall in Julia](https://discourse.julialang.org/t/scipy-using-pycall-in-julia/3207)

<div class="topic-metadata">

**Author:** [@pmarg](https://discourse.julialang.org/u/pmarg)\
**Replies:** 6\
**Last updated:** [April 14, 2017, 10:02am UTC](https://discourse.julialang.org/t/scipy-using-pycall-in-julia/3207 "2017-04-14T10:02:51Z")

</div>

I have a moderately large system of non-linear equations that I want to solve using scipy.optimize in Julia. The problem is that I store the equations in a vector before I pass them to the solver and PyCall doesn’t accep…

---

## [Changing default printing options in JuMP](https://discourse.julialang.org/t/changing-default-printing-options-in-jump/1602)

<div class="topic-metadata">

**Author:** [@huckl3b3rry87](https://discourse.julialang.org/u/huckl3b3rry87)\
**Replies:** 1\
**Last updated:** [April 14, 2017, 4:47am UTC](https://discourse.julialang.org/t/changing-default-printing-options-in-jump/1602 "2017-04-14T04:47:40Z")

</div>

Is there a way to change the default printing options? Specifically, I am using getdual() and it is returning values like 0.0 and I want to see more of this number

---

## [JuMP-Ipopt NLP : Gradient not passed to solver](https://discourse.julialang.org/t/jump-ipopt-nlp-gradient-not-passed-to-solver/2908)

<div class="topic-metadata">

**Author:** [@Manish](https://discourse.julialang.org/u/Manish)\
**Replies:** 6\
**Last updated:** [April 11, 2017, 3:35am UTC](https://discourse.julialang.org/t/jump-ipopt-nlp-gradient-not-passed-to-solver/2908 "2017-04-11T03:35:29Z")

</div>

I have implemented a non-linear (8 variable) unconstrained optimisation problem using JuMP and Ipopt solver. User defined functions were used used for calculating the function value and gradient. The implementation was s…

---

## [How to get the status of optimization of Julia Ipopt as an output?](https://discourse.julialang.org/t/how-to-get-the-status-of-optimization-of-julia-ipopt-as-an-output/2881)

<div class="topic-metadata">

**Author:** [@Angshuman\_Goswami](https://discourse.julialang.org/u/Angshuman_Goswami)\
**Replies:** 5\
**Last updated:** [April 6, 2017, 8:01pm UTC](https://discourse.julialang.org/t/how-to-get-the-status-of-optimization-of-julia-ipopt-as-an-output/2881 "2017-04-06T20:01:03Z")

</div>

I am running MPC with Julia Ipopt+JuMP in ROS. I want to get the output of the MPC along with the status of optimization. Sometimes the MPC is infeasible, my value gets stuck in the previous output and hence this will he…

---

## [Graphs.jl and v0.5](https://discourse.julialang.org/t/graphs-jl-and-v0-5/2978)

<div class="topic-metadata">

**Author:** [@healyp](https://discourse.julialang.org/u/healyp)\
**Replies:** 3\
**Last updated:** [April 4, 2017, 3:17pm UTC](https://discourse.julialang.org/t/graphs-jl-and-v0-5/2978 "2017-04-04T15:17:47Z")

</div>

Perhaps not the exact forum for this but hopefully somebody has a quick answer… I upgraded to v0.5 just recently and since then Graphs.jl has been issuing a slew of warnings of the following type: WARNING: Method defin…

---

## [JuMP & warmstart](https://discourse.julialang.org/t/jump-warmstart/2998)

<div class="topic-metadata">

**Author:** [@abulak](https://discourse.julialang.org/u/abulak)\
**Replies:** 3\
**Last updated:** [April 2, 2017, 2:07am UTC](https://discourse.julialang.org/t/jump-warmstart/2998 "2017-04-02T02:07:09Z")

</div>

I’m trying to start SCS with a given solution from previous runs, see http://jump.readthedocs.io/en/latest/refmodel.html?highlight=internalModel#accessing-the-low-level-model I mimic https://github.com/JuliaOpt/SCS.jl/b…

---

## [Parallel model generation in JuMP](https://discourse.julialang.org/t/parallel-model-generation-in-jump/2965)

<div class="topic-metadata">

**Author:** [@kkmann](https://discourse.julialang.org/u/kkmann)\
**Replies:** 1\
**Last updated:** [March 30, 2017, 3:17pm UTC](https://discourse.julialang.org/t/parallel-model-generation-in-jump/2965 "2017-03-30T15:17:24Z")

</div>

Hey, I am kinda re-iterating on https://github.com/JuliaOpt/JuMP.jl/issues/958. The application I had in mind with when opening the issue was a large-scale binary assignment problem where most of the coefficients are in…

---

## [Ex-post variable values not equal to solver-computed ones](https://discourse.julialang.org/t/ex-post-variable-values-not-equal-to-solver-computed-ones/2927)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 0\
**Last updated:** [March 28, 2017, 2:13pm UTC](https://discourse.julialang.org/t/ex-post-variable-values-not-equal-to-solver-computed-ones/2927 "2017-03-28T14:13:51Z")

</div>

I have a simple JuMP optimisation problem where the objective is to maximise forest harvesting under a budget constraint of subsides/tax to push up/down harvesting, a supply curve that depends on price+subsides and fores…

---

## [Benders Decomposition: Callback function to be called when Master problem reaches optimal at that iteration (in JuMP's example, it is called@ any feasible sub-optimal integer point)](https://discourse.julialang.org/t/benders-decomposition-callback-function-to-be-called-when-master-problem-reaches-optimal-at-that-iteration-in-jumps-example-it-is-called-any-feasible-sub-optimal-integer-point/2856)

<div class="topic-metadata">

**Author:** [@loylobo](https://discourse.julialang.org/u/loylobo)\
**Replies:** 10\
**Last updated:** [March 30, 2017, 6:40am UTC](https://discourse.julialang.org/t/benders-decomposition-callback-function-to-be-called-when-master-problem-reaches-optimal-at-that-iteration-in-jumps-example-it-is-called-any-feasible-sub-optimal-integer-point/2856 "2017-03-30T06:40:32Z")

</div>

Hi, I’m working on Bender’s decomposition of a MILP on the Julia interface with JuMP package on a Gurobi solver. In the example here, the callback function of lazy constraints is called when the master problem reaches a…

---

## [MathProgBase internal model: get constraint sens](https://discourse.julialang.org/t/mathprogbase-internal-model-get-constraint-sens/2946)

<div class="topic-metadata">

**Author:** [@Pierre-Louis\_Poirion](https://discourse.julialang.org/u/Pierre-Louis_Poirion)\
**Replies:** 1\
**Last updated:** [March 29, 2017, 12:39pm UTC](https://discourse.julialang.org/t/mathprogbase-internal-model-get-constraint-sens/2946 "2017-03-29T12:39:56Z")

</div>

Hello When accessing the internal model of an LP with MathProgBase, is there some way to access the sens of the constraints of the LP? Thanks PL

---

## [ReadOnlyMemoryError using Ipopt not fixed in 0.51](https://discourse.julialang.org/t/readonlymemoryerror-using-ipopt-not-fixed-in-0-51/2611)

<div class="topic-metadata">

**Author:** [@Frank\_Kampas](https://discourse.julialang.org/u/Frank_Kampas)\
**Replies:** 8\
**Last updated:** [March 27, 2017, 11:49pm UTC](https://discourse.julialang.org/t/readonlymemoryerror-using-ipopt-not-fixed-in-0-51/2611 "2017-03-27T23:49:45Z")

</div>

ReadOnlyMemoryError() in solveProblem(::Ipopt.IpoptProblem) at C:\\Users\\Frank.julia\\v0.5\\Ipopt\\src\\Ipopt.jl:304 in optimize!(::Ipopt.IpoptMathProgModel) at C:\\Users\\Frank.julia\\v0.5\\Ipopt\\src\\IpoptSolverInterface.jl:12…

---

## [Issues with JuMPeR](https://discourse.julialang.org/t/issues-with-jumper/2794)

<div class="topic-metadata">

**Author:** [@Shimrit\_Shtern](https://discourse.julialang.org/u/Shimrit_Shtern)\
**Replies:** 5\
**Last updated:** [March 23, 2017, 3:39pm UTC](https://discourse.julialang.org/t/issues-with-jumper/2794 "2017-03-23T15:39:07Z")

</div>

Hi I have a legacy code in JuMPeR which I’m trying to run with the latest version of JuMP and Julia. The command setDefaultOracle is not recognized, and I can not find what it was changed to. Does anybody know what it …

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

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