cout deleted

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@578 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
liefooga 2007-07-17 09:07:10 +00:00
commit 17497f0415

View file

@ -87,16 +87,13 @@ public:
moeoArchive < MOEOT > previousArchive; moeoArchive < MOEOT > previousArchive;
// update the archive with the initial population // update the archive with the initial population
archive.update(_pop); archive.update(_pop);
unsigned int count = 0;
do do
{ {
previousArchive.update(archive); previousArchive.update(archive);
oneStep(_pop); oneStep(_pop);
count++;
archive.update(_pop); archive.update(_pop);
} while ( (! archive.equals(previousArchive)) && (continuator(_arch)) ); } while ( (! archive.equals(previousArchive)) && (continuator(_arch)) );
_arch.update(archive); _arch.update(archive);
cout << "\t" << count << " steps" << endl;
} }
@ -120,7 +117,7 @@ private:
* Apply one step of the local search to the population _pop * Apply one step of the local search to the population _pop
* @param _pop the population * @param _pop the population
*/ */
void old_oneStep (eoPop < MOEOT > & _pop) void oneStep (eoPop < MOEOT > & _pop)
{ {
// the move // the move
Move move; Move move;
@ -152,7 +149,7 @@ private:
//////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////
// extreme solutions (min only!) // extreme solutions (min only!)
ext_0_idx = -1; ext_0_idx = -1;
ext_0_objVec = x_objVec; ext_0_objVec = x_objVec;
ext_1_idx = -1; ext_1_idx = -1;
@ -182,7 +179,7 @@ private:
ext_1_objVec = _pop[k].objectiveVector(); ext_1_objVec = _pop[k].objectiveVector();
} }
} }
// worst init // worst init
if (ext_0_idx == -1) if (ext_0_idx == -1)
{ {
ind = 0; ind = 0;
@ -335,12 +332,12 @@ private:
//////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////
// extremes solutions // extremes solutions
OneObjectiveComparator comp0(0); OneObjectiveComparator comp0(0);
ext_0_idx = std::min_element(_pop.begin(), _pop.end(), comp0) - _pop.begin(); ext_0_idx = std::min_element(_pop.begin(), _pop.end(), comp0) - _pop.begin();
OneObjectiveComparator comp1(1); OneObjectiveComparator comp1(1);
ext_1_idx = std::min_element(_pop.begin(), _pop.end(), comp1) - _pop.begin(); ext_1_idx = std::min_element(_pop.begin(), _pop.end(), comp1) - _pop.begin();
// new = extreme ? // new = extreme ?
if (x_objVec[0] < _pop[ext_0_idx].objectiveVector()[0]) if (x_objVec[0] < _pop[ext_0_idx].objectiveVector()[0])
{ {
ext_0_idx = -1; ext_0_idx = -1;
@ -366,7 +363,7 @@ private:
ind++; ind++;
} }
worst_idx = ind; worst_idx = ind;
worst_objVec = _pop[ind].objectiveVector(); worst_objVec = _pop[ind].objectiveVector();
worst_fitness = _pop[ind].fitness(); worst_fitness = _pop[ind].fitness();
} }
else if (ext_1_idx == -1) else if (ext_1_idx == -1)
@ -377,13 +374,13 @@ private:
ind++; ind++;
} }
worst_idx = ind; worst_idx = ind;
worst_objVec = _pop[ind].objectiveVector(); worst_objVec = _pop[ind].objectiveVector();
worst_fitness = _pop[ind].fitness(); worst_fitness = _pop[ind].fitness();
} }
else else
{ {
worst_idx = -1; worst_idx = -1;
worst_objVec = x_objVec; worst_objVec = x_objVec;
worst_fitness = x_fitness; worst_fitness = x_fitness;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////