gplib::AnnealingGA Class Reference
[Genetic algorithm optimization]

AnnealingGA implements a genetic algorithm with an annealing style objective function. More...

#include <AnnealingGA.h>

Inheritance diagram for gplib::AnnealingGA:

Inheritance graph
[legend]

List of all members.

Public Member Functions

int GetBestIndex ()
 The index of the best population member.
void SetParams (const double InitT, const int AnnealG, const double AnnealR)
 Set the parameters for the annealing process.
unsigned virtual int GetNBestmodels ()
 How many best models exist in this iteration, for this GA it is always 1.
virtual std::vector< intGetBestModelIndices ()
 Return the vector containing the best indices, here it has always one component equal to GetBestIndex.
virtual void CalcProbabilities (const int iterationnumber, gplib::rmat &LocalMisFit, GeneralPopulation &LocalPopulation)
 Calculate the selection probabilities given the iterationnumber, misfit and population to store the results.
 AnnealingGA (GeneralPropagation *const LocalPropagation, GeneralPopulation *const LocalPopulation, GeneralTranscribe *const LocalTranscribe, const tObjectiveVector &IndObjective, const int nthreads=1)
 The constructor only passes on the parameters to GeneralGA.
virtual ~AnnealingGA ()

Protected Member Functions

virtual void Elitism (const int iterationnumber)
 The implementation of Elitism for the AnnealingGA, in this case this function has no effect.


Detailed Description

AnnealingGA implements a genetic algorithm with an annealing style objective function.

For the first AnnealingGeneration iterations the objective function is kept constant after that the misfit is stretched with an exponential annealing function to focus on the minimum

Definition at line 15 of file AnnealingGA.h.


Constructor & Destructor Documentation

gplib::AnnealingGA::AnnealingGA ( GeneralPropagation *const   LocalPropagation,
GeneralPopulation *const   LocalPopulation,
GeneralTranscribe *const   LocalTranscribe,
const tObjectiveVector IndObjective,
const int  nthreads = 1 
)

The constructor only passes on the parameters to GeneralGA.

Definition at line 14 of file AnnealingGA.cpp.

gplib::AnnealingGA::~AnnealingGA (  )  [virtual]

Definition at line 24 of file AnnealingGA.cpp.


Member Function Documentation

virtual void gplib::AnnealingGA::CalcProbabilities ( const int  iterationnumber,
gplib::rmat &  LocalMisFit,
GeneralPopulation LocalPopulation 
) [virtual]

Calculate the selection probabilities given the iterationnumber, misfit and population to store the results.

Implements gplib::GeneralGA.

void gplib::AnnealingGA::Elitism ( const int  iterationnumber  )  [protected, virtual]

The implementation of Elitism for the AnnealingGA, in this case this function has no effect.

Reimplemented from gplib::GeneralGA.

Definition at line 69 of file AnnealingGA.cpp.

int gplib::AnnealingGA::GetBestIndex (  ) 

The index of the best population member.

Definition at line 28 of file AnnealingGA.cpp.

References gplib::GeneralPopulation::GetProbabilities(), and gplib::GeneralGA::Population.

Referenced by GetBestModelIndices().

virtual std::vector<int> gplib::AnnealingGA::GetBestModelIndices (  )  [inline, virtual]

Return the vector containing the best indices, here it has always one component equal to GetBestIndex.

Implements gplib::GeneralGA.

Definition at line 39 of file AnnealingGA.h.

References GetBestIndex().

unsigned virtual int gplib::AnnealingGA::GetNBestmodels (  )  [inline, virtual]

How many best models exist in this iteration, for this GA it is always 1.

Implements gplib::GeneralGA.

Definition at line 34 of file AnnealingGA.h.

void gplib::AnnealingGA::SetParams ( const double  InitT,
const int  AnnealG,
const double  AnnealR 
)

Set the parameters for the annealing process.

Definition at line 35 of file AnnealingGA.cpp.

Referenced by SetupAnnealingGA().


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

Generated on Tue Nov 3 13:24:22 2009 for GPLIB++ by  doxygen 1.5.8