MOGAL
Public Member Functions

mogal::MPIGeneticAlgorithm Class Reference

Interface for running a genetic algorithm of which the genome fitnesses are calculated in a distributed way using MPI. More...

#include <mpigeneticalgorithm.h>

Inheritance diagram for mogal::MPIGeneticAlgorithm:
Inheritance graph
[legend]
Collaboration diagram for mogal::MPIGeneticAlgorithm:
Collaboration graph
[legend]

List of all members.

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.

Detailed Description

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.


Member Function Documentation

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.

Parameters:
factoryThe factory which should be used. This factory has to be initialized before this function is called.
populationSizeSize of the population.
pParamsParameters 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.

Parameters:
factoryThe 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.

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