PaGMO
1.1.5
|
The Compass Search Solver (CS) More...
#include <cs.h>
Public Member Functions | |
cs (const int &max_eval=1, const double &stop_range=0.01, const double &start_range=0.1, const double &reduction_coeff=0.5) | |
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. | |
The Compass Search Solver (CS)
In the review paper by Kolda, Lewis, Torczon: 'Optimization by Direct Search: New Perspectives on Some Classical and Modern Methods' published in the SIAM Journal Vol. 45, No. 3, pp. 385-482 (2003) we read the following description of the compass search algorithm:
'Davidon describes what is one of the earliest examples of a direct search method used on a digital computer to solve an optimization problem: Enrico Fermi and Nicholas Metropolis used one of the first digital computers, the Los Alamos Maniac, to determine which values of certain theoretical parameters (phase shifts) best fit experimental data (scattering cross sections). They varied one theoretical parameter at a time by steps of the same magnitude, and when no such increase or decrease in any one parameter further improved the fit to the experimental data, they halved the step size and repeated the process until the steps were deemed sufficiently small. Their simple procedure was slow but sure, and several of us used it on the Avidac computer at the Argonne National Laboratory for adjusting six theoretical parameters to fit the pion-proton scattering data we had gathered using the University of Chicago synchrocyclotron. While this basic algorithm undoubtedly predates Fermi and Metropolis, it has remained a standard in the scientific computing community for exactly the reason observed by Davidon: it is slow but sure'.
pagmo::algorithm::cs::cs | ( | const int & | max_eval = 1 , |
const double & | stop_range = 0.01 , |
||
const double & | start_range = 0.1 , |
||
const double & | reduction_coeff = 0.5 |
||
) |
Constructor.
Allows to specify in detail all the parameters of the algorithm.
[in] | max_eval | Maximum number of function evaluations. The actual number might be much lower. |
[in] | stop_range | Stopping criteron based on the perturbation size |
[in] | start_range | Starting perturbation size |
[in] | reduction_coeff | Size reduction of the perturbation size |
value_error | if start and stop range not and not decreasing. max_eval negative reduction_coeff not |
|
virtual |
Evolve implementation.
Run the compass search algorithm for the number of iterations specified in the constructors. At each accepted point velocity is also updated.
[in,out] | pop | input/output pagmo::population to be evolved. Best member only is evolved. Velocity is evaluated at the end as difference between decision vector before and after evolution |
Implements pagmo::algorithm::base.
|
protectedvirtual |
Extra human readable algorithm info.
Reimplemented from pagmo::algorithm::base.