diff --git a/trunk/paradiseo-mo/src/mo.h b/trunk/paradiseo-mo/src/mo.h index ecde7f536..2a56a86a5 100755 --- a/trunk/paradiseo-mo/src/mo.h +++ b/trunk/paradiseo-mo/src/mo.h @@ -183,13 +183,13 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include #include diff --git a/trunk/paradiseo-moeo/src/algo/moeoUnifiedDominanceBasedLS.h b/trunk/paradiseo-moeo/src/algo/moeoUnifiedDominanceBasedLS.h index 21ea6bdad..0c3d819c1 100755 --- a/trunk/paradiseo-moeo/src/algo/moeoUnifiedDominanceBasedLS.h +++ b/trunk/paradiseo-moeo/src/algo/moeoUnifiedDominanceBasedLS.h @@ -135,8 +135,10 @@ protected: unsigned int i=0; while (!res && i < _pop.size()){ res = (_pop[i].flag() != 1); - i++; + i++; } + //if (res==false) + //std::cout << "[Natural stop]" << std::endl; return res; } } naturalContinuator; diff --git a/trunk/paradiseo-moeo/src/archive/moeo2DMinHypervolumeArchive.h b/trunk/paradiseo-moeo/src/archive/moeo2DMinHypervolumeArchive.h index 809fa0719..de022bb84 100644 --- a/trunk/paradiseo-moeo/src/archive/moeo2DMinHypervolumeArchive.h +++ b/trunk/paradiseo-moeo/src/archive/moeo2DMinHypervolumeArchive.h @@ -111,9 +111,10 @@ public: result = insert(_moeo.objectiveVector()); if (result) { - if(size() < maxSize){ - // if yes, insert it and recompute fitness value of MOEOT and its neighbors - insert(hint,_moeo); + if(size() < maxSize) + { + // if yes, insert it and recompute fitness value of MOEOT and its neighbors + insert(hint, _moeo); if(size() > 2) { //general case @@ -131,7 +132,8 @@ public: } } } - else{ + else + { result = filter(_moeo); } } @@ -198,7 +200,8 @@ public: /** * print objective vector and fitness value of the archive */ - void print(){ + void print() + { Iterator it = begin(); while(it!=end()) { @@ -210,7 +213,7 @@ public: protected: - /** Size max of the archive*/ + /** size max of the archive */ unsigned int maxSize; /** fitness assigned to the first and the last solution in the archive */ double maxValue; @@ -312,7 +315,8 @@ protected: } } - double computeTmp(const ObjectiveVector & _objVec, int _where){ + double computeTmp(const ObjectiveVector & _objVec, int _where) + { double res, tmp; if(hint==begin() || hint==end()) res=maxValue; @@ -345,7 +349,8 @@ protected: } - void filterbis(){ + void filterbis() + { Iterator it, itd; //used to find sol with minimum fitness value double minFit = maxValue; @@ -380,21 +385,24 @@ protected: bool res; double x, y, pred, succ, tmp=0; - if(hint==begin() || hint==end()){ + if(hint==begin() || hint==end()) + { insert(hint, _moeo); hint--; computeFitness(hint); filterbis(); res=true; } - else{ + else + { //compute fitness tmp tmp=computeTmp(_moeo.objectiveVector(), 0); hint--; pred=computeTmp(_moeo.objectiveVector(), -1); hint++; succ=computeTmp(_moeo.objectiveVector(), 1); - if(tmp > succ || tmp>pred){ + if(tmp>succ || tmp>pred) + { insert(hint, _moeo); hint--; //ici faudrait utiliser les valeurs qu'on vient de calculer pour les affecter direct (faire attention à ou on se trouve) @@ -402,7 +410,8 @@ protected: filterbis(); res=true; } - else{ + else + { Iterator it; double minFit = maxValue; for(it=begin(); it!=end(); it++) @@ -412,11 +421,13 @@ protected: minFit = it->fitness(); } } - if(tmp<=minFit){ - res=false; + if (tmp<=minFit) + { + res = false; } - else{ - //REDONDANT arranger le code + else + { + // REDONDANT arranger le code insert(hint, _moeo); hint--; //ici faudrait utiliser les valeurs qu'on vient de calculer pour les affecter direct (faire attention à ou on se trouve) @@ -426,10 +437,9 @@ protected: } } } - return res; } }; -#endif /*MOEO2DMINHYPERVOLUMEARCHIVE_H_ */ +#endif /* MOEO2DMINHYPERVOLUMEARCHIVE_H_ */ diff --git a/trunk/paradiseo-moeo/src/moeo b/trunk/paradiseo-moeo/src/moeo index 3178d638d..d916ec2dc 100644 --- a/trunk/paradiseo-moeo/src/moeo +++ b/trunk/paradiseo-moeo/src/moeo @@ -57,7 +57,7 @@ #include #include -#include +//#include #include #include #include