PaGMO
1.1.5
|
MPI island class. More...
#include <mpi_island.h>
Public Member Functions | |
mpi_island (const mpi_island &) | |
Copy constructor. More... | |
mpi_island (const algorithm::base &, const problem::base &, int=0, const migration::base_s_policy &=migration::best_s_policy(), const migration::base_r_policy &=migration::fair_r_policy()) | |
Constructor from problem::base, algorithm::base, number of individuals, migration probability and selection/replacement policies. More... | |
mpi_island (const algorithm::base &, const population &, const migration::base_s_policy &=migration::best_s_policy(), const migration::base_r_policy &=migration::fair_r_policy()) | |
Constructor from population. More... | |
mpi_island & | operator= (const mpi_island &) |
Assignment operator. | |
base_island_ptr | clone () const |
Clone method. More... | |
std::string | get_name () const |
Return a string identifying the island's type. More... | |
Public Member Functions inherited from pagmo::base_island | |
base_island (const base_island &) | |
Copy constructor. More... | |
base_island (const algorithm::base &, const problem::base &, int, const migration::base_s_policy &, const migration::base_r_policy &) | |
Constructor from problem::base, algorithm::base, number of individuals, migration probability and selection/replacement policies. More... | |
base_island (const algorithm::base &, const population &, const migration::base_s_policy &, const migration::base_r_policy &) | |
Constructor from population. More... | |
base_island & | operator= (const base_island &) |
Assignment operator. More... | |
virtual | ~base_island () |
Destructor. More... | |
std::string | human_readable_terse () const |
Return terse human readable representation of the island. More... | |
std::string | human_readable () const |
Return human readable representation of the island. More... | |
algorithm::base_ptr | get_algorithm () const |
Return copy of the internal algorithm. More... | |
void | set_algorithm (const algorithm::base &) |
Algorithm setter. More... | |
void | set_x (population::size_type, const decision_vector &) |
Sets a decision vector. More... | |
void | set_v (population::size_type, const decision_vector &) |
Sets a velocity vector. More... | |
problem::base_ptr | get_problem () const |
Return copy of the internal problem. More... | |
population::size_type | get_size () const |
Size of the internal population. More... | |
migration::base_s_policy_ptr | get_s_policy () const |
Get a copy of the selection policy. More... | |
migration::base_r_policy_ptr | get_r_policy () const |
Get a copy of the replacement policy. More... | |
population | get_population () const |
Get a copy of the internal population. More... | |
void | set_population (const population &) |
Set internal population. More... | |
virtual void | join () const |
Join island. More... | |
bool | busy () const |
Query the status of the island. More... | |
void | evolve (int=1) |
Evolve island n times. More... | |
void | evolve_t (int) |
Evolve island for a specified minimum amount of time. More... | |
void | interrupt () |
Interrupt evolution. More... | |
std::size_t | get_evolution_time () const |
Return the total evolution time in milliseconds. More... | |
Protected Member Functions | |
void | perform_evolution (const algorithm::base &, population &) const |
Method that implements the evolution of the population. | |
Protected Member Functions inherited from pagmo::base_island | |
virtual void | thread_entry () |
Thread entry hook. More... | |
virtual void | thread_exit () |
Thread exit hook. More... | |
Friends | |
class | boost::serialization::access |
template<class Archive > | |
void | boost::serialization::save_construct_data (Archive &, const pagmo::mpi_island *, const unsigned int) |
template<class Archive > | |
void | boost::serialization::load_construct_data (Archive &, pagmo::mpi_island *, const unsigned int) |
Additional Inherited Members | |
Protected Attributes inherited from pagmo::base_island | |
algorithm::base_ptr | m_algo |
Algorithm. | |
population | m_pop |
Population. | |
archipelago * | m_archi |
Pointer that, if not null, points to the archipelago containing the island. | |
std::size_t | m_evo_time |
Total time spent by the island on evolution (in milliseconds). | |
migration::base_s_policy_ptr | m_s_policy |
Migration selection policy. | |
migration::base_r_policy_ptr | m_r_policy |
Migration replacement policy. | |
boost::scoped_ptr< boost::thread > | m_evo_thread |
Evolution thread. | |
MPI island class.
This island class will dispatch evolutions to participants to an MPI cluster. This class can be used like any other island class, the only difference being that before calling any evolution a pagmo::mpi_environment instance must have been created. More information about the MPI support in PaGMO is available in this page.
NOTE: this class is available only if PaGMO was compiled with MPI support.
Definition at line 77 of file mpi_island.h.
pagmo::mpi_island::mpi_island | ( | const mpi_island & | isl | ) |
Copy constructor.
Definition at line 78 of file mpi_island.cpp.
|
explicit |
Constructor from problem::base, algorithm::base, number of individuals, migration probability and selection/replacement policies.
Definition at line 60 of file mpi_island.cpp.
|
explicit |
Constructor from population.
Definition at line 69 of file mpi_island.cpp.
|
virtual |
Clone method.
Provided that the derived island implements properly the copy constructor, virtually all implementations of this method will look like this:
Implements pagmo::base_island.
Definition at line 88 of file mpi_island.cpp.
|
virtual |
Return a string identifying the island's type.
Reimplemented from pagmo::base_island.
Definition at line 143 of file mpi_island.cpp.