PaGMO  1.1.5
Protected Member Functions | Protected Attributes | Friends
pagmo::algorithm::base_nlopt Class Reference

Base class for wrapping NLopt's algorithms. More...

#include <base_nlopt.h>

Inheritance diagram for pagmo::algorithm::base_nlopt:
Inheritance graph
[legend]

Protected Member Functions

 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

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.
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Public Member Functions inherited from pagmo::algorithm::base
 base ()
 Default constructor. More...
 
virtual base_ptr clone () const =0
 Clone method. More...
 
virtual ~base ()
 Trivial destructor. More...
 
std::string human_readable () const
 Return human readable representation of the algorithm. More...
 
virtual std::string get_name () const
 Get algorithm's name. 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...
 

Detailed Description

Base class for wrapping NLopt's algorithms.

NLopt is a free/open-source library for nonlinear optimization, providing a common interface for a number of different free optimization routines available online as well as original implementations of various other algorithms.

This class provides a common interface for NLopt algorithms. The type of algorithm that this class will wrap and the termination conditions can be specified in the constructor.

The evolve() method will select the best individual from the population and will optimise its continuous part using the specified NLopt algorithm. After the optimisation, the individual will be unconditionally re-inserted in the same position in the population.

All algorithms provided in NLopt are single-objective continuous minimisers.

See also
http://ab-initio.mit.edu/wiki/index.php/NLopt
Author
Francesco Biscani (blues.nosp@m.carn.nosp@m.i@gma.nosp@m.il.c.nosp@m.om), Dario Izzo(dario.nosp@m..izz.nosp@m.o@goo.nosp@m.glem.nosp@m.ail.c.nosp@m.om)

Definition at line 58 of file base_nlopt.h.

Constructor & Destructor Documentation

pagmo::algorithm::base_nlopt::base_nlopt ( nlopt::algorithm  algo,
bool  constrained,
bool  only_ineq,
int  max_iter,
const double &  ftol,
const double &  xtol 
)
protected

Constructor.

Will build a wrapper for the NLopt algorithm algo, specifying the maximum number of iterations allowed and the tolerance (e.g., the relative improvement of the objective function under which the algorithm will stop iterating). The user must also specify whether the chosen NLopt algorithm supports or not constrained optimisation.

Parameters
[in]algoNLopt algorithm (e.g., nlopt::LN_COBYLA).
[in]constrainedtrue if the algorithm supports nonlinear constraints, false otherwise.
[in]only_ineqtrue if the algorithm only support inequality constraints
[in]max_iterstop-criteria (number of iterations)
[in]ftolstop-criteria (absolute on the obj-fun)
[in]xtolstop-criteria (absolute on the chromosome)

Definition at line 55 of file base_nlopt.cpp.

Member Function Documentation

void pagmo::algorithm::base_nlopt::evolve ( population p) const
protectedvirtual

Evolve method.

The purpose of this method is to take a pagmo::population as input and evolve it towards the solution of the problem.

Parameters
[in,out]ppopulation to be evolved.

Implements pagmo::algorithm::base.

Definition at line 151 of file base_nlopt.cpp.

std::string pagmo::algorithm::base_nlopt::human_readable_extra ( ) const
protectedvirtual

Extra information in human readable format.

Default implementation returns an empty string.

Returns
string containing algorithm specific human readable representation of the algorithm.

Reimplemented from pagmo::algorithm::base.

Reimplemented in pagmo::algorithm::nlopt_aug_lag_eq, and pagmo::algorithm::nlopt_aug_lag.

Definition at line 66 of file base_nlopt.cpp.


The documentation for this class was generated from the following files: