diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/CMakeLists.txt b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/CMakeLists.txt deleted file mode 100644 index 0a24397c5..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -# -##################################################################################### -### 1) Definitions (required for tsp target) -###################################################################################### - -SET(TSP_SRC_DIR ${ParadisEO-PEO_SOURCE_DIR}/tutorial/examples/tsp) -SET(TSP_BINARY_DIR ${ParadisEO-PEO_BINARY_DIR}/tutorial/examples/tsp) -SET(FLOWSHOP_SRC_DIR "${MOEO_SRC_DIR}/tutorial/examples/flowshop" CACHE PATH "Flowshop source directory" FORCE) -SET(FLOWSHOP_BIN_DIR "${MOEO_BIN_DIR}/tutorial/examples/flowshop" CACHE PATH "Flowshop binary directory" FORCE) - -###################################################################################### - -###################################################################################### -### 2) Where must cmake go now ? -###################################################################################### - -ADD_SUBDIRECTORY(examples) -ADD_SUBDIRECTORY(Lesson1) -ADD_SUBDIRECTORY(Lesson2) -ADD_SUBDIRECTORY(Lesson3) -ADD_SUBDIRECTORY(Lesson4) -ADD_SUBDIRECTORY(Lesson5) -ADD_SUBDIRECTORY(Lesson6) -###################################################################################### diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson1/CMakeLists.txt b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson1/CMakeLists.txt deleted file mode 100644 index 717546ae3..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson1/CMakeLists.txt +++ /dev/null @@ -1,83 +0,0 @@ - -###################################################################################### -### 0) Set the compiler and define targets to easily run the lessons -###################################################################################### - -SET (CMAKE_CXX_COMPILER mpicxx) - -#ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson1/param ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson1/schema.xml) - -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson1/param -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson1) -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson1/schema.xml -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson1) - -EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson1/param - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson1 - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson1/schema.xml - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson1 -) - -###################################################################################### - - -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src ${MOEO_SRC_DIR}/src ${MO_SRC_DIR}/src ${ParadisEO-PEO_SOURCE_DIR}/src) - -###################################################################################### - - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-PEO_BINARY_DIR}/lib) - -###################################################################################### - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -ADD_EXECUTABLE(pso mainPSO.cpp) -ADD_DEPENDENCIES(pso peo rmc_mpi) -ADD_EXECUTABLE(ea mainEA.cpp) -ADD_DEPENDENCIES(ea peo rmc_mpi) -###################################################################################### - - -###################################################################################### -### 4) Optionnal: define properties -###################################################################################### - -SET(LESSON1_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(pso PROPERTIES VERSION "${LESSON1_VERSION}") -SET_TARGET_PROPERTIES(ea PROPERTIES VERSION "${LESSON1_VERSION}") -###################################################################################### - - -###################################################################################### -### 5) Link the librairies -###################################################################################### - -TARGET_LINK_LIBRARIES(pso ${XML2_LIBS} peo rmc_mpi eo eoutils peo) -TARGET_LINK_LIBRARIES(ea ${XML2_LIBS} peo rmc_mpi eo eoutils peo) - -###################################################################################### diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson1/mainEA.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson1/mainEA.cpp deleted file mode 100644 index 6c65ef7fb..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson1/mainEA.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, INRIA, 2008 -* -* Clive Canape -* -* 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 -* -*/ - -#include -#include - -typedef eoReal Indi; - -//Evaluation function -double f (const Indi & _indi) -{ - // Rosenbrock function f(x) = 100*(x[1]-x[0]^2)^2+(1-x[0])^2 - // => optimal : f* = 0 , with x* =(1,1) - - double sum; - sum=_indi[1]-pow(_indi[0],2); - sum=100*pow(sum,2); - sum+=pow((1-_indi[0]),2); - return (-sum); -} - -int main (int __argc, char *__argv[]) -{ - -// Initialization of the parallel environment : thanks this instruction, ParadisEO-PEO can initialize himself - peo :: init( __argc, __argv ); - -//Parameters - eoParser parser(__argc, __argv); - unsigned int POP_SIZE = parser.createParam((unsigned int)(20), "popSize", "Population size",'P',"Param").value(); - unsigned int MAX_GEN = parser.createParam((unsigned int)(100), "maxGen", "Maximum number of generations",'G',"Param").value(); - double EPSILON = parser.createParam(0.01, "mutEpsilon", "epsilon for mutation",'e',"Param").value(); - double CROSS_RATE = parser.createParam(0.25, "pCross", "Crossover probability",'C',"Param").value(); - double MUT_RATE = parser.createParam(0.35, "pMut", "Mutation probability",'M',"Param").value(); - unsigned int VEC_SIZE = parser.createParam((unsigned int)(2), "vecSize", "Vector size",'V',"Param").value(); - double INIT_POSITION_MIN = parser.createParam(-2.0, "pMin", "Init position min",'N',"Param").value(); - double INIT_POSITION_MAX = parser.createParam(2.0, "pMax", "Init position max",'X',"Param").value(); - rng.reseed (time(0)); - -// Stopping - eoGenContinue < Indi > genContPara (MAX_GEN); - eoCombinedContinue continuatorPara (genContPara); - eoCheckPoint checkpoint(continuatorPara); - -// For a parallel evaluation - peoEvalFunc plainEval(f); - peoPopEval eval(plainEval); - -// Initialization - eoUniformGenerator < double >uGen (INIT_POSITION_MIN, INIT_POSITION_MAX); - eoInitFixedLength < Indi > random (VEC_SIZE, uGen); - -// Selection - eoRankingSelect selectionStrategy; - eoSelectNumber select(selectionStrategy,POP_SIZE); - -// Transformation - eoSegmentCrossover crossover; - eoUniformMutation mutation(EPSILON); - eoSGATransform transform(crossover,CROSS_RATE,mutation,MUT_RATE); - -// Replacement - eoPlusReplacement replace; - -// Creation of the population - eoPop < Indi > pop; - pop.append (POP_SIZE, random); - -// Algorithm - eoEasyEA< Indi > eaAlg( checkpoint, eval, select, transform, replace ); - -//Parallel algorithm - peoWrapper parallelEA( eaAlg, pop); - eval.setOwner(parallelEA); - - peo :: run(); - peo :: finalize(); - if (getNodeRank()==1) - { - pop.sort(); - std::cout << "Final population :\n" << pop << std::endl; - } -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson1/mainPSO.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson1/mainPSO.cpp deleted file mode 100644 index 5e7315683..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson1/mainPSO.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, INRIA, 2008 -* -* Clive Canape -* -* 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 -* -*/ - -#include - -typedef eoRealParticle < double >Indi; - -//Evaluation function -double f (const Indi & _indi) -{ - // Rosenbrock function f(x) = 100*(x[1]-x[0]^2)^2+(1-x[0])^2 - // => optimal : f* = 0 , with x* =(1,1) - - double sum; - sum=_indi[1]-pow(_indi[0],2); - sum=100*pow(sum,2); - sum+=pow((1-_indi[0]),2); - return (-sum); -} - -int main (int __argc, char *__argv[]) -{ - -// Initialization of the parallel environment : thanks this instruction, ParadisEO-PEO can initialize himself - peo :: init( __argc, __argv ); - -//Parameters - eoParser parser(__argc, __argv); - unsigned int POP_SIZE = parser.createParam((unsigned int)(20), "popSize", "Population size",'P',"Param").value(); - unsigned int MAX_GEN = parser.createParam((unsigned int)(100), "maxGen", "Maximum number of generations",'G',"Param").value(); - unsigned int VEC_SIZE = parser.createParam((unsigned int)(2), "vecSize", "Vector size",'V',"Param").value(); - double INIT_POSITION_MIN = parser.createParam(-2.0, "pMin", "Init position min",'N',"Param").value(); - double INIT_POSITION_MAX = parser.createParam(2.0, "pMax", "Init position max",'X',"Param").value(); - double INIT_VELOCITY_MIN = parser.createParam(-1.0, "vMin", "Init velocity min",'n',"Param").value(); - double INIT_VELOCITY_MAX = parser.createParam(1.0, "vMax", "Init velocity max",'x',"Param").value(); - double weight = parser.createParam(1.0, "weight", "Weight",'w',"Param").value(); - double C1 = parser.createParam(0.5, "c1", "C1",'1',"Param").value(); - double C2 = parser.createParam(2.0, "c2t", "C2",'2',"Param").value(); - unsigned int NEIGHBORHOOD_SIZE = parser.createParam((unsigned int)(6), "neighSize", "Neighborhood size",'H',"Param").value(); - rng.reseed (time(0)); - -// Stopping - eoGenContinue < Indi > genContPara (MAX_GEN); - eoCombinedContinue continuatorPara (genContPara); - eoCheckPoint checkpoint(continuatorPara); - -// For a parallel evaluation - peoEvalFunc plainEval(f); - peoPopEval< Indi > eval(plainEval); - -// Initialization - eoUniformGenerator < double >uGen (INIT_POSITION_MIN, INIT_POSITION_MAX); - eoInitFixedLength < Indi > random (VEC_SIZE, uGen); - -// Velocity - eoUniformGenerator < double >sGen (INIT_VELOCITY_MIN, INIT_VELOCITY_MAX); - eoVelocityInitFixedLength < Indi > veloRandom (VEC_SIZE, sGen); - -// Initializing the best - eoFirstIsBestInit < Indi > localInit; - -// Flight - eoRealVectorBounds bndsFlight(VEC_SIZE,INIT_POSITION_MIN,INIT_POSITION_MAX); - eoStandardFlight < Indi > flight(bndsFlight); - -// Creation of the population - eoPop < Indi > pop; - pop.append (POP_SIZE, random); - -// Topology - eoLinearTopology topology(NEIGHBORHOOD_SIZE); - eoRealVectorBounds bnds(VEC_SIZE,INIT_VELOCITY_MIN,INIT_VELOCITY_MAX); - eoStandardVelocity < Indi > velocity (topology,weight,C1,C2,bnds); - -// Initialization - eoInitializer init(eval,veloRandom,localInit,topology,pop); - -//Parallel algorithm - eoSyncEasyPSO psa(init,checkpoint,eval, velocity, flight); - peoWrapper parallelPSO( psa, pop); - eval.setOwner(parallelPSO); - - peo :: run(); - peo :: finalize(); - if (getNodeRank()==1) - { - pop.sort(); - std::cout << "Final population :\n" << pop << std::endl; - } -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson1/paradiseo-peo-lsn.doxyfile b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson1/paradiseo-peo-lsn.doxyfile deleted file mode 100644 index dcbaf631a..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson1/paradiseo-peo-lsn.doxyfile +++ /dev/null @@ -1,242 +0,0 @@ -# Doxyfile 1.4.7 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "ParadisEO-PEO Lesson1" -PROJECT_NUMBER = 0.1 -OUTPUT_DIRECTORY = ../../../doc/html/lesson1 -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = YES -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = NO -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = YES -HIDE_UNDOC_CLASSES = YES -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = YES -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = . -FILE_PATTERNS = *.cpp \ - *.h \ - NEWS \ - README -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = ../../docs/images -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = YES -COLS_IN_ALPHA_INDEX = 3 -IGNORE_PREFIX = peo -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = YES -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = YES -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = YES -USE_PDFLATEX = YES -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = YES -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = ../../../paradiseo-mo/docs/eo.doxytag=../../../../../paradiseo-mo/docs/html \ - ../../../paradiseo-mo/docs/mo.doxytag=../../../../../paradiseo-mo/docs/html \ - ../../docs/paradiseo-peo.doxytag=../../ \ - ../shared/paradiseo-peo-lsn-shared.doxytag=../../lsnshared/html -GENERATE_TAGFILE = ../../docs/paradiseo-peo-lsn.doxytag -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = NO -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1024 -MAX_DOT_GRAPH_DEPTH = 0 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = YES - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson1/param b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson1/param deleted file mode 100644 index 7caa1c61f..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson1/param +++ /dev/null @@ -1,25 +0,0 @@ -###### Param ###### ---popSize=20 # -P : Population size ---maxGen=200 # -G : Maximum number of generations ---mutEpsilon=0.01 # -e : epsilon for mutation ---pCross=0.80 # -C : Crossover probability ---pMut=0.30 # -M : Mutation probability ---vecSize=2 # -V : Vector size ---pMin=-2.0 # -N : Init position min ---pMax=2.0 # -X : Init position max ---vMin=-1.0 # -n : Init velocity min ---vMax=1.0 # -x : Init velocity max ---neighSize=6 # -H : Neighborhood size ---weight=1.0 # -w : Weight ---c1=0.5 # -1 : C1 ---c2=2.0 # -2 : C2 - -## miscallenous parameters - ---debug=false - -## deployment schema - ---schema=schema.xml - - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson1/schema.xml b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson1/schema.xml deleted file mode 100644 index f34107574..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson1/schema.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - 1 - - - - - - - - - - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson2/CMakeLists.txt b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson2/CMakeLists.txt deleted file mode 100644 index ecabfb23f..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson2/CMakeLists.txt +++ /dev/null @@ -1,79 +0,0 @@ - -###################################################################################### -### 0) Set the compiler and define targets to easily run the lessons -###################################################################################### - -SET (CMAKE_CXX_COMPILER mpicxx) - -#ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson2/param ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson2/schema.xml) - -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson2/param -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson2) -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson2/schema.xml -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson2) - -EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson2/param - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson2 - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson2/schema.xml - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson2 -) - -###################################################################################### - - -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src ${MOEO_SRC_DIR}/src ${MO_SRC_DIR}/src ${ParadisEO-PEO_SOURCE_DIR}/src) - -###################################################################################### - - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-PEO_BINARY_DIR}/lib) - -###################################################################################### - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -ADD_EXECUTABLE(ea2 mainEA.cpp) -ADD_DEPENDENCIES(ea2 peo rmc_mpi) -###################################################################################### - - -###################################################################################### -### 4) Optionnal: define properties -###################################################################################### - -SET(LESSON2_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(ea2 PROPERTIES VERSION "${LESSON2_VERSION}") -###################################################################################### - - -###################################################################################### -### 5) Link the librairies -###################################################################################### - -TARGET_LINK_LIBRARIES(ea2 ${XML2_LIBS} peo rmc_mpi eo eoutils peo) - -###################################################################################### diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson2/mainEA.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson2/mainEA.cpp deleted file mode 100644 index 3d36aff8a..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson2/mainEA.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, INRIA, 2008 -* -* Clive Canape -* -* 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 -* -*/ - -#include -#include - -typedef eoReal Indi; - -double f (const Indi & _indi) -{ - double sum; - sum=_indi[1]-pow(_indi[0],2); - sum=100*pow(sum,2); - sum+=pow((1-_indi[0]),2); - return (-sum); -} - -int main (int __argc, char *__argv[]) -{ - - peo :: init( __argc, __argv ); - eoParser parser(__argc, __argv); - unsigned int POP_SIZE = parser.createParam((unsigned int)(20), "popSize", "Population size",'P',"Param").value(); - unsigned int MAX_GEN = parser.createParam((unsigned int)(100), "maxGen", "Maximum number of generations",'G',"Param").value(); - double EPSILON = parser.createParam(0.01, "mutEpsilon", "epsilon for mutation",'e',"Param").value(); - double CROSS_RATE = parser.createParam(0.25, "pCross", "Crossover probability",'C',"Param").value(); - double MUT_RATE = parser.createParam(0.35, "pMut", "Mutation probability",'M',"Param").value(); - unsigned int VEC_SIZE = parser.createParam((unsigned int)(2), "vecSize", "Vector size",'V',"Param").value(); - double INIT_POSITION_MIN = parser.createParam(-2.0, "pMin", "Init position min",'N',"Param").value(); - double INIT_POSITION_MAX = parser.createParam(2.0, "pMax", "Init position max",'X',"Param").value(); - rng.reseed (time(0)); - eoGenContinue < Indi > genContPara (MAX_GEN); - eoCombinedContinue continuatorPara (genContPara); - eoCheckPoint checkpoint(continuatorPara); - peoEvalFunc plainEval(f); - peoPopEval eval(plainEval); - eoUniformGenerator < double >uGen (INIT_POSITION_MIN, INIT_POSITION_MAX); - eoInitFixedLength < Indi > random (VEC_SIZE, uGen); - eoRankingSelect selectionStrategy; - eoSelectNumber select(selectionStrategy,POP_SIZE); - eoSegmentCrossover crossover; - eoUniformMutation mutation(EPSILON); - -// Parallel transformation - peoTransform transform(crossover,CROSS_RATE,mutation,MUT_RATE); - - eoPlusReplacement replace; - eoPop < Indi > pop; - pop.append (POP_SIZE, random); - eoEasyEA< Indi > eaAlg( checkpoint, eval, select, transform, replace ); - peoWrapper parallelEA( eaAlg, pop); - eval.setOwner(parallelEA); - -// setOwner - transform.setOwner (parallelEA); - - peo :: run(); - peo :: finalize(); - if (getNodeRank()==1) - { - pop.sort(); - std::cout << "Final population :\n" << pop << std::endl; - } -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson2/paradiseo-peo-lsn.doxyfile b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson2/paradiseo-peo-lsn.doxyfile deleted file mode 100644 index f85ae31ec..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson2/paradiseo-peo-lsn.doxyfile +++ /dev/null @@ -1,242 +0,0 @@ -# Doxyfile 1.4.7 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "ParadisEO-PEO Lesson2" -PROJECT_NUMBER = 0.1 -OUTPUT_DIRECTORY = ../../../doc/html/lesson2 -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = YES -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = NO -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = YES -HIDE_UNDOC_CLASSES = YES -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = YES -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = . -FILE_PATTERNS = *.cpp \ - *.h \ - NEWS \ - README -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = ../../docs/images -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = YES -COLS_IN_ALPHA_INDEX = 3 -IGNORE_PREFIX = peo -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = YES -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = YES -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = YES -USE_PDFLATEX = YES -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = YES -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = ../../../paradiseo-mo/docs/eo.doxytag=../../../../../paradiseo-mo/docs/html \ - ../../../paradiseo-mo/docs/mo.doxytag=../../../../../paradiseo-mo/docs/html \ - ../../docs/paradiseo-peo.doxytag=../../ \ - ../shared/paradiseo-peo-lsn-shared.doxytag=../../lsnshared/html -GENERATE_TAGFILE = ../../docs/paradiseo-peo-lsn.doxytag -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = NO -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1024 -MAX_DOT_GRAPH_DEPTH = 0 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = YES - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson2/param b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson2/param deleted file mode 100644 index dce69287a..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson2/param +++ /dev/null @@ -1,19 +0,0 @@ -###### Param ###### ---popSize=20 # -P : Population size ---maxGen=300 # -G : Maximum number of generations ---mutEpsilon=0.01 # -e : epsilon for mutation ---pCross=0.80 # -C : Crossover probability ---pMut=0.30 # -M : Mutation probability ---vecSize=2 # -V : Vector size ---pMin=-2.0 # -N : Init position min ---pMax=2.0 # -X : Init position max - -## miscallenous parameters - ---debug=false - -## deployment schema - ---schema=schema.xml - - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson2/schema.xml b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson2/schema.xml deleted file mode 100644 index f34107574..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson2/schema.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - 1 - - - - - - - - - - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson3/CMakeLists.txt b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson3/CMakeLists.txt deleted file mode 100644 index b241e316f..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson3/CMakeLists.txt +++ /dev/null @@ -1,84 +0,0 @@ - -###################################################################################### -### 0) Set the compiler and define targets to easily run the lessons -###################################################################################### - -SET (CMAKE_CXX_COMPILER mpicxx) - -#ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson3/param ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson3/schema.xml) - -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson3/param -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson3) -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson3/schema.xml -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson3) - -EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson3/param - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson3 - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson3/schema.xml - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson3 -) - -###################################################################################### - - -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src ${MOEO_SRC_DIR}/src ${MO_SRC_DIR}/src ${ParadisEO-PEO_SOURCE_DIR}/src) - -###################################################################################### - - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-PEO_BINARY_DIR}/lib) - -###################################################################################### - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -ADD_EXECUTABLE(pso3 mainPSO.cpp) -ADD_DEPENDENCIES(pso3 peo rmc_mpi) -ADD_EXECUTABLE(ea3 mainEA.cpp) -ADD_DEPENDENCIES(ea3 peo rmc_mpi) -###################################################################################### - - -###################################################################################### -### 4) Optionnal: define properties -###################################################################################### - -SET(LESSON3_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(pso3 PROPERTIES VERSION "${LESSON3_VERSION}") -SET_TARGET_PROPERTIES(ea3 PROPERTIES VERSION "${LESSON3_VERSION}") -###################################################################################### - - -###################################################################################### -### 5) Link the librairies -###################################################################################### - -TARGET_LINK_LIBRARIES(pso3 ${XML2_LIBS} peo rmc_mpi eo eoutils peo) -TARGET_LINK_LIBRARIES(ea3 ${XML2_LIBS} peo rmc_mpi eo eoutils peo) - -###################################################################################### - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson3/mainEA.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson3/mainEA.cpp deleted file mode 100644 index daaa068c3..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson3/mainEA.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, INRIA, 2008 -* -* Clive Canape -* -* 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/syncor 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 -* -*/ - -#include -#include - -typedef eoReal Indi; - -double f (const Indi & _indi) -{ - double sum; - sum=_indi[1]-pow(_indi[0],2); - sum=100*pow(sum,2); - sum+=pow((1-_indi[0]),2); - return (-sum); -} - -int main (int __argc, char *__argv[]) -{ - - peo :: init( __argc, __argv ); - eoParser parser(__argc, __argv); - unsigned int POP_SIZE = parser.createParam((unsigned int)(20), "popSize", "Population size",'P',"Param").value(); - unsigned int MAX_GEN = parser.createParam((unsigned int)(100), "maxGen", "Maximum number of generations",'G',"Param").value(); - double EPSILON = parser.createParam(0.01, "mutEpsilon", "epsilon for mutation",'e',"Param").value(); - double CROSS_RATE = parser.createParam(0.25, "pCross", "Crossover probability",'C',"Param").value(); - double MUT_RATE = parser.createParam(0.35, "pMut", "Mutation probability",'M',"Param").value(); - unsigned int VEC_SIZE = parser.createParam((unsigned int)(2), "vecSize", "Vector size",'V',"Param").value(); - double INIT_POSITION_MIN = parser.createParam(-2.0, "pMin", "Init position min",'N',"Param").value(); - double INIT_POSITION_MAX = parser.createParam(2.0, "pMax", "Init position max",'X',"Param").value(); - unsigned int MIG_FREQ = parser.createParam((unsigned int)(10), "migFreq", "Migration frequency",'F',"Param").value(); - unsigned int MIG_SIZE = parser.createParam((unsigned int)(5), "migSize", "Migration size",'S',"Param").value(); - rng.reseed (time(0)); - -// Define the topology of your island model - RingTopology topology; - -// First algorithm - /*****************************************************************************************/ - - eoGenContinue < Indi > genContPara (MAX_GEN); - eoCombinedContinue continuatorPara (genContPara); - eoCheckPoint checkpoint(continuatorPara); - peoEvalFunc mainEval( f ); - peoPopEval eval(mainEval); - eoUniformGenerator < double >uGen (INIT_POSITION_MIN, INIT_POSITION_MAX); - eoInitFixedLength < Indi > random (VEC_SIZE, uGen); - eoRankingSelect selectionStrategy; - eoSelectNumber select(selectionStrategy,POP_SIZE); - eoSegmentCrossover crossover; - eoUniformMutation mutation(EPSILON); - peoTransform transform(crossover,CROSS_RATE,mutation,MUT_RATE); - eoPop < Indi > pop; - pop.append (POP_SIZE, random); - -// Define a synchronous island - - // Seclection - eoRandomSelect mig_select_one; - eoSelector > mig_select (mig_select_one,MIG_SIZE,pop); - // Replacement - eoPlusReplacement replace; - eoReplace > mig_replace (replace,pop); - // Island - peoSyncIslandMig, eoPop > mig(MIG_FREQ,mig_select,mig_replace,topology); - checkpoint.add(mig); - - eoEasyEA< Indi > eaAlg( checkpoint, eval, select, transform, replace ); - peoWrapper parallelEA( eaAlg, pop); - eval.setOwner(parallelEA); - transform.setOwner(parallelEA); -// setOwner - mig.setOwner(parallelEA); - - /*****************************************************************************************/ - -// Second algorithm (on the same model but with others names) - /*****************************************************************************************/ - - eoGenContinue < Indi > genContPara2 (MAX_GEN); - eoCombinedContinue continuatorPara2 (genContPara2); - eoCheckPoint checkpoint2(continuatorPara2); - peoEvalFunc mainEval2( f ); - peoPopEval eval2(mainEval2); - eoUniformGenerator < double >uGen2 (INIT_POSITION_MIN, INIT_POSITION_MAX); - eoInitFixedLength < Indi > random2 (VEC_SIZE, uGen2); - eoRankingSelect selectionStrategy2; - eoSelectNumber select2(selectionStrategy2,POP_SIZE); - eoSegmentCrossover crossover2; - eoUniformMutation mutation2(EPSILON); - peoTransform transform2(crossover2,CROSS_RATE,mutation2,MUT_RATE); - eoPop < Indi > pop2; - pop2.append (POP_SIZE, random2); - eoPlusReplacement replace2; - eoRandomSelect mig_select_one2; - eoSelector > mig_select2 (mig_select_one2,MIG_SIZE,pop2); - eoReplace > mig_replace2 (replace2,pop2); - peoSyncIslandMig, eoPop > mig2(MIG_FREQ,mig_select2,mig_replace2,topology); - checkpoint2.add(mig2); - eoEasyEA< Indi > eaAlg2( checkpoint2, eval2, select2, transform2, replace2 ); - peoWrapper parallelEA2( eaAlg2, pop2); - eval2.setOwner(parallelEA2); - transform2.setOwner(parallelEA2); - mig2.setOwner(parallelEA2); - - /*****************************************************************************************/ - - peo :: run(); - peo :: finalize(); - if (getNodeRank()==1) - { - pop.sort(); - pop2.sort(); - std::cout << "Final population 1 :\n" << pop << std::endl; - std::cout << "Final population 2 :\n" << pop2 << std::endl; - } -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson3/mainPSO.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson3/mainPSO.cpp deleted file mode 100644 index 5fbe1c54a..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson3/mainPSO.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, INRIA, 2008 -* -* Clive Canape -* -* 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 -* -*/ - -#include - -typedef eoRealParticle < double >Indi; - -double f (const Indi & _indi) -{ - double sum; - sum=_indi[1]-pow(_indi[0],2); - sum=100*pow(sum,2); - sum+=pow((1-_indi[0]),2); - return (-sum); -} - -int main (int __argc, char *__argv[]) -{ - peo :: init( __argc, __argv ); - eoParser parser(__argc, __argv); - unsigned int POP_SIZE = parser.createParam((unsigned int)(20), "popSize", "Population size",'P',"Param").value(); - unsigned int MAX_GEN = parser.createParam((unsigned int)(100), "maxGen", "Maximum number of generations",'G',"Param").value(); - unsigned int VEC_SIZE = parser.createParam((unsigned int)(2), "vecSize", "Vector size",'V',"Param").value(); - double INIT_POSITION_MIN = parser.createParam(-2.0, "pMin", "Init position min",'N',"Param").value(); - double INIT_POSITION_MAX = parser.createParam(2.0, "pMax", "Init position max",'X',"Param").value(); - double INIT_VELOCITY_MIN = parser.createParam(-1.0, "vMin", "Init velocity min",'n',"Param").value(); - double INIT_VELOCITY_MAX = parser.createParam(1.0, "vMax", "Init velocity max",'x',"Param").value(); - double omega = parser.createParam(1.0, "weight", "Weight",'w',"Param").value(); - double C1 = parser.createParam(0.5, "c1", "C1",'1',"Param").value(); - double C2 = parser.createParam(2.0, "c2t", "C2",'2',"Param").value(); - unsigned int NEIGHBORHOOD_SIZE = parser.createParam((unsigned int)(6), "neighSize", "Neighborhood size",'H',"Param").value(); - unsigned int MIG_FREQ = parser.createParam((unsigned int)(10), "migFreq", "Migration frequency",'F',"Param").value(); - rng.reseed (time(0)); - -// Island model - - RingTopology topologyMig; - -// First - eoGenContinue < Indi > genContPara (MAX_GEN); - eoCombinedContinue continuatorPara (genContPara); - eoCheckPoint checkpoint(continuatorPara); - peoEvalFunc plainEval(f); - peoPopEval< Indi > eval(plainEval); - eoUniformGenerator < double >uGen (INIT_POSITION_MIN, INIT_POSITION_MAX); - eoInitFixedLength < Indi > random (VEC_SIZE, uGen); - eoUniformGenerator < double >sGen (INIT_VELOCITY_MIN, INIT_VELOCITY_MAX); - eoVelocityInitFixedLength < Indi > veloRandom (VEC_SIZE, sGen); - eoFirstIsBestInit < Indi > localInit; - eoRealVectorBounds bndsFlight(VEC_SIZE,INIT_POSITION_MIN,INIT_POSITION_MAX); - eoStandardFlight < Indi > flight(bndsFlight); - eoPop < Indi > pop; - pop.append (POP_SIZE, random); - eoLinearTopology topology(NEIGHBORHOOD_SIZE); - eoRealVectorBounds bnds(VEC_SIZE,INIT_VELOCITY_MIN,INIT_VELOCITY_MAX); - eoStandardVelocity < Indi > velocity (topology,omega,C1,C2,bnds); - eoInitializer init(eval,veloRandom,localInit,topology,pop); - -// Island model - - eoPeriodicContinue< Indi > mig_cont( MIG_FREQ ); - peoPSOSelect mig_selec(topology); - peoWorstPositionReplacement mig_replac; - -// Specific implementation (peoData.h) - - eoContinuator cont(mig_cont, pop); - eoSelector > mig_select (mig_selec,1,pop); - eoReplace > mig_replace (mig_replac,pop); - - -// Second - - eoGenContinue < Indi > genContPara2 (MAX_GEN); - eoCombinedContinue continuatorPara2 (genContPara2); - eoCheckPoint checkpoint2(continuatorPara2); - peoEvalFunc plainEval2(f); - peoPopEval< Indi > eval2(plainEval2); - eoUniformGenerator < double >uGen2 (INIT_POSITION_MIN, INIT_POSITION_MAX); - eoInitFixedLength < Indi > random2 (VEC_SIZE, uGen2); - eoUniformGenerator < double >sGen2 (INIT_VELOCITY_MIN, INIT_VELOCITY_MAX); - eoVelocityInitFixedLength < Indi > veloRandom2 (VEC_SIZE, sGen2); - eoFirstIsBestInit < Indi > localInit2; - eoRealVectorBounds bndsFlight2(VEC_SIZE,INIT_POSITION_MIN,INIT_POSITION_MAX); - eoStandardFlight < Indi > flight2(bndsFlight2); - eoPop < Indi > pop2; - pop2.append (POP_SIZE, random2); - eoLinearTopology topology2(NEIGHBORHOOD_SIZE); - eoRealVectorBounds bnds2(VEC_SIZE,INIT_VELOCITY_MIN,INIT_VELOCITY_MAX); - eoStandardVelocity < Indi > velocity2 (topology2,omega,C1,C2,bnds2); - eoInitializer init2(eval2,veloRandom2,localInit2,topology2,pop2); - -// Island model - - eoPeriodicContinue< Indi > mig_cont2( MIG_FREQ ); - peoPSOSelect mig_selec2(topology2); - peoWorstPositionReplacement mig_replac2; - -// Specific implementation (peoData.h) - - eoContinuator cont2(mig_cont2,pop2); - eoSelector > mig_select2 (mig_selec2,1,pop2); - eoReplace > mig_replace2 (mig_replac2,pop2); - - -// Asynchronous island - - peoAsyncIslandMig< eoPop, eoPop > mig(cont,mig_select, mig_replace, topologyMig); - checkpoint.add( mig ); - peoAsyncIslandMig< eoPop, eoPop > mig2(cont2,mig_select2, mig_replace2, topologyMig); - checkpoint2.add( mig2 ); - - -// Parallel algorithm - - eoSyncEasyPSO psa(init,checkpoint,eval, velocity, flight); - peoWrapper parallelPSO( psa, pop); - eval.setOwner(parallelPSO); - mig.setOwner(parallelPSO); - eoSyncEasyPSO psa2(init2,checkpoint2,eval2, velocity2, flight2); - peoWrapper parallelPSO2( psa2, pop2); - eval2.setOwner(parallelPSO2); - mig2.setOwner(parallelPSO2); - peo :: run(); - peo :: finalize(); - if (getNodeRank()==1) - { - pop.sort(); - pop2.sort(); - std::cout << "Final population :\n" << pop << std::endl; - std::cout << "Final population :\n" << pop2 << std::endl; - } -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson3/paradiseo-peo-lsn.doxyfile b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson3/paradiseo-peo-lsn.doxyfile deleted file mode 100644 index 646a2fb7d..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson3/paradiseo-peo-lsn.doxyfile +++ /dev/null @@ -1,242 +0,0 @@ -# Doxyfile 1.4.7 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "ParadisEO-PEO Lesson3" -PROJECT_NUMBER = 0.1 -OUTPUT_DIRECTORY = ../../../doc/html/lesson3 -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = YES -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = NO -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = YES -HIDE_UNDOC_CLASSES = YES -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = YES -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = . -FILE_PATTERNS = *.cpp \ - *.h \ - NEWS \ - README -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = ../../docs/images -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = YES -COLS_IN_ALPHA_INDEX = 3 -IGNORE_PREFIX = peo -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = YES -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = YES -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = YES -USE_PDFLATEX = YES -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = YES -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = ../../../paradiseo-mo/docs/eo.doxytag=../../../../../paradiseo-mo/docs/html \ - ../../../paradiseo-mo/docs/mo.doxytag=../../../../../paradiseo-mo/docs/html \ - ../../docs/paradiseo-peo.doxytag=../../ \ - ../shared/paradiseo-peo-lsn-shared.doxytag=../../lsnshared/html -GENERATE_TAGFILE = ../../docs/paradiseo-peo-lsn.doxytag -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = NO -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1024 -MAX_DOT_GRAPH_DEPTH = 0 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = YES - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson3/param b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson3/param deleted file mode 100644 index 8cffb7601..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson3/param +++ /dev/null @@ -1,27 +0,0 @@ -###### Param ###### ---popSize=20 # -P : Population size ---maxGen=200 # -G : Maximum number of generations ---mutEpsilon=0.01 # -e : epsilon for mutation ---pCross=0.80 # -C : Crossover probability ---pMut=0.30 # -M : Mutation probability ---vecSize=2 # -V : Vector size ---pMin=-2.0 # -N : Init position min ---pMax=2.0 # -X : Init position max ---vMin=-1.0 # -n : Init velocity min ---vMax=1.0 # -x : Init velocity max ---neighSize=6 # -H : Neighborhood size ---weight=1.0 # -w : Weight ---c1=0.5 # -1 : C1 ---c2=2.0 # -2 : C2 ---migFreq=10 # -F : Migration frequency ---migSize=5 # -S : Migration size - -## miscallenous parameters - ---debug=false - -## deployment schema - ---schema=schema.xml - - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson3/schema.xml b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson3/schema.xml deleted file mode 100644 index ba6389de9..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson3/schema.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - 1 - 2 - - - - - - - - - - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson4/CMakeLists.txt b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson4/CMakeLists.txt deleted file mode 100644 index 87f45c1a3..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson4/CMakeLists.txt +++ /dev/null @@ -1,81 +0,0 @@ - -###################################################################################### -### 0) Set the compiler and define targets to easily run the lessons -###################################################################################### - -SET (CMAKE_CXX_COMPILER mpicxx) - -#ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson4/param ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson4/schema.xml) - -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson4/param -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson4) -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson4/schema.xml -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson4) - -EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson4/param - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson4 - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson4/schema.xml - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson4 -) - -###################################################################################### - - -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src ${MOEO_SRC_DIR}/src ${MO_SRC_DIR}/src ${ParadisEO-PEO_SOURCE_DIR}/src ${TSP_SRC_DIR}) - -###################################################################################### - - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${MOEO_BIN_DIR}/lib ${ParadisEO-PEO_BINARY_DIR}/lib ${TSP_BINARY_DIR}/lib) - -###################################################################################### - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -ADD_EXECUTABLE(eals mainEALS.cpp) -ADD_DEPENDENCIES(eals tsp peo rmc_mpi) - -###################################################################################### - - -###################################################################################### -### 4) Optionnal: define properties -###################################################################################### - -SET(LESSON4_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(eals PROPERTIES VERSION "${LESSON4_VERSION}") - -###################################################################################### - - -###################################################################################### -### 5) Link the librairies -###################################################################################### - -TARGET_LINK_LIBRARIES(eals ${XML2_LIBS} tsp peo rmc_mpi eo eoutils peo) - -###################################################################################### diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson4/mainEALS.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson4/mainEALS.cpp deleted file mode 100644 index cae45905f..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson4/mainEALS.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, INRIA, 2008 -* -* Clive Canape -* -* 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 -* -*/ - -#include "param.h" -#include "route_init.h" -#include "route_eval.h" -#include "order_xover.h" -#include "edge_xover.h" -#include "partial_mapped_xover.h" -#include "city_swap.h" -#include "part_route_eval.h" -#include "merge_route_eval.h" -#include "two_opt_init.h" -#include "two_opt_next.h" -#include "two_opt_incr_eval.h" - -#include - -#define POP_SIZE 10 -#define NUM_GEN 100 -#define CROSS_RATE 1.0 -#define MUT_RATE 0.01 - - -int main (int __argc, char * * __argv) -{ - - peo :: init (__argc, __argv); - loadParameters (__argc, __argv); - RouteInit route_init; - RouteEval full_eval; - OrderXover order_cross; - PartialMappedXover pm_cross; - EdgeXover edge_cross; - CitySwap city_swap_mut; - -// Initialization of the local search - TwoOptInit pmx_two_opt_init; - TwoOptNext pmx_two_opt_next; - TwoOptIncrEval pmx_two_opt_incr_eval; - moBestImprSelect pmx_two_opt_move_select; - moHC hc (pmx_two_opt_init, pmx_two_opt_next, pmx_two_opt_incr_eval, pmx_two_opt_move_select, full_eval); - -// EA - eoPop pop (POP_SIZE, route_init); - eoGenContinue cont (NUM_GEN); - eoCheckPoint checkpoint (cont); - eoEvalFuncCounter< Route > eval(full_eval); - eoStochTournamentSelect select_one; - eoSelectNumber select (select_one, POP_SIZE); - eoSGATransform transform (order_cross, CROSS_RATE, city_swap_mut, MUT_RATE); - eoEPReplacement replace (2); - eoEasyEA< Route > eaAlg( checkpoint, eval, select, transform, replace ); - peoWrapper parallelEA( eaAlg, pop); - peo :: run (); - peo :: finalize (); - - if (getNodeRank()==1) - { - pop.sort(); - std :: cout << "\nResult before the local search\n"; - for (unsigned i=0;i initParallelHC (hc); - peoWrapper parallelHC (initParallelHC, pop); - initParallelHC.setOwner(parallelHC); - peo :: run( ); - peo :: finalize( ); - - if (getNodeRank()==1) - { - std :: cout << "\nResult after the local search\n"; - pop.sort(); - for (unsigned i=0;i - - - - - - - - 1 - - - - - - - - - - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson5/CMakeLists.txt b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson5/CMakeLists.txt deleted file mode 100644 index 9c6803ba1..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson5/CMakeLists.txt +++ /dev/null @@ -1,81 +0,0 @@ - -###################################################################################### -### 0) Set the compiler and define targets to easily run the lessons -###################################################################################### - -SET (CMAKE_CXX_COMPILER mpicxx) - -#ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson5/param ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson5/schema.xml) - -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson5/param -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson5) -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson5/schema.xml -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson5) - -EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson5/param - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson5 - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson5/schema.xml - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson5 -) - -###################################################################################### - - -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src ${MOEO_SRC_DIR}/src ${MO_SRC_DIR}/src ${ParadisEO-PEO_SOURCE_DIR}/src) - -###################################################################################### - - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-PEO_BINARY_DIR}/lib) - -###################################################################################### - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -ADD_EXECUTABLE(ea5 main.cpp) -ADD_DEPENDENCIES(ea5 peo rmc_mpi) - -###################################################################################### - - -###################################################################################### -### 4) Optionnal: define properties -###################################################################################### - -SET(Lesson5_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(ea5 PROPERTIES VERSION "${Lesson5_VERSION}") -###################################################################################### - - -###################################################################################### -### 5) Link the librairies -###################################################################################### - -TARGET_LINK_LIBRARIES(ea5 ${XML2_LIBS} peo rmc_mpi eo eoutils peo) - -###################################################################################### - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson5/main.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson5/main.cpp deleted file mode 100644 index 067892c1d..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson5/main.cpp +++ /dev/null @@ -1,313 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, INRIA, 2008 -* -* Clive Canape -* -* 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 -* -*/ - -#include - -#define SIZE 10 -#define DEF_DOMAIN 100 -#define POP_SIZE 100 -#define SELECT_RATE 0.8 -#define NB_GEN 1 -#define XOVER_P 0.75 -#define MUT_P 0.05 -#define MIGRATIONS_AT_N_GENERATIONS 5 -#define NUMBER_OF_MIGRANTS 10 - -struct Representation : public eoVector< eoMinimizingFitness, double > - { - - Representation() - { - resize( SIZE ); - } - }; - -struct Init : public eoInit< Representation > - { - - void operator()( Representation& rep ) - { - - for ( int i = 0; i < SIZE; i++ ) - { - rep[ i ] = (rng.uniform() - 0.5) * DEF_DOMAIN; - } - } - }; - -struct Eval : public eoEvalFunc< Representation > - { - - void operator()( Representation& rep ) - { - - double fitnessValue = 0.0; - for ( int i = 0; i < SIZE; i++ ) - { - - fitnessValue += pow( rep[ i ], 2.0 ); - } - - rep.fitness( fitnessValue ); - } - }; - -struct MutationOp : public eoMonOp< Representation > - { - - bool operator()( Representation& rep ) - { - - unsigned int pos = (unsigned int)( rng.uniform() * SIZE ); - rep[ pos ] = (rng.uniform() - 0.5) * DEF_DOMAIN; - - rep.invalidate(); - - return true; - } - }; - -struct XoverOp : public eoQuadOp< Representation > - { - - bool operator()( Representation& repA, Representation& repB ) - { - - static Representation offA, offB; - double lambda = rng.uniform(); - - for ( int i = 0; i < SIZE; i++ ) - { - - offA[ i ] = lambda * repA[ i ] + ( 1.0 - lambda ) * repB[ i ]; - offB[ i ] = lambda * repB[ i ] + ( 1.0 - lambda ) * repA[ i ]; - } - - repA = offA; - repB = offB; - - repA.invalidate(); - repB.invalidate(); - - return true; - } - }; - - - -void pack( const Representation& rep ) -{ - - if ( rep.invalid() ) ::pack( (unsigned int)0 ); - else - { - ::pack( (unsigned int)1 ); - ::pack( (double)(rep.fitness()) ); - } - - for ( unsigned int index = 0; index < SIZE; index++ ) - { - ::pack( (double)rep[ index ] ); - } -} - -void unpack( Representation& rep ) -{ - - eoScalarFitness > fitness; - unsigned int validFitness; - - unpack( validFitness ); - if ( validFitness ) - { - - double fitnessValue; - ::unpack( fitnessValue ); - rep.fitness( fitnessValue ); - } - else - { - rep.invalidate(); - } - - double value; - for ( unsigned int index = 0; index < SIZE; index++ ) - { - ::unpack( value ); - rep[ index ] = value; - } -} - -int main( int __argc, char** __argv ) -{ - - - rng.reseed( time( NULL ) ); - srand( time( NULL ) ); - - peo::init( __argc, __argv ); - - - eoParser parser ( __argc, __argv ); - - eoValueParam < unsigned int > nbGenerations( NB_GEN, "maxGen"); - parser.processParam ( nbGenerations ); - - eoValueParam < double > selectionRate( SELECT_RATE, "select"); - parser.processParam ( selectionRate ); - - - RingTopology ring,topo; - unsigned int dataA, dataB, dataC; - - dataA = 1; - dataB = 5; - dataC = 10; - - peoSyncDataTransfer dataTransfer( dataA, ring ); - peoSyncDataTransfer dataTransferb( dataB, ring ); - peoSyncDataTransfer dataTransferc( dataC, ring ); - - - Init init; - Eval eval; - eoPop< Representation > pop( POP_SIZE, init ); - MutationOp mut; - XoverOp xover; - eoSGATransform< Representation > transform( xover, XOVER_P, mut, MUT_P ); - eoStochTournamentSelect< Representation > select; - eoSelectMany< Representation > selectN( select, selectionRate.value() ); - eoSSGAStochTournamentReplacement< Representation > replace( 1.0 ); - eoWeakElitistReplacement< Representation > elitReplace( replace ); - eoGenContinue< Representation > cont( nbGenerations.value() ); - eoCheckPoint< Representation > checkpoint( cont ); - eoEasyEA< Representation > algo( checkpoint, eval, selectN, transform, elitReplace ); - - - - //------------------------------------------------------------------------------------------------------------- - // MIGRATION CONTEXT DEFINITION - - eoPeriodicContinue< Representation > mig_conti( MIGRATIONS_AT_N_GENERATIONS ); - eoContinuator mig_cont(mig_conti,pop); - eoRandomSelect mig_select_one; - eoSelector > mig_select (mig_select_one,NUMBER_OF_MIGRANTS,pop); - eoPlusReplacement replace_one; - eoReplace > mig_replace (replace_one,pop); -// peoSyncIslandMig< eoPop< Representation >, eoPop< Representation > > mig(MIGRATIONS_AT_N_GENERATIONS,mig_select,mig_replace,topo); - peoAsyncIslandMig< eoPop< Representation >, eoPop< Representation > > mig(mig_cont,mig_select,mig_replace,topo); - checkpoint.add( mig ); - //------------------------------------------------------------------------------------------------------------- - - eoPop< Representation > pop2( POP_SIZE, init ); - eoSGATransform< Representation > transform2( xover, XOVER_P, mut, MUT_P ); - eoStochTournamentSelect< Representation > select2; - eoSelectMany< Representation > selectN2( select2, selectionRate.value() ); - eoSSGAStochTournamentReplacement< Representation > replace2( 1.0 ); - eoWeakElitistReplacement< Representation > elitReplace2( replace2 ); - eoGenContinue< Representation > cont2( nbGenerations.value() ); - eoCheckPoint< Representation > checkpoint2( cont2 ); - eoEasyEA< Representation > algo2( checkpoint2, eval, selectN2, transform2, elitReplace2 ); - - //------------------------------------------------------------------------------------------------------------- - // MIGRATION CONTEXT DEFINITION - - eoPeriodicContinue< Representation > mig_conti2( MIGRATIONS_AT_N_GENERATIONS ); - eoContinuator mig_cont2(mig_conti2,pop2); - eoRandomSelect mig_select_one2; - eoSelector > mig_select2 (mig_select_one2,NUMBER_OF_MIGRANTS,pop2); - eoPlusReplacement replace_one2; - eoReplace > mig_replace2 (replace_one2,pop2); -// peoSyncIslandMig< eoPop< Representation >, eoPop< Representation > > mig2(MIGRATIONS_AT_N_GENERATIONS,mig_select2,mig_replace2,topo); - peoAsyncIslandMig< eoPop< Representation >, eoPop< Representation > > mig2(mig_cont2,mig_select2,mig_replace2,topo); - checkpoint2.add( mig2 ); - //------------------------------------------------------------------------------------------------------------- - - eoPop< Representation > pop3( POP_SIZE, init ); - eoSGATransform< Representation > transform3( xover, XOVER_P, mut, MUT_P ); - eoStochTournamentSelect< Representation > select3; - eoSelectMany< Representation > selectN3( select3, selectionRate.value() ); - eoSSGAStochTournamentReplacement< Representation > replace3( 1.0 ); - eoWeakElitistReplacement< Representation > elitReplace3( replace3 ); - eoGenContinue< Representation > cont3( nbGenerations.value() ); - eoCheckPoint< Representation > checkpoint3( cont3 ); - eoEasyEA< Representation > algo3( checkpoint3, eval, selectN3, transform3, elitReplace3 ); - - //------------------------------------------------------------------------------------------------------------- - // MIGRATION CONTEXT DEFINITION - - eoPeriodicContinue< Representation > mig_conti3( MIGRATIONS_AT_N_GENERATIONS ); - eoContinuator mig_cont3(mig_conti3,pop3); - eoRandomSelect mig_select_one3; - eoSelector > mig_select3 (mig_select_one3,NUMBER_OF_MIGRANTS,pop3); - eoPlusReplacement replace_one3; - eoReplace > mig_replace3 (replace_one3,pop3); -// peoSyncIslandMig< eoPop< Representation >, eoPop< Representation > > mig3(MIGRATIONS_AT_N_GENERATIONS,mig_select3,mig_replace3,topo); - peoAsyncIslandMig< eoPop< Representation >, eoPop< Representation > > mig3(mig_cont3,mig_select3,mig_replace3,topo); - - checkpoint3.add( mig3 ); - //------------------------------------------------------------------------------------------------------------- - - peoWrapper algoPar( algo, pop ); - mig.setOwner( algoPar ); - checkpoint.add( dataTransfer ); - dataTransfer.setOwner( algoPar ); - - - peoWrapper algoPar2( algo2, pop2 ); - mig2.setOwner( algoPar2 ); - checkpoint2.add( dataTransferb ); - dataTransferb.setOwner( algoPar2 ); - - - peoWrapper algoPar3( algo3, pop3 ); - mig3.setOwner( algoPar3 ); - checkpoint3.add( dataTransferc ); - dataTransferc.setOwner( algoPar3 ); - - peo::run(); - peo::finalize(); - - if ( getNodeRank() == 1 ) - std::cout << "A: " << dataA << std::endl; - if ( getNodeRank() == 2 ) - std::cout << "B: " << dataB << std::endl; - if ( getNodeRank() == 3 ) - std::cout << "C: " << dataC << std::endl; - - - return 0; -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson5/param b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson5/param deleted file mode 100644 index 1147e2938..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson5/param +++ /dev/null @@ -1,13 +0,0 @@ -###### Param ###### ---maxGen=1 ---select=0.8 - -## miscallenous parameters - ---debug=false - -## deployment schema - ---schema=schema.xml - - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson5/schema.xml b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson5/schema.xml deleted file mode 100644 index 3c37a46c3..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson5/schema.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - 1 - - - - - - 2 - - - 3 - - - - - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson6/CMakeLists.txt b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson6/CMakeLists.txt deleted file mode 100644 index bc7e8cff0..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson6/CMakeLists.txt +++ /dev/null @@ -1,81 +0,0 @@ - -###################################################################################### -### 0) Set the compiler and define targets to easily run the lessons -###################################################################################### - -SET (CMAKE_CXX_COMPILER mpicxx) - -#ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson6/param ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson6/schema.xml) - -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson6/param -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson6) -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson6/schema.xml -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson6) - -EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson6/param - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson6 - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson6/schema.xml - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson6 -) - -###################################################################################### - - -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src ${MOEO_SRC_DIR}/src ${MO_SRC_DIR}/src ${ParadisEO-PEO_SOURCE_DIR}/src ${TSP_SRC_DIR}) - -###################################################################################### - - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-PEO_BINARY_DIR}/lib ${TSP_BINARY_DIR}/lib) - -###################################################################################### - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -ADD_EXECUTABLE(ea6 main.cpp) -ADD_DEPENDENCIES(ea6 peo rmc_mpi) - -###################################################################################### - - -###################################################################################### -### 4) Optionnal: define properties -###################################################################################### - -SET(Lesson6_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(ea6 PROPERTIES VERSION "${Lesson6_VERSION}") -###################################################################################### - - -###################################################################################### -### 5) Link the librairies -###################################################################################### - -TARGET_LINK_LIBRARIES(ea6 ${XML2_LIBS} tsp peo rmc_mpi eo eoutils peo) - -###################################################################################### - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson6/main.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson6/main.cpp deleted file mode 100644 index ca2033364..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson6/main.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, INRIA, 2008 -* -* Clive Canape -* -* 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 -* -*/ - -#include - -#include "route.h" -#include "route_init.h" -#include "route_eval.h" -#include "order_xover.h" -#include "city_swap.h" -#include "param.h" - - - -#define POP_SIZE 10 -#define NUM_GEN 100 -#define CROSS_RATE 1.0 -#define MUT_RATE 0.01 - - -struct CoSearch - { - - CoSearch( - eoPop< Route >& A, eoPop< Route >& B, - peoAsyncDataTransfer& asyncTransferA, peoAsyncDataTransfer& asyncTransferB - ) - : transferA( A ), transferB( B ), - asyncDataTransferA( asyncTransferA ), asyncDataTransferB( asyncTransferB ) - { - } - - void operator()() - { - - for ( unsigned int index = 0; index < 100; index++ ) - { - - asyncDataTransferA(); - asyncDataTransferB(); - - eoPop< Route > intermed; - intermed = transferA; - transferA = transferB; - transferB = intermed; - } - } - - eoPop< Route >& transferA; - eoPop< Route >& transferB; - - peoAsyncDataTransfer& asyncDataTransferA; - peoAsyncDataTransfer& asyncDataTransferB; - }; - - -struct PushBackAggregation - { - - void operator()( eoPop< Route >& A, eoPop< Route >& B ) - { - - for ( unsigned int index = 0; index < B.size(); index++ ) - { - - A.push_back( B[ index ] ); - } - } - }; - -int main( int __argc, char** __argv ) -{ - - peo :: init( __argc, __argv ); - - loadParameters( __argc, __argv ); - - RouteInit route_init; - RouteEval full_eval; - OrderXover crossover; - CitySwap mutation; - eoPop< Route > population( POP_SIZE, route_init ); - eoGenContinue< Route > eaCont( NUM_GEN ); - eoCheckPoint< Route > eaCheckpointContinue( eaCont ); - eoRankingSelect< Route > selectionStrategy; - eoSelectNumber< Route > eaSelect( selectionStrategy, POP_SIZE ); - eoSGATransform< Route > transformA( crossover, CROSS_RATE, mutation, MUT_RATE ); - eoPlusReplacement< Route > eaReplace; - RingTopology ring; - eoPlusReplacement< Route > transferReplace; - peoAsyncDataTransfer asyncEAEndPoint( population, population, ring, transferReplace ); - eaCheckpointContinue.add( asyncEAEndPoint ); - eoEasyEA< Route > eaAlg( eaCheckpointContinue, full_eval, eaSelect, transformA, eaReplace ); - peoWrapper paraEAAlg( eaAlg, population ); - asyncEAEndPoint.setOwner( paraEAAlg ); - - eoPop< Route > populationB( POP_SIZE, route_init ); - eoGenContinue< Route > eaContB( NUM_GEN ); - eoCheckPoint< Route > eaCheckpointContinueB( eaContB ); - eoRankingSelect< Route > selectionStrategyB; - eoSelectNumber< Route > eaSelectB( selectionStrategyB, POP_SIZE ); - RingTopology ringB; - eoPlusReplacement< Route > transferReplaceB; - peoAsyncDataTransfer asyncEAEndPointB( populationB, populationB, ringB, transferReplaceB ); - eaCheckpointContinueB.add( asyncEAEndPointB ); - eoSGATransform< Route > transformB ( crossover, CROSS_RATE, mutation, MUT_RATE ); - eoEasyEA< Route > eaAlgB( eaCheckpointContinueB, full_eval, eaSelectB, transformB, eaReplace ); - peoWrapper paraEAAlgB( eaAlgB, populationB ); - asyncEAEndPointB.setOwner( paraEAAlgB ); - - - eoPop< Route > A, B; - PushBackAggregation pushBackA, pushBackB; - - peoAsyncDataTransfer coSearchEndPointA( A, A, ring, pushBackA ); - peoAsyncDataTransfer coSearchEndPointB( B, B, ringB, pushBackB ); - - CoSearch coSearch( A, B, coSearchEndPointA, coSearchEndPointB ); - peoWrapper paraCoSearch( coSearch ); - coSearchEndPointA.setOwner( paraCoSearch ); - coSearchEndPointB.setOwner( paraCoSearch ); - - - - peo::run(); - peo::finalize(); - - return 0; -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson6/param b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson6/param deleted file mode 100644 index 7d4b4f519..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson6/param +++ /dev/null @@ -1,15 +0,0 @@ -###### Param ###### ---maxGen=1 ---select=0.8 - -## miscallenous parameters - ---debug=false - -## deployment schema - ---schema=schema.xml - -## parameters - ---inst=../examples/tsp/benchs/eil101.tsp diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson6/schema.xml b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson6/schema.xml deleted file mode 100644 index 66ec6eecd..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/Lesson6/schema.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - 1 - - - 2 - - - 3 - - - - - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/CMakeLists.txt b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/CMakeLists.txt deleted file mode 100644 index 8fb873244..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ - - -####################################################################################### -### 1) Where must cmake go now ? -###################################################################################### - -ADD_SUBDIRECTORY(tsp) - -###################################################################################### - - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/CMakeLists.txt b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/CMakeLists.txt deleted file mode 100644 index 1a6c2184e..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/CMakeLists.txt +++ /dev/null @@ -1,98 +0,0 @@ - -###################################################################################### -### 0) Copy the "benchs" directory in the build directory to easily run the lessons -###################################################################################### - -#ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-PEO_SOURCE_DIR}/tutorial/examples/tsp/benchs) -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_directory -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/examples/tsp/benchs -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/examples/tsp/benchs) - - - SET(BENCH_LIST - eil101.opt.tour - eil101.tsp - eil101.tsp.hc - ) - - FOREACH (bench ${BENCH_LIST}) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/examples/tsp/benchs/${bench} - ${ParadisEO-PEO_BINARY_DIR}/tutorial/examples/tsp/benchs/${bench} - ) - ENDFOREACH (bench) - - -###################################################################################### - - -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${MO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${ParadisEO-PEO_SOURCE_DIR}/src) - -###################################################################################### - - -###################################################################################### -### 2) Define your target(s): just the tsp lib here -###################################################################################### - -SET(TSP_LIB_OUTPUT_PATH ${TSP_BINARY_DIR}/lib) -SET(LIBRARY_OUTPUT_PATH ${TSP_LIB_OUTPUT_PATH}) - -SET (TSP_SOURCES data.h - data.cpp - opt_route.h - opt_route.cpp - param.h - param.cpp - node.h - node.cpp - route.h - route.cpp - route_init.h - route_init.cpp - route_eval.h - route_eval.cpp - two_opt.h - two_opt.cpp - two_opt_init.h - two_opt_init.cpp - two_opt_incr_eval.h - two_opt_incr_eval.cpp - two_opt_next.h - two_opt_next.cpp - order_xover.h - order_xover.cpp - partial_mapped_xover.h - partial_mapped_xover.cpp - edge_xover.h - edge_xover.cpp - city_swap.h - city_swap.cpp - part_route_eval.h - part_route_eval.cpp - merge_route_eval.h - merge_route_eval.cpp) - -ADD_LIBRARY(tsp STATIC ${TSP_SOURCES}) -###################################################################################### - - -###################################################################################### -### 3) Optionnal: define your lib's version -###################################################################################### - -SET(TSP_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(tsp PROPERTIES VERSION "${TSP_VERSION}") -###################################################################################### - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/benchs/eil101.opt.tour b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/benchs/eil101.opt.tour deleted file mode 100644 index 1d3fece5a..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/benchs/eil101.opt.tour +++ /dev/null @@ -1,108 +0,0 @@ -NAME : eil101.opt.tour -COMMENT : Optimum tour for eil101.tsp (Length 629) -TYPE : TOUR -DIMENSION : 101 -TOUR_SECTION -1 -69 -27 -101 -53 -28 -26 -12 -80 -68 -29 -24 -54 -55 -25 -4 -39 -67 -23 -56 -75 -41 -22 -74 -72 -73 -21 -40 -58 -13 -94 -95 -97 -87 -2 -57 -15 -43 -42 -14 -44 -38 -86 -16 -61 -85 -91 -100 -98 -37 -92 -59 -93 -99 -96 -6 -89 -52 -18 -83 -60 -5 -84 -17 -45 -8 -46 -47 -36 -49 -64 -63 -90 -32 -10 -62 -11 -19 -48 -82 -7 -88 -31 -70 -30 -20 -66 -71 -65 -35 -34 -78 -81 -9 -51 -33 -79 -3 -77 -76 -50 --1 -EOF diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/benchs/eil101.tsp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/benchs/eil101.tsp deleted file mode 100644 index 9672f849e..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/benchs/eil101.tsp +++ /dev/null @@ -1,108 +0,0 @@ -NAME : eil101 -COMMENT : 101-city problem (Christofides/Eilon) -TYPE : TSP -DIMENSION : 101 -EDGE_WEIGHT_TYPE : EUC_2D -NODE_COORD_SECTION -1 41 49 -2 35 17 -3 55 45 -4 55 20 -5 15 30 -6 25 30 -7 20 50 -8 10 43 -9 55 60 -10 30 60 -11 20 65 -12 50 35 -13 30 25 -14 15 10 -15 30 5 -16 10 20 -17 5 30 -18 20 40 -19 15 60 -20 45 65 -21 45 20 -22 45 10 -23 55 5 -24 65 35 -25 65 20 -26 45 30 -27 35 40 -28 41 37 -29 64 42 -30 40 60 -31 31 52 -32 35 69 -33 53 52 -34 65 55 -35 63 65 -36 2 60 -37 20 20 -38 5 5 -39 60 12 -40 40 25 -41 42 7 -42 24 12 -43 23 3 -44 11 14 -45 6 38 -46 2 48 -47 8 56 -48 13 52 -49 6 68 -50 47 47 -51 49 58 -52 27 43 -53 37 31 -54 57 29 -55 63 23 -56 53 12 -57 32 12 -58 36 26 -59 21 24 -60 17 34 -61 12 24 -62 24 58 -63 27 69 -64 15 77 -65 62 77 -66 49 73 -67 67 5 -68 56 39 -69 37 47 -70 37 56 -71 57 68 -72 47 16 -73 44 17 -74 46 13 -75 49 11 -76 49 42 -77 53 43 -78 61 52 -79 57 48 -80 56 37 -81 55 54 -82 15 47 -83 14 37 -84 11 31 -85 16 22 -86 4 18 -87 28 18 -88 26 52 -89 26 35 -90 31 67 -91 15 19 -92 22 22 -93 18 24 -94 26 27 -95 25 24 -96 22 27 -97 25 21 -98 19 21 -99 20 26 -100 18 18 -101 35 35 -EOF diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/benchs/eil101.tsp.hc b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/benchs/eil101.tsp.hc deleted file mode 100644 index f12903349..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/benchs/eil101.tsp.hc +++ /dev/null @@ -1,102 +0,0 @@ -101 -41 49 -35 17 -55 45 -55 20 -15 30 -25 30 -20 50 -10 43 -55 60 -30 60 -20 65 -50 35 -30 25 -15 10 -30 5 -10 20 -5 30 -20 40 -15 60 -45 65 -45 20 -45 10 -55 5 -65 35 -65 20 -45 30 -35 40 -41 37 -64 42 -40 60 -31 52 -35 69 -53 52 -65 55 -63 65 -2 60 -20 20 -5 5 -60 12 -40 25 -42 7 -24 12 -23 3 -11 14 -6 38 -2 48 -8 56 -13 52 -6 68 -47 47 -49 58 -27 43 -37 31 -57 29 -63 23 -53 12 -32 12 -36 26 -21 24 -17 34 -12 24 -24 58 -27 69 -15 77 -62 77 -49 73 -67 5 -56 39 -37 47 -37 56 -57 68 -47 16 -44 17 -46 13 -49 11 -49 42 -53 43 -61 52 -57 48 -56 37 -55 54 -15 47 -14 37 -11 31 -16 22 -4 18 -28 18 -26 52 -26 35 -31 67 -15 19 -22 22 -18 24 -26 27 -25 24 -22 27 -25 21 -19 21 -20 26 -18 18 -35 35 diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/city_swap.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/city_swap.cpp deleted file mode 100644 index a9da49f6c..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/city_swap.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include - -#include "city_swap.h" - -bool CitySwap :: operator () (Route & __route) -{ - - std :: swap (__route [rng.random (__route.size ())], - __route [rng.random (__route.size ())]) ; - - __route.invalidate () ; - - return true ; -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/city_swap.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/city_swap.h deleted file mode 100644 index 91770db04..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/city_swap.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 city_swap_h -#define city_swap_h - -#include - -#include "route.h" - -/** Its swaps two vertices - randomly choosen */ -class CitySwap : public eoMonOp - { - - public : - - bool operator () (Route & __route) ; - - } ; - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/data.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/data.cpp deleted file mode 100644 index fc7223342..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/data.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include -#include -#include -#include - -#include - -#include "data.h" -#include "node.h" - -#define MAX_TRASH_LENGTH 1000 -#define MAX_FIELD_LENGTH 1000 -#define MAX_LINE_LENGTH 1000 - -static void getNextField (FILE * __f, char * __buff) -{ - - char trash [MAX_TRASH_LENGTH]; - - fscanf (__f, "%[ \t:\n]", trash); /* Discarding sep. */ - fscanf (__f, "%[^:\n]", __buff); /* Reading the field */ - fgetc (__f); -} - -static void getLine (FILE * __f, char * __buff) -{ - - char trash [MAX_TRASH_LENGTH]; - - fscanf (__f, "%[ \t:\n]", trash); /* Discarding sep. */ - fscanf (__f, "%[^\n]", __buff); /* Reading the line */ -} - -void loadData (const char * __filename) -{ - - FILE * f = fopen (__filename, "r"); - - if (f) - { - - printf ("Loading '%s'.\n", __filename); - - char field [MAX_FIELD_LENGTH]; - - getNextField (f, field); /* Name */ - assert (strstr (field, "NAME")); - getNextField (f, field); - printf ("NAME: %s.\n", field); - - getNextField (f, field); /* Comment */ - assert (strstr (field, "COMMENT")); - getLine (f, field); - printf ("COMMENT: %s.\n", field); - - getNextField (f, field); /* Type */ - assert (strstr (field, "TYPE")); - getNextField (f, field); - printf ("TYPE: %s.\n", field); - - getNextField (f, field); /* Dimension */ - assert (strstr (field, "DIMENSION")); - getNextField (f, field); - printf ("DIMENSION: %s.\n", field); - numNodes = atoi (field); - - getNextField (f, field); /* Edge weight type */ - assert (strstr (field, "EDGE_WEIGHT_TYPE")); - getNextField (f, field); - printf ("EDGE_WEIGHT_TYPE: %s.\n", field); - - getNextField (f, field); /* Node coord section */ - assert (strstr (field, "NODE_COORD_SECTION")); - loadNodes (f); - - getNextField (f, field); /* End of file */ - assert (strstr (field, "EOF")); - printf ("EOF.\n"); - } - else - { - - fprintf (stderr, "Can't open '%s'.\n", __filename); - exit (1); - } -} - -void loadData (eoParser & __parser) -{ - - /* Getting the path of the instance */ - - eoValueParam param ("", "inst", "Path of the instance") ; - __parser.processParam (param) ; - loadData (param.value ().c_str ()); -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/data.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/data.h deleted file mode 100644 index 4f501e463..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/data.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 __data_h -#define __data_h - -#include - -extern void loadData (const char * __filename); - -extern void loadData (eoParser & __parser); - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/display.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/display.cpp deleted file mode 100644 index 905ccbbe0..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/display.cpp +++ /dev/null @@ -1,149 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include -#include - -#include - -#include "display.h" -#include "node.h" -#include "opt_route.h" - -#define BORDER 20 -#define RATIO 0.5 - -#define screen_width 1024 -#define screen_height 768 - -static const char * filename; - -/* Computed coordinates */ -static unsigned * X_new_coord, * Y_new_coord ; - -/* this variable will contain the handle to the returned graphics context. */ -static GC gc; - -/* this variable will contain the pointer to the Display structure */ -static Display* disp; - -/* this variable will store the ID of the newly created window. */ -static Window win; - -static int screen; - -/* Create a new backing pixmap of the appropriate size */ - -/* Best tour */ -/* -gdk_gc_set_line_attributes (gc, 2, GDK_LINE_ON_OFF_DASH, GDK_CAP_NOT_LAST, GDK_JOIN_MITER) ; - -gdk_gc_set_foreground (gc, & color_green) ; - -for (int i = 0 ; i < (int) numNodes ; i ++) { - - gdk_draw_line (pixmap, gc, - X_new_coord [opt_route [i]], - Y_new_coord [opt_route [i]], - X_new_coord [opt_route [(i + 1) % numNodes]], - Y_new_coord [opt_route [(i + 1) % numNodes]]); - - }*/ - -void openMainWindow (const char * __filename) -{ - - filename = __filename; - - /* Map */ - int map_width = (int) (X_max - X_min); - int map_height = (int) (Y_max - Y_min); - int map_side = std :: max (map_width, map_height); - - /* Calculate the window's width and height. */ - int win_width = (int) (screen_width * RATIO * map_width / map_side); - int win_height = (int) (screen_height * RATIO * map_height / map_side); - - /* Computing the coordinates */ - X_new_coord = new unsigned [numNodes]; - Y_new_coord = new unsigned [numNodes]; - - for (unsigned i = 0; i < numNodes; i ++) - { - X_new_coord [i] = (unsigned) (win_width * (1.0 - (X_coord [i] - X_min) / map_width) + BORDER); - Y_new_coord [i] = (unsigned) (win_height * (1.0 - (Y_coord [i] - Y_min) / map_height) + BORDER); - } - - /* Initialisation */ - XGCValues val ; - - disp = XOpenDisplay (NULL) ; - screen = DefaultScreen (disp) ; - win = XCreateSimpleWindow (disp, RootWindow (disp, screen), 0, 0, win_width + 2 * BORDER, win_height + 2 * BORDER, 2, BlackPixel (disp, screen), WhitePixel (disp, screen)) ; - val.foreground = BlackPixel(disp, screen) ; - val.background = WhitePixel(disp, screen) ; - gc = XCreateGC (disp, win, GCForeground | GCBackground, & val) ; - - XMapWindow (disp, win) ; - XFlush (disp) ; - - while (true) - { - XClearWindow (disp, win) ; - - /* Vertices as circles */ - for (unsigned i = 1 ; i < numNodes ; i ++) - XDrawArc (disp, win, gc, X_new_coord [i] - 1, Y_new_coord [i] - 1, 3, 3, 0, 364 * 64) ; - - /* New tour */ - std :: ifstream f (filename); - if (f) - { - Route route; - f >> route; - f.close (); - - for (int i = 0; i < (int) numNodes; i ++) - XDrawLine (disp, win, gc, - X_new_coord [route [i]], - Y_new_coord [route [i]], - X_new_coord [route [(i + 1) % numNodes]], - Y_new_coord [route [(i + 1) % numNodes]]); - } - XFlush (disp) ; - sleep (1) ; - } -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/display.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/display.h deleted file mode 100644 index 6bc271746..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/display.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 __display_h -#define __display_h - -#include "route.h" - -extern void openMainWindow (const char * __filename); - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/display_best_route.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/display_best_route.cpp deleted file mode 100644 index cb2f0afdb..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/display_best_route.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include "display_best_route.h" -#include "display.h" - -DisplayBestRoute :: DisplayBestRoute (eoPop & __pop - ) : pop (__pop) -{ -} - -void DisplayBestRoute :: operator () () -{ - - displayRoute (pop.best_element ()); -} - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/display_best_route.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/display_best_route.h deleted file mode 100644 index 745a50222..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/display_best_route.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 __display_best_route_h -#define __display_best_route_h - -#include - -#include - -#include "route.h" - -class DisplayBestRoute : public eoUpdater - { - - public : - - DisplayBestRoute (eoPop & __pop); - - void operator () (); - - private : - - eoPop & pop; - - }; - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/edge_xover.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/edge_xover.cpp deleted file mode 100644 index fa5a17f9e..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/edge_xover.cpp +++ /dev/null @@ -1,156 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include -#include - -#include - -#include "edge_xover.h" - -void EdgeXover :: build_map (const Route & __par1, const Route & __par2) -{ - - unsigned len = __par1.size () ; - - /* Initialization */ - _map.clear () ; - _map.resize (len) ; - - for (unsigned i = 0 ; i < len ; i ++) - { - _map [__par1 [i]].insert (__par1 [(i + 1) % len]) ; - _map [__par2 [i]].insert (__par2 [(i + 1) % len]) ; - _map [__par1 [i]].insert (__par1 [(i - 1 + len) % len]) ; - _map [__par2 [i]].insert (__par2 [(i - 1 + len) % len]) ; - } - - visited.clear () ; - visited.resize (len, false) ; -} - -void EdgeXover :: remove_entry (unsigned __vertex, std :: vector > & __map) -{ - - std :: set & neigh = __map [__vertex] ; - - for (std :: set :: iterator it = neigh.begin () ; - it != neigh.end () ; - it ++) - __map [* it].erase (__vertex) ; - -} - -void EdgeXover :: add_vertex (unsigned __vertex, Route & __child) -{ - - visited [__vertex] = true ; - __child.push_back (__vertex) ; - remove_entry (__vertex, _map) ; /* Removing entries */ -} - -void EdgeXover :: cross (const Route & __par1, const Route & __par2, Route & __child) -{ - - build_map (__par1, __par2) ; - - unsigned len = __par1.size () ; - - /* Go ! */ - __child.clear () ; - - unsigned cur_vertex = rng.random (len) ; - - add_vertex (cur_vertex, __child) ; - - for (unsigned i = 1 ; i < len ; i ++) - { - - unsigned len_min_entry = MAXINT ; - - std :: set & neigh = _map [cur_vertex] ; - - for (std :: set :: iterator it = neigh.begin () ; - it != neigh.end () ; - it ++) - { - unsigned l = _map [* it].size () ; - if (len_min_entry > l) - len_min_entry = l ; - } - - std :: vector cand ; /* Candidates */ - - for (std :: set :: iterator it = neigh.begin () ; - it != neigh.end () ; - it ++) - { - unsigned l = _map [* it].size () ; - if (len_min_entry == l) - cand.push_back (* it) ; - } - - if (! cand.size ()) - { - - /* Oh no ! Implicit mutation */ - for (unsigned j = 0 ; j < len ; j ++) - if (! visited [j]) - cand.push_back (j) ; - } - - cur_vertex = cand [rng.random (cand.size ())] ; - - add_vertex (cur_vertex, __child) ; - } -} - -bool EdgeXover :: operator () (Route & __route1, Route & __route2) -{ - - // Init. copy - Route par [2] ; - par [0] = __route1 ; - par [1] = __route2 ; - - cross (par [0], par [1], __route1) ; - cross (par [1], par [0], __route2) ; - - __route1.invalidate () ; - __route2.invalidate () ; - - return true ; -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/edge_xover.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/edge_xover.h deleted file mode 100644 index c9249512c..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/edge_xover.h +++ /dev/null @@ -1,72 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 edge_xover_h -#define edge_xover_h - -#include -#include - -#include - -#include "route.h" - -/** Edge Crossover */ -class EdgeXover : public eoQuadOp - { - - public : - - bool operator () (Route & __route1, Route & __route2) ; - - private : - - void cross (const Route & __par1, const Route & __par2, Route & __child) ; /* Binary */ - - void remove_entry (unsigned __vertex, std :: vector > & __map) ; - /* Updating the map of entries */ - - void build_map (const Route & __par1, const Route & __par2) ; - - void add_vertex (unsigned __vertex, Route & __child) ; - - std :: vector > _map ; /* The handled map */ - - std :: vector visited ; /* Vertices that are already visited */ - - } ; - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/merge_route_eval.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/merge_route_eval.cpp deleted file mode 100644 index 5f67b5b3a..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/merge_route_eval.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include "merge_route_eval.h" - -void MergeRouteEval :: operator () (Route & __route, const int & __part_fit) -{ - - int len = __route.fitness (); - len += __part_fit; - __route.fitness (len); -} - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/merge_route_eval.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/merge_route_eval.h deleted file mode 100644 index 40dd1a5a7..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/merge_route_eval.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 __merge_route_eval_h -#define __merge_route_eval_h - -#include - -#include "route.h" - -class MergeRouteEval : public peoAggEvalFunc - { - - public : - - void operator () (Route & __route, const int & __part_fit) ; - - }; - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/mix.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/mix.h deleted file mode 100644 index 11942f5cc..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/mix.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 __mix_h -#define __mix_h - -#include - -#include - -template void mix (std :: vector & __v) -{ - - unsigned len = __v.size () ; - - for (unsigned i = 0 ; i < len ; i ++) - std :: swap (__v [i], __v [rng.random (len)]) ; -} - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/node.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/node.cpp deleted file mode 100644 index a3a668d70..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/node.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include -#include - -#include "node.h" - -unsigned numNodes; /* Number of nodes */ - -//static unsigned * * dist; /* Square matrix of distances */ - -double * X_coord, * Y_coord; - -double X_min = MAXDOUBLE, X_max = MINDOUBLE, Y_min = MAXDOUBLE, Y_max = MINDOUBLE; - -void loadNodes (FILE * __f) -{ - - /* Coord */ - - X_coord = new double [numNodes]; - - Y_coord = new double [numNodes]; - - unsigned num; - - for (unsigned i = 0; i < numNodes; i ++) - { - - fscanf (__f, "%u%lf%lf", & num, X_coord + i, Y_coord + i); - - if (X_coord [i] < X_min) - X_min = X_coord [i]; - if (X_coord [i] > X_max) - X_max = X_coord [i]; - if (Y_coord [i] < Y_min) - Y_min = Y_coord [i]; - if (Y_coord [i] > Y_max) - Y_max = Y_coord [i]; - } - - /* Allocation */ - /* - dist = new unsigned * [numNodes]; - - for (unsigned i = 0; i < numNodes; i ++) - dist [i] = new unsigned [numNodes]; - */ - /* Computation of the distances */ - - /* - for (unsigned i = 0; i < numNodes; i ++) { - - dist [i] [i] = 0; - - for (unsigned j = 0; j < numNodes; j ++) { - - double dx = X_coord [i] - X_coord [j], dy = Y_coord [i] - Y_coord [j]; - - dist [i] [j] = dist [j] [i] = (unsigned) (sqrt (dx * dx + dy * dy) + 0.5) ; - } - }*/ -} - -unsigned distance (Node __from, Node __to) -{ - - // return dist [__from] [__to]; - - double dx = X_coord [__from] - X_coord [__to], dy = Y_coord [__from] - Y_coord [__to]; - - return (unsigned) (sqrt (dx * dx + dy * dy) + 0.5) ; -} - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/node.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/node.h deleted file mode 100644 index 6200d1da8..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/node.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 __node_h -#define __node_h - -#include - -typedef unsigned Node; - -extern double X_min, X_max, Y_min, Y_max; - -extern double * X_coord, * Y_coord; - -extern unsigned numNodes; /* Number of nodes */ - -extern void loadNodes (FILE * __f); - -extern unsigned distance (Node __from, Node __to); - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/opt_route.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/opt_route.cpp deleted file mode 100644 index 0867869b4..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/opt_route.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include "opt_route.h" - -#define MAX_TRASH_LENGTH 1000 -#define MAX_FIELD_LENGTH 1000 -#define MAX_LINE_LENGTH 1000 - -static void getNextField (FILE * __f, char * __buff) -{ - - char trash [MAX_TRASH_LENGTH]; - - fscanf (__f, "%[ \t:\n]", trash); /* Discarding sep. */ - fscanf (__f, "%[^:\n]", __buff); /* Reading the field */ - fgetc (__f); -} - -static void getLine (FILE * __f, char * __buff) -{ - - char trash [MAX_TRASH_LENGTH]; - - fscanf (__f, "%[ \t:\n]", trash); /* Discarding sep. */ - fscanf (__f, "%[^\n]", __buff); /* Reading the line */ -} - -static void loadBestRoute (FILE * __f) -{ - - opt_route.clear (); - - for (unsigned i = 0; i < numNodes; i ++) - { - Node node; - fscanf (__f, "%u", & node); - opt_route.push_back (node - 1); - } - int d; /* -1 ! */ - fscanf (__f, "%d", & d); -} - -void loadOptimumRoute (const char * __filename) -{ - - FILE * f = fopen (__filename, "r"); - - if (f) - { - - printf ("Loading '%s'.\n", __filename); - - char field [MAX_FIELD_LENGTH]; - - getNextField (f, field); /* Name */ - assert (strstr (field, "NAME")); - getNextField (f, field); - //printf ("NAME: %s.\n", field); - - getNextField (f, field); /* Comment */ - assert (strstr (field, "COMMENT")); - getLine (f, field); - // printf ("COMMENT: %s.\n", field); - - getNextField (f, field); /* Type */ - assert (strstr (field, "TYPE")); - getNextField (f, field); - //printf ("TYPE: %s.\n", field); - - getNextField (f, field); /* Dimension */ - assert (strstr (field, "DIMENSION")); - getNextField (f, field); - // printf ("DIMENSION: %s.\n", field); - numNodes = atoi (field); - - getNextField (f, field); /* Tour section */ - assert (strstr (field, "TOUR_SECTION")); - loadBestRoute (f); - - getNextField (f, field); /* End of file */ - assert (strstr (field, "EOF")); - //printf ("EOF.\n"); - - printf ("The length of the best route is %u.\n", length (opt_route)); - } - else - { - - fprintf (stderr, "Can't open '%s'.\n", __filename); - exit (1); - } -} - -void loadOptimumRoute (eoParser & __parser) -{ - - /* Getting the path of the instance */ - - eoValueParam param ("", "optimumTour", "Optimum tour") ; - __parser.processParam (param) ; - if (strlen (param.value ().c_str ())) - loadOptimumRoute (param.value ().c_str ()); - else - opt_route.fitness (0); -} - -Route opt_route; /* Optimum route */ - - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/opt_route.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/opt_route.h deleted file mode 100644 index 3179756dc..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/opt_route.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 __opt_route_h -#define __opt_route_h - -#include -#include -#include -#include - -#include "route.h" - -extern void loadOptimumRoute (const char * __filename); - -extern void loadOptimumRoute (eoParser & __parser); - -extern Route opt_route; /* Optimum route */ - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/order_xover.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/order_xover.cpp deleted file mode 100644 index 0602ccaf9..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/order_xover.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include - -#include - -#include "order_xover.h" - -void OrderXover :: cross (const Route & __par1, const Route & __par2, Route & __child) -{ - - unsigned cut2 = 1 + rng.random (numNodes) ; - unsigned cut1 = rng.random (cut2); - unsigned l = 0; - - /* To store vertices that have already been crossed */ - std :: vector v (numNodes, false); - - /* Copy of the left partial route of the first parent */ - for (unsigned i = cut1 ; i < cut2 ; i ++) - { - __child [l ++] = __par1 [i] ; - v [__par1 [i]] = true ; - } - - /* Searching the vertex of the second path, that ended the previous first one */ - unsigned from = 0 ; - for (unsigned i = 0; i < numNodes; i ++) - if (__par2 [i] == __child [cut2 - 1]) - { - from = i ; - break ; - } - - /* Selecting a direction (Left or Right) */ - char direct = rng.flip () ? 1 : -1 ; - - for (unsigned i = 0; i < numNodes + 1; i ++) - { - unsigned bidule = (direct * i + from + numNodes) % numNodes; - if (! v [__par2 [bidule]]) - { - __child [l ++] = __par2 [bidule] ; - v [__par2 [bidule]] = true ; - } - } -} - -bool OrderXover :: operator () (Route & __route1, Route & __route2) -{ - - // Init. copy - Route par [2] ; - par [0] = __route1 ; - par [1] = __route2 ; - - cross (par [0], par [1], __route1) ; - cross (par [1], par [0], __route2) ; - - __route1.invalidate () ; - __route2.invalidate () ; - - return true ; -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/order_xover.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/order_xover.h deleted file mode 100644 index 17f66eaf1..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/order_xover.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 order_xover_h -#define order_xover_h - -#include - -#include "route.h" - -/** Order Crossover */ -class OrderXover : public eoQuadOp - { - - public : - - bool operator () (Route & __route1, Route & __route2) ; - - private : - - void cross (const Route & __par1, const Route & __par2, Route & __child) ; - } ; - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/paradiseo-peo-lsn-shared.doxyfile b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/paradiseo-peo-lsn-shared.doxyfile deleted file mode 100644 index 5acf7de0b..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/paradiseo-peo-lsn-shared.doxyfile +++ /dev/null @@ -1,240 +0,0 @@ -# Doxyfile 1.4.7 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "@PACKAGE_NAME@ - Lessons" -PROJECT_NUMBER = @PACKAGE_VERSION@ -OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/doc/html/lsnshared -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@ -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = YES -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = NO -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = YES -HIDE_UNDOC_CLASSES = YES -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = YES -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = YES -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = @CMAKE_CURRENT_SOURCE_DIR@ -FILE_PATTERNS = *.cpp \ - *.h \ - NEWS \ - README -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = YES -COLS_IN_ALPHA_INDEX = 3 -IGNORE_PREFIX = peo -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = YES -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = YES -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = YES -USE_PDFLATEX = YES -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = YES -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = @EO_BIN_DIR@/doc/eo.doxytag=http://eodev.sourceforge.net/eo/doc/html \ - @MO_BIN_DIR@/doc/mo.doxytag=@MO_BIN_DIR@/doc/html \ - @ParadisEO-PEO_BINARY_DIR@/doc/peo.doxytag=@ParadisEO-PEO_BINARY_DIR@/doc/html -GENERATE_TAGFILE = @CMAKE_BINARY_DIR@/doc/paradiseo-peo-lsn-shared.doxytag -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = NO -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1024 -MAX_DOT_GRAPH_DEPTH = 0 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = YES diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/param.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/param.cpp deleted file mode 100644 index 03c2c19ab..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/param.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include - -#include "data.h" -#include "opt_route.h" - -void loadParameters (int __argc, char * * __argv) -{ - - eoParser parser (__argc, __argv); - - loadData (parser); - - loadOptimumRoute (parser); -} - - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/param.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/param.h deleted file mode 100644 index 4b0485879..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/param.h +++ /dev/null @@ -1,42 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 __param_h -#define __param_h - -extern void loadParameters (int __argc, char * * __argv); - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/part_route_eval.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/part_route_eval.cpp deleted file mode 100644 index 0134f6065..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/part_route_eval.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include "part_route_eval.h" -#include "node.h" - -PartRouteEval :: PartRouteEval (float __from, - float __to - ) : from (__from), - to (__to) -{} - -void PartRouteEval :: operator () (Route & __route) -{ - - - unsigned len = 0 ; - - for (unsigned i = (unsigned) (__route.size () * from) ; - i < (unsigned) (__route.size () * to) ; - i ++) - len += distance (__route [i], __route [(i + 1) % numNodes]) ; - - __route.fitness (- (int) len) ; -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/part_route_eval.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/part_route_eval.h deleted file mode 100644 index 241a1aa08..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/part_route_eval.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 __part_route_eval_h -#define __part_route_eval_h - -#include - -#include "route.h" - -/** Route Evaluator */ -class PartRouteEval : public eoEvalFunc - { - - public : - - /** Constructor */ - PartRouteEval (float __from, float __to) ; - - void operator () (Route & __route) ; - - private : - - float from, to ; - - } ; - - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/partial_mapped_xover.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/partial_mapped_xover.cpp deleted file mode 100644 index a55689aa2..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/partial_mapped_xover.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include - -#include - -#include "partial_mapped_xover.h" -#include "mix.h" - -void PartialMappedXover :: repair (Route & __route, unsigned __cut1, unsigned __cut2) -{ - - unsigned v [__route.size ()] ; // Number of times a cities are visited ... - - for (unsigned i = 0 ; i < __route.size () ; i ++) - v [i] = 0 ; - - for (unsigned i = 0 ; i < __route.size () ; i ++) - v [__route [i]] ++ ; - - std :: vector vert ; - - for (unsigned i = 0 ; i < __route.size () ; i ++) - if (! v [i]) - vert.push_back (i) ; - - mix (vert) ; - - for (unsigned i = 0 ; i < __route.size () ; i ++) - if (i < __cut1 || i >= __cut2) - if (v [__route [i]] > 1) - { - __route [i] = vert.back () ; - vert.pop_back () ; - } -} - -bool PartialMappedXover :: operator () (Route & __route1, Route & __route2) -{ - - unsigned cut1 = rng.random (__route1.size ()), cut2 = rng.random (__route2.size ()) ; - - if (cut2 < cut1) - std :: swap (cut1, cut2) ; - - // Between the cuts - for (unsigned i = cut1 ; i < cut2 ; i ++) - std :: swap (__route1 [i], __route2 [i]) ; - - // Outside the cuts - repair (__route1, cut1, cut2) ; - repair (__route2, cut1, cut2) ; - - __route1.invalidate () ; - __route2.invalidate () ; - - return true ; -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/partial_mapped_xover.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/partial_mapped_xover.h deleted file mode 100644 index 23453bb9b..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/partial_mapped_xover.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 partial_mapped_xover_h -#define partial_mapped_xover_h - -#include - -#include "route.h" - -/** Partial Mapped Crossover */ -class PartialMappedXover : public eoQuadOp - { - - public : - - bool operator () (Route & __route1, Route & __route2) ; - - private : - - void repair (Route & __route, unsigned __cut1, unsigned __cut2) ; - } ; - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/route.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/route.cpp deleted file mode 100644 index 249056f30..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/route.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include "route.h" - -unsigned length (const Route & __route) -{ - - unsigned len = 0 ; - - for (unsigned i = 0; i < numNodes; i ++) - len += distance (__route [i], __route [(i + 1) % numNodes]) ; - - return len; -} - - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/route.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/route.h deleted file mode 100644 index 30c8e16b5..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/route.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 __route_h -#define __route_h - -#include - -#include "node.h" - -typedef eoVector Route; - -unsigned length (const Route & __route); - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/route_eval.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/route_eval.cpp deleted file mode 100644 index 97c87114c..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/route_eval.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include "route_eval.h" - -void RouteEval :: operator () (Route & __route) -{ - __route.fitness (- (int) length (__route)); -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/route_eval.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/route_eval.h deleted file mode 100644 index 55ceb9b48..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/route_eval.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 __route_eval_h -#define __route_eval_h - -#include - -#include "route.h" - -class RouteEval : public eoEvalFunc - { - - public : - - void operator () (Route & __route) ; - } ; - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/route_init.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/route_init.cpp deleted file mode 100644 index c3301cd46..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/route_init.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include - -#include "route_init.h" -#include "node.h" - -void RouteInit :: operator () (Route & __route) -{ - - __route.clear (); - - for (unsigned i = 0 ; i < numNodes ; i ++) - __route.push_back (i); - - for (unsigned i = 0 ; i < numNodes ; i ++) - std :: swap (__route [i], __route [rng.random (numNodes)]); -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/route_init.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/route_init.h deleted file mode 100644 index 4f48fc26c..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/route_init.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 __route_init_h -#define __route_init_h - -#include - -#include "route.h" - -class RouteInit : public eoInit - { - - public : - - void operator () (Route & __route); - } ; - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt.cpp deleted file mode 100644 index 577723730..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include "two_opt.h" - -void TwoOpt :: operator () (Route & __route) -{ - - unsigned i = 0; - - while ((2 * i) < (second - first)) - { - - std :: swap (__route [first + i], __route [second - i]); - i ++; - } -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt.h deleted file mode 100644 index 68d4d95cb..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 __two_opt_h -#define __two_opt_h - -#include -#include - -#include "route.h" - -class TwoOpt : public moMove , public std :: pair - { - - public : - - void operator () (Route & __route); - - } ; - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_incr_eval.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_incr_eval.cpp deleted file mode 100644 index ba5548789..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_incr_eval.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include "two_opt_incr_eval.h" -#include "node.h" - -int TwoOptIncrEval :: operator () (const TwoOpt & __move, const Route & __route) -{ - - /* From */ - Node v1 = __route [__move.first], v1_left = __route [(__move.first - 1 + numNodes) % numNodes]; - - /* To */ - Node v2 = __route [__move.second], v2_right = __route [(__move.second + 1) % numNodes]; - - if (v1 == v2 || v2_right == v1) - return __route.fitness (); - else - return __route.fitness () - distance (v1_left, v2) - distance (v1, v2_right) + distance (v1_left, v1) + distance (v2, v2_right); -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_incr_eval.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_incr_eval.h deleted file mode 100644 index 9ee08fad4..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_incr_eval.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 __two_opt_incr_eval_h -#define __two_opt_incr_eval_h - -#include -#include "two_opt.h" - -class TwoOptIncrEval : public moMoveIncrEval - { - - public : - - int operator () (const TwoOpt & __move, const Route & __route) ; - - } ; - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_init.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_init.cpp deleted file mode 100644 index 32487b5b4..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_init.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include "two_opt_init.h" - -void TwoOptInit :: operator () (TwoOpt & __move, const Route & __route) -{ - - __move.first = __move.second = 0; -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_init.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_init.h deleted file mode 100644 index bb4eb0dcc..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_init.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 __two_opt_init_h -#define __two_opt_init_h - -#include - -#include "two_opt.h" - -class TwoOptInit : public moMoveInit - { - - public : - - void operator () (TwoOpt & __move, const Route & __route) ; - - } ; - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_next.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_next.cpp deleted file mode 100644 index a2ec7face..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_next.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include "two_opt_next.h" -#include "node.h" - -bool TwoOptNext :: operator () (TwoOpt & __move, const Route & __route) -{ - - if (__move.first == numNodes - 1 && __move.second == numNodes - 1) - return false; - - else - { - - __move.second ++; - if (__move.second == numNodes) - { - - __move.first ++; - __move.second = __move.first; - } - return true ; - } -} diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_next.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_next.h deleted file mode 100644 index 6c2f51442..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_next.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 __two_opt_next_h -#define __two_opt_next_h - -#include - -#include "two_opt.h" - -class TwoOptNext : public moNextMove - { - - public : - - bool operator () (TwoOpt & __move, const Route & __route); - - }; - -#endif diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_rand.cpp b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_rand.cpp deleted file mode 100644 index f38fb80c8..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_rand.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 -* -*/ - -#include - -#include "two_opt_rand.h" -#include "node.h" - -void TwoOptRand :: operator () (TwoOpt & __move, const Route & __route) -{ - - __move.second = rng.random (numNodes); - - __move.first = rng.random (__move.second); -} - - diff --git a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_rand.h b/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_rand.h deleted file mode 100644 index 85868d236..000000000 --- a/tags/paradiseo1.2-patch1/paradiseo-peo/tutorial/examples/tsp/two_opt_rand.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sebastien Cahon, Alexandru-Adrian Tantar -* -* 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 __two_opt_rand_h -#define __two_opt_rand_h - -#include - -#include "two_opt.h" - -class TwoOptRand : public eoMoveRand - { - - public : - - void operator () (TwoOpt & __move, const Route & __route) ; - - } ; - -#endif