PaGMO
1.1.5
|
Wrapper for the IPOPT solver. More...
#include <ipopt.h>
Public Member Functions | |
ipopt (const int &max_iter=100, const double &constr_viol_tol=1e-8, const double &dual_inf_tol=1e-8, const double &compl_inf_tol=1e-8, const bool &nlp_scaling_method=true, const double &obj_scaling_factor=1.0, const double &mu_init=0.1) | |
Constructor. More... | |
base_ptr | clone () const |
Clone method. | |
void | evolve (population &) const |
Evolve implementation. More... | |
std::string | get_name () const |
Algorithm name. | |
Public Member Functions inherited from pagmo::algorithm::base | |
base () | |
Default constructor. More... | |
virtual | ~base () |
Trivial destructor. More... | |
std::string | human_readable () const |
Return human readable representation of the algorithm. More... | |
void | set_screen_output (const bool p) |
Setter-Getter for protected m_screen_output data. More... | |
bool | get_screen_output () const |
Gets screen output. More... | |
void | reset_rngs (const unsigned int) const |
Resets the seed of the internal rngs using a user-provided seed. More... | |
Protected Member Functions | |
std::string | human_readable_extra () const |
Extra human readable algorithm info. More... | |
Friends | |
class | boost::serialization::access |
Additional Inherited Members | |
Protected Attributes inherited from pagmo::algorithm::base | |
bool | m_screen_output |
Indicates to the derived class whether to print stuff on screen. | |
rng_double | m_drng |
Random number generator for double-precision floating point values. | |
rng_uint32 | m_urng |
Random number generator for unsigned integer values. | |
unsigned int | m_fevals |
A counter for the number of function evaluations. | |
Wrapper for the IPOPT solver.
IPOPT is an Interior Point Optimization solver released under the CPL licence. Our wrapper is generic and does not use the hessian information letting IPOPT deal with it. Gradients and Jacobian are evaluated by central differences with a stepsize of 10-8 stepsize. We offer control over only a few IPOPT options, take care in particular of the dual_inf_tol as the hessian_approximation, limited_memory option (i.e. hessian is not provided by the user) makes the dual_inf to remain quite high.
CAREFUL: 1 - IPOPT works only for minimization. 2 - The final solution is guaranteed to be within the box constraints by forcing it after the ipopt call
IPOPT has severa lib dependencies that overlaps with SNOPT lib dependencies. Take care that you link to the correct ones, especially for the blas lib that can give problem if coming from SNOPT native source code
pagmo::algorithm::ipopt::ipopt | ( | const int & | max_iter = 100 , |
const double & | constr_viol_tol = 1e-8 , |
||
const double & | dual_inf_tol = 1e-8 , |
||
const double & | compl_inf_tol = 1e-8 , |
||
const bool & | nlp_scaling_method = true , |
||
const double & | obj_scaling_factor = 1.0 , |
||
const double & | mu_init = 0.1 |
||
) |
Constructor.
Allows to specify some of the parameters of the IPOPT solver. The algorithm stopping criteria will be 1) if the number of iteration exceeds max_iter 2) the three tolerances are met
[in] | max_iter | Maximum number of major iterations (refer to IPOPT manual). |
[in] | constr_viol_tol | Constraint violation tolerance |
[in] | dual_inf_tol | Dual infeasibility tolerance |
[in] | compl_inf_tol | Complementary feasibility tolerance |
[in] | nlp_scaling_method | Select if the "gradient-based" scaling of the NLP should be used |
[in] | obj_scaling_factor | Scaling factor for the objective function. |
[in] | mu_init | Initial value for the barrier parameter. |
value_error | if max_iter or tolerances are negative |
|
virtual |
Evolve implementation.
Run IPOPT with the parameters specified in the constructor At the end, the velocity is updated
[in,out] | pop | input/output pagmo::population to be evolved. |
Implements pagmo::algorithm::base.
|
protectedvirtual |
Extra human readable algorithm info.
Reimplemented from pagmo::algorithm::base.