clean project
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1693 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
deaeaeec36
commit
8f1cdb68d5
3 changed files with 57 additions and 48 deletions
|
|
@ -61,41 +61,41 @@ public:
|
||||||
* @param _solution the related solution
|
* @param _solution the related solution
|
||||||
*/
|
*/
|
||||||
virtual bool operator() (EOT & _solution) {
|
virtual bool operator() (EOT & _solution) {
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
|
do {
|
||||||
|
// explore the neighborhood of the 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);
|
||||||
|
|
||||||
bool b=continuator(_solution);
|
// update the parameter of the search (for ex. Temperature of the SA)
|
||||||
|
searchExplorer.updateParam(_solution);
|
||||||
do {
|
|
||||||
// explore the neighborhood of the solution
|
b=continuator(_solution);
|
||||||
searchExplorer(_solution);
|
} while (b && searchExplorer.isContinue(_solution));
|
||||||
// if a solution in the neighborhood can be accepted
|
|
||||||
if (searchExplorer.accept(_solution)){
|
searchExplorer.terminate(_solution);
|
||||||
searchExplorer.move(_solution);
|
|
||||||
searchExplorer.moveApplied(true);
|
continuator.lastCall(_solution);
|
||||||
}
|
|
||||||
else
|
//A CHANGER
|
||||||
searchExplorer.moveApplied(false);
|
return true;
|
||||||
|
|
||||||
// update the parameter of the search (for ex. Temperature of the SA)
|
|
||||||
searchExplorer.updateParam(_solution);
|
|
||||||
|
|
||||||
b=continuator(_solution);
|
|
||||||
} while (b && searchExplorer.isContinue(_solution));
|
|
||||||
|
|
||||||
searchExplorer.terminate(_solution);
|
|
||||||
|
|
||||||
continuator.lastCall(_solution);
|
|
||||||
|
|
||||||
//A CHANGER
|
|
||||||
return true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
|
|
@ -41,48 +41,58 @@
|
||||||
#include <comparator/moNeighborComparator.h>
|
#include <comparator/moNeighborComparator.h>
|
||||||
#include <comparator/moSolNeighborComparator.h>
|
#include <comparator/moSolNeighborComparator.h>
|
||||||
|
|
||||||
#include <continuator/moContinuator.h>
|
|
||||||
#include <continuator/moTrueContinuator.h>
|
|
||||||
#include <continuator/moCheckpoint.h>
|
#include <continuator/moCheckpoint.h>
|
||||||
|
#include <continuator/moContinuator.h>
|
||||||
#include <continuator/moCounterMonitorSaver.h>
|
#include <continuator/moCounterMonitorSaver.h>
|
||||||
#include <continuator/moCounterStat.h>
|
#include <continuator/moCounterStat.h>
|
||||||
|
#include <continuator/moDistanceStat.h>
|
||||||
#include <continuator/moFitnessStat.h>
|
#include <continuator/moFitnessStat.h>
|
||||||
|
#include <continuator/moMaxNeighborStat.h>
|
||||||
|
#include <continuator/moMinNeighborStat.h>
|
||||||
|
#include <continuator/moNbInfNeighborStat.h>
|
||||||
|
#include <continuator/moNbSupNeighborStat.h>
|
||||||
|
#include <continuator/moNeighborhoodStat.h>
|
||||||
|
#include <continuator/moNeutralDegreeNeighborStat.h>
|
||||||
|
#include <continuator/moSecondMomentNeighborStat.h>
|
||||||
|
#include <continuator/moSizeNeighborStat.h>
|
||||||
|
#include <continuator/moSolutionStat.h>
|
||||||
#include <continuator/moStat.h>
|
#include <continuator/moStat.h>
|
||||||
#include <continuator/moStatBase.h>
|
#include <continuator/moStatBase.h>
|
||||||
|
#include <continuator/moTrueContinuator.h>
|
||||||
|
|
||||||
#include <eval/moEval.h>
|
#include <eval/moEval.h>
|
||||||
#include <eval/moFullEvalByCopy.h>
|
#include <eval/moFullEvalByCopy.h>
|
||||||
#include <eval/moFullEvalByModif.h>
|
#include <eval/moFullEvalByModif.h>
|
||||||
|
|
||||||
#include <explorer/moNeighborhoodExplorer.h>
|
|
||||||
#include <explorer/moSimpleHCexplorer.h>
|
|
||||||
#include <explorer/moFirstImprExplorer.h>
|
#include <explorer/moFirstImprExplorer.h>
|
||||||
#include <explorer/moHCneutralExplorer.h>
|
#include <explorer/moHCneutralExplorer.h>
|
||||||
#include <explorer/moSimpleHCneutralExplorer.h>
|
|
||||||
#include <explorer/moMetropolisHastingExplorer.h>
|
#include <explorer/moMetropolisHastingExplorer.h>
|
||||||
|
#include <explorer/moNeighborhoodExplorer.h>
|
||||||
|
#include <explorer/moRandomNeutralWalkExplorer.h>
|
||||||
#include <explorer/moRandomWalkExplorer.h>
|
#include <explorer/moRandomWalkExplorer.h>
|
||||||
|
#include <explorer/moSimpleHCexplorer.h>
|
||||||
|
#include <explorer/moSimpleHCneutralExplorer.h>
|
||||||
#include <explorer/moTSExplorer.h>
|
#include <explorer/moTSExplorer.h>
|
||||||
|
|
||||||
#include <memory/moAspiration.h>
|
#include <memory/moAspiration.h>
|
||||||
#include <memory/moBestImprAspiration.h>
|
#include <memory/moBestImprAspiration.h>
|
||||||
#include <memory/moTabuList.h>
|
|
||||||
#include <memory/moIntensification.h>
|
|
||||||
#include <memory/moDummyIntensification.h>
|
|
||||||
#include <memory/moDiversification.h>
|
#include <memory/moDiversification.h>
|
||||||
#include <memory/moDummyDiversification.h>
|
#include <memory/moDummyDiversification.h>
|
||||||
|
#include <memory/moDummyIntensification.h>
|
||||||
|
#include <memory/moIntensification.h>
|
||||||
#include <memory/moMemory.h>
|
#include <memory/moMemory.h>
|
||||||
#include <memory/moSolVectorTabuList.h>
|
#include <memory/moSolVectorTabuList.h>
|
||||||
|
#include <memory/moTabuList.h>
|
||||||
|
|
||||||
#include <neighborhood/moBackableNeighbor.h>
|
#include <neighborhood/moBackableNeighbor.h>
|
||||||
#include <neighborhood/moBitNeighbor.h>
|
#include <neighborhood/moBitNeighbor.h>
|
||||||
#include <neighborhood/moIndexNeighborhood.h>
|
|
||||||
#include <neighborhood/moIndexNeighbor.h>
|
#include <neighborhood/moIndexNeighbor.h>
|
||||||
#include <neighborhood/moOrderNeighborhood.h>
|
#include <neighborhood/moIndexNeighborhood.h>
|
||||||
#include <neighborhood/moRndWithReplNeighborhood.h>
|
|
||||||
#include <neighborhood/moRndWithoutReplNeighborhood.h>
|
|
||||||
#include <neighborhood/moNeighbor.h>
|
#include <neighborhood/moNeighbor.h>
|
||||||
#include <neighborhood/moNeighborhood.h>
|
#include <neighborhood/moNeighborhood.h>
|
||||||
|
#include <neighborhood/moOrderNeighborhood.h>
|
||||||
|
#include <neighborhood/moRndWithoutReplNeighborhood.h>
|
||||||
|
#include <neighborhood/moRndWithReplNeighborhood.h>
|
||||||
|
|
||||||
//#include <old/moMove.h>
|
//#include <old/moMove.h>
|
||||||
//#include <old/moMoveIncrEval.h>
|
//#include <old/moMoveIncrEval.h>
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,6 @@ int main(){
|
||||||
assert(test.position()==1);
|
assert(test.position()==1);
|
||||||
|
|
||||||
//verif du cont
|
//verif du cont
|
||||||
test.next(sol, neighbor);
|
|
||||||
assert(test.cont(sol));
|
assert(test.cont(sol));
|
||||||
test.next(sol, neighbor);
|
test.next(sol, neighbor);
|
||||||
assert(!test.cont(sol));
|
assert(!test.cont(sol));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue