IPOPT: Difference between revisions
→Building IPOPT: removed some html code that does not belong in a wiki |
No edit summary |
||
| Line 1: | Line 1: | ||
{{solvers}}{{experimental}} | {{solvers}}{{experimental}} | ||
[https://projects.coin-or.org/Ipopt IPOPT] (also, [http://www.coin-or.org/Ipopt/documentation/ documentation]) is the 'Interior Point Optimizer', part of the the [http://www.coin-or.org/ COIN-OR] open-source effort for the development of solvers for problems in the field of operations research. | [https://projects.coin-or.org/Ipopt IPOPT] (also, [http://www.coin-or.org/Ipopt/documentation/ documentation]) is the 'Interior Point Optimizer', part of the the [http://www.coin-or.org/ COIN-OR] open-source effort for the development of solvers for problems in the field of operations research. | ||
We have now completed integration of the IPOPT solver into ASCEND, as part of a GSOC 2009 project by [[User:Mnm87|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 [[Support|report any problems]]. | We have now completed integration of the IPOPT solver into ASCEND, as part of a GSOC 2009 project by [[User:Mnm87|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 [[Support|report any problems]]. | ||
== Sample problems == | == Sample problems == | ||
A selection of sample problems that solve using IPOPT can be viewed at {{srcdir|models/test/ipopt}}. Mostly the samples are problems taken from the Hock-Schittkowsky [http://www.math.uni-bayreuth.de/~kschittkowski/tp_coll1.htm Test Examples for Nonlinear Programming Codes] test suite. | A selection of sample problems that solve using IPOPT can be viewed at {{srcdir|models/test/ipopt}}. Mostly the samples are problems taken from the Hock-Schittkowsky [http://www.math.uni-bayreuth.de/~kschittkowski/tp_coll1.htm Test Examples for Nonlinear Programming Codes] test suite. | ||
== Installing IPOPT == | == Installing IPOPT == | ||
| Line 20: | Line 17: | ||
We've built our own Debian packages for IPOPT 3.8.1 using [[dtar]]. To build these packages for yourself on Ubuntu 9.10 Karmic, just download the Ipopt tarball, then download <a href="/images/a/a0/Ipopt-debian.tar.bz2" class="internal" title="Ipopt-debian.tar.bz2">ipopt-debian.tar.bz2</a>, rename it to debian.tar.bz2, then type <tt>dtar Ipopt-3.8.1.tgz debian.tar.bz2</tt>. As of Jan 2010, the resulting debian package is now available from our download page. | We've built our own Debian packages for IPOPT 3.8.1 using [[dtar]]. To build these packages for yourself on Ubuntu 9.10 Karmic, just download the Ipopt tarball, then download <a href="/images/a/a0/Ipopt-debian.tar.bz2" class="internal" title="Ipopt-debian.tar.bz2">ipopt-debian.tar.bz2</a>, rename it to debian.tar.bz2, then type <tt>dtar Ipopt-3.8.1.tgz debian.tar.bz2</tt>. As of Jan 2010, the resulting debian package is now available from our download page. | ||
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. | 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== | ==Building IPOPT== | ||
| Line 32: | Line 27: | ||
Next, enter the corresponding ThirdParty subdirectories of $IPOPTTOPDIR and run the <tt>./get.PackageName</tt> scripts for | Next, enter the corresponding ThirdParty subdirectories of $IPOPTTOPDIR and run the <tt>./get.PackageName</tt> scripts for | ||
* MUMPS | * MUMPS | ||
| Line 38: | Line 32: | ||
Optionally, you can also follow the IPOPT instructions for downloading the code for | 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) | * 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). | 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 <tt>get.PackageName</tt> shell scripts in each of the third-party folders under ''$IPOPTTOPDIR/ThirdParty'' to download and extract the corresponding package, without any problems. | If your wget is properly configured, you should be able to use these <tt>get.PackageName</tt> shell scripts in each of the third-party folders under ''$IPOPTTOPDIR/ThirdParty'' to download and extract the corresponding package, without any problems. | ||
| Line 52: | Line 44: | ||
Under ''$IPOPTTOPDIR'', note platform-specific issues <a href="https://projects.coin-or.org/BuildTools/wiki/current-issues" class="external text" title="https://projects.coin-or.org/BuildTools/wiki/current-issues" rel="nofollow">here</a>, then enter | Under ''$IPOPTTOPDIR'', note platform-specific issues <a href="https://projects.coin-or.org/BuildTools/wiki/current-issues" class="external text" title="https://projects.coin-or.org/BuildTools/wiki/current-issues" rel="nofollow">here</a>, then enter | ||
<source lang="a4c">./configure --prefix=/usr/local</source> | <source lang="a4c">./configure --prefix=/usr/local</source> | ||
| Line 58: | Line 49: | ||
If configuration is successful, a message | 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: | 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: | Now, proceed by issuing: | ||
| Line 72: | Line 60: | ||
followed by: | followed by: | ||
<source lang="a4c">sudo make install</source> | <source lang="a4c">sudo make install</source> | ||
| Line 79: | Line 66: | ||
== Building against IPOPT == | == Building against IPOPT == | ||
{{outdated-section}} | |||
You need to download a working copy [[VersionManagement|from our subversion repository]], from <tt>branches/mahesh</tt>. | You need to download a working copy [[VersionManagement|from our subversion repository]], from <tt>branches/mahesh</tt>. | ||
| Line 88: | Line 76: | ||
In particular, if you have not installed IPOPT to /usr/local, then you will probably need to specify the <tt>IPOPT_PREFIX</tt> flag to SCons. | In particular, if you have not installed IPOPT to /usr/local, then you will probably need to specify the <tt>IPOPT_PREFIX</tt> flag to SCons. | ||
This will build <tt>solvers/ipopt/libipopt_ascend.so</tt> which you may then test using <tt>./test.py TestIPOPT</tt> or use via the GUI. | This will build <tt>solvers/ipopt/libipopt_ascend.so</tt> which you may then test using <tt>./test.py TestIPOPT</tt> or use via the GUI. | ||
Another simple test program is available in the <tt>pygtk</tt> subdirectory, it can be built and run using <tt>scons -u testipopt && ./testipopt</tt>. This is useful for quicker testing because it doesn't require loading of the Python layer. | Another simple test program is available in the <tt>pygtk</tt> subdirectory, it can be built and run using <tt>scons -u testipopt && ./testipopt</tt>. This is useful for quicker testing because it doesn't require loading of the Python layer. | ||
== HSL == | == 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. | 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. | ||
== See also == | == See also == | ||
| Line 106: | Line 91: | ||
== Notes == | == Notes == | ||
[[Category:Solvers]] | |||
[[Category:Experimental]] | [[Category:Experimental]] | ||
[[Category:Outdated]] | [[Category:Outdated]] | ||
[[Category:Development]] | [[Category:Development]] | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
Revision as of 13:23, 7 June 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 now 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.
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<a href="#_note-0" title="">[1]</a>
Binaries for IPOPT (ipopt and ipopt-devel RPMs) are available for Fedora and openSUSE via OpenSUSE build service repository.
As of Ubuntu 9.10, MUMPS is now available in the standard package repositories. However the Ubuntu version of MUMPS is not compatible with IPOPT, so the following approach downloads its own copy of MUMPS source code during the build process.
We've built our own Debian packages for IPOPT 3.8.1 using dtar. To build these packages for yourself on Ubuntu 9.10 Karmic, just download the Ipopt tarball, then download <a href="/images/a/a0/Ipopt-debian.tar.bz2" class="internal" title="Ipopt-debian.tar.bz2">ipopt-debian.tar.bz2</a>, rename it to debian.tar.bz2, then type dtar Ipopt-3.8.1.tgz debian.tar.bz2. As of Jan 2010, the resulting debian package is now available from our download page.
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 platform-specific issues <a href="https://projects.coin-or.org/BuildTools/wiki/current-issues" class="external text" title="https://projects.coin-or.org/BuildTools/wiki/current-issues" rel="nofollow">here</a>, 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.