PaGMO
1.1.5
|
Simulated Annealing, Corana's version with adaptive neighbourhood. More...
#include <sa_corana.h>
Public Member Functions | |
sa_corana (int niter=1, const double &Ts=10, const double &Tf=.1, int m_step_adj=1, int m_bin_size=20, const double &range=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. | |
Simulated Annealing, Corana's version with adaptive neighbourhood.
This version of A. CORANA, M. MARCHESI, C. MARTINI, and S. RIDELLA of the simulated annealing algorithm is essentially an iterative random search procedure with adaptive moves along the coordinate directions. It permits uphill moves under the control of metropolis criterion, in the hope to avoid the first local minima encountered.
The implementation provided for PaGMO has been developed from scratch and subsequent call to the algorithm are equivalent to a reannealing procedure.
This algorithm is suitable for box-constrained single-objective continuous optimization.
At each call of the evolve method the number of function evaluations is guaranteed to be less than the total iterations as if a point is produced out of the bounds the iteration is skipped
Definition at line 57 of file sa_corana.h.
pagmo::algorithm::sa_corana::sa_corana | ( | int | niter = 1 , |
const double & | Ts = 10 , |
||
const double & | Tf = .1 , |
||
int | niterT = 1 , |
||
int | niterR = 20 , |
||
const double & | range = 1 |
||
) |
Constructor.
Allows to specify in detail all the parameters of the algorithm.
[in] | niter | number of total iterations. |
[in] | Ts | starting temperature |
[in] | Tf | final temperature |
[in] | niterT | |
[in] | niterR | |
[in] | range |
value_error | niter is non positive, Ts is greater than Tf, Ts is non positive, Tf is non positive, niterT or niterR are negative, range is not in the [0,1] interval |
Definition at line 45 of file sa_corana.cpp.
|
virtual |
Evolve implementation.
Run the sa_corana 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.
Definition at line 79 of file sa_corana.cpp.
|
protectedvirtual |
Extra human readable algorithm info.
Will return a formatted string displaying the parameters of the algorithm.
Reimplemented from pagmo::algorithm::base.
Definition at line 208 of file sa_corana.cpp.