login about faq
3
1

Do you know any good modeling API/language interfacing IPOPT that doesn't require to give it the Hessian and allows to give a starting point for the search?

I found API for R, Matlab and Python but you need to give the Hessian for all these (not very handy to build a model with many constraints).

Do you also have an idea of how Ipopt compares to other NLP solvers (CONOPT,...)?

Thank you in advance!
Pierre

asked Jan 28 '11 at 09:14

pierre%20schaus's gravatar image

pierre schaus
5444

edited Feb 19 at 11:24

fbahr's gravatar image

fbahr ♦
1.5k37


If you come from a UNIX background and are used to efficient tools with parsimonious interfaces, one of the most beautiful modeling languages (IMHO) for math programming is AMPL -- it's extremely fast, the language is very similar to mathematical notation, and it'll supply exact 1st and 2nd derivatives to IPOPT (via automatic differentiation) without user intervention. It is however, commercial software. There is an academic version that is limited to 300 variables and 300 constraints. You can easily specify the initial guess in AMPL. http://www.ampl.com/trial.html

If you are in academia (and are running Windows), you can get a free copy of AIMMS. http://www.aimms.com/academic/free-academic-license

If you are using MATLAB and your problem isn't too big, you can compile the MEX version of IPOPT, and use INTLAB for sparse automatic differentiation. It's easy to specify the initial guess in MATLAB. https://projects.coin-or.org/Ipopt/wiki/MatlabInterface http://www.ti3.tu-harburg.de/~rump/intlab/ The only downside is IPOPT requires the fixed sparsity structure of your Jacobians and Hessians. Some AD tools generate the sparsity structure for you, but INTLAB doesn't, so as a heuristic you may just want to plug in the initial point into your AD-calculated Hessian/Jacobian, get the nonzero element coordinates and pass that to IPOPT as the sparsity structure.

As for comparisons between IPOPT and other solvers, there are many benchmarks out there, but as they say the proof of the pudding is in the eating. You really have to try a solver on your particular problem to see how well it performs.

In my anecdotal experience (so please take this with a grain of salt), IPOPT matches the performance of most other NLP solvers (and I've used quite a few -- we have maintenance license for a whole bunch of them) for small dense problems, and beats them by a fair margin on large-scale sparse ones. IPOPT tends to be able to start from a worse starting point and find solutions faster than most other solvers (probably attributable to the fact that it makes full use of 2nd derivative information). It is also more robust to ill-conditioning than most solvers I have used (except for KNITRO, which is decent). (CONOPT for instance, fails fairly rapidly with only even a slightly bad initial guess -- at least for my problems).

That said, IPOPT does have a few weaknesses.

  • interior point methods are not as amenable to warm-starts as active-set methods. (I know there is a warm-start option in IPOPT, but your mileage may vary). If you have a problem where the previous instance provides a good initial guess for the current (e.g. control problems), then you'll want to use an active-set method. In special problem cases like the NLP reformulation of MPECs (mathematical programs with equilibrium constraints), active-set solvers may actually produce better results.
  • IPOPT tends to not perform as well when there are very few degrees of freedom. Solvers like CONOPT (which implement GRG) tend to perform much better.

IPOPT's performance is mostly tied to the linear solver it is using (in the algorithm, the solution of the linear system dominates in terms of computational time). If you are using a decent linear solver like MA27 or MA57, chances are you'll get excellent performance. Specialized solvers like PARDISO are good for REALLY large-scale problems (possibly > 100,000 variables), but for mid-sized problems (20,000 to 30,000), my experience has been that MA57 is much faster.

Also, there are tricks to initializing an interior-point method; unlike active-set methods, if you pass it an initial point where a majority of variables at their constraints, performance tends to degrade (because the algorithm tends to cycle). If you run through your initial guess points and back-off those variables that are at their constraints by even 1e-6, you'll find that performance will improve significantly. (IPOPT has an option for doing this automatically too, but I do it manually)

link

answered Jan 28 '11 at 15:31

Gilead's gravatar image

Gilead ♦
1.2k28

Thank you very much for your very complete and helpful answer!

Pierre

(Jan 29 '11 at 09:31) pierre schaus

Great answer - upvote.

(Feb 19 at 18:57) Samik R.

FYI, the latest release of YALMIP significantly improves its performance when used together with IPOPT (handles Jacobian sparsity etc)

http://users.isy.liu.se/johanl/yalmip/

link

answered Mar 18 '11 at 17:25

Johan%20L%C3%B6fberg's gravatar image

Johan Löfberg
211

yalmip is very good, consider also pyomo that solves general non linear problems via .nl files. Say can use any solver that is able to be run with ASL library for AMPL

https://software.sandia.gov/trac/coopr/wiki/Pyomo

link

answered Apr 06 '11 at 23:09

Fabrizio's gravatar image

Fabrizio
411

How about Yalmip in matlab?

link

answered Jan 28 '11 at 13:39

John%20Cui's gravatar image

John Cui
1515

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×17
×2

Asked: Jan 28 '11 at 09:14

Seen: 1,032 times

Last updated: Feb 19 at 18:57

OR-Exchange! Your site for questions, answers, and announcements about operations research.