MOGAL
|
Interface for running a genetic algorithm of which the genome fitnesses are calculated in a distributed way using MPI. More...
#include <mpigeneticalgorithm.h>
Public Member Functions | |
bool | runMPI (GAFactory &factory, size_t populationSize, const GeneticAlgorithmParams *pParams=0) |
Start this function on the root node (rank 0) to start a distributed GA. | |
bool | runMPIHelper (GAFactory &factory) |
When the runMPI function is started on the root node, this function should be called on the helper nodes. |
Interface for running a genetic algorithm of which the genome fitnesses are calculated in a distributed way using MPI. Note that currently no load balancing is performed, each node will get approximately the same amount of genomes to calculate.
bool mogal::MPIGeneticAlgorithm::runMPI | ( | GAFactory & | factory, |
size_t | populationSize, | ||
const GeneticAlgorithmParams * | pParams = 0 |
||
) |
Start this function on the root node (rank 0) to start a distributed GA.
factory | The factory which should be used. This factory has to be initialized before this function is called. |
populationSize | Size of the population. |
pParams | Parameters for the genetic algorithm. |
bool mogal::MPIGeneticAlgorithm::runMPIHelper | ( | GAFactory & | factory | ) |
When the runMPI function is started on the root node, this function should be called on the helper nodes.
factory | The factory which should be used. This factory has to be initialized before this function is called. Note that this is not distributed using the MPI mechanism, you'll need to make sure yourself that each node has an initialized version of the factory when this function is called. |