Ajout de moVNS et moSimpleVNS

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1931 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
verel 2010-08-30 09:05:41 +00:00
commit 82a329b006
3 changed files with 52 additions and 31 deletions

View file

@ -2,7 +2,7 @@
<moVNS.h> <moVNS.h>
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010 Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau Sebastien Verel, Arnaud Liefooghe, Jeremie Humeau
This software is governed by the CeCILL license under French law and This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software. You can ue, abiding by the rules of distribution of free software. You can ue,
@ -34,20 +34,41 @@ Contact: paradiseo-help@lists.gforge.inria.fr
#include <eoOp.h> #include <eoOp.h>
#include <comparator/moSolComparator.h> #include <comparator/moSolComparator.h>
#include <continuator/moContinuator.h> #include <continuator/moContinuator.h>
#include <neighborhood/moVariableNeighborhoodSelection.h>
#include <explorer/moNeighborhoodExplorer.h>
#include <neighborhood/moVariableNeighborhoodSelection.h>
#include <acceptCrit/moAcceptanceCriterion.h>
/**
* the "Variable Neighborhood Search" metaheuristic
*/
template<class Neighbor> template<class Neighbor>
class moVNS: public moLocalSearch< Neighbor > class moVNS: public moLocalSearch< Neighbor >
{ {
public: public:
typedef typename Neighbor::EOT EOT; typedef typename Neighbor::EOT EOT;
typedef moNeighborhood<Neighbor> Neighborhood ;
moVNS()
/**
* full constructor for a VNS
* @param _selection selection the "neighborhood" search heuristics during the search
* @param _acceptCrit acceptance criteria which compare and accept or not the two solutions
* @param _fullEval the full evaluation function
* @param _cont an external continuator
*/
moVNS(moVariableNeighborhoodSelection<EOT> & _selection,
moAcceptanceCriterion<Neighbor>& _acceptCrit,
eoEvalFunc<EOT>& _fullEval,
moContinuator<Neighbor>& _cont) :
moLocalSearch<Neighbor>(explorer, _cont, _fullEval),
explorer(_selection, _acceptCrit)
{} {}
private: private:
// the explorer of the VNS
moVNSexplorer<Neighbor> explorer;
}; };

View file

@ -53,6 +53,7 @@
#include <algo/moSimpleHC.h> #include <algo/moSimpleHC.h>
#include <algo/moTS.h> #include <algo/moTS.h>
#include <algo/moVNS.h> #include <algo/moVNS.h>
#include <algo/moSimpleVNS.h>
#include <comparator/moComparator.h> #include <comparator/moComparator.h>
#include <comparator/moNeighborComparator.h> #include <comparator/moNeighborComparator.h>

View file

@ -45,7 +45,6 @@ template< class EOT >
class moRndVectorVNSelection: public moVectorVNSelection<EOT> class moRndVectorVNSelection: public moVectorVNSelection<EOT>
{ {
using moVectorVNSelection<EOT>::LSvector; using moVectorVNSelection<EOT>::LSvector;
// using moVectorVNSelection<EOT>::shakeVector;
using moVectorVNSelection<EOT>::current; using moVectorVNSelection<EOT>::current;
public: public: