#include <GLMultipleGaRunner.h>
Public Member Functions | |
GLMultipleGaRunner () | |
virtual | ~GLMultipleGaRunner () |
virtual void | run (const vector< GLBaseGeneticAlgorithm * > &genetic_algorithms, const vector< int > &number_of_runs, GLBaseOrganismInitialiser *initialiser, GLBaseEvaluator *evaluator, const TListOfStoppers &stoppers, bool bool_operator, vector< vector< GLBaseGaStatus * > > &results, bool same_random_seed=false) |
Definition at line 20 of file GLMultipleGaRunner.h.
GLMultipleGaRunner::GLMultipleGaRunner | ( | ) |
Simple constructor.
Definition at line 14 of file GLMultipleGaRunner.cpp.
GLMultipleGaRunner::~GLMultipleGaRunner | ( | ) | [virtual] |
Destructor. Destroys everything.
Definition at line 21 of file GLMultipleGaRunner.cpp.
void GLMultipleGaRunner::run | ( | const vector< GLBaseGeneticAlgorithm * > & | genetic_algorithms, | |
const vector< int > & | number_of_runs, | |||
GLBaseOrganismInitialiser * | initialiser, | |||
GLBaseEvaluator * | evaluator, | |||
const TListOfStoppers & | stoppers, | |||
bool | bool_operator, | |||
vector< vector< GLBaseGaStatus * > > & | results, | |||
bool | same_random_seed = false | |||
) | [virtual] |
Makes several runs of Genetic Algorithm(s). May run the same or several GAs many times over the same problem.
genetic_algorithms | vector of genetic algorithms to run. | |
number_of_runs | how many times each genetic algorithm will run (number_of_runs.size() >= genetic_algorithms.size()). | |
initialiser | is used to define the initial population of the GA (including the type of organisms). | |
evaluator | objective function. | |
stoppers | list of stoppers (classes which determine when GA should stop). | |
bool_operator | if == AND_OPERATOR then GA stops when ALL stoppers indicate that, when == OR_OPERATOR (default) then it happens when at least ONE of the stoppers is satisfied. | |
results | output vector of vectors of results. One result per GA per run. Previous content will be deleted. | |
same_random_seed | when true, rangom number generator is initialised with the same random seed each time new GA starts to work (e.g. if 2 GAs are scheduled to run 10 times each the random generator will be initialised twice with the same seed). |
Definition at line 46 of file GLMultipleGaRunner.cpp.