AnnealingGA.h
Go to the documentation of this file.00001 #ifndef CANNEALINGGA_H
00002 #define CANNEALINGGA_H
00003 #include <vector>
00004 #include "GeneralGA.h"
00005 #include "VecMat.h"
00006
00007 namespace gplib
00008 {
00009
00010
00011
00012
00013
00014
00015 class AnnealingGA: public GeneralGA
00016 {
00017 private:
00018
00019 double InitTemperature;
00020
00021 int AnnealingGeneration;
00022
00023 double AnnealingRatio;
00024 protected:
00025
00026 void virtual Elitism(const int iterationnumber);
00027 public:
00028
00029 int GetBestIndex();
00030
00031 void SetParams(const double InitT, const int AnnealG,
00032 const double AnnealR);
00033
00034 unsigned int virtual GetNBestmodels()
00035 {
00036 return 1;
00037 }
00038
00039 std::vector<int> virtual GetBestModelIndices()
00040 {
00041 return std::vector<int>(1, GetBestIndex());
00042 }
00043
00044 void virtual CalcProbabilities(const int iterationnumber,
00045 gplib::rmat &LocalMisFit, GeneralPopulation &LocalPopulation);
00046
00047 AnnealingGA(GeneralPropagation* const LocalPropagation,
00048 GeneralPopulation* const LocalPopulation,
00049 GeneralTranscribe* const LocalTranscribe,
00050 const tObjectiveVector &IndObjective, const int nthreads = 1);
00051 virtual ~AnnealingGA();
00052 };
00053
00054 }
00055 #endif // CANNEALINGGA_H