moveApplied added
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1681 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
4f98176c49
commit
fa8f3a7897
1 changed files with 29 additions and 26 deletions
|
|
@ -65,34 +65,37 @@ public:
|
||||||
if(_solution.invalid())
|
if(_solution.invalid())
|
||||||
fullEval(_solution);
|
fullEval(_solution);
|
||||||
|
|
||||||
// initialization of the parameter of the search (for example fill empty the tabu list)
|
// initialization of the parameter of the search (for example fill empty the tabu list)
|
||||||
searchExplorer.initParam(_solution);
|
searchExplorer.initParam(_solution);
|
||||||
|
|
||||||
// initialization of the external continuator (for example the time, or the number of generations)
|
// initialization of the external continuator (for example the time, or the number of generations)
|
||||||
continuator.init(_solution);
|
continuator.init(_solution);
|
||||||
|
|
||||||
bool b=continuator(_solution);
|
bool b=continuator(_solution);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
// explore the neighborhood of the solution
|
// explore the neighborhood of the solution
|
||||||
searchExplorer(_solution);
|
searchExplorer(_solution);
|
||||||
|
// if a solution in the neighborhood can be accepted
|
||||||
|
if (searchExplorer.accept(_solution)){
|
||||||
|
searchExplorer.move(_solution);
|
||||||
|
searchExplorer.moveApplied(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
searchExplorer.moveApplied(false);
|
||||||
|
|
||||||
// if a solution in the neighborhood can be accepted
|
// update the parameter of the search (for ex. Temperature of the SA)
|
||||||
if (searchExplorer.accept(_solution))
|
searchExplorer.updateParam(_solution);
|
||||||
searchExplorer.move(_solution);
|
|
||||||
|
|
||||||
// update the parameter of the search (for ex. Temperature of the SA)
|
b=continuator(_solution);
|
||||||
searchExplorer.updateParam(_solution);
|
} while (b && searchExplorer.isContinue(_solution));
|
||||||
|
|
||||||
b=continuator(_solution);
|
searchExplorer.terminate(_solution);
|
||||||
} while (b && searchExplorer.isContinue(_solution));
|
|
||||||
|
|
||||||
searchExplorer.terminate(_solution);
|
continuator.lastCall(_solution);
|
||||||
|
|
||||||
continuator.lastCall(_solution);
|
//A CHANGER
|
||||||
|
return true;
|
||||||
//A CHANGER
|
|
||||||
return true;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue