# Optimization (Mathematical)

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

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

**Page:** 126

---

## ["We currently do not support ranged constraints with conic solvers"](https://discourse.julialang.org/t/we-currently-do-not-support-ranged-constraints-with-conic-solvers/5148)

<div class="topic-metadata">

**Author:** [@Ksun46](https://discourse.julialang.org/u/Ksun46)\
**Replies:** 0\
**Last updated:** [July 31, 2017, 7:04am UTC](https://discourse.julialang.org/t/we-currently-do-not-support-ranged-constraints-with-conic-solvers/5148 "2017-07-31T07:04:37Z")

</div>

Hi all, I was using Gurobi to solve a problem with some second-order conic constraints (other constraints are linear). The objective function is quadratic, and I made it into the form of another soc constraint. However,…

---

## [User define functions from Python and nonlinear constraint JuMP](https://discourse.julialang.org/t/user-define-functions-from-python-and-nonlinear-constraint-jump/5063)

<div class="topic-metadata">

**Author:** [@pipete40](https://discourse.julialang.org/u/pipete40)\
**Replies:** 0\
**Last updated:** [July 25, 2017, 6:49pm UTC](https://discourse.julialang.org/t/user-define-functions-from-python-and-nonlinear-constraint-jump/5063 "2017-07-25T18:49:22Z")

</div>

Hi JuMP Community, I am working on a problem with a linear objective and one nonlinear constraint. Let mvncdf(x1, x2, x3,…) be the multivariate normal distribution; then, the nonlinear constraint is given by mvncdf(x1, …

---

## [Getting JuMP.Variable from variable name "x\[1\]"](https://discourse.julialang.org/t/getting-jump-variable-from-variable-name-x-1/4875)

<div class="topic-metadata">

**Author:** [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Replies:** 3\
**Last updated:** [July 15, 2017, 8:52pm UTC](https://discourse.julialang.org/t/getting-jump-variable-from-variable-name-x-1/4875 "2017-07-15T20:52:29Z")

</div>

Is there a straightforward way to get a JuMP.Variable object from the model using the variable name or column index that does not involve the relatively inefficient eval(parse(vname))?

---

## [How to deal with the lack of an explicit Expression type (present in CVX) in Convex.jl?](https://discourse.julialang.org/t/how-to-deal-with-the-lack-of-an-explicit-expression-type-present-in-cvx-in-convex-jl/4854)

<div class="topic-metadata">

**Author:** [@falbarelli](https://discourse.julialang.org/u/falbarelli)\
**Replies:** 8\
**Last updated:** [July 14, 2017, 9:09pm UTC](https://discourse.julialang.org/t/how-to-deal-with-the-lack-of-an-explicit-expression-type-present-in-cvx-in-convex-jl/4854 "2017-07-14T21:09:58Z")

</div>

Hello, I am a new user of Convex.jl and I am trying to port some Matlab code I wrote for CVX. Basically one of the variables of my problem is a matrix, but my constraints involve not the variable matrix itself, but two …

---

## [Need help understand error status of Ipopt](https://discourse.julialang.org/t/need-help-understand-error-status-of-ipopt/4771)

<div class="topic-metadata">

**Author:** [@xqrongm](https://discourse.julialang.org/u/xqrongm)\
**Replies:** 7\
**Last updated:** [July 14, 2017, 8:03pm UTC](https://discourse.julialang.org/t/need-help-understand-error-status-of-ipopt/4771 "2017-07-14T20:03:11Z")

</div>

I’m trying to use JuMP and Ipopt for this optimization problem below. I keep getting errors like “Infeasible\_Problem\_Detected”, “Search\_Direction\_Becomes\_Too\_Small”, “Restoration\_Failed”, for various datasets. I read I…

---

## [Videos from the JuMP developers meetup](https://discourse.julialang.org/t/videos-from-the-jump-developers-meetup/4667)

<div class="topic-metadata">

**Author:** [@miles.lubin](https://discourse.julialang.org/u/miles.lubin)\
**Replies:** 1\
**Last updated:** [July 6, 2017, 6:12pm UTC](https://discourse.julialang.org/t/videos-from-the-jump-developers-meetup/4667 "2017-07-06T18:12:34Z")

</div>

On the week of June 12-16 we held the JuMP developers meetup/workshop at MIT. The slides and videos from the talks are now posted. I hope this will be a useful resource for anyone interested in JuMP’s internals, extensio…

---

## [Levenberg-Marquardt in Optim.jl 0.9.0](https://discourse.julialang.org/t/levenberg-marquardt-in-optim-jl-0-9-0/4565)

<div class="topic-metadata">

**Author:** [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Replies:** 4\
**Last updated:** [July 4, 2017, 4:41am UTC](https://discourse.julialang.org/t/levenberg-marquardt-in-optim-jl-0-9-0/4565 "2017-07-04T04:41:38Z")

</div>

I am trying to fix this mexjulia example and I cannot figure out what to replace levenberg\_marquardt with. In particular, levenberg\_marquardt returns a vector of residuals of length m but as far as I can see, all of the …

---

## [High dual infeasibilities in IPOPT lead to convergence issues](https://discourse.julialang.org/t/high-dual-infeasibilities-in-ipopt-lead-to-convergence-issues/1687)

<div class="topic-metadata">

**Author:** [@huckl3b3rry87](https://discourse.julialang.org/u/huckl3b3rry87)\
**Replies:** 6\
**Last updated:** [July 3, 2017, 11:22pm UTC](https://discourse.julialang.org/t/high-dual-infeasibilities-in-ipopt-lead-to-convergence-issues/1687 "2017-07-03T23:22:08Z")

</div>

I am using JuMP.jl to develop NLOptControl.jl to solve optimal control problems and I have dealt with an IPOPT issue for some time now, where the dual infeasibility of my constraints are very high and eventually the prob…

---

## [Simple "coin" example will not work with JuMP + Gurobi](https://discourse.julialang.org/t/simple-coin-example-will-not-work-with-jump-gurobi/4629)

<div class="topic-metadata">

**Author:** [@mbeltagy](https://discourse.julialang.org/u/mbeltagy)\
**Replies:** 1\
**Last updated:** [July 3, 2017, 9:03pm UTC](https://discourse.julialang.org/t/simple-coin-example-will-not-work-with-jump-gurobi/4629 "2017-07-03T21:03:38Z")

</div>

This model is a simple introductory example in Gurobi, that seems unsolvable with JuMP + Gurobi The model itself is typical found in a Gurobi installation at /opt/gurobi702/linux64/examples/data/coins.lp. Running gurob…

---

## [Mosek, different behavior after upgrade](https://discourse.julialang.org/t/mosek-different-behavior-after-upgrade/4613)

<div class="topic-metadata">

**Author:** [@mauro](https://discourse.julialang.org/u/mauro)\
**Replies:** 2\
**Last updated:** [July 3, 2017, 8:59pm UTC](https://discourse.julialang.org/t/mosek-different-behavior-after-upgrade/4613 "2017-07-03T20:59:40Z")

</div>

Hello everyone, I upgraded today from Julia 0.5.1 to 0.6. Doing so I ended up with the following behavior of Mosek (v.0.7.0) and JuMP (v.0.17.1): the example is using JuMP, Mosek m = Model(solver=MosekSolver()) @vari…

---

## [Help modeling a problem in Julia using JuMP (stock problem)](https://discourse.julialang.org/t/help-modeling-a-problem-in-julia-using-jump-stock-problem/4549)

<div class="topic-metadata">

**Author:** [@gbaesso](https://discourse.julialang.org/u/gbaesso)\
**Replies:** 6\
**Last updated:** [June 30, 2017, 11:13pm UTC](https://discourse.julialang.org/t/help-modeling-a-problem-in-julia-using-jump-stock-problem/4549 "2017-06-30T23:13:39Z")

</div>

Hello everyone, I’m new to Julia, and I´m helping my wife with her Master degree. Unfortunately, we both lack a solid mathematical foundation, and that´s really making things more difficult for me. I have started with …

---

## [Comparison involving variables with JuMP](https://discourse.julialang.org/t/comparison-involving-variables-with-jump/4551)

<div class="topic-metadata">

**Author:** [@kguo](https://discourse.julialang.org/u/kguo)\
**Replies:** 2\
**Last updated:** [June 29, 2017, 8:29pm UTC](https://discourse.julialang.org/t/comparison-involving-variables-with-jump/4551 "2017-06-29T20:29:56Z")

</div>

I am new to Julia/JuMP. Is it possible to perform comparison on variable. For example, is there something close to the following? maximum(M\[1,:\]. \* myFunction(x)) M is a nxn matrix and x is a variable. If not, what’…

---

## [Installation of Mosek.jl fails on Julia v0.5.2](https://discourse.julialang.org/t/installation-of-mosek-jl-fails-on-julia-v0-5-2/4498)

<div class="topic-metadata">

**Author:** [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Replies:** 2\
**Last updated:** [June 28, 2017, 11:13am UTC](https://discourse.julialang.org/t/installation-of-mosek-jl-fails-on-julia-v0-5-2/4498 "2017-06-28T11:13:06Z")

</div>

I cannot install Mosek.jl on a Windows 7 64 bit under Julia v0.5.2. I have downloaded and installed Mosek 8.0, mosek.exe is on the PATH and ENV contains the following keys: "MOSEK\_8\_0\_BINDIR" =\> "C:\\\\Program File…

---

## [Passing an array of variables to a user-defined non-linear function](https://discourse.julialang.org/t/passing-an-array-of-variables-to-a-user-defined-non-linear-function/4132)

<div class="topic-metadata">

**Author:** [@axsk](https://discourse.julialang.org/u/axsk)\
**Replies:** 11\
**Last updated:** [June 23, 2017, 4:15pm UTC](https://discourse.julialang.org/t/passing-an-array-of-variables-to-a-user-defined-non-linear-function/4132 "2017-06-23T16:15:03Z")

</div>

I am trying to optimize a multivariate function with JuMP, but can’t find a way to pass the arguments. The current code is: using JuMP …

---

## [Querying the coefficient of a variable in a constraint](https://discourse.julialang.org/t/querying-the-coefficient-of-a-variable-in-a-constraint/4236)

<div class="topic-metadata">

**Author:** [@Amulya\_Yadav](https://discourse.julialang.org/u/Amulya_Yadav)\
**Replies:** 1\
**Last updated:** [June 22, 2017, 6:30pm UTC](https://discourse.julialang.org/t/querying-the-coefficient-of-a-variable-in-a-constraint/4236 "2017-06-22T18:30:31Z")

</div>

Hi, I have built a model using JuMP. Now, I want to be able to get the A matrix for my constraints (i.e., the coefficient matrix in Ax\<b if my problem is represented in standard form. Is there any way to get this matrix…

---

## [Help Couenne error when specifying non-linear warehouse location problem](https://discourse.julialang.org/t/help-couenne-error-when-specifying-non-linear-warehouse-location-problem/4403)

<div class="topic-metadata">

**Author:** [@prescient](https://discourse.julialang.org/u/prescient)\
**Replies:** 2\
**Last updated:** [June 22, 2017, 3:52pm UTC](https://discourse.julialang.org/t/help-couenne-error-when-specifying-non-linear-warehouse-location-problem/4403 "2017-06-22T15:52:32Z")

</div>

I’m trying to specify a warehouse location problem that allows the optimizer to pick the warehouse locations rather than provide candidate locations. The problem is (1) when trying to register a function and solve the pr…

---

## [Extending MathProgBase to support complementarity constraints](https://discourse.julialang.org/t/extending-mathprogbase-to-support-complementarity-constraints/3995)

<div class="topic-metadata">

**Author:** [@adowling2](https://discourse.julialang.org/u/adowling2)\
**Replies:** 2\
**Last updated:** [May 30, 2017, 9:29pm UTC](https://discourse.julialang.org/t/extending-mathprogbase-to-support-complementarity-constraints/3995 "2017-05-30T21:29:14Z")

</div>

A few of us at Wisconsin are very interested in extending the abstraction in MathProgBase (MPB) to support complementarity constraints. The package https://github.com/chkwon/Complementarity.jl offers a nice way to model …

---

## [Rigorous global optimisation: First release of \`IntervalOptimisation.jl\`](https://discourse.julialang.org/t/rigorous-global-optimisation-first-release-of-intervaloptimisation-jl/4336)

<div class="topic-metadata">

**Author:** [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Replies:** 5\
**Last updated:** [June 18, 2017, 10:21pm UTC](https://discourse.julialang.org/t/rigorous-global-optimisation-first-release-of-intervaloptimisation-jl/4336 "2017-06-18T22:21:23Z")

</div>

I am excited to announce the first release of the \[IntervalOptimisation.jl\] (https://github.com/JuliaIntervals/IntervalOptimisation.jl) package, which performs (box-constrained) global optimisation for functions, includi…

---

## [How to generate solution file?](https://discourse.julialang.org/t/how-to-generate-solution-file/4266)

<div class="topic-metadata">

**Author:** [@gopal2017](https://discourse.julialang.org/u/gopal2017)\
**Replies:** 10\
**Last updated:** [June 18, 2017, 3:20pm UTC](https://discourse.julialang.org/t/how-to-generate-solution-file/4266 "2017-06-18T15:20:26Z")

</div>

Hello, I am using Cbc solver. I used the code mentioned below to generate .sol file at particular location: m=Model(solver=CbcSolver(ResultFile=“E:/SolverFuncSolution.sol”) It is generating .sol file but it is not sol…

---

## [Help rewriting Convex.jl problem in JuMP.jl](https://discourse.julialang.org/t/help-rewriting-convex-jl-problem-in-jump-jl/4321)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 8\
**Last updated:** [June 18, 2017, 5:24am UTC](https://discourse.julialang.org/t/help-rewriting-convex-jl-problem-in-jump-jl/4321 "2017-06-18T05:24:33Z")

</div>

I am having a hard time trying to translate a convex optimization problem from Convex.jl to JuMP.jl: using Convex, ECOS # generate some data n = 100 e = \[sin(50i)\*sin(50j) for i=1:n, j=1:n\] # optimization variable h =…

---

## [Creating a macro for defining differential equation constraints in NLOptControl.jl](https://discourse.julialang.org/t/creating-a-macro-for-defining-differential-equation-constraints-in-nloptcontrol-jl/4023)

<div class="topic-metadata">

**Author:** [@huckl3b3rry87](https://discourse.julialang.org/u/huckl3b3rry87)\
**Replies:** 11\
**Last updated:** [June 14, 2017, 5:34pm UTC](https://discourse.julialang.org/t/creating-a-macro-for-defining-differential-equation-constraints-in-nloptcontrol-jl/4023 "2017-06-14T17:34:02Z")

</div>

@miles.lubin please correct me if I am wrong, but from what I understand from the docs and our previous discussions, JuMP.jl does not allow the user to programmatically create variables and use ReverseDiffSparse.jl. To …

---

## [Should ForwardDiff.jl issue warnings at non-differentiable points?](https://discourse.julialang.org/t/should-forwarddiff-jl-issue-warnings-at-non-differentiable-points/4228)

<div class="topic-metadata">

**Author:** [@Dan](https://discourse.julialang.org/u/Dan)\
**Replies:** 12\
**Last updated:** [June 13, 2017, 2:15am UTC](https://discourse.julialang.org/t/should-forwarddiff-jl-issue-warnings-at-non-differentiable-points/4228 "2017-06-13T02:15:18Z")

</div>

The derivative of abs is discontinuous at zero. Currently ForwardDiff chooses the +1.0 derivative. Should this choice be done without a warning? In formal math, a new concept called the subgradient is defined to include…

---

## [SCSSolver in Convex and JuMP](https://discourse.julialang.org/t/scssolver-in-convex-and-jump/4171)

<div class="topic-metadata">

**Author:** [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Replies:** 5\
**Last updated:** [June 10, 2017, 1:53pm UTC](https://discourse.julialang.org/t/scssolver-in-convex-and-jump/4171 "2017-06-10T13:53:47Z")

</div>

The SCS solver is for convex cone problems, but Convex.jl manages to use it to solve quadratic problems; JuMP.jl instead throws an error. On the other hand, Ipopt seems to be working fine with JuMP but Convex complains. …

---

## [Empty constraint](https://discourse.julialang.org/t/empty-constraint/4111)

<div class="topic-metadata">

**Author:** [@mposs](https://discourse.julialang.org/u/mposs)\
**Replies:** 8\
**Last updated:** [June 7, 2017, 8:37pm UTC](https://discourse.julialang.org/t/empty-constraint/4111 "2017-06-07T20:37:43Z")

</div>

Is it possible to create an empty constraint? I need that for coding a row-and-column generation algorithm where I need to generate constraints associated to new variables only. Hence, at some point I’ll need to create n…

---

## [JuMP: How to construct a matrix with both variables and real numbers](https://discourse.julialang.org/t/jump-how-to-construct-a-matrix-with-both-variables-and-real-numbers/4127)

<div class="topic-metadata">

**Author:** [@Ksun46](https://discourse.julialang.org/u/Ksun46)\
**Replies:** 3\
**Last updated:** [June 7, 2017, 6:54am UTC](https://discourse.julialang.org/t/jump-how-to-construct-a-matrix-with-both-variables-and-real-numbers/4127 "2017-06-07T06:54:19Z")

</div>

I am a starter to JuMP and I am trying to construct a matrix that consists of both variables and real number(0s). The first way I can think of is to push! entries(variables or 0s) to an array and then push! multiple arra…

---

## [Dynamic generation of constraints](https://discourse.julialang.org/t/dynamic-generation-of-constraints/4107)

<div class="topic-metadata">

**Author:** [@mposs](https://discourse.julialang.org/u/mposs)\
**Replies:** 2\
**Last updated:** [June 6, 2017, 2:21pm UTC](https://discourse.julialang.org/t/dynamic-generation-of-constraints/4107 "2017-06-06T14:21:45Z")

</div>

Is there an easy way to expand the base set of a constraint? For instance, suppose that I have created @constraint(model, mycons\[i in 1:2\], x\[i\] \>= 1) and that I would like to extend it to @constraint(model, mycons\[i in…

---

## [JuMPChance into c++](https://discourse.julialang.org/t/jumpchance-into-c/4042)

<div class="topic-metadata">

**Author:** [@UserMorocco](https://discourse.julialang.org/u/UserMorocco)\
**Replies:** 0\
**Last updated:** [June 1, 2017, 6:15pm UTC](https://discourse.julialang.org/t/jumpchance-into-c/4042 "2017-06-01T18:15:31Z")

</div>

Hello, Can I use JuMPChance into c++ code ?

---

## [JuMP: Printing Mosek Solver Progress to Console](https://discourse.julialang.org/t/jump-printing-mosek-solver-progress-to-console/4006)

<div class="topic-metadata">

**Author:** [@prescient](https://discourse.julialang.org/u/prescient)\
**Replies:** 4\
**Last updated:** [June 1, 2017, 12:44am UTC](https://discourse.julialang.org/t/jump-printing-mosek-solver-progress-to-console/4006 "2017-06-01T00:44:31Z")

</div>

I’m an optimization newbie and can’t figure out how to print Mosek solver progress when attempting to solve problems with JuMP. Could anyone point me to an example that shows how to set Mosek parameters in JuMP? I’ve loo…

---

## [\[JuMP\] Sum function with additional constraints on indexes](https://discourse.julialang.org/t/jump-sum-function-with-additional-constraints-on-indexes/4001)

<div class="topic-metadata">

**Author:** [@Joao\_Saran](https://discourse.julialang.org/u/Joao_Saran)\
**Replies:** 2\
**Last updated:** [May 31, 2017, 11:03pm UTC](https://discourse.julialang.org/t/jump-sum-function-with-additional-constraints-on-indexes/4001 "2017-05-31T23:03:11Z")

</div>

My Objective Function is the following: @setObjective(m,Min, sum{costs\[i,j\]\*x\[i,j,k,t\],i= nodes, j = nodes, k = vehicles, t = periods}) AND I would like to make “i \< j” in the sum expression above! It is like adding …

---

## [Announcement: JuMP 0.17 released](https://discourse.julialang.org/t/announcement-jump-0-17-released/4012)

<div class="topic-metadata">

**Author:** [@blegat](https://discourse.julialang.org/u/blegat)\
**Replies:** 0\
**Last updated:** [May 31, 2017, 12:15pm UTC](https://discourse.julialang.org/t/announcement-jump-0-17-released/4012 "2017-05-31T12:15:33Z")

</div>

We are pleased to announce the release of JuMP 0.17. The release introduced 2 breaking changes: JuMP used to automatically transform quadratic constraints into second order cones for conic models but this is no longer …

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

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