IPOPT: Difference between revisions
| Line 26: | Line 26: | ||
''Problems with the standard Ubuntu-repository IPOPT 3.8.1 and MUMPS packages seem to persist in 10.04.'' | ''Problems with the standard Ubuntu-repository IPOPT 3.8.1 and MUMPS packages seem to persist in 10.04.'' | ||
The following packages will work successfully with ASCEND on Ubuntu 10.04 LTS Lucid (intel 32 bit). You'll need to install them both. | |||
* [[Media:libipopt0_3.9.1_i386.deb|libipopt0_3.9.1_i386.deb]] (1.5 MB Ubuntu 10.04 package) | |||
* [[Media:libipopt-dev_3.9.1_i386.deb|libipopt-dev_3.9.1_i386.deb]] (2.4 MB Ubuntu 10.04 developer package) | |||
On this platform, we have successfully built IPOPT 3.9.1, so you can again build your own package. For Lucid, you need to download [[Media:Ipopt-debian-3.9.1-lucid.tar.bz2|Ipopt-debian-3.9.1-lucid.tar.bz2]] and run <tt>dtar Ipopt-3.9.1.tgz Ipopt-debian-3.9.1-lucid.tar.gz</tt>. | On this platform, we have successfully built IPOPT 3.9.1, so you can again build your own package. For Lucid, you need to download [[Media:Ipopt-debian-3.9.1-lucid.tar.bz2|Ipopt-debian-3.9.1-lucid.tar.bz2]] and run <tt>dtar Ipopt-3.9.1.tgz Ipopt-debian-3.9.1-lucid.tar.gz</tt>. | ||
Revision as of 07:07, 22 December 2010
| NLA |
|---|
| QRSlv |
| CMSlv |
| IPSlv |
| NLP |
| CONOPT |
| IPOPT |
| TRON |
| MINOS |
| Opt |
| NGSlv |
| DAE/ODE |
| IDA |
| LSODE |
| DOPRI5 |
| RADAU5 |
| LA |
| Linsolqr |
| Linsol |
| LP |
| MakeMPS |
| Logic |
| LRSlv |
IPOPT (also, documentation) is the 'Interior Point Optimizer', part of the the COIN-OR open-source effort for the development of solvers for problems in the field of operations research.
We have almost completed integration of the IPOPT solver into ASCEND, as part of a GSOC 2009 project by Mahesh Narayanamurthi. This implementation includes efficient methods for calculating hessian matrices directly using automatic differentiation code developed specifically for our core engine. We're looking for people to try it out and report any problems.
The remaining feature requiring implemention is to connect support for external relations to the IPOPT solver. Currently this kind of function is not supported in the reverse-AD code, and so models with external relations can not be solved with IPOPT (unless possibly using estimated second derivatives... need to check).
Sample problems
A selection of sample problems that solve using IPOPT can be viewed at models/test/ipopt. Mostly the samples are problems taken from the Hock-Schittkowsky Test Examples for Nonlinear Programming Codes test suite.
Installing IPOPT
To test the state of the IPOPT solver, you must first install the base IPOPT software on your machine. The following instructions complement the IPOPT installation guide.
Ubuntu 9.10 Karmic
As of Ubuntu 9.10, MUMPS is now available in the standard package repositories. However the Ubuntu version of IPOPT doesn't seem to be correctly linked with MUMPS, so the we propose that you make use of the following packages instead, which download their own copy of MUMPS source code during the build process.
Packages (libipopt0 and libipopt-dev) for IPOPT 3.8.1 were built using dtar and have been uploaded as of January 2010 to our download page on SourceForge.
You can also build these packages yourself usinig the file Ipopt-debian.tar.bz2 and the command dtar Ipopt-3.8.1.tgz Ipopt-debian.tar.bz2. Your package will be un-signed however, and you may have to rescue it from /tmp/dtar-XXXX as indicated by dtar when it terminates.
Ubuntu 10.04 LTS Lucid
Problems with the standard Ubuntu-repository IPOPT 3.8.1 and MUMPS packages seem to persist in 10.04.
The following packages will work successfully with ASCEND on Ubuntu 10.04 LTS Lucid (intel 32 bit). You'll need to install them both.
- libipopt0_3.9.1_i386.deb (1.5 MB Ubuntu 10.04 package)
- libipopt-dev_3.9.1_i386.deb (2.4 MB Ubuntu 10.04 developer package)
On this platform, we have successfully built IPOPT 3.9.1, so you can again build your own package. For Lucid, you need to download Ipopt-debian-3.9.1-lucid.tar.bz2 and run dtar Ipopt-3.9.1.tgz Ipopt-debian-3.9.1-lucid.tar.gz.
Note that as of 3.9.0, IPOPT makes use of the COIN 'BuildTools' system, and many things have changed. The above package installs shared libraries in the rather annoying location /usr/lib/coin and /usr/lib/coin/ThirdParty, which makes dlopening libraries that reference IPOPT rather annoying, because these locations must now be added to LD_LIBRARY_PATH. Bah! We will try to work out a way to create an IPOPT package that installs to /usr/lib.
Other systems
Some outdated binaries for IPOPT (ipopt and ipopt-devel RPMs) are available for Fedora and openSUSE via OpenSUSE build service repository.
On other systems you will need to install your own copy of IPOPT from source. Instructions are at the IPOPT website and documented below for quick setup.
Building IPOPT
To use IPOPT with ASCEND, a source tar-ball of IPOPT can be downloaded from here IPOPT Sources (Version 3.6 is the latest stable distribution as on date of writing this install guide). This tarball is a 'partial' tarball, in that it expected certain extra third-party code to be downloaded before you start the process of building the code. For a minimal free open-source installation of IPOPT, you should first use your Linux package manage to install BLAS and LAPACK developer's packages (libblas-dev and liblapack-dev on Ubuntu).
Unpack the source into a directory (we will refer to this directory as $IPOPTTOPDIR here on).
Next, enter the corresponding ThirdParty subdirectories of $IPOPTTOPDIR and run the ./get.PackageName scripts for
- MUMPS
- METIS
Optionally, you can also follow the IPOPT instructions for downloading the code for
- HSL (optionally, just MA27 and MC19. Note that this is not free-libre code though)
Note that ASL is not required, because we are not building an AMPL interface for IPOPT here. BLAS can be installed on Linux from your package repositories (see Atlas, GSL C-BLAS, and others). HSL routines are also not essential, you will need to register on the corresponding websites and you would get an e-mail confirmation giving you instructions on how to obtain them and install them. So give sufficient time for this and plan your installation accordingly (we are interested in using open source code here). LAPACK can be installed on Linux from your package repositories (on Ubuntu, the package is liblapack-dev).
If your wget is properly configured, you should be able to use these get.PackageName shell scripts in each of the third-party folders under $IPOPTTOPDIR/ThirdParty to download and extract the corresponding package, without any problems.
Note that the download scripts 'get.PackageName' contain some hand-written version numbers, which you may wish to update if you want to use a newer third-party package versions.
Once all the third-party packages have been obtained, you are ready to build and install IPOPT. It is recommended that you install IPOPT to /usr/local if possible.
Under $IPOPTTOPDIR, note any platform-specific issues, then enter
./configure --prefix=/usr/local
If configuration is successful, a message
configure: Main configuration of Ipopt successful
will be observed on the command line. You should also check the output during configuration of each package: if package configuration was successful, you should see a message, for each package, like:
configure: Configuration of ThirdPartyMumps successful
Now, proceed by issuing:
make
followed by:
sudo make install
Please note that IPOPT is still experimental and development is ongoing. Implementation of support for this solver is not yet completed (see Development activities).
Building against IPOPT
You need to download a working copy from our subversion repository, from branches/mahesh.
Next you can build ASCEND with IPOPT by running scons WITH_SOLVERS=IPOPT,... (add IPOPT to the list you were already building, or edit your options.cache file).
There are a number of SCons configuration options for specifying the location of your IPOPT files, as well. See scons -Qh output for details.
In particular, if you have not installed IPOPT to /usr/local, then you will probably need to specify the IPOPT_PREFIX flag to SCons.
This will build solvers/ipopt/libipopt_ascend.so which you may then test using ./test.py TestIPOPT or use via the GUI.
Another simple test program is available in the pygtk subdirectory, it can be built and run using scons -u testipopt && ./testipopt. This is useful for quicker testing because it doesn't require loading of the Python layer.
HSL
To use IPOPT with the HSL linear solver routines (MA27, MA57, MC19), you can compile a shared library libhsl.so using the IPOPT ThirdParty/HSL/configure script. In that case, use the LD_LIBRARY_PATH environment variable if necessary to tell IPOPT where that shared library will be found.