#include <ParetoGA.h>

Public Member Functions | |
| unsigned virtual int | GetNBestmodels () |
| Return the size of the pareto-optimal front. | |
| virtual std::vector< int > | GetBestModelIndices () |
| Get the indices of the models within the Pareto front. | |
| virtual void | CalcProbabilities (const int iterationnumber, gplib::rmat &LocalMisFit, GeneralPopulation &LocalPopulation) |
| Calculate the probabilities of reproduction by ranking the population. | |
| void | PrintRanks (std::ostream &output) |
| Write the population by ranks to the stream output. | |
| void | PrintFront (std::ostream &output) |
| Write the models in the pareto-optimal front to stream output. | |
| ParetoGA (GeneralPropagation *const LocalPropagation, GeneralPopulation *const LocalPopulation, GeneralTranscribe *const LocalTranscribe, const tObjectiveVector &IndObjective, const int nthreads=1) | |
| The constructor needs other classes that determine the behaviour of the GA. | |
| virtual | ~ParetoGA () |
Protected Member Functions | |
| virtual void | Elitism (const int iterationnumber) |
| The function Elitism ensures that the best models are preserved after mutation and crossover. | |
The class ParetoGA implements a variant of NSGA-II by Deb et al.: Deb, K., Pratap. A, Agarwal, S., and Meyarivan, T. (2002). A fast and elitist multi-objective genetic algorithm: NSGA-II. IEEE Transaction on Evolutionary Computation, 6(2), 181-197.
Definition at line 13 of file ParetoGA.h.
| ParetoGA::ParetoGA | ( | GeneralPropagation *const | LocalPropagation, | |
| GeneralPopulation *const | LocalPopulation, | |||
| GeneralTranscribe *const | LocalTranscribe, | |||
| const tObjectiveVector & | IndObjective, | |||
| const int | nthreads = 1 | |||
| ) | [inline] |
The constructor needs other classes that determine the behaviour of the GA.
Definition at line 43 of file ParetoGA.h.
| ParetoGA::~ParetoGA | ( | ) | [virtual] |
Definition at line 224 of file ParetoGA.cpp.
| void ParetoGA::CalcProbabilities | ( | const int | iterationnumber, | |
| gplib::rmat & | LocalMisFit, | |||
| GeneralPopulation & | LocalPopulation | |||
| ) | [virtual] |
Calculate the probabilities of reproduction by ranking the population.
Implements GeneralGA.
Definition at line 82 of file ParetoGA.cpp.
References GeneralPopulation::GetPopsize(), GeneralPopulation::SetProbabilities(), and size.
Referenced by Elitism().
| void ParetoGA::Elitism | ( | const int | iterationnumber | ) | [protected, virtual] |
The function Elitism ensures that the best models are preserved after mutation and crossover.
Reimplemented from GeneralGA.
Definition at line 154 of file ParetoGA.cpp.
References CalcProbabilities(), GeneralPopulation::GetGenesize(), GeneralPopulation::GetOldPopulation(), GeneralPopulation::GetPopsize(), GeneralPopulation::GetPopulation(), GeneralGA::MisFit, GeneralGA::OldMisFit, GeneralGA::Population, and GeneralPopulation::SetPopulation().
| virtual std::vector<int> ParetoGA::GetBestModelIndices | ( | ) | [inline, virtual] |
Get the indices of the models within the Pareto front.
Implements GeneralGA.
Definition at line 31 of file ParetoGA.h.
| unsigned virtual int ParetoGA::GetNBestmodels | ( | ) | [inline, virtual] |
Return the size of the pareto-optimal front.
Implements GeneralGA.
Definition at line 26 of file ParetoGA.h.
| void ParetoGA::PrintFront | ( | std::ostream & | output | ) |
Write the models in the pareto-optimal front to stream output.
Definition at line 211 of file ParetoGA.cpp.
References GeneralGA::MisFit.
| void ParetoGA::PrintRanks | ( | std::ostream & | output | ) |
Write the population by ranks to the stream output.
Definition at line 193 of file ParetoGA.cpp.
References GeneralGA::MisFit.
1.5.8