PaGMO  1.1.5
Public Member Functions | Friends
pagmo::migration::hv_fair_r_policy Class Reference

Replace the 'n' least contributors with the incoming set. More...

#include <hv_fair_r_policy.h>

Inheritance diagram for pagmo::migration::hv_fair_r_policy:
Inheritance graph
[legend]

Public Member Functions

 hv_fair_r_policy (const double &rate=1, rate_type type=absolute, double nadir_eps=1.0)
 Constructor from rate and rate type. More...
 
base_r_policy_ptr clone () const
 Clone method. More...
 
std::vector< std::pair< population::size_type, std::vector< population::individual_type >::size_type > > select (const std::vector< population::individual_type > &, const population &) const
 Assign pairs of individuals for replacement during migration. More...
 
- Public Member Functions inherited from pagmo::migration::base_r_policy
 base_r_policy (const double &rate=1, rate_type type=fractional)
 Constructor from migration rate and type. More...
 
virtual ~base_r_policy ()
 Trivial destructor. More...
 
- Public Member Functions inherited from pagmo::migration::base
 base (const double &, rate_type)
 Constructor from migration rate and type. More...
 
population::size_type get_n_individuals (const population &) const
 Get number of individuals to migrate from/to input population. More...
 
std::string human_readable () const
 Return human readable representation. More...
 
virtual ~base ()
 Destructor. More...
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Protected Member Functions inherited from pagmo::migration::base
virtual std::string human_readable_extra () const
 Return extra information in human readable representation. More...
 
- Static Protected Member Functions inherited from pagmo::migration::base
template<class ForwardIterator , class T >
static void iota (ForwardIterator first, ForwardIterator last, T value)
 Iota function, usefull to fill iterator range with increasing values. More...
 
- Protected Attributes inherited from pagmo::migration::base
double m_rate
 Migration rate. More...
 
rate_type m_type
 Migration rate type.
 

Detailed Description

Replace the 'n' least contributors with the incoming set.

Policy replaces a set of 'n' least contributors with the incoming set of immigrants in a 'fair' way. That is: an original inhabitant of the island is only substituted if its exclusive hypervolume contribution is less than the the worst contribution of a replaced immigrant. Least contributors are computed at once for single population (per-front).

Note: If the problem is a single objective one, we fall back to the pagmo::migration::fair_r_policy instead.

Author
Marcus Maertens (mmarc.nosp@m.usx@.nosp@m.gmail.nosp@m..com)
Krzysztof Nowak (kn@ki.nosp@m.ryx..nosp@m.net)

Definition at line 51 of file hv_fair_r_policy.h.

Constructor & Destructor Documentation

pagmo::migration::hv_fair_r_policy::hv_fair_r_policy ( const double &  rate = 1,
rate_type  type = absolute,
double  nadir_eps = 1.0 
)

Constructor from rate and rate type.

Parameters
[in]ratemigration rate.
[in]typemigration rate type.
[in]nadir_epsepsilon value for the nadir point computation
See also
base_r_policy::base_r_policy.

Definition at line 52 of file hv_fair_r_policy.cpp.

Member Function Documentation

base_r_policy_ptr pagmo::migration::hv_fair_r_policy::clone ( ) const
virtual

Clone method.

Provided that the derived policy implements properly the copy constructor, virtually all implementations of this method will look like this:

return base_ptr(new derived_policy(*this));
               @return migration::base_s_policy_ptr to a copy of this.

Implements pagmo::migration::base_r_policy.

Definition at line 54 of file hv_fair_r_policy.cpp.

std::vector< std::pair< population::size_type, std::vector< population::individual_type >::size_type > > pagmo::migration::hv_fair_r_policy::select ( const std::vector< population::individual_type > &  immigrants,
const population destination 
) const
virtual

Assign pairs of individuals for replacement during migration.

Note, that this method does not alter the target population, it just provides the replacement choice. The actual replacement is done in the archipelago class. The first element of a pair should be the index of the one from the destination population. The second one - the index of the individual from the immigrants vector which is to replace the first one.

Parameters
[in]immigrantsvector of incoming individuals.
[in]destinationpopulation into which the immigrants will be replaced.
Returns
replacement assignment.

Implements pagmo::migration::base_r_policy.

Definition at line 61 of file hv_fair_r_policy.cpp.


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