AnnealingGA Class Reference
[Genetic algorithm optimization]

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

#include <AnnealingGA.h>

Inheritance diagram for 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< int > GetBestModelIndices ()
 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)
 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 13 of file AnnealingGA.h.


Constructor & Destructor Documentation

AnnealingGA::AnnealingGA ( GeneralPropagation *const   LocalPropagation,
GeneralPopulation *const   LocalPopulation,
GeneralTranscribe *const   LocalTranscribe,
const tObjectiveVector IndObjective 
)

The constructor only passes on the parameters to GeneralGA.

Definition at line 12 of file AnnealingGA.cpp.

AnnealingGA::~AnnealingGA (  )  [virtual]

Definition at line 21 of file AnnealingGA.cpp.


Member Function Documentation

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

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

Reimplemented from GeneralGA.

Definition at line 61 of file AnnealingGA.cpp.

int AnnealingGA::GetBestIndex (  ) 

The index of the best population member.

Definition at line 24 of file AnnealingGA.cpp.

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

Referenced by GetBestModelIndices().

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

Set the parameters for the annealing process.

Definition at line 29 of file AnnealingGA.cpp.

Referenced by SetupAnnealingGA().

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

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

Implements GeneralGA.

Definition at line 30 of file AnnealingGA.h.

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

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

Implements GeneralGA.

Definition at line 32 of file AnnealingGA.h.

References GetBestIndex().

virtual void 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 GeneralGA.


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

Generated on Fri Jul 4 15:30:21 2008 for GPLIB++ by  doxygen 1.5.5