# Optimization (Mathematical)

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

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

**Page:** 123

---

## [Build issues of Ipopt](https://discourse.julialang.org/t/build-issues-of-ipopt/7095)

<div class="topic-metadata">

**Author:** [@Rahul\_Sharma](https://discourse.julialang.org/u/Rahul_Sharma)\
**Replies:** 4\
**Last updated:** [February 2, 2018, 9:13am UTC](https://discourse.julialang.org/t/build-issues-of-ipopt/7095 "2018-02-02T09:13:49Z")

</div>

Hi all, I am trying to install CoinOptServces package. But, the Ipopt package in it has build issues. It seems that the process ./get.Blas had an error (ProcessExited(1)). How do I install the package without any probe…

---

## [JuMP User-Defined Function, Value and Gradient At Once](https://discourse.julialang.org/t/jump-user-defined-function-value-and-gradient-at-once/8681)

<div class="topic-metadata">

**Author:** [@nhipsman](https://discourse.julialang.org/u/nhipsman)\
**Replies:** 3\
**Last updated:** [February 1, 2018, 8:27pm UTC](https://discourse.julialang.org/t/jump-user-defined-function-value-and-gradient-at-once/8681 "2018-02-01T20:27:26Z")

</div>

Hi - I have a user-defined function for which I have an analytical gradient I’d like to use. Furthermore, most of the effort in calculating that gradient is already done in calculating the value of the function. Is th…

---

## [Correct way to express SOSII constraints](https://discourse.julialang.org/t/correct-way-to-express-sosii-constraints/8596)

<div class="topic-metadata">

**Author:** [@michaellindon](https://discourse.julialang.org/u/michaellindon)\
**Replies:** 8\
**Last updated:** [January 31, 2018, 3:46am UTC](https://discourse.julialang.org/t/correct-way-to-express-sosii-constraints/8596 "2018-01-31T03:46:19Z")

</div>

I have an application in which I would like to use SOS II constraints to model a piecewise linear approximation to non-linear function. In particular I have a log(z) term in my objective which I would like to approximate…

---

## [Convex.jl: Return number of solver iterations](https://discourse.julialang.org/t/convex-jl-return-number-of-solver-iterations/8689)

<div class="topic-metadata">

**Author:** [@migarstka](https://discourse.julialang.org/u/migarstka)\
**Replies:** 0\
**Last updated:** [January 30, 2018, 12:17pm UTC](https://discourse.julialang.org/t/convex-jl-return-number-of-solver-iterations/8689 "2018-01-30T12:17:23Z")

</div>

Hi, is there any way to return the number of solver iterations to convergence when I solve an optimization problem with Convex.jl and the SCS-solver? Thank you!

---

## [JuMP (Not) Passing Exact Hessians to Ipopt](https://discourse.julialang.org/t/jump-not-passing-exact-hessians-to-ipopt/7844)

<div class="topic-metadata">

**Author:** [@Juser](https://discourse.julialang.org/u/Juser)\
**Replies:** 12\
**Last updated:** [January 29, 2018, 10:17pm UTC](https://discourse.julialang.org/t/jump-not-passing-exact-hessians-to-ipopt/7844 "2018-01-29T22:17:30Z")

</div>

When using Ipopt through JuMP, I find myself unable to set hessian\_approximation=“exact” (i.e. to tell Ipopt that I will give it an exact hessian). When I try, I get an error to the effect of “Exception message: eval\_h…

---

## [Nonlinear Constraints with Splatting](https://discourse.julialang.org/t/nonlinear-constraints-with-splatting/8677)

<div class="topic-metadata">

**Author:** [@shoshievass](https://discourse.julialang.org/u/shoshievass)\
**Replies:** 7\
**Last updated:** [January 29, 2018, 9:47pm UTC](https://discourse.julialang.org/t/nonlinear-constraints-with-splatting/8677 "2018-01-29T21:47:05Z")

</div>

I’m trying to solve an optimization problem w/ (N+1) parameters subject to a set of N nonlinear constraints, each of which relies on the whole vector of the parameters. A simplified version of my problem looks like this…

---

## [NLopt 0.3.6 segfaults Julia 0.6.2](https://discourse.julialang.org/t/nlopt-0-3-6-segfaults-julia-0-6-2/8645)

<div class="topic-metadata">

**Author:** [@ivo\_welch](https://discourse.julialang.org/u/ivo_welch)\
**Replies:** 0\
**Last updated:** [January 27, 2018, 9:54pm UTC](https://discourse.julialang.org/t/nlopt-0-3-6-segfaults-julia-0-6-2/8645 "2018-01-27T21:54:54Z")

</div>

julia\> using NLopt julia\> myfun(x::Vector, unused::Vector)= (x\[1\]-2)^2 + (x\[2\]-3)^2 + (x\[1\]\*x\[2\])^2 myfun (generic function with 1 method) julia\> opt= Opt(:LN\_NELDERMEAD,2) Opt(:LN\_NELDERMEAD, 2) julia\> lower\_bounds!(…

---

## [Optim L-BFGS() - Can I save internal state?](https://discourse.julialang.org/t/optim-l-bfgs-can-i-save-internal-state/8583)

<div class="topic-metadata">

**Author:** [@egcjm](https://discourse.julialang.org/u/egcjm)\
**Replies:** 1\
**Last updated:** [January 25, 2018, 11:32am UTC](https://discourse.julialang.org/t/optim-l-bfgs-can-i-save-internal-state/8583 "2018-01-25T11:32:52Z")

</div>

Oftentimes, L-BFGS has not converged when it stops after a few hours of crunching away because I specified too few iterations… I then would like to continue without having to restart from scratch, i.e. without L-BFGS reb…

---

## [optim arguments: higher dimensional arrays and gradient specification](https://discourse.julialang.org/t/optim-arguments-higher-dimensional-arrays-and-gradient-specification/8500)

<div class="topic-metadata">

**Author:** [@egcjm](https://discourse.julialang.org/u/egcjm)\
**Replies:** 10\
**Last updated:** [January 26, 2018, 2:31pm UTC](https://discourse.julialang.org/t/optim-arguments-higher-dimensional-arrays-and-gradient-specification/8500 "2018-01-26T14:31:30Z")

</div>

Two questions regarding optim,jl: Gradient specification for higher dimensional arrays. Optim.jl documentation states that “for zeroth and first order methods, it is also possible to pass in matrices, or even higher d…

---

## [Linking solver binaries with models (JuMP)](https://discourse.julialang.org/t/linking-solver-binaries-with-models-jump/8453)

<div class="topic-metadata">

**Author:** [@Curious1](https://discourse.julialang.org/u/Curious1)\
**Replies:** 7\
**Last updated:** [January 24, 2018, 11:43am UTC](https://discourse.julialang.org/t/linking-solver-binaries-with-models-jump/8453 "2018-01-24T11:43:57Z")

</div>

I have binaries of solvers in a particular directory of my linux systems. Now I want to solve my JuMP model using those binaries. How do I do that?

---

## [JuMP : Adding variables/constraints to a model dynamically](https://discourse.julialang.org/t/jump-adding-variables-constraints-to-a-model-dynamically/3974)

<div class="topic-metadata">

**Author:** [@Julie](https://discourse.julialang.org/u/Julie)\
**Replies:** 8\
**Last updated:** [October 27, 2017, 12:51pm UTC](https://discourse.julialang.org/t/jump-adding-variables-constraints-to-a-model-dynamically/3974 "2017-10-27T12:51:32Z")

</div>

Is it possible to add dynamically constraints and/or variables to a model? I know there is a syntax to add variable (for column generation) but in the documentation I found that “Some solvers do not expose the ability t…

---

## [Optimization routines for Bigfloat/doubledouble/higher precision objective and gradient functions?](https://discourse.julialang.org/t/optimization-routines-for-bigfloat-doubledouble-higher-precision-objective-and-gradient-functions/8448)

<div class="topic-metadata">

**Author:** [@egcjm](https://discourse.julialang.org/u/egcjm)\
**Replies:** 3\
**Last updated:** [January 19, 2018, 4:46pm UTC](https://discourse.julialang.org/t/optimization-routines-for-bigfloat-doubledouble-higher-precision-objective-and-gradient-functions/8448 "2018-01-19T16:46:18Z")

</div>

Are there Julia optimizers that operate on bigfloat/doubledouble/higher precision objective and gradient functions? I am specifically interested in a L-BGFS functionality for higher that double precision.

---

## [Solvers, nonlinear constraints and user defined functions](https://discourse.julialang.org/t/solvers-nonlinear-constraints-and-user-defined-functions/4690)

<div class="topic-metadata">

**Author:** [@kguo](https://discourse.julialang.org/u/kguo)\
**Replies:** 10\
**Last updated:** [January 18, 2018, 1:17pm UTC](https://discourse.julialang.org/t/solvers-nonlinear-constraints-and-user-defined-functions/4690 "2018-01-18T13:17:28Z")

</div>

I apologize if someone had raised questions like this. And I understand the topic sounded similar to some previous topics. I did do a search. But didn’t found specific answers to all the questions I have. I understan…

---

## [Error solve JuMP models in parallel](https://discourse.julialang.org/t/error-solve-jump-models-in-parallel/8250)

<div class="topic-metadata">

**Author:** [@CanLi1](https://discourse.julialang.org/u/CanLi1)\
**Replies:** 6\
**Last updated:** [January 10, 2018, 4:53pm UTC](https://discourse.julialang.org/t/error-solve-jump-models-in-parallel/8250 "2018-01-10T16:53:32Z")

</div>

Hi folks, I’m new to Julia. I’m solving some JuMP models in parallel and I encountered the following error. The smallest example that I can come up with is as follows: smallmodel.jl using JuMP using Ipopt function g…

---

## [Genetic Programming for predicting equations of motion](https://discourse.julialang.org/t/genetic-programming-for-predicting-equations-of-motion/8211)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 14\
**Last updated:** [January 9, 2018, 12:24pm UTC](https://discourse.julialang.org/t/genetic-programming-for-predicting-equations-of-motion/8211 "2018-01-09T12:24:28Z")

</div>

Hello people! We want to start a new bachelor project soon, with the goal of using Genetic Programming to somehow predict equations of motion from timeseries. There has been quite some work on this field, notably the pu…

---

## [Initialize a nonlinear model](https://discourse.julialang.org/t/initialize-a-nonlinear-model/8190)

<div class="topic-metadata">

**Author:** [@CanLi1](https://discourse.julialang.org/u/CanLi1)\
**Replies:** 2\
**Last updated:** [January 6, 2018, 12:31am UTC](https://discourse.julialang.org/t/initialize-a-nonlinear-model/8190 "2018-01-06T00:31:47Z")

</div>

Hi folks, In GAMS, we can initialize a nonlinear model by setting variable.l = initial\_value. I’m wondering how this can be done in JuMP, i.e., how can we initialize the primal variables of a JuMP model before we use th…

---

## [JuMP, LinearProg, How to get problem data in form min (c^t)x s.t. Ax = b, x \>= 0](https://discourse.julialang.org/t/jump-linearprog-how-to-get-problem-data-in-form-min-c-t-x-s-t-ax-b-x-0/8100)

<div class="topic-metadata">

**Author:** [@pedroborgesmelo](https://discourse.julialang.org/u/pedroborgesmelo)\
**Replies:** 4\
**Last updated:** [January 3, 2018, 10:12pm UTC](https://discourse.julialang.org/t/jump-linearprog-how-to-get-problem-data-in-form-min-c-t-x-s-t-ax-b-x-0/8100 "2018-01-03T22:12:22Z")

</div>

Hey Guys! When I model a LP with JuMP, is it possible get the problem data in the form min (c^t)x s.t. Ax = b, x \>= 0 easily ? I mean, with a function already existing? If not, what is an easy way? Thanks in advance,

---

## [Parse NLconstraint in JuMP](https://discourse.julialang.org/t/parse-nlconstraint-in-jump/7841)

<div class="topic-metadata">

**Author:** [@CanLi1](https://discourse.julialang.org/u/CanLi1)\
**Replies:** 2\
**Last updated:** [December 19, 2017, 5:04pm UTC](https://discourse.julialang.org/t/parse-nlconstraint-in-jump/7841 "2017-12-19T17:04:34Z")

</div>

Hi folks, I want do the following in JuMP but I don’t know how to do it. Suppose I already have a model m. In model m, I defined variables x (for simplicity let’s just represent all the variables in x, which is a R^n v…

---

## [Build issues with IPOPT](https://discourse.julialang.org/t/build-issues-with-ipopt/7829)

<div class="topic-metadata">

**Author:** [@Rahul\_Sharma](https://discourse.julialang.org/u/Rahul_Sharma)\
**Replies:** 0\
**Last updated:** [December 18, 2017, 8:12am UTC](https://discourse.julialang.org/t/build-issues-with-ipopt/7829 "2017-12-18T08:12:07Z")

</div>

I am trying to install IPOPT package. But, the Pkg.build("Ipopt") gives the following error (There are a lot of logs but I thought pasting all the output might be helpful. The error is at the last if you want to skip to…

---

## [StackOverflowError](https://discourse.julialang.org/t/stackoverflowerror/7773)

<div class="topic-metadata">

**Author:** [@bdeonovic](https://discourse.julialang.org/u/bdeonovic)\
**Replies:** 7\
**Last updated:** [December 17, 2017, 8:11pm UTC](https://discourse.julialang.org/t/stackoverflowerror/7773 "2017-12-17T20:11:56Z")

</div>

First time using JuMP. Below is my JuMP specific code. I am getting very vague error when I try to solve the model and so I am not sure how to follow up. I’m not even sure how specific I should get: m = Model(solver=NLo…

---

## [JuMP - how to check if particular constraint already exists](https://discourse.julialang.org/t/jump-how-to-check-if-particular-constraint-already-exists/7768)

<div class="topic-metadata">

**Author:** [@Rafal\_Machalica](https://discourse.julialang.org/u/Rafal_Machalica)\
**Replies:** 3\
**Last updated:** [December 15, 2017, 5:16pm UTC](https://discourse.julialang.org/t/jump-how-to-check-if-particular-constraint-already-exists/7768 "2017-12-15T17:16:59Z")

</div>

Hello, I’m trying to optimize my Integer Linear Model by automatic analysing of the input data and generate lots of constraints like x\[3,45,12,7,8,1\] == 0 I have several different subalghoritms that may return partial…

---

## [Adding Algencan to JuMP](https://discourse.julialang.org/t/adding-algencan-to-jump/7766)

<div class="topic-metadata">

**Author:** [@pjssilva](https://discourse.julialang.org/u/pjssilva)\
**Replies:** 5\
**Last updated:** [December 15, 2017, 10:10am UTC](https://discourse.julialang.org/t/adding-algencan-to-jump/7766 "2017-12-15T10:10:25Z")

</div>

Hello, I work in the Optimization group at the University of Campinas. Two of my colleagues have written a very good general purpose nolinear optimization solver called Algencan. https://www.ime.usp.br/~egbirgin/tango/c…

---

## [JuMP: Ipopt, ECOS, ErrorMsg: no method matching setvartype](https://discourse.julialang.org/t/jump-ipopt-ecos-errormsg-no-method-matching-setvartype/7705)

<div class="topic-metadata">

**Author:** [@Anton\_Hinneck](https://discourse.julialang.org/u/Anton_Hinneck)\
**Replies:** 3\
**Last updated:** [December 12, 2017, 5:31pm UTC](https://discourse.julialang.org/t/jump-ipopt-ecos-errormsg-no-method-matching-setvartype/7705 "2017-12-12T17:31:08Z")

</div>

Hi, I have been programming a MILP for university. The model is feasible and was already solved using GLPK, CBC, Gurobi and CPLEX. The results are as expected and were carefully examined already. However, I have an issue…

---

## [Interpolation in constraint](https://discourse.julialang.org/t/interpolation-in-constraint/7325)

<div class="topic-metadata">

**Author:** [@MaximilianJHuber](https://discourse.julialang.org/u/MaximilianJHuber)\
**Replies:** 3\
**Last updated:** [December 7, 2017, 3:59pm UTC](https://discourse.julialang.org/t/interpolation-in-constraint/7325 "2017-12-07T15:59:17Z")

</div>

Hi, I have a conceptional question: I have 10 non-linear constraints for k=k\_1, ..., k\_{10} (that represent a discrete grid of a continuous variable) and 10 coefficients, \\theta = \\theta\_1, ... \\theta\_{10}, that are det…

---

## [Memory corruption bugs in ECOS.jl and SCS.jl](https://discourse.julialang.org/t/memory-corruption-bugs-in-ecos-jl-and-scs-jl/7582)

<div class="topic-metadata">

**Author:** [@miles.lubin](https://discourse.julialang.org/u/miles.lubin)\
**Replies:** 0\
**Last updated:** [December 6, 2017, 10:26pm UTC](https://discourse.julialang.org/t/memory-corruption-bugs-in-ecos-jl-and-scs-jl/7582 "2017-12-06T22:26:50Z")

</div>

We recently discovered and corrected memory corruption bugs in both ECOS.jl and SCS.jl. The wrappers did not properly keep a reference in Julia to the memory passed to the solvers, so if the GC fired at an inopportune t…

---

## [Restarting NLP solve from previous infeasible solution](https://discourse.julialang.org/t/restarting-nlp-solve-from-previous-infeasible-solution/7542)

<div class="topic-metadata">

**Author:** [@adowling2](https://discourse.julialang.org/u/adowling2)\
**Replies:** 1\
**Last updated:** [December 6, 2017, 2:25am UTC](https://discourse.julialang.org/t/restarting-nlp-solve-from-previous-infeasible-solution/7542 "2017-12-06T02:25:13Z")

</div>

I am solving a nasty, non-convex NLP. In some instances, Ipopt converges to a point of local infeasibility. For other problems, I observed that restarting Ipopt from such an infeasible solution can sometimes lead to an o…

---

## [Force a gradient value at a degenerate point](https://discourse.julialang.org/t/force-a-gradient-value-at-a-degenerate-point/7418)

<div class="topic-metadata">

**Author:** [@vepiteski](https://discourse.julialang.org/u/vepiteski)\
**Replies:** 1\
**Last updated:** [December 1, 2017, 1:34am UTC](https://discourse.julialang.org/t/force-a-gradient-value-at-a-degenerate-point/7418 "2017-12-01T01:34:55Z")

</div>

I wish to implement Wolfe’s example x0 = \[0; 0.25; 0.0\] lb = \[0.0; 0.0; 0.0\] ub = \[Inf; Inf; 2.0\] @variable(nlp, lb\[i\] \<= x\[i = 1:3\] \<= ub\[i\], start = x0\[i\]) @NLobjective( nlp, Min, 4/3\*(x\[1\]^2 - x\[1\] \* x…

---

## [NLopt stopval and termination criteria](https://discourse.julialang.org/t/nlopt-stopval-and-termination-criteria/7333)

<div class="topic-metadata">

**Author:** [@ivborissov](https://discourse.julialang.org/u/ivborissov)\
**Replies:** 3\
**Last updated:** [November 30, 2017, 3:24pm UTC](https://discourse.julialang.org/t/nlopt-stopval-and-termination-criteria/7333 "2017-11-30T15:24:39Z")

</div>

Hi, I am solving optimization problems like find max x1 in \[a1,b1\] : f(x1,x2,x3...)\<=0 plus I know that at initial point f(a1,a2,a3...)\<=0. Sometimes my model f (based on experimental data) isn’t sensitive to x1 (like …

---

## [Announcement: updates to NEOS.jl](https://discourse.julialang.org/t/announcement-updates-to-neos-jl/7395)

<div class="topic-metadata">

**Author:** [@odow](https://discourse.julialang.org/u/odow)\
**Replies:** 3\
**Last updated:** [November 30, 2017, 5:22am UTC](https://discourse.julialang.org/t/announcement-updates-to-neos-jl/7395 "2017-11-30T05:22:54Z")

</div>

NEOS.jl is a Julia interface to the NEOS Server, a free internet-based service for solving numerical optimization problems. In addition to wrapping the XML-RPC interface, NEOS.jl provides a MathProgBase solver that can …

---

## [Announcement: breaking changes in AmplNLWriter.jl v0.4.0](https://discourse.julialang.org/t/announcement-breaking-changes-in-amplnlwriter-jl-v0-4-0/7342)

<div class="topic-metadata">

**Author:** [@odow](https://discourse.julialang.org/u/odow)\
**Replies:** 0\
**Last updated:** [November 28, 2017, 1:22am UTC](https://discourse.julialang.org/t/announcement-breaking-changes-in-amplnlwriter-jl-v0-4-0/7342 "2017-11-28T01:22:50Z")

</div>

Version 0.4.0 of AmplNLWriter.jl introduces a major breaking change for users: BonminNLSolver(), CouenneNLSolver(), and IpoptNLSolver() have been removed and will now throw an error. Users of Bonmin and Couenne should c…

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

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