rm problems from mo.h
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2658 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
9973938e34
commit
767073a51d
4 changed files with 39 additions and 27 deletions
|
|
@ -183,13 +183,13 @@
|
|||
#include <problems/permutation/moTwoOptExNeighbor.h>
|
||||
#include <problems/permutation/moTwoOptExNeighborhood.h>
|
||||
|
||||
#include <problems/eval/moMaxSATincrEval.h>
|
||||
#include <problems/eval/moOneMaxIncrEval.h>
|
||||
#include <problems/eval/moQAPIncrEval.h>
|
||||
#include <problems/eval/moRoyalRoadIncrEval.h>
|
||||
#include <problems/eval/moUBQPSimpleIncrEval.h>
|
||||
#include <problems/eval/moUBQPdoubleIncrEvaluation.h>
|
||||
#include <problems/eval/moUBQPBitsIncrEval.h>
|
||||
//#include <problems/eval/moMaxSATincrEval.h>
|
||||
//#include <problems/eval/moOneMaxIncrEval.h>
|
||||
//#include <problems/eval/moQAPIncrEval.h>
|
||||
//#include <problems/eval/moRoyalRoadIncrEval.h>
|
||||
//#include <problems/eval/moUBQPSimpleIncrEval.h>
|
||||
//#include <problems/eval/moUBQPdoubleIncrEvaluation.h>
|
||||
//#include <problems/eval/moUBQPBitsIncrEval.h>
|
||||
|
||||
|
||||
#include <sampling/moAdaptiveWalkSampling.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;
|
||||
|
|
|
|||
|
|
@ -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_ */
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
#include <algo/moeoSPEA2.h>
|
||||
#include <algo/moeoUnifiedDominanceBasedLS.h>
|
||||
|
||||
#include <archive/moeo2DMinHypervolumeArchive.h>
|
||||
//#include <archive/moeo2DMinHypervolumeArchive.h>
|
||||
#include <archive/moeoArchive.h>
|
||||
#include <archive/moeoBoundedArchive.h>
|
||||
#include <archive/moeoEpsilonHyperboxArchive.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue