IPOPT¶
IPOPT (Interior Point OPTimizer) is an open source interior point optimizer, designed for large-scale nonlinear optimization. The source code can be found here. The latest version we support is 3.11.7.
Installation¶
Install instructions for pyIPOPT
.
Download
IPopt-3.11.7.tar.gz
and put in the/pyoptsparse/pyoptsparse/pyIPOPT
directoryUntar
Rename the directory from
Ipopt-x.x.x
toIpopt
Obtain the MA27 linear solver from HSL. Rename the source file
ma27ad.f
and put it in theIpopt/ThirdParty/HSLold/
directoryGo to:
Ipopt/ThirdParty/Blas/
and run:
sh ./get.Blas
This will download a blas copy and
Ipopt
will use that.Go to:
Ipopt/ThirdParty/Lapack/
and run:
sh ./get.Lapack
Run in the root directory:
$ ./configure --disable-linear-solver-loader
Now make:
$ make install
You must add the
lib
directoryIpopt
to yourLD_LIBRARY_PATH
variable for things to work right:export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/hg/pyoptsparse/pyoptsparse/pyIPOPT/Ipopt/lib
Now the pyOptSparse builder (run from the root directory) should take care of the rest.
API¶
-
class
pyoptsparse.pyIPOPT.pyIPOPT.
IPOPT
(*args, **kwargs)[source]¶ IPOPT Optimizer Class - Inherited from Optimizer Abstract Class
-
__call__
(self, optProb, sens=None, sensStep=None, sensMode=None, storeHistory=None, hotStart=None, storeSens=True)[source]¶ This is the main routine used to solve the optimization problem.
Parameters: - optProb : Optimization or Solution class instance
This is the complete description of the optimization problem to be solved by the optimizer
- sens : str or python Function.
Specifiy method to compute sensitivities. To explictly use pyOptSparse gradient class to do the derivatives with finite differenes use ‘FD’. ‘sens’ may also be ‘CS’ which will cause pyOptSpare to compute the derivatives using the complex step method. Finally, ‘sens’ may be a python function handle which is expected to compute the sensitivities directly. For expensive function evaluations and/or problems with large numbers of design variables this is the preferred method.
- sensStep : float
Set the step size to use for design variables. Defaults to 1e-6 when sens is ‘FD’ and 1e-40j when sens is ‘CS’.
- sensMode : str
Use ‘pgc’ for parallel gradient computations. Only available with mpi4py and each objective evaluation is otherwise serial
- storeHistory : str
File name of the history file into which the history of this optimization will be stored
- hotStart : str
File name of the history file to “replay” for the optimziation. The optimization problem used to generate the history file specified in ‘hotStart’ must be IDENTICAL to the currently supplied ‘optProb’. By identical we mean, EVERY SINGLE PARAMETER MUST BE IDENTICAL. As soon as he requested evaluation point does not match the history, function and gradient evaluations revert back to normal evaluations.
- storeSens : bool
Flag sepcifying if sensitivities are to be stored in hist. This is necessay for hot-starting only.
-