PaGMO  1.1.5
Public Member Functions | Protected Member Functions | Friends
pagmo::algorithm::cs Class Reference

The Compass Search Solver (CS) More...

#include <cs.h>

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

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.
 

Detailed Description

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'.

Author
Dario Izzo (dario.nosp@m..izz.nosp@m.o@goo.nosp@m.glem.nosp@m.ail.c.nosp@m.om)
See also
http://www.cs.wm.edu/~va/research/sirev.pdf

Definition at line 63 of file cs.h.

Constructor & Destructor Documentation

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.

Parameters
[in]max_evalMaximum number of function evaluations. The actual number might be much lower.
[in]stop_rangeStopping criteron based on the perturbation size
[in]start_rangeStarting perturbation size
[in]reduction_coeffSize reduction of the perturbation size
Exceptions
value_errorif start and stop range not $ \in [0,1[ $ and not decreasing. max_eval negative reduction_coeff not $ \in ]0,1[$

Definition at line 44 of file cs.cpp.

Member Function Documentation

void pagmo::algorithm::cs::evolve ( population pop) const
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.

Parameters
[in,out]popinput/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.

Definition at line 76 of file cs.cpp.

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

Extra human readable algorithm info.

Returns
a formatted string displaying the parameters of the algorithm.

Reimplemented from pagmo::algorithm::base.

Definition at line 167 of file cs.cpp.


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