[Coin-ipopt] problems to solve optimal control problems

Andreas Waechter andreasw at watson.ibm.com
Tue Sep 13 22:00:46 EDT 2005

Hi Ricki,

Sorry for taking so long to respond - I was on vacation :)

> I am new in using AMPL. I would like to calculate optimal control
> problems (OCP) with a direct method and I have heard, that IPOPT is very
> fast. Unfortunately, I have not been able to get a problem running.

Too bad - let's see if we can fix this.

> First of all, I have looked at the page: http://projects.coin-or.org/Ipopt
> At the bottom of this page, the version ipopt-3.0.0.tar.gz is available
> for downloading. But when I tried to open this file, there was an error.
> The linked file has only 3.8 KB (not 453 KB, as mentioned in the internet).

I think what happened is that you right-clicked on the link and chose
downloading - this will actually download the HTML for a webpage.

If you want to download the tarball from the Ipopt home page, click
normally on that attachment link.  This will bring up a new webpage, which
has a link called "download the file".  When you click on that one, your
browser will ask you where do download the file.  I'm very sorry for the
confusion - the attachment is only a temporary solution...

> Then I changed to the Tarballs: www.coin-or.org/Tarballs
> There were two Files: Ipopt_2005Sep05.tgz and Ipopt_2005Sep06.tgz
> These I was able to unzip and untar. When starting to install this
> version of IPOPT, the documentation referred to different folders (for
> example to EXTER in stead of OTHERS). This is not a big problem, but in
> the future time it would be nice to have this beeing consistent.

The problem is that you downloaded the tarballs for the old Fortran
version.  The new tarballs are not yet generated.  I just stepped again on
the feet of the person today who is responsible to setting up the scripts
for generating the tarballs, and he promised me that he would do it soon.

I agree this is confusing, and we will try to make it clearer soon.

> Then I started AMPL again and used the solver IPOPT. As an output, it
> first says: ipopt 2.2.1e.
> Is this right? Should it not say 3.0.0? This is also something, one can
> change easily.

You saw 2.2.1e, because you were using version 2.2.1e, which is the
most recent Fortran version.  The new version would say 3.0.0.

> The main problem was, that I could not run an OCP. I attatched an
> example from Zermelo, which is written in the book from Bryson and Ho
> ("Applied Optimal Control", pp. 77). The output in my version is:
> ....

I had a look at your model, and I was able to solve it with the old and
the new version, with default settings.  It is possible that something
didn't compile correctly on your system.  I suggest that you get the
C++ 3.0.0 version from the web, and try it again.  (If you have trouble
downloading it, please let me know directly [my email address] and I'll
send you the tarball by email.)  If you still see the same failure that
you describe in your message, please send me an email with the config.log
output from your ./configure run (please send it to me and not the mailing
list, because it can be quite long).

As an additional note to your model, I noticed that you don't provide an
initial point for the optimization. By default, AMPL sets the variables to
zero, which is often a bad choice.  For your model, I believe that many of
the first and second derivatives are zero at that point.  When you choose
a different starting point, such as

var x{(i,j) in {0..m,1..nx}} := 0.5;    # Zustand
var u{(i,j) in {0..m,1..nu}} := 0.5;    # Steuerung

solves the problem easier (doesn't switch to the restoration phase in the
first iteration) - and actually found a different local solution with a
smaller value of the objective function (1.06 instead of 1.15)

I hope this helps, and I hope you didn't get too frustrated with the
downloading problems to give up on Ipopt...

Schoene Gruesse nach Hamburg,


PS: Please subscribe to the mailing list, since otherwise I always have to
manually appove your postings...

More information about the Coin-ipopt mailing list