PaGMO
1.1.5
|
Wrapper for NLopt's Slsqp algorithm. More...
#include <nlopt_slsqp.h>
Public Member Functions | |
nlopt_slsqp (int=100, const double &=1E-6, const double &=1E-6) | |
Constructor. More... | |
base_ptr | clone () const |
Clone method. 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... | |
Friends | |
class | boost::serialization::access |
Additional Inherited Members | |
Protected Member Functions inherited from pagmo::algorithm::base_nlopt | |
base_nlopt (nlopt::algorithm, bool, bool, int, const double &, const double &) | |
Constructor. More... | |
void | evolve (population &) const |
Evolve method. More... | |
std::string | human_readable_extra () const |
Extra information in human readable format. More... | |
Protected Attributes inherited from pagmo::algorithm::base_nlopt | |
nlopt::opt | m_opt |
NLOPT optimization method. | |
const std::size_t | m_max_iter |
Maximum number of iterations. | |
const double | m_ftol |
Tolerance on the fitness function variation (stopping criteria) | |
const double | m_xtol |
Tolerance on the decision_vector variation function (stopping criteria) | |
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 NLopt's Slsqp algorithm.
From NLopt's documentation:
The algorithm optimizes successive second-order (quadratic/least-squares) approximations of the objective function (via BFGS updates), with first-order (affine) approximations of the constraints. The Fortran code was obtained from the SciPy project, who are responsible for obtaining permission to distribute it under a free-software (3-clause BSD) license. The code was modified for inclusion in NLopt by S. G. Johnson in 2010, .... since roundoff errors sometimes pushed SLSQP's parameters slightly outside the bound constraints (not allowed by NLopt), we added checks to force the parameters within the bounds. We fixed a bug in the LSEI subroutine (use of uninitialized variables) for the case where the number of equality constraints equals the dimension of the problem. The LSQ subroutine was modified to handle infinite lower/upper bounds (in which case those constraints are omitted).
The inclusion in PaGMO required to write central difference code for the automated, numercal evaluation of gradients. the rest was left unchaged
NOTE: Because the SLSQP code uses dense-matrix methods (ordinary BFGS, not low-storage BFGS), it requires O(n2) storage and O(n3) time in n dimensions, which makes it less practical for optimizing more than a few thousand parameters.
This algorithm is a single-objective continuous minimiser that supports box constraints.
Definition at line 65 of file nlopt_slsqp.h.
pagmo::algorithm::nlopt_slsqp::nlopt_slsqp | ( | int | max_iter = 100 , |
const double & | ftol = 1E-6 , |
||
const double & | xtol = 1E-6 |
||
) |
Constructor.
Definition at line 36 of file nlopt_slsqp.cpp.
|
virtual |
Clone method.
Provided that the derived algorithm implements properly the copy constructor, virtually all implementations of this method will look like this:
return base_ptr(new derived_algorithm(*this));
@return algorithm::base_ptr to a copy of this.
Implements pagmo::algorithm::base.
Definition at line 38 of file nlopt_slsqp.cpp.