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

CORE constraints handling meta-algorithm. More...

#include <cstrs_core.h>

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

Public Member Functions

 cstrs_core (const base &=jde(1), const base &=jde(1), int=1, int=10, double=1., double=1e-15, double=1e-15)
 Constructor. More...
 
 cstrs_core (const cstrs_core &)
 Copy constructor.
 
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 local algorithm. More...
 
void set_algorithm (const base &)
 Set algorithm. More...
 
base_ptr get_repair_algorithm () const
 Get a copy of the internal local repair algorithm. More...
 
void set_repair_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

CORE constraints handling meta-algorithm.

CORE is a meta-algorithm that allow to solve constrained optimization problems. The key idea of this constraint handling technique is to repair infeasible individuals of the population at fixed intervals.

The original algorithm is using a random evolutionary search algorithm. This implementation is extended to be used with any algorithm.

This meta-algorithm is based on the population population::repair() method.

See also
Belur, S.V. CORE: Constrained optimization by random evolution, Late Breaking Papers at the Genetic Programming Conference, Stanford University, 280-286, 1997.
Author
Jeremie Labroquere (jerem.nosp@m.ie.l.nosp@m.abroq.nosp@m.uere.nosp@m.@gmai.nosp@m.l.co.nosp@m.m)

Definition at line 57 of file cstrs_core.h.

Constructor & Destructor Documentation

pagmo::algorithm::cstrs_core::cstrs_core ( const base original_algo = jde(1),
const base repair_algo = jde(1),
int  gen = 1,
int  repair_frequency = 10,
double  repair_ratio = 1.,
double  ftol = 1e-15,
double  xtol = 1e-15 
)

Constructor.

Constructs a CORE constraints handling algorithm

Parameters
[in]original_algopagmo::algorithm to use as 'original' optimization method. Its number of generations should be set to 1.
[in]repair_algopagmo::algorithm to use as 'repairing' optimization algorithm. It should be able to deal with population of size 1.
[in]gennumber of generations.
[in]repair_frequencyThe infeasible are repaired at each repair frequency generations.
[in]repair_ratioIt the repair ratio is the ratio of repaired individuals over infeasible ones (a ratio of 1 will repair all the individuals).
[in]ftolstopping criteria on the f tolerance.
[in]xtolstopping criteria on the x tolerance.
Exceptions
value_errorif gen is negative, if repair frequency is negative.

Definition at line 58 of file cstrs_core.cpp.

Member Function Documentation

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

Evolve implementation.

Run the CORE algorithm

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

Implements pagmo::algorithm::base.

Definition at line 103 of file cstrs_core.cpp.

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

Get a copy of the internal local algorithm.

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

Definition at line 227 of file cstrs_core.cpp.

base_ptr pagmo::algorithm::cstrs_core::get_repair_algorithm ( ) const

Get a copy of the internal local repair algorithm.

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

Definition at line 247 of file cstrs_core.cpp.

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

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

Set algorithm.

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

Parameters
[in]algoalgorithm to be set as local algorithm.

Definition at line 238 of file cstrs_core.cpp.

void pagmo::algorithm::cstrs_core::set_repair_algorithm ( const base algo)

Set algorithm.

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

Parameters
[in]algoalgorithm to be set as local repair algorithm.

Definition at line 258 of file cstrs_core.cpp.


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