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

Immune system constraints handling meta-algorithm. More...

#include <cstrs_immune_system.h>

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

Public Types

enum  select_method_type { BEST_ANTIBODY = 0, INFEASIBILITY = 1 }
 Type of immune system antibody selection method. More...
 
enum  inject_method_type { CHAMPION = 0, BEST25 = 1 }
 Type of immune system antibody injection method. More...
 
enum  distance_method_type { HAMMING = 0, EUCLIDEAN = 1 }
 Type of antibodies problem distance method. More...
 

Public Member Functions

 cstrs_immune_system (const base &=jde(1), const base &=sga(), int gen=1, select_method_type=BEST_ANTIBODY, inject_method_type=CHAMPION, distance_method_type=EUCLIDEAN, double=0.5, double=0.5, double=1./3., double=1e-15, double=1e-15)
 Constructor. More...
 
 cstrs_immune_system (const cstrs_immune_system &)
 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_algorithm_immune () const
 Get a copy of the internal local algorithm. More...
 
void set_algorithm_immune (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

Immune system constraints handling meta-algorithm.

Immune constraints handling is a meta-algorithm that allow to solve constrained optimization problems. The key idea of this constraint handling technique is to simulate an immune system to drive the unfeasible individuals (called antibodies) towards the feasible individuals (called the antigens).

This meta-algorithm is based on the problem antibodies_problem.

See also
Hajela, P., & Lee, J. (1996). Constrained genetic search via schema adaptation: an immune network solution. Structural optimization, 12(1), 11-15.
Coello, C. A. C., Cortés, N. C., San, C., & Zacatenco, P. (2001). Use of emulations of the immune system to handle constraints in evolutionary algorithms.
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_immune_system.h.

Member Enumeration Documentation

Type of antibodies problem distance method.

Two distances are implemented: the hamming and euclidean distances: HAMMING, and EUCLIDEAN.

Definition at line 86 of file cstrs_immune_system.h.

Type of immune system antibody injection method.

Definition of two types of antibody injections method: CHAMPION, and BEST25. The CHAMPION method reinject the best antibody after the immune system simulation into the main population. The BEST25 method reinject the best 25% antibody after the immune system simulation into the main population.

Definition at line 79 of file cstrs_immune_system.h.

Type of immune system antibody selection method.

Definition of two types of antibody selections method: BEST_ANTIBODY, and INFEASIBILITY. The BEST_ANTIBODY, is the selection defined by COELLO, where the antigen population contains only one antigen which is the individual with lowest constraints violation. INFEASIBILITY is an extension where the antigen population contains selected individuals based on their infeasibility.

Definition at line 69 of file cstrs_immune_system.h.

Constructor & Destructor Documentation

pagmo::algorithm::cstrs_immune_system::cstrs_immune_system ( const base original_algo = jde(1),
const base original_algo_immune = sga(),
int  gen = 1,
select_method_type  select_method = BEST_ANTIBODY,
inject_method_type  inject_method = CHAMPION,
distance_method_type  distance_method = EUCLIDEAN,
double  phi = 0.5,
double  gamma = 0.5,
double  sigma = 1./3.,
double  ftol = 1e-15,
double  xtol = 1e-15 
)

Constructor.

Constructs an immune system constraints handling algorithm

Parameters
[in]original_algopagmo::algorithm to use as 'original' optimization method. Its number of generations should be set to 1.
[in]original_algo_immunepagmo::algorithm to use as 'original' optimization method for the immune system
[in]gennumber of generations.
[in]select_methodthe method used for selecting the antibodies.
[in]inject_methodthe method used for reinjecting the antibodies.
[in]distance_methodthe method used to compute the antibodies distance
[in]phithe feasible fraction selection to compute the mean value
[in]gammanumber of antigens selected / number of total antigens
[in]sigmanumber of antibodies / number of antigens
[in]ftolstopping criteria on the f tolerance
[in]xtolstopping criteria on the x tolerance
Exceptions
value_errorif gen is negative

Definition at line 62 of file cstrs_immune_system.cpp.

Member Function Documentation

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

Evolve implementation.

Run the co-evolution algorithm

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

Implements pagmo::algorithm::base.

Definition at line 101 of file cstrs_immune_system.cpp.

base_ptr pagmo::algorithm::cstrs_immune_system::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 492 of file cstrs_immune_system.cpp.

base_ptr pagmo::algorithm::cstrs_immune_system::get_algorithm_immune ( ) const

Get a copy of the internal local algorithm.

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

Definition at line 513 of file cstrs_immune_system.cpp.

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

void pagmo::algorithm::cstrs_immune_system::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 524 of file cstrs_immune_system.cpp.

void pagmo::algorithm::cstrs_immune_system::set_algorithm_immune ( const base algo)

Set algorithm.

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

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

Definition at line 504 of file cstrs_immune_system.cpp.


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