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

Multistart. More...

#include <ms.h>

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

Public Member Functions

 ms (const base &=de(), int=1)
 Constructor. More...
 
 ms (const ms &)
 Copy constructor (deep copy).
 
base_ptr clone () const
 Clone method.
 
void evolve (population &) const
 Evolve implementation. More...
 
std::string get_name () const
 Algorithm name.
 
base_ptr get_algorithm () const
 Get a copy of the internal algorithm. More...
 
void set_algorithm (const base &)
 Set algorithm. More...
 
- 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

Multistart.

The name of this algorithm says it all!! It runs the same algorithm over and over on a random initial population. At the end, the champion will keep memory of the luckiest run. The psuedo algorithm is as follow:

> Select a pagmo::population
> Select a pagmo::algorithm
> Store best individual
> Until termination:
> > Reset the population
> > evolve the population with the pagmo::algorithm
Author
Dario Izzo (dario.nosp@m..izz.nosp@m.o@goo.nosp@m.glem.nosp@m.ail.c.nosp@m.om)

Definition at line 59 of file ms.h.

Constructor & Destructor Documentation

pagmo::algorithm::ms::ms ( const base algorithm = de(),
int  starts = 1 
)

Constructor.

Allows to specify in detail all the parameters of the algorithm.

Parameters
[in]algorithmpagmo::algorithm for the multistarts
[in]startsnumber of multistarts
Exceptions
value_errorif starts is negative

Definition at line 47 of file ms.cpp.

Member Function Documentation

void pagmo::algorithm::ms::evolve ( population pop) const
virtual

Evolve implementation.

Run the Multi-start algorithm

Parameters
[in,out]popinput/output pagmo::population to be evolved.

Implements pagmo::algorithm::base.

Definition at line 71 of file ms.cpp.

base_ptr pagmo::algorithm::ms::get_algorithm ( ) const

Get a copy of the internal algorithm.

Returns
algorithm::base_ptr to a copy of the internal algorithm.

Definition at line 115 of file ms.cpp.

std::string pagmo::algorithm::ms::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 135 of file ms.cpp.

void pagmo::algorithm::ms::set_algorithm ( const base algo)

Set algorithm.

A copy of the input algorithm will be set as the internal algorithm.

Parameters
[in]algoalgorithm to be set for multistart.

Definition at line 126 of file ms.cpp.


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