Migration from SVN

This commit is contained in:
quemy 2012-08-30 11:30:11 +02:00
commit 8cd56f37db
29069 changed files with 0 additions and 4096888 deletions

View file

@ -0,0 +1,66 @@
/*
<moLocalSearchInit.h>
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
Sebastien Verel, Arnaud Liefooghe, Jeremie 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 _moLocalSearchInit_h
#define _moLocalSearchInit_h
#include <eoInit.h>
#include <algo/moLocalSearch.h>
/**
* Initialization of the solution with a local search
*/
template< class Neighbor >
class moLocalSearchInit : public eoInit<typename Neighbor::EOT> {
public:
typedef typename Neighbor::EOT EOT;
/**
* Constructor
* @param _init initialization of the solution before the local search
* @param _ls the local search to apply to the solution
*/
moLocalSearchInit(eoInit<EOT>& _init, moLocalSearch<Neighbor>& _ls) : init(_init), ls(_ls) {
}
/**
* Apply the local search on the solution
* @param _solution to perturb
*/
void operator()(EOT& _solution) {
init(_solution);
ls(_solution);
}
private:
eoInit<EOT>& init;
moLocalSearch<Neighbor> & ls;
};
#endif

View file

@ -0,0 +1,72 @@
/*
<moMonOpPerturb.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 _moMonOpPerturb_h
#define _moMonOpPerturb_h
#include <eoEvalFunc.h>
#include <eoOp.h>
#include <perturb/moPerturbation.h>
#include <memory/moDummyMemory.h>
/**
* Perturbation operator using only a eoMonOp
*/
template< class Neighbor >
class moMonOpPerturb : public moPerturbation<Neighbor>, public moDummyMemory<Neighbor> {
public:
typedef typename Neighbor::EOT EOT;
/**
* Constructor
* @param _monOp an eoMonOp (pertubation operator)
* @param _fullEval a full evaluation function
*/
moMonOpPerturb(eoMonOp<EOT>& _monOp, eoEvalFunc<EOT>& _fullEval):monOp(_monOp), fullEval(_fullEval) {}
/**
* Apply monOp on the solution
* @param _solution to perturb
* @return value of monOp
*/
bool operator()(EOT& _solution) {
bool res = monOp(_solution);
_solution.invalidate();
fullEval(_solution);
return res;
}
private:
/** monOp */
eoMonOp<EOT>& monOp;
eoEvalFunc<EOT>& fullEval;
};
#endif

View file

@ -0,0 +1,109 @@
/*
<moNeighborhoodPerturb.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 _moNeighborhoodPerturb_h
#define _moNeighborhoodPerturb_h
#include <eval/moEval.h>
#include <perturb/moPerturbation.h>
#include <neighborhood/moNeighborhood.h>
/**
* Neighborhood Perturbation: explore the neighborhood to perturb the solution (the neighborhood could be different as the one used in the Local Search)
*/
template< class Neighbor, class OtherNeighbor >
class moNeighborhoodPerturb : public moPerturbation<Neighbor> {
public:
typedef typename Neighbor::EOT EOT;
typedef moNeighborhood<OtherNeighbor> OtherNH;
/**
* Constructor
* @param _otherNeighborhood a neighborhood
* @param _eval an Evaluation Function
*/
moNeighborhoodPerturb(OtherNH& _otherNeighborhood, moEval<OtherNeighbor>& _eval): otherNeighborhood(_otherNeighborhood), eval(_eval) {}
/**
* Apply move on the solution
* @param _solution the current solution
* @return true
*/
virtual bool operator()(EOT& _solution) {
if (otherNeighborhood.hasNeighbor(_solution)) {
eval(_solution, current);
current.move(_solution);
_solution.fitness(current.fitness());
}
return true;
}
/**
* Init the neighborhood
* @param _sol the current solution
*/
virtual void init(EOT & _sol) {
if (otherNeighborhood.hasNeighbor(_sol))
otherNeighborhood.init(_sol, current);
}
/**
* ReInit the neighborhood because a move was done
* @param _sol the current solution
* @param _neighbor unused neighbor (always empty)
*/
virtual void add(EOT & _sol, Neighbor & _neighbor) {
(*this).init(_sol);
}
/**
* Explore another neighbor because no move was done
* @param _sol the current solution
* @param _neighbor unused neighbor (always empty)
*/
virtual void update(EOT & _sol, Neighbor & _neighbor) {
if (otherNeighborhood.cont(_sol))
otherNeighborhood.next(_sol, current);
else
(*this).init(_sol);
}
/**
* NOTHING TO DO
*/
virtual void clearMemory() {}
private:
OtherNH& otherNeighborhood;
moEval<OtherNeighbor>& eval;
OtherNeighbor current;
};
#endif

View file

@ -0,0 +1,42 @@
/*
<moPertubation.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 _moPertubation_h
#define _moPertubation_h
#include <eoOp.h>
#include <memory/moMemory.h>
/**
* Abstract class for Perturbation operator
*/
template< class Neighbor >
class moPerturbation : public eoMonOp<typename Neighbor::EOT>, virtual public moMemory<Neighbor> {};
#endif

View file

@ -0,0 +1,77 @@
/*
<moRestartPerturb.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 _moRestartPerturb_h
#define _moRestartPerturb_h
#include <eoEvalFunc.h>
#include <eoInit.h>
#include <perturb/moPerturbation.h>
#include <memory/moCountMoveMemory.h>
/**
* Restart Perturbation : restart when maximum number of iteration with no improvement is reached
*/
template< class Neighbor >
class moRestartPerturb : public moPerturbation<Neighbor>, public moCountMoveMemory<Neighbor> {
public:
typedef typename Neighbor::EOT EOT;
/**
* Constructor
* @param _initializer an initializer of solution
* @param _fullEval a full evaluation function
* @param _threshold maximum number of iteration with no improvement
*/
moRestartPerturb(eoInit<EOT>& _initializer, eoEvalFunc<EOT>& _fullEval, unsigned int _threshold):initializer(_initializer), fullEval(_fullEval), threshold(_threshold) {}
/**
* Apply restart when necessary
* @param _solution to restart
* @return true
*/
bool operator()(EOT& _solution) {
if ((*this).getCounter()>= threshold) {
initializer(_solution);
fullEval(_solution);
(*this).initCounter();
}
return true;
}
private:
eoInit<EOT>& initializer;
eoEvalFunc<EOT>& fullEval;
unsigned int threshold;
};
#endif

View file

@ -0,0 +1,60 @@
/*
<moSolInit.h>
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
Sebastien Verel, Arnaud Liefooghe, Jeremie 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 _moSolInit_h
#define _moSolInit_h
#include <eoInit.h>
/**
* Initialization of the solution with the external solution
*/
template< class EOT >
class moSolInit : public eoInit<EOT> {
public:
/**
* Constructor
* @param _extSol external solution of the initialization
*/
moSolInit(EOT & _extSol) : extSol(_extSol) {}
/**
* Initialization on the external solution
* @param _solution to initialize
*/
void operator()(EOT& _solution) {
_solution = extSol;
}
private:
EOT& extSol;
};
#endif