Ajout de la marche aléatoire neutre avec le prg de test.
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1689 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
db2846ef23
commit
d6146b471d
6 changed files with 501 additions and 41 deletions
|
|
@ -38,17 +38,6 @@ using namespace std;
|
|||
#include <continuator/moSolutionStat.h>
|
||||
#include <utils/eoDistance.h>
|
||||
#include <continuator/moDistanceStat.h>
|
||||
#include <comparator/moNeighborComparator.h>
|
||||
#include <comparator/moSolNeighborComparator.h>
|
||||
#include <neighborhood/moOrderNeighborhood.h>
|
||||
#include <continuator/moNeighborhoodStat.h>
|
||||
#include <continuator/moMinNeighborStat.h>
|
||||
#include <continuator/moMaxNeighborStat.h>
|
||||
#include <continuator/moSecondMomentNeighborStat.h>
|
||||
#include <continuator/moNbInfNeighborStat.h>
|
||||
#include <continuator/moNbSupNeighborStat.h>
|
||||
#include <continuator/moNeutralDegreeNeighborStat.h>
|
||||
#include <continuator/moSizeNeighborStat.h>
|
||||
|
||||
#include <utils/eoFileMonitor.h>
|
||||
#include <utils/eoUpdater.h>
|
||||
|
|
@ -179,29 +168,9 @@ void main_function(int argc, char **argv)
|
|||
moDistanceStat<Indi, unsigned> distStat(distance, bestSolution);
|
||||
// moSolutionStat<Indi> solStat;
|
||||
|
||||
moNeighborComparator<Neighbor> comparator;
|
||||
moSolNeighborComparator<Neighbor> solComparator;
|
||||
moOrderNeighborhood<Neighbor> nh(vecSize);
|
||||
moNeigborhoodStat< moOrderNeighborhood<Neighbor> > neighborhoodStat(nh, nhEval, comparator, solComparator);
|
||||
moMinNeighborStat< moOrderNeighborhood<Neighbor> > minStat(neighborhoodStat);
|
||||
moMaxNeighborStat< moOrderNeighborhood<Neighbor> > maxStat(neighborhoodStat);
|
||||
moSecondMomentNeighborStat< moOrderNeighborhood<Neighbor> > secondMomentStat(neighborhoodStat);
|
||||
moNbSupNeighborStat< moOrderNeighborhood<Neighbor> > nbSupStat(neighborhoodStat);
|
||||
moNbInfNeighborStat< moOrderNeighborhood<Neighbor> > nbInfStat(neighborhoodStat);
|
||||
moNeutralDegreeNeighborStat< moOrderNeighborhood<Neighbor> > ndStat(neighborhoodStat);
|
||||
moSizeNeighborStat< moOrderNeighborhood<Neighbor> > sizeStat(neighborhoodStat);
|
||||
|
||||
checkpoint.add(fStat);
|
||||
checkpoint.add(distStat);
|
||||
// checkpoint.add(solStat);
|
||||
checkpoint.add(neighborhoodStat);
|
||||
checkpoint.add(minStat);
|
||||
checkpoint.add(maxStat);
|
||||
checkpoint.add(secondMomentStat);
|
||||
checkpoint.add(nbInfStat);
|
||||
checkpoint.add(nbSupStat);
|
||||
checkpoint.add(ndStat);
|
||||
checkpoint.add(sizeStat);
|
||||
|
||||
eoValueParam<unsigned int> genCounter(-1,"Gen");
|
||||
eoIncrementor<unsigned int> increm(genCounter.value());
|
||||
|
|
@ -214,21 +183,15 @@ void main_function(int argc, char **argv)
|
|||
outputfile.add(fStat);
|
||||
outputfile.add(distStat);
|
||||
// outputfile.add(solStat);
|
||||
outputfile.add(minStat);
|
||||
outputfile.add(maxStat);
|
||||
outputfile.add(secondMomentStat);
|
||||
outputfile.add(nbInfStat);
|
||||
outputfile.add(nbSupStat);
|
||||
outputfile.add(ndStat);
|
||||
outputfile.add(sizeStat);
|
||||
|
||||
Indi solution; // current solution of the search process
|
||||
|
||||
/*
|
||||
// to save the solution at each iteration
|
||||
eoState outState;
|
||||
|
||||
// Register the algorithm into the state (so it has something to save!!
|
||||
|
||||
Indi solution; // current solution of the search process
|
||||
|
||||
outState.registerObject(solution);
|
||||
|
||||
// and feed the state to state savers
|
||||
|
|
@ -237,6 +200,7 @@ void main_function(int argc, char **argv)
|
|||
|
||||
// Don't forget to add the two savers to the checkpoint
|
||||
checkpoint.add(stateSaver);
|
||||
*/
|
||||
|
||||
/* =========================================================
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue