PaGMO
1.1.5
|
CORE constraints handling meta-algorithm. More...
#include <cstrs_core.h>
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. | |
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.
Definition at line 57 of file cstrs_core.h.
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
[in] | original_algo | pagmo::algorithm to use as 'original' optimization method. Its number of generations should be set to 1. |
[in] | repair_algo | pagmo::algorithm to use as 'repairing' optimization algorithm. It should be able to deal with population of size 1. |
[in] | gen | number of generations. |
[in] | repair_frequency | The infeasible are repaired at each repair frequency generations. |
[in] | repair_ratio | It the repair ratio is the ratio of repaired individuals over infeasible ones (a ratio of 1 will repair all the individuals). |
[in] | ftol | stopping criteria on the f tolerance. |
[in] | xtol | stopping criteria on the x tolerance. |
value_error | if gen is negative, if repair frequency is negative. |
Definition at line 58 of file cstrs_core.cpp.
|
virtual |
Evolve implementation.
Run the CORE algorithm
[in,out] | pop | input/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.
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.
Definition at line 247 of file cstrs_core.cpp.
|
protectedvirtual |
Extra human readable algorithm info.
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.
[in] | algo | algorithm 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.
[in] | algo | algorithm to be set as local repair algorithm. |
Definition at line 258 of file cstrs_core.cpp.