Add the notion of currentNeighbor in the moVNSExplorer

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2546 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
verel 2011-12-06 13:52:23 +00:00
commit 5f108b9b74

View file

@ -83,7 +83,7 @@ public:
if ((*this).moveApplied()) { if ((*this).moveApplied()) {
selection.init(_solution); selection.init(_solution);
} else } else
if (selection.cont(current)) { if (selection.cont(currentSol)) {
selection.next(_solution); selection.next(_solution);
} else } else
stop = true; stop = true;
@ -102,9 +102,9 @@ public:
eoMonOp<EOT> & shake = selection.getShake(); eoMonOp<EOT> & shake = selection.getShake();
eoMonOp<EOT> & ls = selection.getLocalSearch(); eoMonOp<EOT> & ls = selection.getLocalSearch();
current = _solution; currentSol = _solution;
shake(current); shake(currentSol);
ls(current); ls(currentSol);
} }
/** /**
@ -121,7 +121,7 @@ public:
* @param _solution the solution to move * @param _solution the solution to move
*/ */
virtual void move(EOT & _solution) { virtual void move(EOT & _solution) {
_solution = current; _solution = currentSol;
}; };
/** /**
@ -130,7 +130,7 @@ public:
* @return true if the neighbor ameliorate the fitness * @return true if the neighbor ameliorate the fitness
*/ */
virtual bool accept(EOT & _solution) { virtual bool accept(EOT & _solution) {
return acceptCrit(_solution, current); return acceptCrit(_solution, currentSol);
}; };
/** /**
@ -145,7 +145,7 @@ private:
moVariableNeighborhoodSelection<EOT>& selection; moVariableNeighborhoodSelection<EOT>& selection;
moAcceptanceCriterion<Neighbor>& acceptCrit; moAcceptanceCriterion<Neighbor>& acceptCrit;
bool stop; bool stop;
EOT current; EOT currentSol;
}; };