git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1708 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
18901c5769
commit
63ae86a458
165 changed files with 0 additions and 38091 deletions
|
|
@ -1,9 +0,0 @@
|
||||||
Source Code:
|
|
||||||
Sebastien CAHON
|
|
||||||
Jean-Charles BOISSON : Jean-Charles.Boisson@lifl.fr
|
|
||||||
|
|
||||||
Lessons:
|
|
||||||
Sebastien CAHON
|
|
||||||
|
|
||||||
Documentation:
|
|
||||||
Jean-Charles BOISSON : Jean-Charles.Boisson@lifl.fr
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
|
||||||
|
|
||||||
##########################################################################################################################################
|
|
||||||
### 0) If you want to set your own variables in mo-conf.cmake and avoid the cmd line
|
|
||||||
##########################################################################################################################################
|
|
||||||
|
|
||||||
INCLUDE(mo-conf.cmake OPTIONAL)
|
|
||||||
|
|
||||||
##########################################################################################################################################
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################################################################################
|
|
||||||
### 1) Project properties
|
|
||||||
##########################################################################################################################################
|
|
||||||
|
|
||||||
# set the project name
|
|
||||||
PROJECT(ParadisEO-MO)
|
|
||||||
|
|
||||||
SET(PACKAGE_BUGREPORT "paradiseo-help@lists.gforge.inria.fr" CACHE STRING "Package bug report" FORCE)
|
|
||||||
SET(PACKAGE_NAME "ParadisEO-MO - Moving Objects" CACHE STRING "Package name" FORCE)
|
|
||||||
SET(PACKAGE_STRING "ParadisEO-MO 1.2" CACHE STRING "MO Package string full name" FORCE)
|
|
||||||
SET(PACKAGE_VERSION "1.2" CACHE STRING "Package version" FORCE)
|
|
||||||
SET(GLOBAL_VERSION "1.2" CACHE STRING "Global version" FORCE)
|
|
||||||
SET(VERSION "1.2" CACHE STRING "Version" FORCE)
|
|
||||||
##########################################################################################################################################
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################################################################################
|
|
||||||
### 2) Include the common CMake configuration
|
|
||||||
##########################################################################################################################################
|
|
||||||
|
|
||||||
# The "config" variable must be provided on the command line
|
|
||||||
IF(NOT DEFINED config OR NOT config)
|
|
||||||
MESSAGE(FATAL_ERROR "The \"config\" variable must be set on the command line to
|
|
||||||
give the path of the install configuration file. ")
|
|
||||||
ENDIF(NOT DEFINED config OR NOT config)
|
|
||||||
|
|
||||||
# Need the config file whose full path is given thanks to the "config" variable
|
|
||||||
INCLUDE(${config})
|
|
||||||
##########################################################################################################################################
|
|
||||||
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
set(CTEST_PROJECT_NAME "ParadisEO")
|
|
||||||
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
|
|
||||||
|
|
||||||
set(CTEST_DROP_METHOD "http")
|
|
||||||
set(CTEST_DROP_SITE "cdash.inria.fr")
|
|
||||||
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=ParadisEO")
|
|
||||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
|
||||||
|
|
@ -1,76 +0,0 @@
|
||||||
PARADISEO-MO README FILE
|
|
||||||
=======================================================================
|
|
||||||
|
|
||||||
=======================================================================
|
|
||||||
|
|
||||||
Welcome to PARADISEO-MO (Moving Objects), one part of the ParadisEO framework.
|
|
||||||
|
|
||||||
=======================================================================
|
|
||||||
BUILDING PARADISEO-MO
|
|
||||||
=======================================================================
|
|
||||||
The basic installation procedure goes the following:
|
|
||||||
|
|
||||||
To compile paradiseo-mo in the default directory,
|
|
||||||
go to paradiseo-mo/build/ and run:
|
|
||||||
> cmake ../ -Dconfig=<path to the install.cmake file>
|
|
||||||
> make
|
|
||||||
// for an easy-use of the provided lessons
|
|
||||||
> make install
|
|
||||||
// optional (if the documentation is not already available)
|
|
||||||
> make doc
|
|
||||||
|
|
||||||
To compile paradiseo-mo anywhere else, simply run:
|
|
||||||
> cmake $(MO) -Dconfig=<path to the install.cmake file>
|
|
||||||
> make
|
|
||||||
// for an easy-use of the provided lessons
|
|
||||||
> make install
|
|
||||||
// optional (if the documentation is not already available)
|
|
||||||
> make doc
|
|
||||||
|
|
||||||
where $(MO) is the top-level directory of PARADISEO-MO.
|
|
||||||
|
|
||||||
To clean everything, simply run
|
|
||||||
> make clean
|
|
||||||
|
|
||||||
======================================================================
|
|
||||||
DIRECTORY STRUCTURE
|
|
||||||
======================================================================
|
|
||||||
After unpacking the archive file, you should end up with the following
|
|
||||||
structure:
|
|
||||||
|
|
||||||
.../ The MAIN PARADISEO-MO directory, created when unpacking.
|
|
||||||
|
|
|
||||||
+-- build Repertory where the executables will be produced.
|
|
||||||
|
|
|
||||||
|
|
|
||||||
+-- src SOURCE directory contains most PARADISEO-MO .h files.
|
|
||||||
|
|
|
||||||
|
|
|
||||||
+-- doc DOCUMENTATION directory (generated by Doxygen).
|
|
||||||
| |
|
|
||||||
| +- html HTML files - start at index.html.
|
|
||||||
| |
|
|
||||||
| +- latex latex files - use to generate Postcript doc.
|
|
||||||
| |
|
|
||||||
| +- man Unix man format documentation.
|
|
||||||
|
|
|
||||||
|
|
|
||||||
+-- tutorial TUTORIAL with lessons
|
|
||||||
|
|
|
||||||
+- examples APPLICATIONS - one directory per separate application.
|
|
||||||
| |
|
|
||||||
| +- tsp traveling salesman problem (TSP) example sources.
|
|
||||||
| |
|
|
||||||
| +- benchs TSP instance files.
|
|
||||||
|
|
|
||||||
+- Lesson1 How make a Hill Climbing on the TSP example (source file and lesson_1.pdf).
|
|
||||||
|
|
|
||||||
+- Lesson2 How make a Tabu Search on the TSP example (source file and lesson_2.pdf).
|
|
||||||
|
|
|
||||||
+- Lesson3 How make a Simulated Annealing on the TSP example (source file and lesson_3.pdf).
|
|
||||||
|
|
||||||
===================================================================
|
|
||||||
NOTES
|
|
||||||
===================================================================
|
|
||||||
|
|
||||||
Mailing list : paradiseo-help@lists.gforge.inria.fr
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
|
|
||||||
##########################################################################################
|
|
||||||
### MO Doc generation using Doxygen
|
|
||||||
##########################################################################################
|
|
||||||
|
|
||||||
IF (DOXYGEN_FOUND)
|
|
||||||
|
|
||||||
SET(DOC_DIR ${CMAKE_BINARY_DIR}/doc CACHE PATH "MO documentation directory")
|
|
||||||
SET(MO_DOC_CONFIG_FILE "mo.doxyfile" CACHE PATH "MO documentation configuration file")
|
|
||||||
# define the doc target
|
|
||||||
IF (DOXYGEN_EXECUTABLE)
|
|
||||||
ADD_CUSTOM_TARGET(doc
|
|
||||||
COMMAND ${DOXYGEN_EXECUTABLE} ${MO_DOC_CONFIG_FILE}
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
)
|
|
||||||
ENDIF (DOXYGEN_EXECUTABLE)
|
|
||||||
|
|
||||||
# configure doxyfile file
|
|
||||||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/doc/${MO_DOC_CONFIG_FILE}.cmake"
|
|
||||||
"${CMAKE_BINARY_DIR}/doc/${MO_DOC_CONFIG_FILE}")
|
|
||||||
|
|
||||||
ELSE (DOXYGEN_FOUND)
|
|
||||||
MESSAGE(STATUS "Unable to generate the documentation, Doxygen package not found")
|
|
||||||
ENDIF (DOXYGEN_FOUND)
|
|
||||||
|
|
||||||
##########################################################################################
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +0,0 @@
|
||||||
######################################################################################
|
|
||||||
######################################################################################
|
|
||||||
### In this file, you can specify many CMake variables used to build paradisEO-MO.
|
|
||||||
######################################################################################
|
|
||||||
######################################################################################
|
|
||||||
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
|
|
||||||
###############################################################
|
|
||||||
# This is a dummy file
|
|
||||||
###############################################################
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
/** @mainpage Welcome to PARADISEO-Moving Objects
|
|
||||||
|
|
||||||
@section Introduction
|
|
||||||
|
|
||||||
MO is an extension of the ANSI-C++ compliant evolutionary computation library EO.
|
|
||||||
<BR>
|
|
||||||
It contains classes for almost any kind of one solution based heuristics.
|
|
||||||
|
|
||||||
@section authors AUTHORS
|
|
||||||
|
|
||||||
<TABLE>
|
|
||||||
<TR>
|
|
||||||
<TD>Sebastien CAHON</TD>
|
|
||||||
</TR>
|
|
||||||
<TR>
|
|
||||||
<TD>
|
|
||||||
<A href=http://www.lifl.fr/~boisson TARGET=blank>Jean-Charles BOISSON</A>
|
|
||||||
</TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
|
|
||||||
@section LICENSE
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
@section Paradiseo Home Page
|
|
||||||
|
|
||||||
<A href=http://paradiseo.gforge.inria.fr>http://paradiseo.gforge.inria.fr</A>
|
|
||||||
|
|
||||||
@section Installation
|
|
||||||
|
|
||||||
The installation procedure of the package is detailed in the
|
|
||||||
<a href="../../README">README</a> file in the top-directory of the source-tree.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
// coding: iso-8859-1
|
|
||||||
// mode: C++
|
|
||||||
// c-file-style: "Stroustrup"
|
|
||||||
// fill-column: 80
|
|
||||||
// End:
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
/*
|
|
||||||
<mo>
|
|
||||||
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 __mo
|
|
||||||
#define __mo
|
|
||||||
|
|
||||||
#include "mo.h"
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,79 +0,0 @@
|
||||||
/*
|
|
||||||
<mo.h>
|
|
||||||
Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
|
||||||
(C) OPAC Team, LIFL, 2002-2007
|
|
||||||
|
|
||||||
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 _mo_h
|
|
||||||
#define _mo_h
|
|
||||||
|
|
||||||
#include <moAlgo.h>
|
|
||||||
#include <moAspirCrit.h>
|
|
||||||
#include <moBestImprSelect.h>
|
|
||||||
#include <moComparator.h>
|
|
||||||
#include <moCoolingSchedule.h>
|
|
||||||
#include <moFirstImprSelect.h>
|
|
||||||
#include <moFitComparator.h>
|
|
||||||
#include <moFitSolContinue.h>
|
|
||||||
#include <moGenSolContinue.h>
|
|
||||||
#include <moGeometricCoolingSchedule.h>
|
|
||||||
#include <moHC.h>
|
|
||||||
#include <moHCMoveLoopExpl.h>
|
|
||||||
#include <moILS.h>
|
|
||||||
#include <moImprBestFitAspirCrit.h>
|
|
||||||
#include <moItRandNextMove.h>
|
|
||||||
#include <moLinearCoolingSchedule.h>
|
|
||||||
#include <moLSCheckPoint.h>
|
|
||||||
#include <moMoveExpl.h>
|
|
||||||
#include <moMove.h>
|
|
||||||
#include <moMoveIncrEval.h>
|
|
||||||
#include <moMoveInit.h>
|
|
||||||
#include <moMoveLoopExpl.h>
|
|
||||||
#include <moMoveSelect.h>
|
|
||||||
#include <moNextMove.h>
|
|
||||||
#include <moNoAspirCrit.h>
|
|
||||||
#include <moNoFitImprSolContinue.h>
|
|
||||||
#include <moRandImprSelect.h>
|
|
||||||
#include <moRandMove.h>
|
|
||||||
#include <moSA.h>
|
|
||||||
#include <moSimpleMoveTabuList.h>
|
|
||||||
#include <moSimpleSolutionTabuList.h>
|
|
||||||
#include <moSolContinue.h>
|
|
||||||
#include <moSteadyFitSolContinue.h>
|
|
||||||
#include <moTabuList.h>
|
|
||||||
#include <moTS.h>
|
|
||||||
#include <moTSMoveLoopExpl.h>
|
|
||||||
#include <moExpl.h>
|
|
||||||
#include <moVNS.h>
|
|
||||||
#include <moTA.h>
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
/*
|
|
||||||
<moAlgo.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 _moAlgo_h
|
|
||||||
#define _moAlgo_h
|
|
||||||
|
|
||||||
#include <eoOp.h>
|
|
||||||
|
|
||||||
//! Description of an algorithm of the paradiseo-mo library
|
|
||||||
/*!
|
|
||||||
moHC, moTS and moSA are 3 examples of algorithm of the paradiseo-mo library.
|
|
||||||
*/
|
|
||||||
template < class EOT > class moAlgo:public eoMonOp < EOT >
|
|
||||||
{};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
/*
|
|
||||||
<moAspirCrit.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 _moAspirCrit_h
|
|
||||||
#define _moAspirCrit_h
|
|
||||||
|
|
||||||
#include <eoFunctor.h>
|
|
||||||
|
|
||||||
//! Description of the conditions in which a tabu move could be accepted
|
|
||||||
/*!
|
|
||||||
It is only a description... An object that herits from this class is needed to be used in a moTS.
|
|
||||||
See moNoAspriCrit for example.
|
|
||||||
*/
|
|
||||||
template < class M >
|
|
||||||
class moAspirCrit: public eoBF < const M &, const typename M::EOType::Fitness &, bool >
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
//! Procedure which initialises all that needs an aspiration criterion.
|
|
||||||
/*!
|
|
||||||
It can be possible that this procedure does nothing...
|
|
||||||
*/
|
|
||||||
virtual void init () = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,127 +0,0 @@
|
||||||
/*
|
|
||||||
<moBestImprSelect.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 _moBestImprSelect_h
|
|
||||||
#define _moBestImprSelect_h
|
|
||||||
|
|
||||||
#include <moMoveSelect.h>
|
|
||||||
|
|
||||||
//! One of the possible moMoveSelect.
|
|
||||||
/*!
|
|
||||||
All neighbors are considered, and the movement
|
|
||||||
which enables the best improvement is selected.
|
|
||||||
*/
|
|
||||||
template < class M >
|
|
||||||
class moBestImprSelect:public moMoveSelect < M >
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
//! Alias for the fitness.
|
|
||||||
typedef typename M::EOType::Fitness Fitness;
|
|
||||||
|
|
||||||
//! Procedure which initialise the exploration
|
|
||||||
/*!
|
|
||||||
\param _fitness The current fitness.
|
|
||||||
*/
|
|
||||||
void init (const Fitness & _fitness)
|
|
||||||
{
|
|
||||||
//Code only used to avoid warning because _fitness is not used in this procedure.
|
|
||||||
Fitness fitness;
|
|
||||||
fitness=(Fitness)_fitness;
|
|
||||||
|
|
||||||
//std::cout.precision(10);
|
|
||||||
|
|
||||||
//std::cout << "old fitness = " << _fitness << std::endl;
|
|
||||||
|
|
||||||
first_time = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//!Function that indicates if the current move has not improved the fitness.
|
|
||||||
/*!
|
|
||||||
If the given fitness enables an improvment,
|
|
||||||
the move (moMove) and the fitness linked to this move are saved.
|
|
||||||
|
|
||||||
\param _move a move.
|
|
||||||
\param _fitness a fitness linked to the move.
|
|
||||||
\return TRUE if the move does not improve the fitness.
|
|
||||||
*/
|
|
||||||
bool update (const M & _move, const Fitness & _fitness)
|
|
||||||
{
|
|
||||||
if ( first_time || (_fitness > best_fitness) )
|
|
||||||
{
|
|
||||||
best_fitness = _fitness;
|
|
||||||
best_move = _move;
|
|
||||||
|
|
||||||
first_time = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//std::cout << "best fitness = " << best_fitness << std::endl;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Procedure which saved the best move and fitness.
|
|
||||||
/*!
|
|
||||||
\param _move the current move (result of the procedure).
|
|
||||||
\param _fitness the current fitness (result of the procedure).
|
|
||||||
*/
|
|
||||||
void operator () (M & _move, Fitness & _fitness)
|
|
||||||
{
|
|
||||||
if(first_time)
|
|
||||||
{
|
|
||||||
throw std::runtime_error("[moBestImprSelect.h]: no move or/and no fitness already saved, update has to be called first.");
|
|
||||||
}
|
|
||||||
|
|
||||||
_move = best_move;
|
|
||||||
_fitness = best_fitness;
|
|
||||||
|
|
||||||
|
|
||||||
//std::cout << "Final fitness = " << best_fitness << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
//! Allowing to know if at least one move has been generated.
|
|
||||||
bool first_time;
|
|
||||||
|
|
||||||
//! The best move.
|
|
||||||
M best_move;
|
|
||||||
|
|
||||||
//! The best fitness.
|
|
||||||
Fitness best_fitness;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
/*
|
|
||||||
<moComparator.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 _moComparator_h
|
|
||||||
#define _moComparator_h
|
|
||||||
|
|
||||||
|
|
||||||
//! Template for classes which need to compare two EOT and indicate if the first is "better" than the second.
|
|
||||||
/*!
|
|
||||||
The objects that extend this template describe how an EOT is "better" than an other.
|
|
||||||
*/
|
|
||||||
template<class EOT>
|
|
||||||
class moComparator: public eoBF<const EOT &, const EOT &, bool>
|
|
||||||
{};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
/*
|
|
||||||
<moCoolingSchedule.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 _moCoolingSchedule_h
|
|
||||||
#define _moCoolingSchedule_h
|
|
||||||
|
|
||||||
#include <eoFunctor.h>
|
|
||||||
|
|
||||||
//! This class gives the description of a cooling schedule.
|
|
||||||
/*!
|
|
||||||
It is only a description... An object that herits from this class is needed to be used in a moSA.
|
|
||||||
See moExponentialCoolingSchedule or moLinearCoolingSchedule for example.
|
|
||||||
*/
|
|
||||||
class moCoolingSchedule : public eoUF < double &, bool >
|
|
||||||
{};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,113 +0,0 @@
|
||||||
/*
|
|
||||||
<moExpl.h>
|
|
||||||
Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
|
|
||||||
(C) OPAC Team, LIFL, 2002-2008
|
|
||||||
|
|
||||||
Salma Mesmoudi (salma.mesmoudi@inria.fr), 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 _moExpl_h
|
|
||||||
#define _moExpl_h
|
|
||||||
|
|
||||||
#include <eoFunctor.h>
|
|
||||||
|
|
||||||
//! Description of an explorer
|
|
||||||
/*!
|
|
||||||
This class allows to use any mutation object as a neighborhood.
|
|
||||||
*/
|
|
||||||
template < class EOT >
|
|
||||||
class moExpl : public eoBF < const EOT &, EOT &, bool >
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
//! Generic constructor
|
|
||||||
/*!
|
|
||||||
Generic constructor using a eoMonOp
|
|
||||||
|
|
||||||
\param _explorer Algorithme or mutation.
|
|
||||||
|
|
||||||
*/
|
|
||||||
moExpl(eoMonOp<EOT> & _explorer): index(0)
|
|
||||||
{
|
|
||||||
explorers.clear();
|
|
||||||
addExplorer(_explorer);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Procedure which launches the moExpl.
|
|
||||||
/*!
|
|
||||||
The exploration starts from an old solution and provides a new solution.
|
|
||||||
|
|
||||||
\param _old_solution The current solution.
|
|
||||||
\param _new_solution The new solution (result of the procedure).
|
|
||||||
*/
|
|
||||||
|
|
||||||
bool operator ()(const EOT & _old_solution, EOT & _new_solution)
|
|
||||||
{
|
|
||||||
_new_solution=(EOT)_old_solution;
|
|
||||||
return (*explorers[index])(_new_solution);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Add an algorithm or mutation to neighborhoods vector
|
|
||||||
void addExplorer(eoMonOp<EOT> & _new_explorer)
|
|
||||||
{
|
|
||||||
explorers.push_back(&_new_explorer);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Procedure which modified the current explorer to use.
|
|
||||||
/*!
|
|
||||||
\param _index Index of the explorer to use.
|
|
||||||
*/
|
|
||||||
void setCurrentExplorer(unsigned int _index)
|
|
||||||
{
|
|
||||||
if( _index >= explorers.size() )
|
|
||||||
{
|
|
||||||
std::cout << "[" << _index << "]" << std::endl;
|
|
||||||
throw std::runtime_error("[moExpl.h]: bad index "+_index);
|
|
||||||
}
|
|
||||||
index=_index;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Function which returns the number of explorers already saved.
|
|
||||||
/*!
|
|
||||||
\return The number of explorers contained in the moExpl.
|
|
||||||
*/
|
|
||||||
unsigned int getExplorerNumber()
|
|
||||||
{
|
|
||||||
return explorers.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
private :
|
|
||||||
|
|
||||||
unsigned int index;
|
|
||||||
|
|
||||||
//!Neighborhoods vector
|
|
||||||
std::vector< eoMonOp<EOT>* > explorers;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,120 +0,0 @@
|
||||||
/*
|
|
||||||
<moFirstImprSelect.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 _moFirstImprSelect_h
|
|
||||||
#define _moFirstImprSelect_h
|
|
||||||
|
|
||||||
#include <moMoveSelect.h>
|
|
||||||
|
|
||||||
//! One possible moMoveSelect.
|
|
||||||
/*!
|
|
||||||
The neighborhood is explored until
|
|
||||||
a move enables an improvment of the
|
|
||||||
current solution.
|
|
||||||
*/
|
|
||||||
template < class M >
|
|
||||||
class moFirstImprSelect:public moMoveSelect < M >
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
//! Alias for the fitness.
|
|
||||||
typedef typename M::EOType::Fitness Fitness;
|
|
||||||
|
|
||||||
//! Procedure which initialise the exploration.
|
|
||||||
/*!
|
|
||||||
It save the current fitness as the initial value for the fitness.
|
|
||||||
\param _fitness The current fitness.
|
|
||||||
*/
|
|
||||||
virtual void init (const Fitness & _fitness)
|
|
||||||
{
|
|
||||||
valid = false;
|
|
||||||
initial_fitness = _fitness;
|
|
||||||
}
|
|
||||||
|
|
||||||
//!Function that indicates if the current move has not improved the fitness.
|
|
||||||
/*!
|
|
||||||
If the given fitness enables an improvment,
|
|
||||||
the move (moMove) should be applied to the current solution.
|
|
||||||
|
|
||||||
\param _move a move.
|
|
||||||
\param _fitness a fitness linked to the move.
|
|
||||||
\return true if the move does not improve the fitness.
|
|
||||||
*/
|
|
||||||
bool update (const M & _move, const Fitness & _fitness)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (_fitness > initial_fitness)
|
|
||||||
{
|
|
||||||
|
|
||||||
best_fitness = _fitness;
|
|
||||||
best_move = _move;
|
|
||||||
valid = true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Procedure which saved the best move and fitness.
|
|
||||||
/*!
|
|
||||||
\param _move the current move (result of the procedure).
|
|
||||||
\param _fitness the current fitness (result of the procedure).
|
|
||||||
*/
|
|
||||||
void operator () (M & _move, Fitness & _fitness)
|
|
||||||
{
|
|
||||||
if (valid)
|
|
||||||
{
|
|
||||||
_move = best_move;
|
|
||||||
_fitness = best_fitness;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
//! Allow to know if at least one move has improved the solution.
|
|
||||||
bool valid;
|
|
||||||
|
|
||||||
//! Best stored movement.
|
|
||||||
M best_move;
|
|
||||||
|
|
||||||
//! Initial fitness.
|
|
||||||
Fitness initial_fitness;
|
|
||||||
|
|
||||||
//! Best stored fitness.
|
|
||||||
Fitness best_fitness;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
/*
|
|
||||||
<moFitComparator.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 _moFitComparator_h
|
|
||||||
#define _moFitComparator_h
|
|
||||||
|
|
||||||
#include <moComparator.h>
|
|
||||||
|
|
||||||
//! Comparison according to the fitness.
|
|
||||||
/*!
|
|
||||||
An EOT is better than an other if its fitness is better.
|
|
||||||
*/
|
|
||||||
template<class EOT>
|
|
||||||
class moFitComparator: public moComparator<EOT>
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
//! Function which makes the comparison and gives the result.
|
|
||||||
/*!
|
|
||||||
\param _solution1 The first solution.
|
|
||||||
\param _solution2 The second solution.
|
|
||||||
\return true if the fitness of the first solution is better than the second solution, false else.
|
|
||||||
*/
|
|
||||||
bool operator()(const EOT & _solution1, const EOT & _solution2)
|
|
||||||
{
|
|
||||||
return _solution1.fitness() > _solution2.fitness();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue