Fin du nettoyage
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1812 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
c4b0699f53
commit
cc31901008
46 changed files with 417 additions and 546 deletions
|
|
@ -1295,7 +1295,7 @@ SKIP_FUNCTION_MACROS = YES
|
|||
# If a tag file is not located in the directory in which doxygen
|
||||
# is run, you must also specify the path to the tagfile here.
|
||||
|
||||
TAGFILES = @PARADISEO_EO_BIN_DIR@/doc/eo.doxytag=http://eodev.sourceforge.net/eo/doc/html
|
||||
TAGFILES = @EO_BIN_DIR@/doc/eo.doxytag=http://eodev.sourceforge.net/eo/doc/html
|
||||
|
||||
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
|
||||
# a tag file that is based on the input files it reads.
|
||||
|
|
|
|||
|
|
@ -55,12 +55,6 @@ public:
|
|||
moStat(T _value, std::string _description):
|
||||
eoValueParam<T>(_value, _description) {}
|
||||
|
||||
// /**
|
||||
// * @return name of the class
|
||||
// */
|
||||
// virtual std::string className(void) const {
|
||||
// return "moStat";
|
||||
// }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ public :
|
|||
|
||||
/**
|
||||
* Default Constructor
|
||||
* @param _stat a stat
|
||||
*/
|
||||
moStatFromStat(moStat<EOT,T> & _stat): moStat<EOT, T>(0, _stat.description()), stat(_stat) {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@ public:
|
|||
|
||||
/**
|
||||
* Ctor.
|
||||
* @param _max maximum running time
|
||||
* @param _max maximum running time$
|
||||
* @param _verbose verbose mode true/false -> on/off
|
||||
*/
|
||||
moTimeContinuator(time_t _max, bool _verbose=true): max(_max), verbose(_verbose){
|
||||
start = time(NULL);
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ public:
|
|||
moTrueContinuator() {} ;
|
||||
|
||||
/**
|
||||
*@param _solution a solution
|
||||
*@return always true
|
||||
* @param _solution a solution
|
||||
* @return always true
|
||||
*/
|
||||
virtual bool operator()(EOT & _solution) {
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public:
|
|||
|
||||
/**
|
||||
* Default Constructor
|
||||
* @param _param the parameter of type EOT to save in the vector
|
||||
* @param _param the parameter of type eoScalarFitness to save in the vector
|
||||
*/
|
||||
template <class ScalarType, class Compare>
|
||||
moVectorMonitor(eoValueParam<eoScalarFitness<ScalarType, Compare> > & _param) : doubleParam( & (eoValueParam<double>&)_param), intParam(NULL), eotParam(NULL)
|
||||
|
|
@ -80,7 +80,7 @@ public:
|
|||
|
||||
/**
|
||||
* Default Constructor
|
||||
* @param _param the parameter of type EOT to save in the vector
|
||||
* @param _param unvalid Parameter
|
||||
*/
|
||||
template <class T>
|
||||
moVectorMonitor(eoValueParam<T> & _param) : doubleParam(NULL), intParam(NULL), eotParam(NULL)
|
||||
|
|
|
|||
|
|
@ -52,8 +52,7 @@ public:
|
|||
* @param _span number of iteration with equal temperature
|
||||
* @param _finalT final temperature, threshold of the stopping criteria
|
||||
*/
|
||||
moSimpleCoolingSchedule(double _initT, double _alpha, unsigned _span, double _finalT) : initT(_initT), alpha(_alpha), span(_span), finalT(_finalT) {
|
||||
}
|
||||
moSimpleCoolingSchedule(double _initT, double _alpha, unsigned _span, double _finalT) : initT(_initT), alpha(_alpha), span(_span), finalT(_finalT) {}
|
||||
|
||||
/**
|
||||
* Initial temperature
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@ public:
|
|||
|
||||
/**
|
||||
* NOTHING TO DO
|
||||
* @param _sol a solution
|
||||
* @param _sol a solution (unused)
|
||||
* @param _n a neighbor (unused)
|
||||
*/
|
||||
void operator()(EOT& _sol, Neighbor& _n){}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,46 +51,46 @@ public:
|
|||
moDummyExplorer(): moNeighborhoodExplorer<Neighbor>() { }
|
||||
|
||||
/**
|
||||
* Init Search parameters
|
||||
* @param _solution the solution to explore
|
||||
* NOTHING TO DO
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
void initParam (EOT& _solution) { } ;
|
||||
|
||||
/**
|
||||
* Update Search parameters
|
||||
* @param _solution the solution to explore
|
||||
* NOTHING TO DO
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
void updateParam (EOT& _solution) { } ;
|
||||
|
||||
/**
|
||||
* Test if the exploration continue or not
|
||||
* @param _solution the solution to explore
|
||||
* @return true if the exploration continue, else return false
|
||||
* NOTHING TO DO
|
||||
* @param _solution a solution (unused)
|
||||
* @return always false
|
||||
*/
|
||||
bool isContinue(EOT& _solution) { return false; } ;
|
||||
|
||||
/**
|
||||
* Move a solution
|
||||
* @param _solution the solution to explore
|
||||
* NOTHING TO DO
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
void move(EOT& _solution) { } ;
|
||||
|
||||
/**
|
||||
* Test if a solution is accepted
|
||||
* @param _solution the solution to explore
|
||||
* @return true if the solution is accepted, else return false
|
||||
* NOTHING TO DO
|
||||
* @param _solution a solution (unused)
|
||||
* @return always false
|
||||
*/
|
||||
virtual bool accept(EOT& _solution) { return false; } ;
|
||||
|
||||
/**
|
||||
* Terminate the search
|
||||
* @param _solution the solution to explore
|
||||
* NOTHING TO DO
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
virtual void terminate(EOT& _solution) { } ;
|
||||
|
||||
/**
|
||||
* Explore the neighborhood of a solution
|
||||
* @param _solution
|
||||
* NOTHING TO DO
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
void operator()(EOT & _solution) { }
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
#include <neighborhood/moNeighborhood.h>
|
||||
|
||||
/**
|
||||
* Explorer for a first imporvement heuristic
|
||||
* Explorer for a first improvement heuristic
|
||||
*/
|
||||
template< class Neighbor>
|
||||
class moFirstImprHCexplorer : public moNeighborhoodExplorer<Neighbor>
|
||||
|
|
@ -74,21 +74,24 @@ public:
|
|||
|
||||
/**
|
||||
* initParam: NOTHING TO DO
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
virtual void initParam(EOT & solution) {};
|
||||
virtual void initParam(EOT & _solution) {};
|
||||
|
||||
/**
|
||||
* updateParam: NOTHING TO DO
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
virtual void updateParam(EOT & solution) {};
|
||||
virtual void updateParam(EOT & _solution) {};
|
||||
|
||||
/**
|
||||
* terminate: NOTHING TO DO
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
virtual void terminate(EOT & solution) {};
|
||||
virtual void terminate(EOT & _solution) {};
|
||||
|
||||
/**
|
||||
* Explore the neighborhood of a solution
|
||||
* Explore the neighborhood of a solution until an ameliorated neighbor is found
|
||||
* @param _solution
|
||||
*/
|
||||
virtual void operator()(EOT & _solution) {
|
||||
|
|
@ -136,7 +139,7 @@ public:
|
|||
};
|
||||
|
||||
/**
|
||||
* accept test if an amelirated neighbor was be found
|
||||
* accept test if an ameliorated neighbor was be found
|
||||
* @param _solution the solution
|
||||
* @return true if the best neighbor ameliorate the fitness
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -98,12 +98,13 @@ public:
|
|||
|
||||
/**
|
||||
* terminate: NOTHING TO DO
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
virtual void terminate(EOT & _solution){};
|
||||
|
||||
/**
|
||||
* Explore the neighborhood of a solution
|
||||
* @param _solution
|
||||
* Perturb and apply local search on a solution
|
||||
* @param _solution the solution
|
||||
*/
|
||||
virtual void operator()(EOT & _solution){
|
||||
//copy the solution to perform new local search
|
||||
|
|
@ -132,8 +133,8 @@ public:
|
|||
};
|
||||
|
||||
/**
|
||||
* move the solution with the best neighbor
|
||||
* @param _solution the solution to move
|
||||
* copy the solution found by the local search
|
||||
* @param _solution the solution
|
||||
*/
|
||||
virtual void move(EOT & _solution) {
|
||||
_solution=current;
|
||||
|
|
|
|||
|
|
@ -119,14 +119,6 @@ public:
|
|||
isMoved=_isMoved;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the class id.
|
||||
* @return the class name as a std::string
|
||||
*/
|
||||
// virtual std::string className() const {
|
||||
// return "moNeighborhoodExplorer";
|
||||
// }
|
||||
|
||||
protected:
|
||||
moDummyNeighborhood<Neighbor> dummyNeighborhood;
|
||||
moDummyEval<Neighbor> dummyEval;
|
||||
|
|
|
|||
|
|
@ -70,8 +70,7 @@ public:
|
|||
moNeighborComparator<Neighbor>& _neighborComparator,
|
||||
moSolNeighborComparator<Neighbor>& _solNeighborComparator,
|
||||
unsigned _nbStep) :
|
||||
moRandomBestHCexplorer<Neighbor>(_neighborhood, _eval, _neighborComparator, _solNeighborComparator),
|
||||
nbStep(_nbStep) {
|
||||
moRandomBestHCexplorer<Neighbor>(_neighborhood, _eval, _neighborComparator, _solNeighborComparator),nbStep(_nbStep) {
|
||||
//Some cycle is possible with equals fitness solutions if the neighborhood is not random
|
||||
}
|
||||
|
||||
|
|
@ -83,18 +82,20 @@ public:
|
|||
|
||||
/**
|
||||
* initial number of step
|
||||
* @param _solution the current solution
|
||||
*/
|
||||
virtual void initParam(EOT & solution) {
|
||||
moRandomBestHCexplorer<Neighbor>::initParam(solution);
|
||||
virtual void initParam(EOT & _solution) {
|
||||
moRandomBestHCexplorer<Neighbor>::initParam(_solution);
|
||||
|
||||
step = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* one more step
|
||||
* @param _solution the current solution
|
||||
*/
|
||||
virtual void updateParam(EOT & solution) {
|
||||
moRandomBestHCexplorer<Neighbor>::updateParam(solution);
|
||||
virtual void updateParam(EOT & _solution) {
|
||||
moRandomBestHCexplorer<Neighbor>::updateParam(_solution);
|
||||
|
||||
step++;
|
||||
};
|
||||
|
|
@ -109,7 +110,7 @@ public:
|
|||
};
|
||||
|
||||
/**
|
||||
* accept test if an ameliorated neighbor was be found
|
||||
* accept test if an ameliorated or an equal neighbor was be found
|
||||
* @param _solution the solution
|
||||
* @return true if the best neighbor ameliorate the fitness or is equals
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -83,28 +83,31 @@ public:
|
|||
|
||||
/**
|
||||
* empty the vector of best solutions
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
virtual void initParam(EOT & solution) {
|
||||
virtual void initParam(EOT & _solution) {
|
||||
// delete all the best solutions
|
||||
bestVector.clear();
|
||||
};
|
||||
|
||||
/**
|
||||
* empty the vector of best solutions
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
virtual void updateParam(EOT & solution) {
|
||||
virtual void updateParam(EOT & _solution) {
|
||||
// delete all the best solutions
|
||||
bestVector.clear();
|
||||
};
|
||||
|
||||
/**
|
||||
* terminate: NOTHING TO DO
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
virtual void terminate(EOT & solution) {};
|
||||
virtual void terminate(EOT & _solution) {};
|
||||
|
||||
/**
|
||||
* Explore the neighborhood of a solution
|
||||
* @param _solution
|
||||
* @param _solution the current solution
|
||||
*/
|
||||
virtual void operator()(EOT & _solution) {
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,8 @@ public:
|
|||
* @param _solNeighborComparator a solution vs neighbor comparator
|
||||
* @param _nbStep maximum number of step to do
|
||||
*/
|
||||
moRandomNeutralWalkExplorer(Neighborhood& _neighborhood, moEval<Neighbor>& _eval,
|
||||
moRandomNeutralWalkExplorer(Neighborhood& _neighborhood,
|
||||
moEval<Neighbor>& _eval,
|
||||
moSolNeighborComparator<Neighbor>& _solNeighborComparator,
|
||||
unsigned _nbStep):
|
||||
moNeighborhoodExplorer<Neighbor>(_neighborhood, _eval),
|
||||
|
|
@ -84,23 +85,26 @@ public:
|
|||
|
||||
/**
|
||||
* initialization of the number of step to be done
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
virtual void initParam(EOT & solution) {
|
||||
virtual void initParam(EOT & _solution) {
|
||||
step = 0;
|
||||
isAccept = true;
|
||||
};
|
||||
|
||||
/**
|
||||
* increase the number of step
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
virtual void updateParam(EOT & solution) {
|
||||
virtual void updateParam(EOT & _solution) {
|
||||
step++;
|
||||
};
|
||||
|
||||
/**
|
||||
* terminate: NOTHING TO DO
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
virtual void terminate(EOT & solution) {};
|
||||
virtual void terminate(EOT & _solution) {};
|
||||
|
||||
/**
|
||||
* Explore the neighborhood of a solution
|
||||
|
|
@ -135,7 +139,7 @@ public:
|
|||
* @return true there is some steps to do
|
||||
*/
|
||||
virtual bool isContinue(EOT & _solution) {
|
||||
return (step < nbStep) && isAccept ;
|
||||
return (step < nbStep) && isAccept ;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -150,7 +154,7 @@ public:
|
|||
};
|
||||
|
||||
/**
|
||||
* accept test if an ameliorated neighbor was be found
|
||||
* accept test if an equals neighbor was be found
|
||||
* @param _solution the solution
|
||||
* @return true if the best neighbor ameliorate the fitness
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public:
|
|||
/**
|
||||
* Constructor
|
||||
* @param _init the solution initializer, to explore at random the search space
|
||||
* @param _eval the evaluation function
|
||||
* @param _fulleval the evaluation function
|
||||
* @param _nbStep maximum number of step to do
|
||||
*/
|
||||
moRandomSearchExplorer(eoInit<EOT>& _init, eoEvalFunc<EOT>& _fulleval, unsigned _nbStep) : moNeighborhoodExplorer<Neighbor>(), init(_init), fulleval(_fulleval), nbStep(_nbStep) {
|
||||
|
|
@ -68,27 +68,29 @@ public:
|
|||
/**
|
||||
* Destructor
|
||||
*/
|
||||
~moRandomSearchExplorer() {
|
||||
}
|
||||
~moRandomSearchExplorer() {}
|
||||
|
||||
/**
|
||||
* initialization of the number of step to be done
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
virtual void initParam(EOT & solution) {
|
||||
virtual void initParam(EOT & _solution) {
|
||||
step = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* increase the number of step
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
virtual void updateParam(EOT & solution) {
|
||||
virtual void updateParam(EOT & _solution) {
|
||||
step++;
|
||||
};
|
||||
|
||||
/**
|
||||
* terminate: NOTHING TO DO
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
virtual void terminate(EOT & solution) {};
|
||||
virtual void terminate(EOT & _solution) {};
|
||||
|
||||
/**
|
||||
* Explore the neighborhood with only one random solution
|
||||
|
|
|
|||
|
|
@ -78,28 +78,31 @@ public:
|
|||
|
||||
/**
|
||||
* initialization of the number of step to be done
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
virtual void initParam(EOT & solution) {
|
||||
virtual void initParam(EOT & _solution) {
|
||||
step = 0;
|
||||
isAccept = true;
|
||||
};
|
||||
|
||||
/**
|
||||
* increase the number of step
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
virtual void updateParam(EOT & solution) {
|
||||
virtual void updateParam(EOT & _solution) {
|
||||
step++;
|
||||
};
|
||||
|
||||
/**
|
||||
* terminate: NOTHING TO DO
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
virtual void terminate(EOT & solution) {};
|
||||
virtual void terminate(EOT & _solution) {};
|
||||
|
||||
/**
|
||||
* Explore the neighborhood with only one random solution
|
||||
* we supposed that the first neighbor is uniformly selected in the neighborhood
|
||||
* @param _solution
|
||||
* @param _solution a solution
|
||||
*/
|
||||
virtual void operator()(EOT & _solution) {
|
||||
|
||||
|
|
|
|||
|
|
@ -64,9 +64,8 @@ public:
|
|||
* Constructor
|
||||
* @param _neighborhood the neighborhood
|
||||
* @param _eval the evaluation function
|
||||
* @param _neighborComparator a neighbor comparator
|
||||
* @param _solNeighborComparator a solution vs neighbor comparator
|
||||
* @param _nbStep maximum number of step to do
|
||||
* @param _coolingSchedule the cooling schedule
|
||||
*/
|
||||
moSAexplorer(Neighborhood& _neighborhood, moEval<Neighbor>& _eval, moSolNeighborComparator<Neighbor>& _solNeighborComparator, moCoolingSchedule<EOT>& _coolingSchedule) : moNeighborhoodExplorer<Neighbor>(_neighborhood, _eval), solNeighborComparator(_solNeighborComparator), coolingSchedule(_coolingSchedule) {
|
||||
isAccept = false;
|
||||
|
|
@ -168,6 +167,10 @@ public:
|
|||
return isAccept;
|
||||
};
|
||||
|
||||
/**
|
||||
* Getter
|
||||
* @return the temperature
|
||||
*/
|
||||
double getTemperature(){
|
||||
return temperature;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,33 @@
|
|||
/*
|
||||
<moAspiration.h>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
||||
|
||||
Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau
|
||||
|
||||
This software is governed by the CeCILL license under French law and
|
||||
abiding by the rules of distribution of free software. You can ue,
|
||||
modify and/ or redistribute the software under the terms of the CeCILL
|
||||
license as circulated by CEA, CNRS and INRIA at the following URL
|
||||
"http://www.cecill.info".
|
||||
|
||||
In this respect, the user's attention is drawn to the risks associated
|
||||
with loading, using, modifying and/or developing or reproducing the
|
||||
software by the user in light of its specific status of free software,
|
||||
that may mean that it is complicated to manipulate, and that also
|
||||
therefore means that it is reserved for developers and experienced
|
||||
professionals having in-depth computer knowledge. Users are therefore
|
||||
encouraged to load and test the software's suitability as regards their
|
||||
requirements in conditions enabling the security of their systems and/or
|
||||
data to be ensured and, more generally, to use and operate it in the
|
||||
same conditions as regards security.
|
||||
The fact that you are presently reading this means that you have had
|
||||
knowledge of the CeCILL license and that you accept its terms.
|
||||
|
||||
ParadisEO WebSite : http://paradiseo.gforge.inria.fr
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _moAspiration_h
|
||||
#define _moAspiration_h
|
||||
|
||||
|
|
@ -12,7 +42,17 @@ class moAspiration : public eoBF<typename Neighbor::EOT &, Neighbor &, bool>
|
|||
public:
|
||||
typedef typename Neighbor::EOT EOT;
|
||||
|
||||
/**
|
||||
* Virtual Init
|
||||
* @param _sol the current solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) = 0;
|
||||
|
||||
/**
|
||||
* Virtual update
|
||||
* @param _sol the current solution
|
||||
* @param _neighbor the current neighbor
|
||||
*/
|
||||
virtual void update(EOT & _sol, Neighbor & _neighbor) = 0;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,33 @@
|
|||
/*
|
||||
<moBestImprAspiration.h>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
||||
|
||||
Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau
|
||||
|
||||
This software is governed by the CeCILL license under French law and
|
||||
abiding by the rules of distribution of free software. You can ue,
|
||||
modify and/ or redistribute the software under the terms of the CeCILL
|
||||
license as circulated by CEA, CNRS and INRIA at the following URL
|
||||
"http://www.cecill.info".
|
||||
|
||||
In this respect, the user's attention is drawn to the risks associated
|
||||
with loading, using, modifying and/or developing or reproducing the
|
||||
software by the user in light of its specific status of free software,
|
||||
that may mean that it is complicated to manipulate, and that also
|
||||
therefore means that it is reserved for developers and experienced
|
||||
professionals having in-depth computer knowledge. Users are therefore
|
||||
encouraged to load and test the software's suitability as regards their
|
||||
requirements in conditions enabling the security of their systems and/or
|
||||
data to be ensured and, more generally, to use and operate it in the
|
||||
same conditions as regards security.
|
||||
The fact that you are presently reading this means that you have had
|
||||
knowledge of the CeCILL license and that you accept its terms.
|
||||
|
||||
ParadisEO WebSite : http://paradiseo.gforge.inria.fr
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _moBestImprAspiration_h
|
||||
#define _moBestImprAspiration_h
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* @param _sol unused solution
|
||||
* @param _sol a solution (unused)
|
||||
* @param _neighbor unused neighbor
|
||||
*/
|
||||
void add(EOT & _sol, Neighbor & _neighbor) {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,32 @@
|
|||
/*
|
||||
<moDiversification.h>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
||||
|
||||
Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau
|
||||
|
||||
This software is governed by the CeCILL license under French law and
|
||||
abiding by the rules of distribution of free software. You can ue,
|
||||
modify and/ or redistribute the software under the terms of the CeCILL
|
||||
license as circulated by CEA, CNRS and INRIA at the following URL
|
||||
"http://www.cecill.info".
|
||||
|
||||
In this respect, the user's attention is drawn to the risks associated
|
||||
with loading, using, modifying and/or developing or reproducing the
|
||||
software by the user in light of its specific status of free software,
|
||||
that may mean that it is complicated to manipulate, and that also
|
||||
therefore means that it is reserved for developers and experienced
|
||||
professionals having in-depth computer knowledge. Users are therefore
|
||||
encouraged to load and test the software's suitability as regards their
|
||||
requirements in conditions enabling the security of their systems and/or
|
||||
data to be ensured and, more generally, to use and operate it in the
|
||||
same conditions as regards security.
|
||||
The fact that you are presently reading this means that you have had
|
||||
knowledge of the CeCILL license and that you accept its terms.
|
||||
|
||||
ParadisEO WebSite : http://paradiseo.gforge.inria.fr
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
#ifndef _moDiversification_h
|
||||
#define _moDiversification_h
|
||||
|
||||
|
|
@ -8,7 +37,6 @@
|
|||
* Abstract class for diversification strategy
|
||||
*/
|
||||
template< class Neighbor >
|
||||
class moDiversification : virtual public moMemory<Neighbor>, public eoUF<typename Neighbor::EOT &,bool>
|
||||
{};
|
||||
class moDiversification : virtual public moMemory<Neighbor>, public eoUF<typename Neighbor::EOT &,bool>{};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,3 +1,32 @@
|
|||
/*
|
||||
<moDummyDiversification.h>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
||||
|
||||
Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau
|
||||
|
||||
This software is governed by the CeCILL license under French law and
|
||||
abiding by the rules of distribution of free software. You can ue,
|
||||
modify and/ or redistribute the software under the terms of the CeCILL
|
||||
license as circulated by CEA, CNRS and INRIA at the following URL
|
||||
"http://www.cecill.info".
|
||||
|
||||
In this respect, the user's attention is drawn to the risks associated
|
||||
with loading, using, modifying and/or developing or reproducing the
|
||||
software by the user in light of its specific status of free software,
|
||||
that may mean that it is complicated to manipulate, and that also
|
||||
therefore means that it is reserved for developers and experienced
|
||||
professionals having in-depth computer knowledge. Users are therefore
|
||||
encouraged to load and test the software's suitability as regards their
|
||||
requirements in conditions enabling the security of their systems and/or
|
||||
data to be ensured and, more generally, to use and operate it in the
|
||||
same conditions as regards security.
|
||||
The fact that you are presently reading this means that you have had
|
||||
knowledge of the CeCILL license and that you accept its terms.
|
||||
|
||||
ParadisEO WebSite : http://paradiseo.gforge.inria.fr
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
#ifndef _moDummyDiversification_h
|
||||
#define _moDummyDiversification_h
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,32 @@
|
|||
/*
|
||||
<moDummyIntensification.h>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
||||
|
||||
Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau
|
||||
|
||||
This software is governed by the CeCILL license under French law and
|
||||
abiding by the rules of distribution of free software. You can ue,
|
||||
modify and/ or redistribute the software under the terms of the CeCILL
|
||||
license as circulated by CEA, CNRS and INRIA at the following URL
|
||||
"http://www.cecill.info".
|
||||
|
||||
In this respect, the user's attention is drawn to the risks associated
|
||||
with loading, using, modifying and/or developing or reproducing the
|
||||
software by the user in light of its specific status of free software,
|
||||
that may mean that it is complicated to manipulate, and that also
|
||||
therefore means that it is reserved for developers and experienced
|
||||
professionals having in-depth computer knowledge. Users are therefore
|
||||
encouraged to load and test the software's suitability as regards their
|
||||
requirements in conditions enabling the security of their systems and/or
|
||||
data to be ensured and, more generally, to use and operate it in the
|
||||
same conditions as regards security.
|
||||
The fact that you are presently reading this means that you have had
|
||||
knowledge of the CeCILL license and that you accept its terms.
|
||||
|
||||
ParadisEO WebSite : http://paradiseo.gforge.inria.fr
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
#ifndef _moDummyIntensification_h
|
||||
#define _moDummyIntensification_h
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,32 @@
|
|||
/*
|
||||
<moIntensification.h>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
||||
|
||||
Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau
|
||||
|
||||
This software is governed by the CeCILL license under French law and
|
||||
abiding by the rules of distribution of free software. You can ue,
|
||||
modify and/ or redistribute the software under the terms of the CeCILL
|
||||
license as circulated by CEA, CNRS and INRIA at the following URL
|
||||
"http://www.cecill.info".
|
||||
|
||||
In this respect, the user's attention is drawn to the risks associated
|
||||
with loading, using, modifying and/or developing or reproducing the
|
||||
software by the user in light of its specific status of free software,
|
||||
that may mean that it is complicated to manipulate, and that also
|
||||
therefore means that it is reserved for developers and experienced
|
||||
professionals having in-depth computer knowledge. Users are therefore
|
||||
encouraged to load and test the software's suitability as regards their
|
||||
requirements in conditions enabling the security of their systems and/or
|
||||
data to be ensured and, more generally, to use and operate it in the
|
||||
same conditions as regards security.
|
||||
The fact that you are presently reading this means that you have had
|
||||
knowledge of the CeCILL license and that you accept its terms.
|
||||
|
||||
ParadisEO WebSite : http://paradiseo.gforge.inria.fr
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
#ifndef _moIntensification_h
|
||||
#define _moIntensification_h
|
||||
|
||||
|
|
@ -8,7 +37,6 @@
|
|||
* Abstract class for intensification strategy
|
||||
*/
|
||||
template< class Neighbor >
|
||||
class moIntensification : virtual public moMemory<Neighbor>, public eoUF<typename Neighbor::EOT &,bool>
|
||||
{};
|
||||
class moIntensification : virtual public moMemory<Neighbor>, public eoUF<typename Neighbor::EOT &,bool>{};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,3 +1,32 @@
|
|||
/*
|
||||
<moSolVectorTabuList.h>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
||||
|
||||
Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau
|
||||
|
||||
This software is governed by the CeCILL license under French law and
|
||||
abiding by the rules of distribution of free software. You can ue,
|
||||
modify and/ or redistribute the software under the terms of the CeCILL
|
||||
license as circulated by CEA, CNRS and INRIA at the following URL
|
||||
"http://www.cecill.info".
|
||||
|
||||
In this respect, the user's attention is drawn to the risks associated
|
||||
with loading, using, modifying and/or developing or reproducing the
|
||||
software by the user in light of its specific status of free software,
|
||||
that may mean that it is complicated to manipulate, and that also
|
||||
therefore means that it is reserved for developers and experienced
|
||||
professionals having in-depth computer knowledge. Users are therefore
|
||||
encouraged to load and test the software's suitability as regards their
|
||||
requirements in conditions enabling the security of their systems and/or
|
||||
data to be ensured and, more generally, to use and operate it in the
|
||||
same conditions as regards security.
|
||||
The fact that you are presently reading this means that you have had
|
||||
knowledge of the CeCILL license and that you accept its terms.
|
||||
|
||||
ParadisEO WebSite : http://paradiseo.gforge.inria.fr
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
#ifndef _moSolVectorTabuList_h
|
||||
#define _moSolVectorTabuList_h
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,32 @@
|
|||
/*
|
||||
<moTabuList.h>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
||||
|
||||
Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau
|
||||
|
||||
This software is governed by the CeCILL license under French law and
|
||||
abiding by the rules of distribution of free software. You can ue,
|
||||
modify and/ or redistribute the software under the terms of the CeCILL
|
||||
license as circulated by CEA, CNRS and INRIA at the following URL
|
||||
"http://www.cecill.info".
|
||||
|
||||
In this respect, the user's attention is drawn to the risks associated
|
||||
with loading, using, modifying and/or developing or reproducing the
|
||||
software by the user in light of its specific status of free software,
|
||||
that may mean that it is complicated to manipulate, and that also
|
||||
therefore means that it is reserved for developers and experienced
|
||||
professionals having in-depth computer knowledge. Users are therefore
|
||||
encouraged to load and test the software's suitability as regards their
|
||||
requirements in conditions enabling the security of their systems and/or
|
||||
data to be ensured and, more generally, to use and operate it in the
|
||||
same conditions as regards security.
|
||||
The fact that you are presently reading this means that you have had
|
||||
knowledge of the CeCILL license and that you accept its terms.
|
||||
|
||||
ParadisEO WebSite : http://paradiseo.gforge.inria.fr
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
#ifndef _moTabuList_h
|
||||
#define _moTabuList_h
|
||||
|
||||
|
|
|
|||
|
|
@ -35,90 +35,98 @@
|
|||
#ifndef _newmo_h
|
||||
#define _newmo_h
|
||||
|
||||
#include <algo/moLocalSearch.h>
|
||||
#include <acceptCrit/moAcceptanceCriterion.h>
|
||||
#include <acceptCrit/moAlwaysAcceptCrit.h>
|
||||
#include <acceptCrit/moBetterAcceptCrit.h>
|
||||
|
||||
#include <algo/moDummyLS.h>
|
||||
#include <algo/moRandomSearch.h>
|
||||
#include <algo/moFirstImprHC.h>
|
||||
#include <algo/moILS.h>
|
||||
#include <algo/moLocalSearch.h>
|
||||
#include <algo/moMetropolisHasting.h>
|
||||
#include <algo/moNeutralHC.h>
|
||||
#include <algo/moRandomBestHC.h>
|
||||
#include <algo/moRandomNeutralWalk.h>
|
||||
#include <algo/moRandomSearch.h>
|
||||
#include <algo/moRandomWalk.h>
|
||||
#include <algo/moSA.h>
|
||||
#include <algo/moSimpleHC.h>
|
||||
#include <algo/moFirstImprHC.h>
|
||||
#include <algo/moRandomBestHC.h>
|
||||
#include <algo/moNeutralHC.h>
|
||||
#include <algo/moRandomWalk.h>
|
||||
#include <algo/moRandomNeutralWalk.h>
|
||||
#include <algo/moTS.h>
|
||||
#include <algo/moILS.h>
|
||||
|
||||
#include <comparator/moComparator.h>
|
||||
#include <comparator/moNeighborComparator.h>
|
||||
#include <comparator/moSolNeighborComparator.h>
|
||||
#include <comparator/moSolComparator.h>
|
||||
#include <comparator/moSolNeighborComparator.h>
|
||||
|
||||
#include <continuator/moAverageFitnessNeighborStat.h>
|
||||
#include <continuator/moBestSoFarStat.h>
|
||||
#include <continuator/moCheckpoint.h>
|
||||
#include <continuator/moCombinedContinuator.h>
|
||||
#include <continuator/moContinuator.h>
|
||||
#include <continuator/moCounterMonitorSaver.h>
|
||||
#include <continuator/moCounterStat.h>
|
||||
#include <continuator/moDistanceStat.h>
|
||||
#include <continuator/moFitContinuator.h>
|
||||
#include <continuator/moFitnessStat.h>
|
||||
#include <continuator/moNeighborFitnessStat.h>
|
||||
#include <continuator/moNeighborBestStat.h>
|
||||
#include <continuator/moFullEvalContinuator.h>
|
||||
#include <continuator/moIterContinuator.h>
|
||||
#include <continuator/moMaxNeighborStat.h>
|
||||
#include <continuator/moMinNeighborStat.h>
|
||||
#include <continuator/moMinusOneCounterStat.h>
|
||||
#include <continuator/moNbInfNeighborStat.h>
|
||||
#include <continuator/moNbSupNeighborStat.h>
|
||||
#include <continuator/moNeighborBestStat.h>
|
||||
#include <continuator/moNeighborEvalContinuator.h>
|
||||
#include <continuator/moNeighborFitnessStat.h>
|
||||
#include <continuator/moNeighborhoodStat.h>
|
||||
#include <continuator/moNeutralDegreeNeighborStat.h>
|
||||
#include <continuator/moSecondMomentNeighborStat.h>
|
||||
#include <continuator/moAverageFitnessNeighborStat.h>
|
||||
#include <continuator/moStdFitnessNeighborStat.h>
|
||||
#include <continuator/moSizeNeighborStat.h>
|
||||
#include <continuator/moCounterStat.h>
|
||||
#include <continuator/moMinusOneCounterStat.h>
|
||||
#include <continuator/moSolutionStat.h>
|
||||
#include <continuator/moStat.h>
|
||||
#include <continuator/moStatBase.h>
|
||||
#include <continuator/moTrueContinuator.h>
|
||||
#include <continuator/moIterContinuator.h>
|
||||
#include <continuator/moFitContinuator.h>
|
||||
#include <continuator/moCombinedContinuator.h>
|
||||
#include <continuator/moFullEvalContinuator.h>
|
||||
#include <continuator/moNeighborEvalContinuator.h>
|
||||
#include <continuator/moStatFromStat.h>
|
||||
#include <continuator/moStdFitnessNeighborStat.h>
|
||||
#include <continuator/moTimeContinuator.h>
|
||||
#include <continuator/moTrueContinuator.h>
|
||||
#include <continuator/moVectorMonitor.h>
|
||||
|
||||
#include <coolingSchedule/moCoolingSchedule.h>
|
||||
#include <coolingSchedule/moSimpleCoolingSchedule.h>
|
||||
|
||||
#include <eval/moDummyEval.h>
|
||||
#include <eval/moEval.h>
|
||||
#include <eval/moEvalCounter.h>
|
||||
#include <eval/moFullEvalByCopy.h>
|
||||
#include <eval/moFullEvalByModif.h>
|
||||
#include <eval/moDummyEval.h>
|
||||
#include <eval/moEvalCounter.h>
|
||||
#include <eval/moMaxSATincrEval.h>
|
||||
|
||||
#include <explorer/moDummyExplorer.h>
|
||||
#include <explorer/moFirstImprHCexplorer.h>
|
||||
#include <explorer/moNeutralHCexplorer.h>
|
||||
#include <explorer/moILSexplorer.h>
|
||||
#include <explorer/moMetropolisHastingExplorer.h>
|
||||
#include <explorer/moNeighborhoodExplorer.h>
|
||||
#include <explorer/moDummyExplorer.h>
|
||||
#include <explorer/moRandomSearchExplorer.h>
|
||||
#include <explorer/moRandomNeutralWalkExplorer.h>
|
||||
#include <explorer/moRandomWalkExplorer.h>
|
||||
#include <explorer/moSimpleHCexplorer.h>
|
||||
#include <explorer/moNeutralHCexplorer.h>
|
||||
#include <explorer/moRandomBestHCexplorer.h>
|
||||
#include <explorer/moTSexplorer.h>
|
||||
#include <explorer/moILSexplorer.h>
|
||||
#include <explorer/moRandomNeutralWalkExplorer.h>
|
||||
#include <explorer/moRandomSearchExplorer.h>
|
||||
#include <explorer/moRandomWalkExplorer.h>
|
||||
#include <explorer/moSAexplorer.h>
|
||||
#include <explorer/moSimpleHCexplorer.h>
|
||||
#include <explorer/moTSexplorer.h>
|
||||
|
||||
#include <memory/moAspiration.h>
|
||||
#include <memory/moBestImprAspiration.h>
|
||||
#include <memory/moCountMoveMemory.h>
|
||||
#include <memory/moDiversification.h>
|
||||
#include <memory/moDummyMemory.h>
|
||||
#include <memory/moDummyDiversification.h>
|
||||
#include <memory/moDummyIntensification.h>
|
||||
#include <memory/moDummyMemory.h>
|
||||
#include <memory/moIntensification.h>
|
||||
#include <memory/moMemory.h>
|
||||
#include <memory/moSolVectorTabuList.h>
|
||||
#include <memory/moNeighborVectorTabuList.h>
|
||||
#include <memory/moTabuList.h>
|
||||
#include <memory/moCountMoveMemory.h>
|
||||
#include <memory/moMonOpDiversification.h>
|
||||
#include <memory/moNeighborVectorTabuList.h>
|
||||
#include <memory/moSolVectorTabuList.h>
|
||||
#include <memory/moTabuList.h>
|
||||
|
||||
#include <neighborhood/moBackableNeighbor.h>
|
||||
#include <neighborhood/moDummyNeighbor.h>
|
||||
|
|
@ -132,45 +140,31 @@
|
|||
#include <neighborhood/moRndWithoutReplNeighborhood.h>
|
||||
#include <neighborhood/moRndWithReplNeighborhood.h>
|
||||
|
||||
#include <perturb/moPerturbation.h>
|
||||
#include <perturb/moMonOpPerturb.h>
|
||||
#include <perturb/moRestartPerturb.h>
|
||||
#include <perturb/moNeighborhoodPerturb.h>
|
||||
#include <perturb/moLocalSearchInit.h>
|
||||
#include <perturb/moMonOpPerturb.h>
|
||||
#include <perturb/moNeighborhoodPerturb.h>
|
||||
#include <perturb/moPerturbation.h>
|
||||
#include <perturb/moRestartPerturb.h>
|
||||
#include <perturb/moSolInit.h>
|
||||
|
||||
#include <acceptCrit/moAcceptanceCriterion.h>
|
||||
#include <acceptCrit/moAlwaysAcceptCrit.h>
|
||||
#include <acceptCrit/moBetterAcceptCrit.h>
|
||||
|
||||
#include <coolingSchedule/moCoolingSchedule.h>
|
||||
#include <coolingSchedule/moSimpleCoolingSchedule.h>
|
||||
|
||||
#include <sampling/moSampling.h>
|
||||
#include <sampling/moDensityOfStatesSampling.h>
|
||||
#include <sampling/moAutocorrelationSampling.h>
|
||||
#include <sampling/moHillClimberSampling.h>
|
||||
#include <sampling/moFDCsampling.h>
|
||||
#include <sampling/moNeutralDegreeSampling.h>
|
||||
#include <sampling/moFitnessCloudSampling.h>
|
||||
#include <sampling/moRndRndFitnessCloudSampling.h>
|
||||
#include <sampling/moRndBestFitnessCloudSampling.h>
|
||||
#include <sampling/moMHRndFitnessCloudSampling.h>
|
||||
#include <sampling/moMHBestFitnessCloudSampling.h>
|
||||
#include <sampling/moNeutralWalkSampling.h>
|
||||
#include <sampling/moStatistics.h>
|
||||
|
||||
#include <problems/bitString/moBitNeighbor.h>
|
||||
#include <problems/eval/moOneMaxIncrEval.h>
|
||||
#include <problems/permutation/moShiftNeighbor.h>
|
||||
#include <problems/permutation/moSwapNeighbor.h>
|
||||
#include <problems/permutation/moSwapNeighborhood.h>
|
||||
|
||||
//#include <old/moMove.h>
|
||||
//#include <old/moMoveIncrEval.h>
|
||||
//#include <old/moMoveInit.h>
|
||||
//#include <old/moNextMove.h>
|
||||
//#include <old/moMoveNeighbor.h>
|
||||
//#include <old/moMoveNeighborhood.h>
|
||||
#include <sampling/moAutocorrelationSampling.h>
|
||||
#include <sampling/moDensityOfStatesSampling.h>
|
||||
#include <sampling/moFDCsampling.h>
|
||||
#include <sampling/moFitnessCloudSampling.h>
|
||||
#include <sampling/moHillClimberSampling.h>
|
||||
#include <sampling/moMHBestFitnessCloudSampling.h>
|
||||
#include <sampling/moMHRndFitnessCloudSampling.h>
|
||||
#include <sampling/moNeutralDegreeSampling.h>
|
||||
#include <sampling/moNeutralWalkSampling.h>
|
||||
#include <sampling/moRndBestFitnessCloudSampling.h>
|
||||
#include <sampling/moRndRndFitnessCloudSampling.h>
|
||||
#include <sampling/moSampling.h>
|
||||
#include <sampling/moStatistics.h>
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public:
|
|||
|
||||
/**
|
||||
* NOTHING TO DO
|
||||
* @param _solution the related solution
|
||||
* @param _solution a solution (unused)
|
||||
* @return always false
|
||||
*/
|
||||
virtual bool hasNeighbor(EOT & _solution){
|
||||
|
|
@ -52,21 +52,21 @@ public:
|
|||
|
||||
/**
|
||||
* NOTHING TO DO
|
||||
* @param _solution the solution to explore
|
||||
* @param _current the first neighbor
|
||||
* @param _solution a solution (unused)
|
||||
* @param _current a neighbor (unused)
|
||||
*/
|
||||
virtual void init(EOT & _solution, Neighbor & _current){}
|
||||
|
||||
/**
|
||||
* NOTHING TO DO
|
||||
* @param _solution the solution to explore
|
||||
* @param _current the next neighbor
|
||||
* @param _solution a solution (unused)
|
||||
* @param _current a neighbor (unused)
|
||||
*/
|
||||
virtual void next(EOT & _solution, Neighbor & _current){}
|
||||
|
||||
/**
|
||||
* NOTHING TO DO
|
||||
* @param _solution the solution to explore
|
||||
* @param _solution a solution (unused)
|
||||
* @return always false
|
||||
*/
|
||||
virtual bool cont(EOT & _solution){
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ public:
|
|||
|
||||
/**
|
||||
* Copy Constructor
|
||||
* @param _n the neighbor to copy
|
||||
*/
|
||||
moIndexNeighbor(const moIndexNeighbor& _n) : moNeighbor<EOT>(_n) {
|
||||
this->key = _n.key ;
|
||||
|
|
@ -61,6 +62,7 @@ public:
|
|||
|
||||
/**
|
||||
* Assignment operator
|
||||
* @param _source the source neighbor
|
||||
*/
|
||||
virtual moIndexNeighbor<EOT> & operator=(const moIndexNeighbor<EOT> & _source) {
|
||||
moNeighbor<EOT>::operator=(_source);
|
||||
|
|
|
|||
|
|
@ -55,15 +55,8 @@ public:
|
|||
*/
|
||||
moIndexNeighborhood(unsigned int _neighborhoodSize):neighborhoodSize(_neighborhoodSize) {}
|
||||
|
||||
/**
|
||||
* Return the class id.
|
||||
* @return the class name as a std::string
|
||||
*/
|
||||
// virtual std::string className() const {
|
||||
// return "moIndexNeighborhood";
|
||||
// }
|
||||
|
||||
protected:
|
||||
// size of the neighborhood
|
||||
unsigned int neighborhoodSize;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public:
|
|||
moNeighborhood() {}
|
||||
|
||||
/**
|
||||
* @return if the neighborhood is random
|
||||
* @return if the neighborhood is random (default false)
|
||||
*/
|
||||
virtual bool isRandom() {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -32,11 +32,17 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
|
||||
#include <neighborhood/moNeighborhood.h>
|
||||
|
||||
/**
|
||||
* Class used to specify a neighborhood is random
|
||||
*/
|
||||
template< class Neighbor >
|
||||
class moRndNeighborhood : virtual public moNeighborhood<Neighbor> {
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* @return true
|
||||
*/
|
||||
bool isRandom() {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
#ifndef moIncrEvalWrapper_H
|
||||
#define moIncrEvalWrapper_H
|
||||
|
||||
#include <eoEvalFunc.h>
|
||||
#include <moEval.h>
|
||||
|
||||
/*
|
||||
* (Old fashioned) Incremental evaluation to use with a moMoveNeighbor
|
||||
* WARNING: Don't use this class unless you are an moMove user.
|
||||
*/
|
||||
template<class MoveNeighbor, class M>
|
||||
class moIncrEvalWrapper : public moEval<MoveNeighbor>
|
||||
{
|
||||
public:
|
||||
using moEval<BackableNeighbor>::EOT EOT;
|
||||
using moEval<BackableNeighbor>::Fitness Fitness;
|
||||
|
||||
moIncrEvalWrapper(moIncrEval<M>& _incr):incr(_incr) {}
|
||||
|
||||
/*
|
||||
* make the evaluation of the current neighbor and update the information on this neighbor
|
||||
* the evaluation could be incremental
|
||||
*/
|
||||
virtual void eval(MoveNeighbor& _neighbor,EOT & _solution) {
|
||||
_neighbor.fitness(incrEval(*(_neighbor.getMove()), _solution));
|
||||
}
|
||||
|
||||
private:
|
||||
/** the full evaluation object */
|
||||
moIncrEval<M> & incrEval;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
<moMove.h>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
|
||||
(C) OPAC Team, LIFL, 2002-2008
|
||||
|
||||
Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr)
|
||||
|
||||
This software is governed by the CeCILL license under French law and
|
||||
abiding by the rules of distribution of free software. You can use,
|
||||
modify and/ or redistribute the software under the terms of the CeCILL
|
||||
license as circulated by CEA, CNRS and INRIA at the following URL
|
||||
"http://www.cecill.info".
|
||||
|
||||
As a counterpart to the access to the source code and rights to copy,
|
||||
modify and redistribute granted by the license, users are provided only
|
||||
with a limited warranty and the software's author, the holder of the
|
||||
economic rights, and the successive licensors have only limited liability.
|
||||
|
||||
In this respect, the user's attention is drawn to the risks associated
|
||||
with loading, using, modifying and/or developing or reproducing the
|
||||
software by the user in light of its specific status of free software,
|
||||
that may mean that it is complicated to manipulate, and that also
|
||||
therefore means that it is reserved for developers and experienced
|
||||
professionals having in-depth computer knowledge. Users are therefore
|
||||
encouraged to load and test the software's suitability as regards their
|
||||
requirements in conditions enabling the security of their systems and/or
|
||||
data to be ensured and, more generally, to use and operate it in the
|
||||
same conditions as regards security.
|
||||
The fact that you are presently reading this means that you have had
|
||||
knowledge of the CeCILL license and that you accept its terms.
|
||||
|
||||
ParadisEO WebSite : http://paradiseo.gforge.inria.fr
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _moMove_h
|
||||
#define _moMove_h
|
||||
|
||||
#include <eoFunctor.h>
|
||||
|
||||
// Definition of a move.
|
||||
|
||||
/*
|
||||
* A move transforms a solution to another close solution.
|
||||
* It describes how a solution can be modified to another one.
|
||||
*/
|
||||
template < class EOT >
|
||||
class moMove:public eoUF < EOT &, void >
|
||||
{
|
||||
public:
|
||||
|
||||
// Alias for the type
|
||||
typedef EOT EOType;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
<moMoveIncrEval.h>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
|
||||
(C) OPAC Team, LIFL, 2002-2008
|
||||
|
||||
Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr)
|
||||
|
||||
This software is governed by the CeCILL license under French law and
|
||||
abiding by the rules of distribution of free software. You can use,
|
||||
modify and/ or redistribute the software under the terms of the CeCILL
|
||||
license as circulated by CEA, CNRS and INRIA at the following URL
|
||||
"http://www.cecill.info".
|
||||
|
||||
As a counterpart to the access to the source code and rights to copy,
|
||||
modify and redistribute granted by the license, users are provided only
|
||||
with a limited warranty and the software's author, the holder of the
|
||||
economic rights, and the successive licensors have only limited liability.
|
||||
|
||||
In this respect, the user's attention is drawn to the risks associated
|
||||
with loading, using, modifying and/or developing or reproducing the
|
||||
software by the user in light of its specific status of free software,
|
||||
that may mean that it is complicated to manipulate, and that also
|
||||
therefore means that it is reserved for developers and experienced
|
||||
professionals having in-depth computer knowledge. Users are therefore
|
||||
encouraged to load and test the software's suitability as regards their
|
||||
requirements in conditions enabling the security of their systems and/or
|
||||
data to be ensured and, more generally, to use and operate it in the
|
||||
same conditions as regards security.
|
||||
The fact that you are presently reading this means that you have had
|
||||
knowledge of the CeCILL license and that you accept its terms.
|
||||
|
||||
ParadisEO WebSite : http://paradiseo.gforge.inria.fr
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
#ifndef _moMoveIncrEval_h
|
||||
#define _moMoveIncrEval_h
|
||||
|
||||
#include <eoFunctor.h>
|
||||
|
||||
// (generally) Efficient evaluation function based a move and a solution.
|
||||
|
||||
/*
|
||||
* From a move and a solution, it computes
|
||||
* a new fitness that could be associated to
|
||||
* the solution if this one is updated.
|
||||
*/
|
||||
template < class M, class Objective = typename M::EOType::Fitness>
|
||||
class moMoveIncrEval:public eoBF < const M &, const typename M::EOType &, Objective >
|
||||
{};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
/*
|
||||
<moMoveInit.h>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
|
||||
(C) OPAC Team, LIFL, 2002-2008
|
||||
|
||||
Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr)
|
||||
|
||||
This software is governed by the CeCILL license under French law and
|
||||
abiding by the rules of distribution of free software. You can use,
|
||||
modify and/ or redistribute the software under the terms of the CeCILL
|
||||
license as circulated by CEA, CNRS and INRIA at the following URL
|
||||
"http://www.cecill.info".
|
||||
|
||||
As a counterpart to the access to the source code and rights to copy,
|
||||
modify and redistribute granted by the license, users are provided only
|
||||
with a limited warranty and the software's author, the holder of the
|
||||
economic rights, and the successive licensors have only limited liability.
|
||||
|
||||
In this respect, the user's attention is drawn to the risks associated
|
||||
with loading, using, modifying and/or developing or reproducing the
|
||||
software by the user in light of its specific status of free software,
|
||||
that may mean that it is complicated to manipulate, and that also
|
||||
therefore means that it is reserved for developers and experienced
|
||||
professionals having in-depth computer knowledge. Users are therefore
|
||||
encouraged to load and test the software's suitability as regards their
|
||||
requirements in conditions enabling the security of their systems and/or
|
||||
data to be ensured and, more generally, to use and operate it in the
|
||||
same conditions as regards security.
|
||||
The fact that you are presently reading this means that you have had
|
||||
knowledge of the CeCILL license and that you accept its terms.
|
||||
|
||||
ParadisEO WebSite : http://paradiseo.gforge.inria.fr
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
#ifndef _moMoveInit_h
|
||||
#define _moMoveInit_h
|
||||
|
||||
#include <eoFunctor.h>
|
||||
|
||||
// Move (moMove) initializer
|
||||
/*
|
||||
* Class which allows to initiase a move.
|
||||
* Only a description... An object that herits from this class needs to be designed to be used.
|
||||
*/
|
||||
template < class M >
|
||||
class moMoveInit:public eoBF < M &, const typename M::EOType &, void >
|
||||
{};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
#ifndef _moMoveNeighbor_h
|
||||
#define _moMoveNeighbor_h
|
||||
|
||||
#include <eo>
|
||||
|
||||
#include <neighborhood/moNeighbor.h>
|
||||
#include <move/moMoveIncrEval.h>
|
||||
#include <move/moMove.h>
|
||||
|
||||
|
||||
/*
|
||||
contener of the neighbor informations
|
||||
*/
|
||||
template< class M , class Fitness >
|
||||
class moMoveNeighbor : public moNeighbor <typename M::EOType, Fitness>
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename M::EOType EOT;
|
||||
|
||||
// empty constructor
|
||||
moMoveNeighbor() {
|
||||
move=new M();
|
||||
};
|
||||
|
||||
~moMoveNeighbor() {
|
||||
delete move;
|
||||
};
|
||||
|
||||
// copy constructeur
|
||||
moMoveNeighbor(const moMoveNeighbor<M, Fitness> & _n) {
|
||||
moNeighbor<EOT, Fitness>::operator=(_n);
|
||||
(*move) = *(_n.getMove());
|
||||
}
|
||||
|
||||
// assignment operator
|
||||
virtual moMoveNeighbor<M, Fitness> & operator=(const moMoveNeighbor<M, Fitness> & _n) {
|
||||
moNeighbor <EOT, Fitness>::operator=(_n);
|
||||
(*move) = *(_n.getMove());
|
||||
return *this ;
|
||||
}
|
||||
|
||||
/*
|
||||
* move the solution
|
||||
*/
|
||||
virtual void move(EOT & _solution) {
|
||||
(*move)(_solution);
|
||||
}
|
||||
|
||||
/** Return the class id.
|
||||
* @return the class name as a std::string
|
||||
*/
|
||||
virtual std::string className() const {
|
||||
return "moMoveNeighbor";
|
||||
}
|
||||
|
||||
void setMove(M* _move) {
|
||||
move=_move;
|
||||
}
|
||||
|
||||
M* getMove() {
|
||||
return move;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
M* move;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
#ifndef _moMoveNeighborhood_h
|
||||
#define _moMoveNeighborhood_h
|
||||
|
||||
#include <neighborhood/moMoveNeighbor.h>
|
||||
#include <neighborhood/moNeighborhood.h>
|
||||
|
||||
#include <move/moMoveInit.h>
|
||||
#include <move/moNextMove.h>
|
||||
|
||||
template< class M, class Fitness >
|
||||
class moMoveNeighborhood : public moNeighborhood <moMoveNeighbor<M, Fitness> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef moMoveNeighbor<M, Fitness> Neighbor;
|
||||
typedef typename M::EOType EOT;
|
||||
|
||||
moMoveNeighborhood(moMoveInit<M>& i, moNextMove<M>& n):_init(i), _next(n), isContinue(true) {}
|
||||
|
||||
virtual bool hasNeighbor(EOT & solution) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
initialisation of the neighborhood
|
||||
*/
|
||||
virtual void init(EOT & solution, Neighbor & current) {
|
||||
_init(*(current._move), solution);
|
||||
isContinue=true;
|
||||
}
|
||||
|
||||
/*
|
||||
Give the next neighbor
|
||||
*/
|
||||
virtual void next(EOT & solution, Neighbor & current) {
|
||||
isContinue=_next(*(current._move), solution);
|
||||
}
|
||||
|
||||
/*
|
||||
if false, there is no neighbor left to explore
|
||||
*/
|
||||
virtual bool cont(EOT & solution) {
|
||||
return isContinue;
|
||||
}
|
||||
|
||||
/** Return the class id.
|
||||
* @return the class name as a std::string
|
||||
*/
|
||||
virtual std::string className() const {
|
||||
return "moMoveNeighborhood";
|
||||
}
|
||||
|
||||
private:
|
||||
moMoveInit<M>& _init;
|
||||
moNextMove<M>& _next;
|
||||
bool isContinue;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
/*
|
||||
<moNextMove.h>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
|
||||
(C) OPAC Team, LIFL, 2002-2008
|
||||
|
||||
Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr)
|
||||
|
||||
This software is governed by the CeCILL license under French law and
|
||||
abiding by the rules of distribution of free software. You can use,
|
||||
modify and/ or redistribute the software under the terms of the CeCILL
|
||||
license as circulated by CEA, CNRS and INRIA at the following URL
|
||||
"http://www.cecill.info".
|
||||
|
||||
As a counterpart to the access to the source code and rights to copy,
|
||||
modify and redistribute granted by the license, users are provided only
|
||||
with a limited warranty and the software's author, the holder of the
|
||||
economic rights, and the successive licensors have only limited liability.
|
||||
|
||||
In this respect, the user's attention is drawn to the risks associated
|
||||
with loading, using, modifying and/or developing or reproducing the
|
||||
software by the user in light of its specific status of free software,
|
||||
that may mean that it is complicated to manipulate, and that also
|
||||
therefore means that it is reserved for developers and experienced
|
||||
professionals having in-depth computer knowledge. Users are therefore
|
||||
encouraged to load and test the software's suitability as regards their
|
||||
requirements in conditions enabling the security of their systems and/or
|
||||
data to be ensured and, more generally, to use and operate it in the
|
||||
same conditions as regards security.
|
||||
The fact that you are presently reading this means that you have had
|
||||
knowledge of the CeCILL license and that you accept its terms.
|
||||
|
||||
ParadisEO WebSite : http://paradiseo.gforge.inria.fr
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
#ifndef _moNextMove_h
|
||||
#define _moNextMove_h
|
||||
|
||||
#include <eoFunctor.h>
|
||||
|
||||
// Class which allows to generate a new move (moMove).
|
||||
/*
|
||||
* Useful for the explorer (for moTS or moHC).
|
||||
* Does nothing... An object that herits from this class needs to be designed for being used.
|
||||
*/
|
||||
template < class M >
|
||||
class moNextMove:public eoBF < M &, const typename M::EOType &, bool >
|
||||
{};
|
||||
|
||||
#endif
|
||||
|
|
@ -37,7 +37,6 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
* Abstract class for Perturbation operator
|
||||
*/
|
||||
template< class Neighbor >
|
||||
class moPerturbation : public eoMonOp<typename Neighbor::EOT>, virtual public moMemory<Neighbor> {
|
||||
};
|
||||
class moPerturbation : public eoMonOp<typename Neighbor::EOT>, virtual public moMemory<Neighbor> {};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public:
|
|||
|
||||
/**
|
||||
* Default Constructor
|
||||
* @param _init an initializer of solution
|
||||
* @param _initializer an initializer of solution
|
||||
* @param _fullEval a full evaluation function
|
||||
* @param _threshold maximum number of iteration with no improvement
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -38,12 +38,12 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
template< class EOT >
|
||||
class moSolInit : public eoInit<EOT> {
|
||||
public:
|
||||
|
||||
/**
|
||||
* Default Constructor
|
||||
* @param _extSol external solution of the intiialization
|
||||
*/
|
||||
moSolInit(EOT & _extSol) : extSol(_extSol) {
|
||||
}
|
||||
moSolInit(EOT & _extSol) : extSol(_extSol) {}
|
||||
|
||||
/**
|
||||
* Initialization on the externatl solution
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@ public:
|
|||
* @param _neighbor the neighbor to consider (of type moBitNeigbor)
|
||||
*/
|
||||
virtual void operator()(EOT & _solution, Neighbor & _neighbor) {
|
||||
if (_solution[_neighbor.index()] == 0)
|
||||
_neighbor.fitness(_solution.fitness() + 1);
|
||||
else
|
||||
_neighbor.fitness(_solution.fitness() - 1);
|
||||
if (_solution[_neighbor.index()] == 0)
|
||||
_neighbor.fitness(_solution.fitness() + 1);
|
||||
else
|
||||
_neighbor.fitness(_solution.fitness() - 1);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public:
|
|||
/**
|
||||
* Default Constructor
|
||||
* @param _init initialisation method of the solution
|
||||
* @param _neighborhood neighborhood giving neighbor in random order
|
||||
* @param _fullEval a full evaluation function
|
||||
* @param _dist the distance function between solution
|
||||
* @param _refSol the reference solution to compute the distance (think of global optimum when possible)
|
||||
* @param _nbSol Number of solutions of the sample
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@ public:
|
|||
* Default Constructor
|
||||
* @param _init initialisation method of the solution
|
||||
* @param _neighborhood neighborhood giving neighbor in random order
|
||||
* @param _fullEval a full evaluation function
|
||||
* @param _eval an incremental evaluation of neighbors
|
||||
* @param _nbAdaptWalk Number of adaptive walks
|
||||
*/
|
||||
moHillClimberSampling(eoInit<EOT> & _init,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue