• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

D:/LIACS/mies/SerialES/NSGAII_MIES.h

Go to the documentation of this file.
00001 #ifndef NSGA_MIES
00002 #define NSGA_MIES
00003 
00004 #include "NSGA_II.h"
00005 
00006 #ifdef PARALLEL 
00007 #include "../ParallelES/MixedIntegerES_P.h"
00009 class NSGAII_MIES:public MixedIntegerES_P, virtual public NSGA_II 
00010 {
00011   public:
00012     NSGAII_MIES(unsigned n_r_, unsigned n_z_, unsigned n_d_, unsigned n_sigma_r_, unsigned n_sigma_z_, unsigned n_prob_, unsigned n_f_, 
00013                  unsigned mu_, unsigned rho_, unsigned kappa_, unsigned lambda_,  
00014                    vector<double>& lBound_r_, vector<double>& uBound_r_, vector<int>& lBound_z_, vector<int>& uBound_z_, 
00015                      vector<int> lBound_d_, vector<int> uBound_d_, double prob_min_, double prob_max_,
00016                        bool disRec_r_, bool disRec_z_, bool disRec_sigma_r_, bool disRec_sigma_z_, bool disRec_prob_,
00017                          bool selfAdaptation_, vector<int>& direction_, 
00018                            unsigned evaluations_, vector<double>& optimalF_, 
00019                              double initialSigma_r_, double initialSigma_z_, double initialProb_,
00020                                ifstream* initialPopFile_, int randomSeed_, bool feedback_, 
00021                                  unsigned timeOutVal_,
00022                                    unsigned selectDimension_, vector<unsigned>& selectFunction_) 
00023       :MixedIntegerES_P(n_r_, n_z_, n_d_, n_sigma_r_, n_sigma_z_, n_prob_, n_f_, 
00024                          mu_, rho_, kappa_, lambda_,  
00025                            lBound_r_, uBound_r_, lBound_z_, uBound_z_, 
00026                              lBound_d_, uBound_d_, prob_min_, prob_max_,
00027                                disRec_r_, disRec_z_, disRec_sigma_r_, disRec_sigma_z_, disRec_prob_,
00028                                  selfAdaptation_, direction_, 
00029                                    evaluations_, optimalF_, 
00030                                      initialSigma_r_, initialSigma_z_, initialProb_,
00031                                        initialPopFile_, randomSeed_, feedback_, timeOutVal_) 
00032                                      { 
00033 #ifdef DEBUG
00034                                        cout << "NSGAII_MIES::NSGAII_MIES()" << endl;
00035 #endif  
00036                                        selectDimension = selectDimension_;
00037                                        selectFunction = selectFunction_;   
00038                                      }
00039 #else
00040 #include "MixedIntegerES.h"
00042 class NSGAII_MIES:public MixedIntegerES, virtual public NSGA_II
00043 {
00044   public:
00045     NSGAII_MIES(unsigned n_r_, unsigned n_z_, unsigned n_d_, unsigned n_sigma_r_, unsigned n_sigma_z_, unsigned n_prob_, unsigned n_f_, 
00046                  unsigned mu_, unsigned rho_, unsigned kappa_, unsigned lambda_,  
00047                    vector<double>& lBound_r_, vector<double>& uBound_r_, vector<int>& lBound_z_, vector<int>& uBound_z_, 
00048                      vector<int> lBound_d_, vector<int> uBound_d_, double prob_min_, double prob_max_,
00049                        bool disRec_r_, bool disRec_z_, bool disRec_sigma_r_, bool disRec_sigma_z_, bool disRec_prob_,
00050                          bool selfAdaptation_, vector<int>& direction_, 
00051                            unsigned evaluations_, vector<double>& optimalF_, 
00052                              double initialSigma_r_, double initialSigma_z_, double initialProb_,
00053                                ifstream* initialPopFile_, int randomSeed_, bool feedback_, 
00054                                  unsigned timeOutVal_,
00055                                    unsigned selectDimension_, vector<unsigned>& selectFunction_) 
00056       :MixedIntegerES(n_r_, n_z_, n_d_, n_sigma_r_, n_sigma_z_, n_prob_, n_f_, 
00057                        mu_, rho_, kappa_, lambda_,  
00058                          lBound_r_, uBound_r_, lBound_z_, uBound_z_, 
00059                            lBound_d_, uBound_d_, prob_min_, prob_max_,
00060                              disRec_r_, disRec_z_, disRec_sigma_r_, disRec_sigma_z_, disRec_prob_,
00061                                selfAdaptation_, direction_, 
00062                                  evaluations_, optimalF_, 
00063                                    initialSigma_r_, initialSigma_z_, initialProb_,
00064                                      initialPopFile_, randomSeed_, feedback_) 
00065                                      { 
00066 #ifdef DEBUG
00067                                        cout << "NSGAII_MIES::NSGAII_MIES()" << endl;
00068 #endif     
00069                                        selectDimension = selectDimension_;
00070                                        selectFunction = selectFunction_;   
00071                                      }
00072 #endif
00073     virtual ~NSGAII_MIES() {}
00074 
00075   protected:
00077     virtual void simulate(Individual* I) = 0; 
00078 
00080     virtual void writePop(time_t id) = 0;
00081 
00083     virtual void writeLog(time_t elapsed, time_t id) = 0;
00084 
00088     void select() { NSGA_II::select(P, O, mu, kappa, lambda, direction, bestF); } 
00089 
00091     MOComparison compare(Individual* A, Individual* B, vector<double>& bestWorstF, bool determineValues, bool worst)
00092                          { return NSGA_II::compare(A, B, direction, bestWorstF, determineValues, worst); }                                    
00093 
00095     void determineBestF();
00096     
00098     bool optimumReached(); 
00099 };
00100 
00101 #endif

Generated on Tue Oct 4 2011 16:25:19 for WDN by  doxygen 1.7.2