Initial import.
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1384 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
f8da7c715a
commit
ef8dafa740
397 changed files with 118785 additions and 0 deletions
11
contribution/trunk/tutos_META08/.project
Normal file
11
contribution/trunk/tutos_META08/.project
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Tutos_META08</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
84
contribution/trunk/tutos_META08/README.txt
Executable file
84
contribution/trunk/tutos_META08/README.txt
Executable file
|
|
@ -0,0 +1,84 @@
|
|||
###############
|
||||
# CONTENTS #
|
||||
###############
|
||||
|
||||
The package "paradiseo_tutorials" contains pre-compiled files for different operating systems and a "not_compiled" package:
|
||||
- windows
|
||||
- linux 32bits
|
||||
- linux 64bits
|
||||
- not_compiled
|
||||
|
||||
Each pre_compiled sub-directory contains an executable file, a parameter file and a c++ source file (provided as an informational resource only) for each lesson:
|
||||
- EO_lesson1 (contains "tsp_EA(.exe)", "tsp_EA.cpp", param)
|
||||
- MO_lesson1 (contains "hill_climbing(.exe)", "hill_climbing.cpp", param)
|
||||
- MO_lesson2 (contains "tabu_search(.exe)", "tabu_search.cpp", param)
|
||||
- MO_lesson3 (contains "simulated_annealing(.exe)", "simulated_annealing.cpp", param)
|
||||
- MO_lesson4 (contains "iterated_local_search(.exe)", "iterated_local_search.cpp", param)
|
||||
- hybrid_lesson (contains "hybrid_ga(.exe)", "hybrid_ga.cpp", param)
|
||||
- MOEO_lesson (contains "FlowShopEA(.exe)", "FlowShopEA.cpp", param)
|
||||
|
||||
For advance users:
|
||||
- The package "not_compiled" allows you to compile tutorials in your own machine ONLY IF PARADISEO HAS BEEN PREVIOUSLY INSTALLED on it.
|
||||
|
||||
|
||||
|
||||
###############
|
||||
# USE #
|
||||
###############
|
||||
|
||||
Copy the package corresponding to your operating system on your computer.
|
||||
|
||||
Then, you can execute all lessons with a command line interpreter.
|
||||
Windows users, do not click on the executable file "*.exe" whereas you won't be able to see the results.
|
||||
|
||||
For instance, to run the hill_climbing, launch a command line interpreter, go to the "MO_lesson1" directory and type:
|
||||
(windows system)
|
||||
> hill_climbing.exe @param
|
||||
(Linux system)
|
||||
> ./hill_climbing @param
|
||||
|
||||
|
||||
|
||||
###############
|
||||
# COMPILATION #
|
||||
###############
|
||||
|
||||
We recommend you to use the pre-compiled packages. But if you still want to compile the "not_compiled" package, please perform the following steps.
|
||||
|
||||
Linux users:
|
||||
************
|
||||
1. Go to the not_compiled directory
|
||||
2. Edit the install.cmake file
|
||||
• PARADISEO DIR : replace "TO FILL" by the path where ParadisEO has been installed (for instance, "/home/user/paradiseo-1.1/")
|
||||
• SOURCES DIR : replace "TO FILL" by the path where the install.cmake file is located on your computer (for instance, "/home/user/tutorials/not_compiled/")
|
||||
3. Go to the build directory and run the following command lines:
|
||||
> cmake ..
|
||||
> make
|
||||
> make install
|
||||
|
||||
Windows users (Visual Studio 9 2008):
|
||||
*************************************
|
||||
1. Go to the not_compiled directory
|
||||
2. Edit the install.cmake file
|
||||
• PARADISEO DIR : replace "TO FILL" by the path where ParadisEO has been installed WITH DOUBLE BACKSLASHES (for instance, "C:\\[ParadisEO_PATH]")
|
||||
• SOURCES DIR : replace "TO FILL" by the path where the install.cmake file is located on your computer (for instance, "C:\\...\\not_compiled")
|
||||
3. Run The Cmake interface.
|
||||
• In the field "Where is the source code:", browse to find path of the "not_compiled" directory.
|
||||
• In the field "Where to build the binaries:", browse to find path of the "not_compiled/build" directory.
|
||||
• Click on "Configure"
|
||||
• Choose "Visual Studio 9 2008"
|
||||
• Skip Warnings (click "OK" for all)
|
||||
• click on "Configure"
|
||||
• Skip Warnings (click "OK" for all)
|
||||
• Click on "Ok"
|
||||
• Skip Warnings (click "OK" for all)
|
||||
4. Compilation.
|
||||
• Go in "not_compiled/build" directory.
|
||||
• Double click on the Visual Studio Solution "TUTORIAUX".
|
||||
• Skip Warnings while Visual Studio is launched (click "OK" for all)
|
||||
• Choose "Release" in the top of the windows near the green arrow.
|
||||
• In the Solutions Explorer (on the left), right click on "Solution'TUTORIAUX'", then click on "Build Solution".
|
||||
• right click on "installall", then click on "Build Solution".
|
||||
Now lessons should be compiled in the build directories.
|
||||
Executable are in the "Release" directories.
|
||||
NOTE: Relative path in "param" files must be changed in added "../" to --instancePath.
|
||||
14
contribution/trunk/tutos_META08/linux_32bits/EO_lesson1/current_param
Executable file
14
contribution/trunk/tutos_META08/linux_32bits/EO_lesson1/current_param
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
###### General ######
|
||||
# --help=0 # -h : Prints this message
|
||||
# --stopOnUnknownParam=1 # Stop if unkown param entered
|
||||
|
||||
###### Configuration ######
|
||||
--instancePath=../tsp/benchs/berlin52.tsp # Path to the instance.
|
||||
# --seed=1224772176 # Seed for rand.
|
||||
--popSize=100 # Size of the population.
|
||||
--maxGen=1000 # Maximum number of generations.
|
||||
--crossRate=1 # Probability of crossover.
|
||||
--mutRate=0.01 # Probability of mutation.
|
||||
--nbOffspring=100 # Number of offspring.
|
||||
--crossType=Partial # Crossover to use, it can be 'Partial', 'Order' or 'Edge'.
|
||||
9
contribution/trunk/tutos_META08/linux_32bits/EO_lesson1/param
Executable file
9
contribution/trunk/tutos_META08/linux_32bits/EO_lesson1/param
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
###### Configuration ######
|
||||
--instancePath=../tsp/benchs/berlin52.tsp # Path to the instance.
|
||||
--popSize=100 # Size of the population.
|
||||
--nbOffspring=100 # Number of selected parents.
|
||||
--maxGen=1000 # Maximum number of iterations.
|
||||
--crossType=Partial # Crossover to use, it can be 'Partial', 'Order' or 'Edge'.
|
||||
--crossRate=1 # Probability of crossover.
|
||||
--mutRate=0.01 # Probability of mutation
|
||||
|
||||
160
contribution/trunk/tutos_META08/linux_32bits/EO_lesson1/tsp.cpp
Executable file
160
contribution/trunk/tutos_META08/linux_32bits/EO_lesson1/tsp.cpp
Executable file
|
|
@ -0,0 +1,160 @@
|
|||
/*
|
||||
* <tsp.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Thomas Legrand
|
||||
*
|
||||
* 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 <eo>
|
||||
#include <tsp>
|
||||
|
||||
void manage_configuration_file(eoParser & _parser);
|
||||
|
||||
int main (int _argc, char* _argv [])
|
||||
{
|
||||
|
||||
eoParser parser(_argc, _argv);
|
||||
|
||||
manage_configuration_file(parser);
|
||||
|
||||
unsigned int seed=atoi( (parser.getParamWithLongName("seed")->getValue()).c_str() );
|
||||
std::string instancePath=parser.getParamWithLongName("instancePath")->getValue();
|
||||
unsigned int populationSize=atoi( (parser.getParamWithLongName("popSize")->getValue()).c_str() );
|
||||
unsigned int maxGen=atoi( (parser.getParamWithLongName("maxGen")->getValue()).c_str() );
|
||||
double crossoverRate=atof( (parser.getParamWithLongName("crossRate")->getValue()).c_str() );
|
||||
double mutationRate=atof( (parser.getParamWithLongName("mutRate")->getValue()).c_str() );
|
||||
unsigned int nbOffspring=atoi( (parser.getParamWithLongName("nbOffspring")->getValue()).c_str() );
|
||||
std::string crossoverType=parser.getParamWithLongName("crossType")->getValue();
|
||||
|
||||
// random number generator
|
||||
srand (seed);
|
||||
|
||||
// load test instance
|
||||
Graph::load(instancePath.c_str());
|
||||
|
||||
|
||||
|
||||
/*** the representation-dependent things ***/
|
||||
|
||||
// the evaluation function
|
||||
RouteEval full_eval ;
|
||||
// the genotype (through a genotype initializer)
|
||||
RouteInit init ;
|
||||
// crossover
|
||||
eoQuadOp <Route>*crossover;
|
||||
if(crossoverType.compare("Partial")==0)
|
||||
{
|
||||
crossover=new PartialMappedXover();
|
||||
}
|
||||
else if (crossoverType.compare("Order")==0)
|
||||
{
|
||||
crossover=new OrderXover();
|
||||
}
|
||||
else if (crossoverType.compare("Edge")==0)
|
||||
{
|
||||
crossover=new EdgeXover();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw std::runtime_error("[tsp.cpp]: the crossover type '"+crossoverType+"' is not correct.");
|
||||
}
|
||||
// mutation
|
||||
CitySwap mutation ;
|
||||
// variation operators
|
||||
eoSGATransform <Route> transform (*crossover, crossoverRate, mutation, mutationRate) ;
|
||||
|
||||
|
||||
|
||||
/*** the representation-independent things ***/
|
||||
|
||||
// initialization of the population
|
||||
eoPop <Route> pop (populationSize, init) ;
|
||||
apply <Route> (full_eval, pop) ;
|
||||
// select
|
||||
eoDetTournamentSelect <Route> select_one ;
|
||||
eoSelectNumber <Route> select (select_one, nbOffspring) ;
|
||||
// replace
|
||||
eoGenerationalReplacement <Route> genReplace;
|
||||
eoWeakElitistReplacement <Route> replace(genReplace);
|
||||
// stopping criteria
|
||||
eoGenContinue <Route> continu (maxGen) ;
|
||||
// algorithm
|
||||
eoEasyEA <Route> ea (continu, full_eval, select, transform, replace) ;
|
||||
|
||||
|
||||
|
||||
/*** Go ! ***/
|
||||
|
||||
// initial solution
|
||||
std :: cout << "[From] " << pop.best_element () << std :: endl ;
|
||||
|
||||
// run the algo
|
||||
ea(pop);
|
||||
|
||||
// final solution
|
||||
std :: cout << "[To] " << pop.best_element () << std :: endl ;
|
||||
|
||||
|
||||
|
||||
// delete pointer
|
||||
delete(crossover);
|
||||
|
||||
// that's all
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void manage_configuration_file(eoParser & _parser)
|
||||
{
|
||||
std::ofstream os;
|
||||
_parser.getORcreateParam(std::string("../tsp/benchs/berlin52.tsp"), "instancePath", "Path to the instance.", 0, "Configuration", false);
|
||||
_parser.getORcreateParam((unsigned int)time(0), "seed", "Seed for rand.", 0, "Configuration", false);
|
||||
_parser.getORcreateParam((unsigned int)100, "popSize", "Size of the population.", 0, "Configuration", false);
|
||||
_parser.getORcreateParam((unsigned int)1000, "maxGen", "Maximum number of generations.", 0, "Configuration", false);
|
||||
_parser.getORcreateParam((double)1.0, "crossRate", "Probability of crossover.", 0, "Configuration", false);
|
||||
_parser.getORcreateParam((double)0.01, "mutRate", "Probability of mutation.", 0, "Configuration", false);
|
||||
_parser.getORcreateParam((unsigned int)100, "nbOffspring", "Number of offspring.", 0, "Configuration", false);
|
||||
_parser.getORcreateParam(std::string("Partial"), "crossType", "Crossover to use, it can be 'Partial', 'Order' or 'Edge'.", 0, "Configuration", false);
|
||||
if (_parser.userNeedsHelp())
|
||||
{
|
||||
_parser.printHelp(std::cout);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
os.open("current_param");
|
||||
if(!os.is_open())
|
||||
{
|
||||
throw std::runtime_error("[tsp.cpp]: the file current_param cannot be created.");
|
||||
}
|
||||
os <<_parser;
|
||||
os.close();
|
||||
}
|
||||
BIN
contribution/trunk/tutos_META08/linux_32bits/EO_lesson1/tsp_EA
Executable file
BIN
contribution/trunk/tutos_META08/linux_32bits/EO_lesson1/tsp_EA
Executable file
Binary file not shown.
BIN
contribution/trunk/tutos_META08/linux_32bits/MOEO_lesson/FlowShopEA
Executable file
BIN
contribution/trunk/tutos_META08/linux_32bits/MOEO_lesson/FlowShopEA
Executable file
Binary file not shown.
132
contribution/trunk/tutos_META08/linux_32bits/MOEO_lesson/FlowShopEA.cpp
Executable file
132
contribution/trunk/tutos_META08/linux_32bits/MOEO_lesson/FlowShopEA.cpp
Executable file
|
|
@ -0,0 +1,132 @@
|
|||
/*
|
||||
* <FlowShopEA.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// moeo general include
|
||||
#include <moeo>
|
||||
// for the creation of an evaluator
|
||||
#include <make_eval_FlowShop.h>
|
||||
// for the creation of an initializer
|
||||
#include <make_genotype_FlowShop.h>
|
||||
// for the creation of the variation operators
|
||||
#include <make_op_FlowShop.h>
|
||||
// how to initialize the population
|
||||
#include <do/make_pop.h>
|
||||
// the stopping criterion
|
||||
#include <do/make_continue_moeo.h>
|
||||
// outputs (stats, population dumps, ...)
|
||||
#include <do/make_checkpoint_moeo.h>
|
||||
// evolution engine (selection and replacement)
|
||||
#include <do/make_ea_moeo.h>
|
||||
// simple call to the algo
|
||||
#include <do/make_run.h>
|
||||
// checks for help demand, and writes the status file and make_help; in libutils
|
||||
void make_help(eoParser & _parser);
|
||||
// definition of the representation
|
||||
#include <FlowShop.h>
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
eoParser parser(argc, argv); // for user-parameter reading
|
||||
eoState state; // to keep all things allocated
|
||||
|
||||
|
||||
/*** the representation-dependent things ***/
|
||||
|
||||
// The evaluation
|
||||
eoEvalFuncCounter<FlowShop>& eval = do_make_eval(parser, state);
|
||||
// the genotype (through a genotype initializer)
|
||||
eoInit<FlowShop>& init = do_make_genotype(parser, state);
|
||||
// the variation operators
|
||||
eoGenOp<FlowShop>& op = do_make_op(parser, state);
|
||||
|
||||
|
||||
/*** the representation-independent things ***/
|
||||
|
||||
// initialization of the population
|
||||
eoPop<FlowShop>& pop = do_make_pop(parser, state, init);
|
||||
// definition of the archive
|
||||
moeoArchive<FlowShop> arch;
|
||||
// stopping criteria
|
||||
eoContinue<FlowShop>& term = do_make_continue_moeo(parser, state, eval);
|
||||
// output
|
||||
eoCheckPoint<FlowShop>& checkpoint = do_make_checkpoint_moeo(parser, state, eval, term, pop, arch);
|
||||
// algorithm
|
||||
eoAlgo<FlowShop>& algo = do_make_ea_moeo(parser, state, eval, checkpoint, op, arch);
|
||||
|
||||
|
||||
/*** Go ! ***/
|
||||
|
||||
// help ?
|
||||
make_help(parser);
|
||||
|
||||
// first evalution (for printing)
|
||||
apply<FlowShop>(eval, pop);
|
||||
|
||||
// printing of the initial population
|
||||
cout << "Initial Population\n";
|
||||
pop.sortedPrintOn(cout);
|
||||
cout << endl;
|
||||
|
||||
// run the algo
|
||||
algo(pop);
|
||||
|
||||
// printing of the final population
|
||||
cout << "Final Population\n";
|
||||
pop.sortedPrintOn(cout);
|
||||
cout << endl;
|
||||
|
||||
// printing of the final archive
|
||||
cout << "Final Archive\n";
|
||||
arch.sortedPrintOn(cout);
|
||||
cout << endl;
|
||||
|
||||
|
||||
}
|
||||
catch (exception& e)
|
||||
{
|
||||
cout << e.what() << endl;
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
49
contribution/trunk/tutos_META08/linux_32bits/MOEO_lesson/FlowShopEA.status
Executable file
49
contribution/trunk/tutos_META08/linux_32bits/MOEO_lesson/FlowShopEA.status
Executable file
|
|
@ -0,0 +1,49 @@
|
|||
|
||||
###### General ######
|
||||
# --help=0 # -h : Prints this message
|
||||
# --stopOnUnknownParam=1 # Stop if unkown param entered
|
||||
# --seed=1224772186 # -S : Random number seed
|
||||
|
||||
###### Evolution Engine ######
|
||||
--popSize=100 # -P : Population Size
|
||||
--updateArch=1 # Update the archive at each gen.
|
||||
--fitness=FastNonDominatedSorting # -F : Fitness assignment scheme: Dummy, FastNonDominatedSorting or IndicatorBased
|
||||
--indicator=Epsilon # -i : Binary indicator for IndicatorBased: Epsilon, Hypervolume
|
||||
# --rho=1.1 # reference point for the hypervolume indicator
|
||||
# --kappa=0.05 # -k : Scaling factor kappa for IndicatorBased
|
||||
--diversity=Crowding # -D : Diversity assignment scheme: Dummy, Sharing(nicheSize) or Crowding
|
||||
--comparator=FitnessThenDiversity # -c : Comparator scheme: FitnessThenDiversity, DiversityThenFitness or Aggregative
|
||||
--selection=DetTour(2) # -S : Selection scheme: DetTour(T), StochTour(t) or Random
|
||||
--replacement=Elitist # -R : Replacement scheme: Elitist, Environmental or Generational
|
||||
--nbOffspring=100% # -O : Number of offspring (percentage or absolute)
|
||||
|
||||
###### Output ######
|
||||
--resDir=Res # Directory to store DISK outputs
|
||||
--eraseDir=1 # erase files in dirName if any
|
||||
--printPop=0 # Print sorted pop. every gen.
|
||||
--storeArch=1 # Store the archive's objective vectors at each gen.
|
||||
--contribution=0 # Store the contribution of the archive at each gen.
|
||||
--entropy=0 # Store the entropy of the archive at each gen.
|
||||
|
||||
###### Persistence ######
|
||||
# --Load= # -L : A save file to restart from
|
||||
# --recomputeFitness=0 # -r : Recompute the fitness after re-loading the pop.?
|
||||
# --saveFrequency=0 # Save every F generation (0 = only final state, absent = never)
|
||||
# --saveTimeInterval=0 # Save every T seconds (0 or absent = never)
|
||||
# --status=./FlowShopEA.status # Status file
|
||||
|
||||
###### Representation ######
|
||||
--BenchmarkFile=../flowshop/benchs/020_10_01.txt # -B : Benchmark file name (benchmarks are available at www.lifl.fr/~liefooga/benchmarks) REQUIRED
|
||||
|
||||
###### Stopping criterion ######
|
||||
--maxGen=100 # -G : Maximum number of generations (0 = none)
|
||||
--maxEval=0 # -E : Maximum number of evaluations (0 = none)
|
||||
--maxTime=0 # -T : Maximum running time in seconds (0 = none)
|
||||
# --CtrlC=1 # -C : Terminate current generation upon Ctrl C
|
||||
|
||||
###### Variation Operators ######
|
||||
--crossRate=1 # Relative rate for the only crossover
|
||||
--shiftMutRate=0.5 # Relative rate for shift mutation
|
||||
--exchangeMutRate=0.5 # Relative rate for exchange mutation
|
||||
--pCross=0.25 # -c : Probability of Crossover
|
||||
--pMut=0.35 # -m : Probability of Mutation
|
||||
3
contribution/trunk/tutos_META08/linux_32bits/MOEO_lesson/Res/arch
Executable file
3
contribution/trunk/tutos_META08/linux_32bits/MOEO_lesson/Res/arch
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
1637 2875
|
||||
1670 2653
|
||||
1634 3244
|
||||
33
contribution/trunk/tutos_META08/linux_32bits/MOEO_lesson/param
Executable file
33
contribution/trunk/tutos_META08/linux_32bits/MOEO_lesson/param
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
###### Evolution Engine ######
|
||||
--popSize=100 # -P : Population Size
|
||||
--updateArch=1 # Update the archive at each gen.
|
||||
--fitness=FastNonDominatedSorting # -F : Fitness assignment scheme: Dummy, FastNonDominatedSorting or IndicatorBased
|
||||
--indicator=Epsilon # -i : Binary indicator for IndicatorBased: Epsilon, Hypervolume
|
||||
--diversity=Crowding # -D : Diversity assignment scheme: Dummy, Sharing(nicheSize) or Crowding
|
||||
--comparator=FitnessThenDiversity # -C : Comparator scheme: FitnessThenDiversity, DiversityThenFitness or Aggregative
|
||||
--selection=DetTour(2) # -S : Selection scheme: DetTour(T), StochTour(t) or Random
|
||||
--replacement=Elitist # -R : Replacement scheme: Elitist, Environmental or Generational
|
||||
--nbOffspring=100% # -O : Number of offspring (percentage or absolute)
|
||||
|
||||
###### Output ######
|
||||
--resDir=Res # Directory to store DISK outputs
|
||||
--eraseDir=1 # erase files in dirName if any
|
||||
--printPop=0 # Print sorted pop. every gen.
|
||||
--storeArch=1 # Store the archive's objective vectors at each gen.
|
||||
--contribution=0 # Store the contribution of the archive at each gen.
|
||||
--entropy=0 # Store the entropy of the archive at each gen.
|
||||
|
||||
###### Representation ######
|
||||
--BenchmarkFile=../flowshop/benchs/020_10_01.txt # -B : Benchmark file name REQUIRED
|
||||
|
||||
###### Stopping criterion ######
|
||||
--maxGen=100 # -G : Maximum number of generations (0 = none)
|
||||
--maxEval=0 # -E : Maximum number of evaluations (0 = none)
|
||||
--maxTime=0 # -T : Maximum running time in seconds (0 = none)
|
||||
|
||||
###### Variation Operators ######
|
||||
--crossRate=1 # Relative rate for the only crossover
|
||||
--shiftMutRate=0.5 # Relative rate for shift mutation
|
||||
--exchangeMutRate=0.5 # Relative rate for exchange mutation
|
||||
--pCross=0.25 # -c : Probability of Crossover
|
||||
--pMut=0.35 # -m : Probability of Mutation
|
||||
9
contribution/trunk/tutos_META08/linux_32bits/MO_lesson1/current_param
Executable file
9
contribution/trunk/tutos_META08/linux_32bits/MO_lesson1/current_param
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
###### General ######
|
||||
# --help=0 # -h : Prints this message
|
||||
# --stopOnUnknownParam=1 # Stop if unkown param entered
|
||||
|
||||
###### Configuration ######
|
||||
--instancePath=../tsp/benchs/berlin52.tsp # Path to the instance.
|
||||
# --seed=1224772221 # Seed for rand.
|
||||
--selectionType=Best # Type of the selection: 'Best', 'First' or 'Random'.
|
||||
BIN
contribution/trunk/tutos_META08/linux_32bits/MO_lesson1/hill_climbing
Executable file
BIN
contribution/trunk/tutos_META08/linux_32bits/MO_lesson1/hill_climbing
Executable file
Binary file not shown.
134
contribution/trunk/tutos_META08/linux_32bits/MO_lesson1/hill_climbing.cpp
Executable file
134
contribution/trunk/tutos_META08/linux_32bits/MO_lesson1/hill_climbing.cpp
Executable file
|
|
@ -0,0 +1,134 @@
|
|||
/*
|
||||
<hill_climbing.cpp>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
|
||||
(C) OPAC Team, LIFL, 2002-2008
|
||||
|
||||
Sébastien Cahon, Jean-Charles Boisson
|
||||
|
||||
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 <eo>
|
||||
#include <mo>
|
||||
#include <tsp>
|
||||
|
||||
void manage_configuration_file(eoParser & _parser);
|
||||
|
||||
int
|
||||
main (int _argc, char* _argv [])
|
||||
{
|
||||
std::string instancePath, selectionType;
|
||||
unsigned int seed;
|
||||
|
||||
eoParser parser(_argc, _argv);
|
||||
|
||||
manage_configuration_file(parser);
|
||||
|
||||
seed=atoi( (parser.getParamWithLongName("seed")->getValue()).c_str() );
|
||||
instancePath=parser.getParamWithLongName("instancePath")->getValue();
|
||||
selectionType=parser.getParamWithLongName("selectionType")->getValue();
|
||||
|
||||
srand (seed);
|
||||
Graph::load(instancePath.c_str());
|
||||
|
||||
Route solution;
|
||||
|
||||
RouteInit initializer;
|
||||
initializer (solution);
|
||||
|
||||
RouteEval full_evaluation;
|
||||
full_evaluation (solution);
|
||||
|
||||
std :: cout << "[From] " << solution << std :: endl;
|
||||
|
||||
/* Tools for an efficient (? :-))
|
||||
local search ! */
|
||||
|
||||
TwoOptInit two_opt_initializer;
|
||||
|
||||
TwoOptNext two_opt_next_move_generator;
|
||||
|
||||
TwoOptIncrEval two_opt_incremental_evaluation;
|
||||
|
||||
moMoveSelect<TwoOpt>* two_opt_selection;
|
||||
|
||||
if(selectionType.compare("Best")==0)
|
||||
{
|
||||
two_opt_selection= new moBestImprSelect<TwoOpt>();
|
||||
}
|
||||
else if (selectionType.compare("First")==0)
|
||||
{
|
||||
two_opt_selection= new moFirstImprSelect<TwoOpt>();
|
||||
}
|
||||
else if (selectionType.compare("Random")==0)
|
||||
{
|
||||
two_opt_selection= new moRandImprSelect<TwoOpt>();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw std::runtime_error("[hill_climbing.cpp]: the type of selection '"+selectionType+"' is not correct.");
|
||||
}
|
||||
|
||||
moHC <TwoOpt> hill_climbing (two_opt_initializer, two_opt_next_move_generator, two_opt_incremental_evaluation,
|
||||
*two_opt_selection, full_evaluation);
|
||||
hill_climbing (solution) ;
|
||||
|
||||
std :: cout << "[To] " << solution << std :: endl;
|
||||
|
||||
delete(two_opt_selection);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
manage_configuration_file(eoParser & _parser)
|
||||
{
|
||||
std::ofstream os;
|
||||
|
||||
_parser.createParam(std::string("../tsp/benchs/berlin52.tsp"), "instancePath", "Path to the instance.",
|
||||
0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam((unsigned int)time(0), "seed", "Seed for rand.", 0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam(std::string("Best"), "selectionType", "Type of the selection: 'Best', 'First' or 'Random'.",
|
||||
0, "Configuration", false);
|
||||
|
||||
if (_parser.userNeedsHelp())
|
||||
{
|
||||
_parser.printHelp(std::cout);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
os.open("current_param");
|
||||
if(!os.is_open())
|
||||
{
|
||||
throw std::runtime_error("[hill_climbing.cpp]: the file current_param cannot be created.");
|
||||
}
|
||||
os <<_parser;
|
||||
os.close();
|
||||
}
|
||||
3
contribution/trunk/tutos_META08/linux_32bits/MO_lesson1/param
Executable file
3
contribution/trunk/tutos_META08/linux_32bits/MO_lesson1/param
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
###### Configuration ######
|
||||
--instancePath=../tsp/benchs/berlin52.tsp # Path to the instance.
|
||||
--selectionType=Best # Type of the selection: 'Best', 'First' or 'Random'.
|
||||
11
contribution/trunk/tutos_META08/linux_32bits/MO_lesson2/current_param
Executable file
11
contribution/trunk/tutos_META08/linux_32bits/MO_lesson2/current_param
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
###### General ######
|
||||
# --help=0 # -h : Prints this message
|
||||
# --stopOnUnknownParam=1 # Stop if unkown param entered
|
||||
|
||||
###### Configuration ######
|
||||
--instancePath=../tsp/benchs/berlin52.tsp # Path to the instance.
|
||||
# --seed=1224772237 # Seed for rand.
|
||||
--tabuListSize=10 # Size of the tabu list.
|
||||
--maxIter=1000 # Maximum number of iterations.
|
||||
--tabuListType=TwoOpt # Type of the tabu list: 'TwoOpt', 'SimpleMove' or 'SimpleSolution'.
|
||||
5
contribution/trunk/tutos_META08/linux_32bits/MO_lesson2/param
Executable file
5
contribution/trunk/tutos_META08/linux_32bits/MO_lesson2/param
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
###### Configuration ######
|
||||
--instancePath=../tsp/benchs/berlin52.tsp # Path to the instance
|
||||
--tabuListSize=10 # Size of the tabu list
|
||||
--maxIter=1000 # Maximum number of iterations
|
||||
--tabuListType=TwoOpt # Type of the tabu list: 'TwoOpt', 'SimpleMove' or 'SimpleSolution'
|
||||
BIN
contribution/trunk/tutos_META08/linux_32bits/MO_lesson2/tabu_search
Executable file
BIN
contribution/trunk/tutos_META08/linux_32bits/MO_lesson2/tabu_search
Executable file
Binary file not shown.
145
contribution/trunk/tutos_META08/linux_32bits/MO_lesson2/tabu_search.cpp
Executable file
145
contribution/trunk/tutos_META08/linux_32bits/MO_lesson2/tabu_search.cpp
Executable file
|
|
@ -0,0 +1,145 @@
|
|||
/*
|
||||
<tabu_search.cpp>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
|
||||
(C) OPAC Team, LIFL, 2002-2008
|
||||
|
||||
Sébastien Cahon, Jean-Charles Boisson
|
||||
|
||||
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 <eo>
|
||||
#include <mo>
|
||||
#include <tsp>
|
||||
|
||||
void manage_configuration_file(eoParser & _parser);
|
||||
|
||||
int
|
||||
main (int _argc, char* _argv [])
|
||||
{
|
||||
std::string instancePath, value;
|
||||
unsigned int seed, maxIterations, tabuListSize;
|
||||
|
||||
eoParser parser(_argc, _argv);
|
||||
|
||||
manage_configuration_file(parser);
|
||||
|
||||
seed=atoi( (parser.getParamWithLongName("seed")->getValue()).c_str() );
|
||||
maxIterations=atoi( (parser.getParamWithLongName("maxIter")->getValue()).c_str() );
|
||||
tabuListSize=atoi( (parser.getParamWithLongName("tabuListSize")->getValue()).c_str() );
|
||||
instancePath=parser.getParamWithLongName("instancePath")->getValue();
|
||||
value=parser.getParamWithLongName("tabuListType")->getValue();
|
||||
|
||||
srand (seed);
|
||||
Graph::load(instancePath.c_str());
|
||||
|
||||
Route solution;
|
||||
|
||||
RouteInit initializer;
|
||||
initializer(solution);
|
||||
|
||||
RouteEval full_evaluation;
|
||||
full_evaluation(solution);
|
||||
|
||||
std :: cout << "[From] " << solution << std :: endl;
|
||||
|
||||
/* Tools for an efficient (? :-))
|
||||
local search ! */
|
||||
|
||||
TwoOptInit two_opt_initializer;
|
||||
|
||||
TwoOptNext two_opt_next_move_generator;
|
||||
|
||||
TwoOptIncrEval two_opt_incremental_evaluation;
|
||||
|
||||
moTabuList<TwoOpt> *tabuList;
|
||||
|
||||
if(value.compare("TwoOpt")==0)
|
||||
{
|
||||
tabuList=new TwoOptTabuList();
|
||||
}
|
||||
else if (value.compare("SimpleMove")==0)
|
||||
{
|
||||
tabuList=new moSimpleMoveTabuList<TwoOpt>(tabuListSize);
|
||||
}
|
||||
else if (value.compare("SimpleSolution")==0)
|
||||
{
|
||||
tabuList=new moSimpleSolutionTabuList<TwoOpt>(tabuListSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw std::runtime_error("[tabu_search.cpp]: the type of tabu list '"+value+"' is not correct.");
|
||||
}
|
||||
|
||||
moNoAspirCrit <TwoOpt> aspiration_criterion;
|
||||
|
||||
moGenSolContinue <Route> continu (maxIterations);
|
||||
|
||||
moTS <TwoOpt> tabu_search (two_opt_initializer, two_opt_next_move_generator,
|
||||
two_opt_incremental_evaluation, *tabuList, aspiration_criterion, continu, full_evaluation);
|
||||
tabu_search(solution);
|
||||
|
||||
std :: cout << "[To] " << solution << std :: endl;
|
||||
|
||||
delete(tabuList);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
manage_configuration_file(eoParser & _parser)
|
||||
{
|
||||
std::ofstream os;
|
||||
|
||||
_parser.createParam(std::string("../tsp/benchs/berlin52.tsp"), "instancePath", "Path to the instance.",
|
||||
0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam((unsigned int)time(0), "seed", "Seed for rand.", 0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam((unsigned int)10, "tabuListSize", "Size of the tabu list.", 0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam((unsigned int)1000, "maxIter", "Maximum number of iterations.", 0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam(std::string("TwoOpt"), "tabuListType", "Type of the tabu list: 'TwoOpt', 'SimpleMove' or 'SimpleSolution'.",
|
||||
0, "Configuration", false);
|
||||
|
||||
if (_parser.userNeedsHelp())
|
||||
{
|
||||
_parser.printHelp(std::cout);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
os.open("current_param");
|
||||
if(!os.is_open())
|
||||
{
|
||||
throw std::runtime_error("[tabu_search.cpp]: the file current_param cannot be created.");
|
||||
}
|
||||
os <<_parser;
|
||||
os.close();
|
||||
}
|
||||
14
contribution/trunk/tutos_META08/linux_32bits/MO_lesson3/current_param
Executable file
14
contribution/trunk/tutos_META08/linux_32bits/MO_lesson3/current_param
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
###### General ######
|
||||
# --help=0 # -h : Prints this message
|
||||
# --stopOnUnknownParam=1 # Stop if unkown param entered
|
||||
|
||||
###### Configuration ######
|
||||
--instancePath=../tsp/benchs/berlin52.tsp # Path to the instance.
|
||||
# --seed=1224772252 # Seed for rand.
|
||||
--maxIter=1000 # Maximum number of iterations.
|
||||
--initialTemp=1000 # Initial temperature.
|
||||
--threshold=0.1 # Minimum temperature allowed.
|
||||
--expoRatio=0.98 # Ratio used if exponential cooling schedule is chosen.
|
||||
--lineaRatio=0.5 # Ratio used if linear cooling schedule is chosen.
|
||||
--coolSchedType=Expo # Type the cooling schedule: 'Expo' or 'Linear'.
|
||||
8
contribution/trunk/tutos_META08/linux_32bits/MO_lesson3/param
Executable file
8
contribution/trunk/tutos_META08/linux_32bits/MO_lesson3/param
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
###### Configuration ######
|
||||
--instancePath=../tsp/benchs/berlin52.tsp # Path to the instance.
|
||||
--maxIter=1000 # Maximum number of iterations.
|
||||
--initialTemp=1000 # Initial temperature.
|
||||
--threshold=0.1 # Minimum temperature allowed.
|
||||
--expoRatio=0.98 # Ratio used if exponential cooling schedule is chosen.
|
||||
--lineaRatio=0.5 # Ratio used if linear cooling schedule is chosen.
|
||||
--coolSchedType=Expo # Type the cooling schedule: 'Expo' or 'Linear'.
|
||||
BIN
contribution/trunk/tutos_META08/linux_32bits/MO_lesson3/simulated_annealing
Executable file
BIN
contribution/trunk/tutos_META08/linux_32bits/MO_lesson3/simulated_annealing
Executable file
Binary file not shown.
148
contribution/trunk/tutos_META08/linux_32bits/MO_lesson3/simulated_annealing.cpp
Executable file
148
contribution/trunk/tutos_META08/linux_32bits/MO_lesson3/simulated_annealing.cpp
Executable file
|
|
@ -0,0 +1,148 @@
|
|||
/*
|
||||
<simulated_annealing.cpp>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
|
||||
(C) OPAC Team, LIFL, 2002-2008
|
||||
|
||||
Sébastien Cahon, Jean-Charles Boisson
|
||||
|
||||
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 <eo>
|
||||
#include <mo>
|
||||
#include <tsp>
|
||||
|
||||
void manage_configuration_file(eoParser & _parser);
|
||||
|
||||
int
|
||||
main (int _argc, char* _argv [])
|
||||
{
|
||||
std::string instancePath, value;
|
||||
unsigned int seed, maxIterations;
|
||||
double threshold, exponentialRatio, linearRatio, initialTemperature;
|
||||
|
||||
eoParser parser(_argc, _argv);
|
||||
|
||||
manage_configuration_file(parser);
|
||||
|
||||
seed=atoi( (parser.getParamWithLongName("seed")->getValue()).c_str() );
|
||||
instancePath=parser.getParamWithLongName("instancePath")->getValue();
|
||||
maxIterations=atoi( (parser.getParamWithLongName("maxIter")->getValue()).c_str() );
|
||||
initialTemperature=atof( (parser.getParamWithLongName("initialTemp")->getValue()).c_str() );
|
||||
threshold=atof( (parser.getParamWithLongName("threshold")->getValue()).c_str() );
|
||||
exponentialRatio=atof( (parser.getParamWithLongName("expoRatio")->getValue()).c_str() );
|
||||
linearRatio=atof( (parser.getParamWithLongName("lineaRatio")->getValue()).c_str() );
|
||||
value=parser.getParamWithLongName("coolSchedType")->getValue();
|
||||
|
||||
srand (seed);
|
||||
Graph::load(instancePath.c_str());
|
||||
|
||||
Route solution;
|
||||
|
||||
RouteInit initializer;
|
||||
initializer (solution);
|
||||
|
||||
RouteEval full_evaluation;
|
||||
full_evaluation (solution);
|
||||
|
||||
std :: cout << "[From] " << solution << std :: endl;
|
||||
|
||||
/* Tools for an efficient (? :-))
|
||||
local search ! */
|
||||
|
||||
TwoOptRand two_opt_random_move_generator;
|
||||
|
||||
TwoOptIncrEval two_opt_incremental_evaluation;
|
||||
|
||||
TwoOpt move;
|
||||
|
||||
moCoolingSchedule* coolingSchedule;
|
||||
|
||||
if(value.compare("Expo")==0)
|
||||
{
|
||||
coolingSchedule=new moExponentialCoolingSchedule(threshold, exponentialRatio);
|
||||
}
|
||||
else if (value.compare("Linear")==0)
|
||||
{
|
||||
coolingSchedule=new moLinearCoolingSchedule(threshold, linearRatio);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw std::runtime_error("[simulated_annealing.cpp]: the type of cooling schedule '"+value+"' is not correct.");
|
||||
}
|
||||
|
||||
moGenSolContinue <Route> continu (maxIterations);
|
||||
|
||||
moSA <TwoOpt> simulated_annealing (two_opt_random_move_generator, two_opt_incremental_evaluation,
|
||||
continu, initialTemperature, *coolingSchedule, full_evaluation);
|
||||
simulated_annealing (solution);
|
||||
|
||||
std :: cout << "[To] " << solution << std :: endl;
|
||||
|
||||
delete(coolingSchedule);
|
||||
|
||||
return EXIT_SUCCESS ;
|
||||
}
|
||||
|
||||
void
|
||||
manage_configuration_file(eoParser & _parser)
|
||||
{
|
||||
std::ofstream os;
|
||||
|
||||
_parser.createParam(std::string("../tsp/benchs/berlin52.tsp"), "instancePath", "Path to the instance.",
|
||||
0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam((unsigned int)time(0), "seed", "Seed for rand.", 0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam((unsigned int)1000, "maxIter", "Maximum number of iterations.", 0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam((double)1000, "initialTemp", "Initial temperature.", 0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam((double)0.1, "threshold", "Minimum temperature allowed.", 0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam((double)0.98, "expoRatio", "Ratio used if exponential cooling schedule is chosen.", 0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam((double)0.5, "lineaRatio", "Ratio used if linear cooling schedule is chosen.", 0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam(std::string("Expo"), "coolSchedType", "Type the cooling schedule: 'Expo' or 'Linear'.",
|
||||
0, "Configuration", false);
|
||||
|
||||
if (_parser.userNeedsHelp())
|
||||
{
|
||||
_parser.printHelp(std::cout);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
os.open("current_param");
|
||||
if(!os.is_open())
|
||||
{
|
||||
throw std::runtime_error("[simulated_annealing.cpp]: the file current_param cannot be created.");
|
||||
}
|
||||
os <<_parser;
|
||||
os.close();
|
||||
}
|
||||
9
contribution/trunk/tutos_META08/linux_32bits/MO_lesson4/current_param
Executable file
9
contribution/trunk/tutos_META08/linux_32bits/MO_lesson4/current_param
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
###### General ######
|
||||
# --help=0 # -h : Prints this message
|
||||
# --stopOnUnknownParam=1 # Stop if unkown param entered
|
||||
|
||||
###### Configuration ######
|
||||
--instancePath=../tsp/benchs/berlin52.tsp # Path to the instance.
|
||||
# --seed=1224772265 # Seed for rand.
|
||||
--maxIter=1000 # Maximum number of iterations.
|
||||
BIN
contribution/trunk/tutos_META08/linux_32bits/MO_lesson4/iterated_local_search
Executable file
BIN
contribution/trunk/tutos_META08/linux_32bits/MO_lesson4/iterated_local_search
Executable file
Binary file not shown.
|
|
@ -0,0 +1,117 @@
|
|||
/*
|
||||
<iterated_local_search.cpp>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
|
||||
(C) OPAC Team, LIFL, 2002-2008
|
||||
|
||||
Sébastien Cahon, Jean-Charles Boisson
|
||||
|
||||
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 <eo>
|
||||
#include <mo>
|
||||
#include <tsp>
|
||||
|
||||
void manage_configuration_file(eoParser & _parser);
|
||||
|
||||
int
|
||||
main (int _argc, char* _argv [])
|
||||
{
|
||||
std::string instancePath;
|
||||
unsigned int seed, maxIterations;
|
||||
|
||||
eoParser parser(_argc, _argv);
|
||||
|
||||
manage_configuration_file(parser);
|
||||
|
||||
seed=atoi( (parser.getParamWithLongName("seed")->getValue()).c_str() );
|
||||
instancePath=parser.getParamWithLongName("instancePath")->getValue();
|
||||
maxIterations=atoi( (parser.getParamWithLongName("maxIter")->getValue()).c_str() );
|
||||
|
||||
srand(seed);
|
||||
Graph::load (instancePath.c_str());
|
||||
|
||||
Route solution;
|
||||
|
||||
RouteInit initializer;
|
||||
initializer (solution);
|
||||
|
||||
RouteEval full_evaluation;
|
||||
full_evaluation (solution);
|
||||
|
||||
std :: cout << "[From] " << solution << std :: endl;
|
||||
|
||||
TwoOptInit two_opt_initializer;
|
||||
|
||||
TwoOptNext two_opt_next_move_generator;
|
||||
|
||||
TwoOptIncrEval two_opt_incremental_evaluation;
|
||||
|
||||
moBestImprSelect <TwoOpt> two_opt_selection;
|
||||
|
||||
moGenSolContinue <Route> continu(maxIterations);
|
||||
|
||||
moFitComparator<Route> comparator;
|
||||
|
||||
CitySwap perturbation;
|
||||
|
||||
moILS<TwoOpt> iterated_local_search (two_opt_initializer, two_opt_next_move_generator, two_opt_incremental_evaluation,
|
||||
two_opt_selection, continu, comparator, perturbation, full_evaluation) ;
|
||||
iterated_local_search(solution);
|
||||
|
||||
std :: cout << "[To] " << solution << std :: endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
manage_configuration_file(eoParser & _parser)
|
||||
{
|
||||
std::ofstream os;
|
||||
|
||||
_parser.createParam(std::string("../tsp/benchs/berlin52.tsp"), "instancePath", "Path to the instance.",
|
||||
0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam((unsigned int)time(0), "seed", "Seed for rand.", 0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam((unsigned int)1000, "maxIter", "Maximum number of iterations.", 0, "Configuration", false);
|
||||
|
||||
if (_parser.userNeedsHelp())
|
||||
{
|
||||
_parser.printHelp(std::cout);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
os.open("current_param");
|
||||
if(!os.is_open())
|
||||
{
|
||||
throw std::runtime_error("[iterated_local_search.cpp]: the file current_param cannot be created.");
|
||||
}
|
||||
os <<_parser;
|
||||
os.close();
|
||||
}
|
||||
3
contribution/trunk/tutos_META08/linux_32bits/MO_lesson4/param
Executable file
3
contribution/trunk/tutos_META08/linux_32bits/MO_lesson4/param
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
###### Configuration ######
|
||||
--instancePath=../tsp/benchs/berlin52.tsp # Path to the instance.
|
||||
--maxIter=1000 # Maximum number of iterations.
|
||||
63
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/020_05_01.txt
Executable file
63
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/020_05_01.txt
Executable file
|
|
@ -0,0 +1,63 @@
|
|||
20
|
||||
5
|
||||
873654221
|
||||
0
|
||||
468
|
||||
54 79 16 66 58
|
||||
1
|
||||
325
|
||||
83 3 89 58 56
|
||||
2
|
||||
923
|
||||
15 11 49 31 20
|
||||
3
|
||||
513
|
||||
71 99 15 68 85
|
||||
4
|
||||
1070
|
||||
77 56 89 78 53
|
||||
5
|
||||
690
|
||||
36 70 45 91 35
|
||||
6
|
||||
602
|
||||
53 99 60 13 53
|
||||
7
|
||||
289
|
||||
38 60 23 59 41
|
||||
8
|
||||
873
|
||||
27 5 57 49 69
|
||||
9
|
||||
342
|
||||
87 56 64 85 13
|
||||
10
|
||||
764
|
||||
76 3 7 85 86
|
||||
11
|
||||
268
|
||||
91 61 1 9 72
|
||||
12
|
||||
1158
|
||||
14 73 63 39 8
|
||||
13
|
||||
646
|
||||
29 75 41 41 49
|
||||
14
|
||||
1111
|
||||
12 47 63 56 47
|
||||
15
|
||||
965
|
||||
77 14 47 40 87
|
||||
16
|
||||
703
|
||||
32 21 26 54 58
|
||||
17
|
||||
1205
|
||||
87 86 75 77 18
|
||||
18
|
||||
334
|
||||
68 5 77 51 68
|
||||
19
|
||||
1111
|
||||
94 77 40 31 28
|
||||
63
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/020_05_02.txt
Executable file
63
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/020_05_02.txt
Executable file
|
|
@ -0,0 +1,63 @@
|
|||
20
|
||||
5
|
||||
379008056
|
||||
0
|
||||
517
|
||||
26 59 78 88 69
|
||||
1
|
||||
461
|
||||
38 62 90 54 30
|
||||
2
|
||||
832
|
||||
27 44 64 47 61
|
||||
3
|
||||
653
|
||||
88 10 49 83 35
|
||||
4
|
||||
933
|
||||
95 23 47 84 53
|
||||
5
|
||||
811
|
||||
55 64 20 9 98
|
||||
6
|
||||
966
|
||||
54 47 61 30 94
|
||||
7
|
||||
448
|
||||
63 68 93 11 33
|
||||
8
|
||||
577
|
||||
23 54 36 92 77
|
||||
9
|
||||
1122
|
||||
45 9 47 63 31
|
||||
10
|
||||
666
|
||||
86 30 70 62 54
|
||||
11
|
||||
1189
|
||||
43 31 54 75 71
|
||||
12
|
||||
470
|
||||
43 92 87 48 78
|
||||
13
|
||||
475
|
||||
40 7 13 23 9
|
||||
14
|
||||
462
|
||||
37 14 40 85 79
|
||||
15
|
||||
866
|
||||
54 95 34 23 51
|
||||
16
|
||||
392
|
||||
35 76 55 4 76
|
||||
17
|
||||
310
|
||||
59 82 13 31 56
|
||||
18
|
||||
719
|
||||
43 91 11 13 80
|
||||
19
|
||||
1221
|
||||
50 37 5 98 72
|
||||
63
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/020_10_01.txt
Executable file
63
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/020_10_01.txt
Executable file
|
|
@ -0,0 +1,63 @@
|
|||
20
|
||||
10
|
||||
587595453
|
||||
0
|
||||
1250
|
||||
74 28 89 60 54 92 9 4 25 15
|
||||
1
|
||||
1371
|
||||
21 3 52 88 66 11 8 18 15 84
|
||||
2
|
||||
637
|
||||
58 27 56 26 12 54 88 25 91 8
|
||||
3
|
||||
616
|
||||
4 61 13 58 57 97 72 28 49 30
|
||||
4
|
||||
917
|
||||
21 34 7 76 70 57 27 95 56 95
|
||||
5
|
||||
937
|
||||
28 76 32 98 82 53 22 51 10 79
|
||||
6
|
||||
1435
|
||||
58 64 32 29 99 65 50 84 62 9
|
||||
7
|
||||
1197
|
||||
83 87 98 47 84 77 2 18 70 91
|
||||
8
|
||||
1301
|
||||
31 54 46 79 16 51 49 6 76 76
|
||||
9
|
||||
637
|
||||
61 98 60 26 41 36 82 90 99 26
|
||||
10
|
||||
749
|
||||
94 76 23 19 23 53 93 69 58 42
|
||||
11
|
||||
1223
|
||||
44 41 87 48 11 19 96 61 83 66
|
||||
12
|
||||
887
|
||||
97 70 7 95 68 54 43 57 84 70
|
||||
13
|
||||
1316
|
||||
94 43 36 78 58 86 13 5 64 91
|
||||
14
|
||||
1330
|
||||
66 42 26 77 30 40 60 75 74 67
|
||||
15
|
||||
1380
|
||||
6 79 85 90 5 56 11 4 14 3
|
||||
16
|
||||
767
|
||||
37 88 7 24 5 79 37 38 18 98
|
||||
17
|
||||
574
|
||||
22 15 34 10 39 74 91 28 48 4
|
||||
18
|
||||
1398
|
||||
99 49 36 85 58 24 84 4 96 71
|
||||
19
|
||||
1179
|
||||
83 72 48 55 31 3 67 80 86 62
|
||||
63
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/020_10_02.txt
Executable file
63
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/020_10_02.txt
Executable file
|
|
@ -0,0 +1,63 @@
|
|||
20
|
||||
10
|
||||
1401007982
|
||||
0
|
||||
1279
|
||||
80 59 59 31 30 53 93 90 65 64
|
||||
1
|
||||
1481
|
||||
13 83 70 64 88 19 79 92 97 38
|
||||
2
|
||||
1157
|
||||
64 85 76 11 14 99 88 35 27 44
|
||||
3
|
||||
1391
|
||||
77 85 10 9 22 62 77 13 25 46
|
||||
4
|
||||
763
|
||||
17 70 65 32 93 88 94 75 61 66
|
||||
5
|
||||
1456
|
||||
78 35 19 58 48 93 39 55 24 31
|
||||
6
|
||||
900
|
||||
82 2 77 98 10 34 74 80 97 48
|
||||
7
|
||||
1047
|
||||
4 76 86 95 7 72 46 67 61 27
|
||||
8
|
||||
1355
|
||||
72 46 21 25 14 42 17 3 75 82
|
||||
9
|
||||
1262
|
||||
93 72 75 4 91 65 30 93 92 51
|
||||
10
|
||||
1329
|
||||
68 69 96 45 5 39 62 54 73 90
|
||||
11
|
||||
562
|
||||
25 46 3 60 43 79 77 67 21 63
|
||||
12
|
||||
684
|
||||
67 3 50 87 30 9 43 25 29 85
|
||||
13
|
||||
567
|
||||
80 57 57 31 79 26 98 77 3 36
|
||||
14
|
||||
765
|
||||
43 71 66 1 39 72 48 38 96 69
|
||||
15
|
||||
808
|
||||
93 77 84 96 34 29 14 98 51 67
|
||||
16
|
||||
999
|
||||
21 33 98 22 77 36 45 96 26 81
|
||||
17
|
||||
548
|
||||
33 49 55 95 81 48 25 20 44 18
|
||||
18
|
||||
577
|
||||
14 59 70 73 11 57 98 15 56 81
|
||||
19
|
||||
704
|
||||
30 82 32 77 10 95 30 36 31 72
|
||||
63
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/020_20_01.txt
Executable file
63
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/020_20_01.txt
Executable file
|
|
@ -0,0 +1,63 @@
|
|||
20
|
||||
20
|
||||
479340445
|
||||
0
|
||||
1696
|
||||
50 78 36 85 9 75 46 73 71 7 49 3 60 12 75 31 70 20 88 9
|
||||
1
|
||||
1273
|
||||
90 56 43 88 92 64 94 3 49 40 49 53 88 47 19 61 78 78 30 41
|
||||
2
|
||||
1546
|
||||
39 9 10 60 98 96 6 56 36 33 15 59 15 46 60 47 41 38 34 22
|
||||
3
|
||||
1882
|
||||
34 43 19 98 44 95 19 73 87 64 18 7 26 17 87 32 9 26 33 34
|
||||
4
|
||||
1117
|
||||
66 84 55 4 51 22 20 80 8 5 65 65 11 43 27 34 47 64 21 83
|
||||
5
|
||||
1181
|
||||
81 73 48 99 8 41 51 82 25 25 55 58 16 16 48 69 94 62 7 55
|
||||
6
|
||||
1416
|
||||
27 66 85 53 31 26 85 36 76 89 1 24 55 91 72 32 26 11 94 3
|
||||
7
|
||||
1635
|
||||
48 38 70 21 15 33 92 98 73 95 79 55 59 94 88 1 65 38 10 8
|
||||
8
|
||||
1723
|
||||
46 83 82 33 47 68 43 90 80 58 10 26 81 73 48 1 17 68 73 75
|
||||
9
|
||||
1932
|
||||
68 57 39 53 31 9 75 46 6 83 37 40 53 89 59 80 42 37 85 30
|
||||
10
|
||||
1219
|
||||
48 97 91 63 80 81 70 10 6 28 77 89 92 12 74 19 59 74 82 57
|
||||
11
|
||||
1521
|
||||
92 52 82 18 83 28 70 46 33 35 80 94 23 58 86 57 80 9 62 65
|
||||
12
|
||||
1322
|
||||
78 77 85 45 20 61 36 65 79 74 79 51 55 25 49 98 7 65 99 89
|
||||
13
|
||||
1057
|
||||
84 13 17 29 84 69 31 83 10 5 84 74 79 24 94 37 75 16 67 60
|
||||
14
|
||||
1922
|
||||
93 12 6 43 69 37 76 75 93 6 93 54 13 55 15 31 63 38 61 90
|
||||
15
|
||||
1130
|
||||
39 2 54 41 49 57 63 47 65 9 21 86 89 1 95 51 96 85 10 84
|
||||
16
|
||||
1411
|
||||
43 65 87 80 93 36 89 61 26 3 85 22 2 67 41 66 7 50 4 74
|
||||
17
|
||||
1840
|
||||
1 93 85 4 39 80 46 28 73 2 64 83 17 3 94 38 10 62 70 17
|
||||
18
|
||||
1741
|
||||
65 39 4 31 13 96 25 59 42 35 46 19 97 1 15 62 47 39 31 2
|
||||
19
|
||||
1377
|
||||
87 1 72 19 88 74 88 22 18 41 35 44 41 71 71 72 38 97 49 19
|
||||
153
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/050_05_01.txt
Executable file
153
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/050_05_01.txt
Executable file
|
|
@ -0,0 +1,153 @@
|
|||
50
|
||||
5
|
||||
1328042058
|
||||
0
|
||||
1290
|
||||
75 26 48 26 77
|
||||
1
|
||||
2352
|
||||
87 37 4 67 94
|
||||
2
|
||||
362
|
||||
13 25 92 4 9
|
||||
3
|
||||
305
|
||||
11 95 92 14 57
|
||||
4
|
||||
262
|
||||
41 49 72 93 29
|
||||
5
|
||||
1250
|
||||
43 12 45 54 79
|
||||
6
|
||||
2170
|
||||
93 59 5 21 55
|
||||
7
|
||||
1601
|
||||
69 17 98 20 73
|
||||
8
|
||||
2039
|
||||
80 46 93 6 65
|
||||
9
|
||||
1628
|
||||
13 20 17 18 86
|
||||
10
|
||||
483
|
||||
24 52 79 75 25
|
||||
11
|
||||
285
|
||||
72 44 11 25 39
|
||||
12
|
||||
1092
|
||||
38 92 16 16 76
|
||||
13
|
||||
936
|
||||
81 75 89 77 24
|
||||
14
|
||||
2349
|
||||
83 95 81 28 38
|
||||
15
|
||||
473
|
||||
88 33 92 24 5
|
||||
16
|
||||
2325
|
||||
26 10 45 15 91
|
||||
17
|
||||
747
|
||||
6 45 61 77 29
|
||||
18
|
||||
970
|
||||
89 2 39 36 22
|
||||
19
|
||||
434
|
||||
67 62 28 16 27
|
||||
20
|
||||
1258
|
||||
70 62 94 32 39
|
||||
21
|
||||
2405
|
||||
30 82 87 46 31
|
||||
22
|
||||
862
|
||||
89 29 23 21 46
|
||||
23
|
||||
298
|
||||
30 29 1 81 18
|
||||
24
|
||||
2014
|
||||
68 94 55 28 93
|
||||
25
|
||||
2608
|
||||
21 20 91 70 58
|
||||
26
|
||||
1737
|
||||
78 42 67 89 85
|
||||
27
|
||||
2214
|
||||
46 80 91 54 58
|
||||
28
|
||||
1910
|
||||
99 94 4 96 97
|
||||
29
|
||||
2245
|
||||
10 35 60 62 10
|
||||
30
|
||||
2211
|
||||
17 8 38 46 79
|
||||
31
|
||||
547
|
||||
23 41 25 60 93
|
||||
32
|
||||
2237
|
||||
83 65 90 19 2
|
||||
33
|
||||
1327
|
||||
47 4 93 97 87
|
||||
34
|
||||
700
|
||||
86 71 13 13 17
|
||||
35
|
||||
1011
|
||||
18 30 65 7 18
|
||||
36
|
||||
2001
|
||||
67 14 25 44 10
|
||||
37
|
||||
1230
|
||||
46 32 34 7 50
|
||||
38
|
||||
1020
|
||||
4 50 47 73 8
|
||||
39
|
||||
1918
|
||||
14 30 98 15 26
|
||||
40
|
||||
1001
|
||||
4 27 91 66 14
|
||||
41
|
||||
1383
|
||||
20 98 11 70 21
|
||||
42
|
||||
1229
|
||||
88 39 46 97 15
|
||||
43
|
||||
2594
|
||||
50 84 50 33 10
|
||||
44
|
||||
403
|
||||
84 65 77 97 85
|
||||
45
|
||||
1515
|
||||
58 12 5 64 46
|
||||
46
|
||||
431
|
||||
93 58 14 73 42
|
||||
47
|
||||
1971
|
||||
76 45 47 28 18
|
||||
48
|
||||
939
|
||||
50 49 80 4 36
|
||||
49
|
||||
2028
|
||||
30 15 45 87 2
|
||||
153
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/050_10_01.txt
Executable file
153
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/050_10_01.txt
Executable file
|
|
@ -0,0 +1,153 @@
|
|||
50
|
||||
10
|
||||
1958948863
|
||||
0
|
||||
793
|
||||
46 61 3 51 37 79 83 22 27 24
|
||||
1
|
||||
2280
|
||||
52 87 1 24 16 93 87 29 92 47
|
||||
2
|
||||
939
|
||||
79 51 58 21 42 68 38 99 75 39
|
||||
3
|
||||
2591
|
||||
45 25 85 57 47 75 38 25 94 66
|
||||
4
|
||||
1540
|
||||
97 73 33 69 94 37 86 98 18 41
|
||||
5
|
||||
2386
|
||||
10 93 71 51 14 44 67 55 41 46
|
||||
6
|
||||
812
|
||||
44 28 58 50 94 34 23 80 37 24
|
||||
7
|
||||
2524
|
||||
24 90 56 51 34 39 19 82 58 23
|
||||
8
|
||||
1370
|
||||
85 94 64 21 72 76 97 33 56 68
|
||||
9
|
||||
1319
|
||||
75 59 43 19 36 62 78 68 20 50
|
||||
10
|
||||
2388
|
||||
66 64 48 63 88 74 66 47 2 93
|
||||
11
|
||||
961
|
||||
49 2 69 91 51 28 67 74 39 22
|
||||
12
|
||||
2831
|
||||
95 16 96 11 41 78 7 26 91 64
|
||||
13
|
||||
2790
|
||||
61 35 35 6 71 43 23 61 81 81
|
||||
14
|
||||
2076
|
||||
19 53 82 31 94 98 67 95 33 94
|
||||
15
|
||||
2519
|
||||
47 40 53 63 99 83 8 55 14 97
|
||||
16
|
||||
1981
|
||||
84 81 64 36 11 91 77 11 88 54
|
||||
17
|
||||
695
|
||||
13 26 11 39 97 27 71 42 22 82
|
||||
18
|
||||
2133
|
||||
11 85 61 57 44 6 85 72 36 11
|
||||
19
|
||||
1871
|
||||
19 4 36 47 77 82 29 14 65 91
|
||||
20
|
||||
1495
|
||||
98 4 53 56 69 60 49 8 79 23
|
||||
21
|
||||
754
|
||||
2 10 87 65 91 44 3 98 23 32
|
||||
22
|
||||
783
|
||||
85 63 88 59 38 43 94 90 66 26
|
||||
23
|
||||
984
|
||||
44 96 10 4 25 76 76 36 5 22
|
||||
24
|
||||
2004
|
||||
7 55 32 10 87 99 95 75 15 12
|
||||
25
|
||||
2269
|
||||
73 71 38 12 7 66 48 69 51 23
|
||||
26
|
||||
1771
|
||||
19 66 25 62 66 11 4 26 2 34
|
||||
27
|
||||
2030
|
||||
69 94 24 43 54 35 37 24 81 87
|
||||
28
|
||||
2603
|
||||
12 7 90 49 86 52 82 55 12 59
|
||||
29
|
||||
2150
|
||||
73 15 7 54 49 8 57 98 40 2
|
||||
30
|
||||
2157
|
||||
85 11 11 87 3 40 61 86 59 38
|
||||
31
|
||||
2187
|
||||
23 99 49 29 48 62 6 30 32 84
|
||||
32
|
||||
937
|
||||
53 37 2 2 44 25 97 92 16 62
|
||||
33
|
||||
728
|
||||
16 50 76 18 93 24 5 94 87 10
|
||||
34
|
||||
510
|
||||
88 56 17 75 37 30 27 66 78 11
|
||||
35
|
||||
2786
|
||||
8 69 32 39 82 1 95 47 41 93
|
||||
36
|
||||
2134
|
||||
26 22 39 77 31 73 46 3 43 57
|
||||
37
|
||||
1046
|
||||
42 56 9 69 59 27 92 41 94 81
|
||||
38
|
||||
2849
|
||||
58 67 83 15 78 16 46 41 1 10
|
||||
39
|
||||
1956
|
||||
63 63 69 78 33 91 52 47 93 40
|
||||
40
|
||||
2456
|
||||
7 96 67 68 36 33 8 89 22 62
|
||||
41
|
||||
1105
|
||||
2 74 28 37 3 11 11 28 93 49
|
||||
42
|
||||
1560
|
||||
44 4 88 22 58 99 7 39 62 90
|
||||
43
|
||||
1745
|
||||
38 42 23 41 10 2 54 80 53 34
|
||||
44
|
||||
2216
|
||||
24 40 91 92 98 60 72 47 30 11
|
||||
45
|
||||
1157
|
||||
76 30 71 67 6 90 57 57 34 81
|
||||
46
|
||||
1317
|
||||
85 93 3 24 44 36 85 74 27 51
|
||||
47
|
||||
2372
|
||||
61 36 26 87 62 62 22 38 30 21
|
||||
48
|
||||
777
|
||||
32 25 41 91 24 15 87 59 54 39
|
||||
49
|
||||
972
|
||||
90 87 96 31 94 3 65 5 77 27
|
||||
153
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/050_20_01.txt
Executable file
153
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/050_20_01.txt
Executable file
|
|
@ -0,0 +1,153 @@
|
|||
50
|
||||
20
|
||||
1539989115
|
||||
0
|
||||
2509
|
||||
52 63 82 16 63 94 79 22 80 96 53 54 71 27 95 3 92 80 61 74
|
||||
1
|
||||
2039
|
||||
95 99 21 26 55 34 21 6 13 3 19 67 90 93 53 80 62 38 86 38
|
||||
2
|
||||
3096
|
||||
42 69 79 46 59 89 93 24 64 50 99 25 59 49 54 78 11 55 16 4
|
||||
3
|
||||
2950
|
||||
75 70 95 66 35 62 32 55 77 57 62 77 82 63 22 32 83 34 42 31
|
||||
4
|
||||
1249
|
||||
44 53 46 76 21 47 8 48 17 66 88 38 22 65 84 53 87 85 14 62
|
||||
5
|
||||
2481
|
||||
57 21 23 31 59 66 45 57 78 84 93 98 88 34 54 43 66 44 92 39
|
||||
6
|
||||
3193
|
||||
89 10 40 36 78 76 37 78 82 98 34 96 35 10 2 85 98 47 67 97
|
||||
7
|
||||
3253
|
||||
53 31 95 8 25 15 78 5 4 55 72 20 49 56 80 19 42 66 77 57
|
||||
8
|
||||
2123
|
||||
84 80 87 37 30 18 26 50 72 70 42 15 78 51 84 48 23 19 46 9
|
||||
9
|
||||
2390
|
||||
62 18 37 21 38 54 98 83 93 32 65 36 69 97 66 49 45 66 41 54
|
||||
10
|
||||
1764
|
||||
91 5 24 3 78 24 17 70 68 31 39 65 76 52 25 66 52 61 78 13
|
||||
11
|
||||
2940
|
||||
14 18 24 76 79 55 25 21 25 64 79 97 2 46 16 22 6 60 3 47
|
||||
12
|
||||
1635
|
||||
95 17 65 67 58 96 21 71 67 11 9 27 14 16 79 37 3 98 72 6
|
||||
13
|
||||
3171
|
||||
89 71 62 5 44 10 28 58 80 9 26 25 3 50 90 51 64 82 95 70
|
||||
14
|
||||
2670
|
||||
4 90 19 47 38 12 68 36 43 32 72 61 22 96 51 82 55 79 53 19
|
||||
15
|
||||
2932
|
||||
95 93 67 72 76 96 24 50 93 58 29 24 26 85 29 59 97 71 59 97
|
||||
16
|
||||
2054
|
||||
2 14 66 66 70 53 62 31 21 98 36 97 44 61 29 88 83 28 34 41
|
||||
17
|
||||
3238
|
||||
97 49 6 56 72 92 89 86 33 95 48 61 1 76 90 77 42 74 66 1
|
||||
18
|
||||
2466
|
||||
68 52 65 95 85 77 60 29 14 25 57 75 4 30 83 19 81 27 42 57
|
||||
19
|
||||
2384
|
||||
20 7 59 49 8 6 64 30 30 4 95 92 16 90 83 32 92 33 63 60
|
||||
20
|
||||
3473
|
||||
33 78 2 47 10 91 38 93 59 45 93 73 55 42 19 52 68 13 27 62
|
||||
21
|
||||
3290
|
||||
51 57 67 26 84 14 90 49 83 60 79 21 43 88 95 9 46 9 92 14
|
||||
22
|
||||
2086
|
||||
98 41 82 81 42 41 87 83 85 87 88 29 87 37 87 96 56 12 8 90
|
||||
23
|
||||
2560
|
||||
8 75 90 56 67 30 1 89 85 31 77 3 35 43 12 23 88 51 65 76
|
||||
24
|
||||
3253
|
||||
85 98 30 76 20 85 99 44 70 1 94 96 76 88 34 64 50 16 34 12
|
||||
25
|
||||
3205
|
||||
86 93 63 66 24 17 34 38 35 96 39 51 98 91 23 22 13 49 6 89
|
||||
26
|
||||
2534
|
||||
73 33 5 36 75 23 9 62 2 22 74 26 78 14 44 37 23 83 42 37
|
||||
27
|
||||
2039
|
||||
4 75 93 53 23 60 22 45 76 95 46 44 81 63 30 3 13 48 39 35
|
||||
28
|
||||
2273
|
||||
40 68 53 26 33 76 74 22 46 73 17 56 48 65 82 52 49 13 2 91
|
||||
29
|
||||
2062
|
||||
98 33 85 52 60 39 14 85 72 77 30 31 25 74 83 44 18 78 7 69
|
||||
30
|
||||
1909
|
||||
12 60 81 29 20 85 14 39 69 30 62 64 81 71 42 11 50 96 85 55
|
||||
31
|
||||
2432
|
||||
59 82 73 36 75 10 84 98 46 88 77 38 27 8 56 21 94 77 32 48
|
||||
32
|
||||
2624
|
||||
44 24 34 68 83 65 75 56 3 14 43 44 84 39 89 85 71 68 14 56
|
||||
33
|
||||
3325
|
||||
46 99 74 21 26 15 37 68 57 22 98 46 59 95 38 6 64 88 74 84
|
||||
34
|
||||
3427
|
||||
2 4 13 71 92 55 32 84 71 93 48 66 98 82 96 40 31 77 59 22
|
||||
35
|
||||
1318
|
||||
41 97 78 61 29 41 29 77 77 48 14 31 14 17 10 68 21 76 95 51
|
||||
36
|
||||
1539
|
||||
28 24 35 71 39 28 32 67 33 10 45 48 32 38 3 30 2 73 48 43
|
||||
37
|
||||
3223
|
||||
83 50 20 69 14 93 89 53 49 7 25 27 95 69 53 35 63 92 37 50
|
||||
38
|
||||
1703
|
||||
28 55 16 28 74 88 12 46 59 14 98 82 30 17 97 58 58 72 59 62
|
||||
39
|
||||
1051
|
||||
21 91 48 86 66 27 47 24 82 91 30 51 13 24 11 31 36 87 4 61
|
||||
40
|
||||
1512
|
||||
80 46 12 27 86 77 19 52 59 5 90 90 68 66 65 11 64 66 42 10
|
||||
41
|
||||
2589
|
||||
71 58 11 41 10 81 97 96 70 43 92 63 19 75 47 11 52 98 93 87
|
||||
42
|
||||
3248
|
||||
4 17 80 86 27 19 7 2 76 30 35 85 57 52 76 6 8 40 32 99
|
||||
43
|
||||
2047
|
||||
60 47 9 55 8 76 12 88 10 79 13 36 65 59 22 59 94 31 30 40
|
||||
44
|
||||
3333
|
||||
34 82 24 17 7 55 43 33 65 39 75 69 13 4 17 64 51 75 16 91
|
||||
45
|
||||
1760
|
||||
55 6 76 62 97 67 89 27 19 34 55 67 63 73 14 65 36 45 95 64
|
||||
46
|
||||
2333
|
||||
53 15 32 96 84 65 14 49 77 77 80 81 26 56 11 23 82 98 58 62
|
||||
47
|
||||
2400
|
||||
96 91 35 59 56 8 33 78 86 81 67 18 96 19 69 80 30 90 12 53
|
||||
48
|
||||
2142
|
||||
37 74 66 53 61 18 56 82 21 11 3 81 53 39 91 75 17 4 95 33
|
||||
49
|
||||
1231
|
||||
37 42 48 93 9 56 57 65 75 10 93 72 94 51 53 63 21 23 21 16
|
||||
303
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/100_05_01.txt
Executable file
303
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/100_05_01.txt
Executable file
|
|
@ -0,0 +1,303 @@
|
|||
100
|
||||
5
|
||||
896678084
|
||||
0
|
||||
1682
|
||||
73 34 8 62 10
|
||||
1
|
||||
4503
|
||||
84 46 37 86 60
|
||||
2
|
||||
1249
|
||||
57 97 38 46 34
|
||||
3
|
||||
4984
|
||||
52 88 30 3 96
|
||||
4
|
||||
2923
|
||||
66 52 20 22 79
|
||||
5
|
||||
2401
|
||||
67 49 68 33 62
|
||||
6
|
||||
1978
|
||||
33 88 4 90 6
|
||||
7
|
||||
5318
|
||||
62 15 78 94 15
|
||||
8
|
||||
4769
|
||||
65 55 41 98 94
|
||||
9
|
||||
2093
|
||||
7 6 2 9 39
|
||||
10
|
||||
2438
|
||||
6 77 62 84 85
|
||||
11
|
||||
3143
|
||||
31 49 38 69 17
|
||||
12
|
||||
698
|
||||
42 46 95 26 55
|
||||
13
|
||||
621
|
||||
82 14 82 22 59
|
||||
14
|
||||
2463
|
||||
48 35 96 49 48
|
||||
15
|
||||
3865
|
||||
45 40 56 90 11
|
||||
16
|
||||
1563
|
||||
79 1 61 81 63
|
||||
17
|
||||
1461
|
||||
86 70 34 12 98
|
||||
18
|
||||
2285
|
||||
10 46 1 54 33
|
||||
19
|
||||
4381
|
||||
47 28 9 53 49
|
||||
20
|
||||
1057
|
||||
67 73 57 18 41
|
||||
21
|
||||
3190
|
||||
86 24 80 56 82
|
||||
22
|
||||
4493
|
||||
64 44 58 43 12
|
||||
23
|
||||
4604
|
||||
38 55 7 50 61
|
||||
24
|
||||
1592
|
||||
13 94 56 82 94
|
||||
25
|
||||
4645
|
||||
69 52 31 18 80
|
||||
26
|
||||
2729
|
||||
4 40 92 89 84
|
||||
27
|
||||
1925
|
||||
21 76 84 49 18
|
||||
28
|
||||
3843
|
||||
25 92 25 20 68
|
||||
29
|
||||
4188
|
||||
74 22 20 76 6
|
||||
30
|
||||
2635
|
||||
11 46 65 90 98
|
||||
31
|
||||
3773
|
||||
85 19 36 64 47
|
||||
32
|
||||
269
|
||||
50 18 67 89 6
|
||||
33
|
||||
307
|
||||
21 50 96 16 55
|
||||
34
|
||||
907
|
||||
93 31 35 3 73
|
||||
35
|
||||
288
|
||||
98 41 59 12 70
|
||||
36
|
||||
5211
|
||||
91 51 76 45 56
|
||||
37
|
||||
331
|
||||
26 73 66 67 46
|
||||
38
|
||||
1499
|
||||
4 22 83 97 50
|
||||
39
|
||||
1119
|
||||
28 21 37 80 90
|
||||
40
|
||||
4399
|
||||
61 79 33 97 89
|
||||
41
|
||||
1306
|
||||
8 93 2 92 88
|
||||
42
|
||||
1149
|
||||
55 98 95 56 50
|
||||
43
|
||||
3919
|
||||
68 89 20 50 99
|
||||
44
|
||||
3875
|
||||
30 44 84 95 41
|
||||
45
|
||||
3485
|
||||
26 64 43 25 36
|
||||
46
|
||||
2800
|
||||
81 93 4 52 16
|
||||
47
|
||||
1893
|
||||
95 66 44 21 84
|
||||
48
|
||||
2341
|
||||
49 14 74 47 98
|
||||
49
|
||||
874
|
||||
6 10 92 4 44
|
||||
50
|
||||
3355
|
||||
82 36 55 67 42
|
||||
51
|
||||
345
|
||||
71 36 98 62 43
|
||||
52
|
||||
1530
|
||||
61 69 8 63 62
|
||||
53
|
||||
3516
|
||||
84 79 30 25 49
|
||||
54
|
||||
3194
|
||||
29 90 18 3 22
|
||||
55
|
||||
985
|
||||
44 51 28 55 16
|
||||
56
|
||||
1638
|
||||
83 81 54 87 14
|
||||
57
|
||||
2970
|
||||
12 16 68 84 55
|
||||
58
|
||||
4265
|
||||
54 28 42 28 45
|
||||
59
|
||||
3494
|
||||
19 26 28 73 20
|
||||
60
|
||||
5134
|
||||
52 97 12 8 35
|
||||
61
|
||||
3520
|
||||
59 33 57 38 89
|
||||
62
|
||||
3570
|
||||
74 77 81 80 7
|
||||
63
|
||||
1335
|
||||
42 68 19 53 64
|
||||
64
|
||||
313
|
||||
60 28 16 70 36
|
||||
65
|
||||
1031
|
||||
43 46 88 9 5
|
||||
66
|
||||
4360
|
||||
80 16 75 87 63
|
||||
67
|
||||
2814
|
||||
34 96 11 33 8
|
||||
68
|
||||
571
|
||||
74 59 57 11 76
|
||||
69
|
||||
538
|
||||
46 56 99 65 95
|
||||
70
|
||||
2856
|
||||
40 4 4 92 40
|
||||
71
|
||||
747
|
||||
27 52 51 34 51
|
||||
72
|
||||
3321
|
||||
79 89 26 64 98
|
||||
73
|
||||
612
|
||||
1 84 6 96 77
|
||||
74
|
||||
4517
|
||||
98 42 16 67 92
|
||||
75
|
||||
1532
|
||||
44 37 71 54 35
|
||||
76
|
||||
2848
|
||||
8 90 52 26 3
|
||||
77
|
||||
4701
|
||||
55 51 96 32 56
|
||||
78
|
||||
263
|
||||
55 84 89 10 1
|
||||
79
|
||||
5340
|
||||
27 16 79 91 17
|
||||
80
|
||||
3979
|
||||
69 39 91 90 70
|
||||
81
|
||||
4804
|
||||
79 16 57 31 45
|
||||
82
|
||||
1574
|
||||
97 37 2 7 87
|
||||
83
|
||||
3644
|
||||
39 19 33 6 37
|
||||
84
|
||||
1512
|
||||
54 15 42 77 70
|
||||
85
|
||||
4445
|
||||
75 68 1 91 84
|
||||
86
|
||||
3253
|
||||
88 7 40 42 69
|
||||
87
|
||||
5334
|
||||
87 58 76 5 7
|
||||
88
|
||||
2338
|
||||
97 47 85 46 5
|
||||
89
|
||||
1071
|
||||
4 27 99 54 97
|
||||
90
|
||||
2398
|
||||
79 82 65 56 47
|
||||
91
|
||||
1675
|
||||
59 72 98 1 12
|
||||
92
|
||||
4974
|
||||
7 1 78 24 54
|
||||
93
|
||||
1785
|
||||
89 7 61 62 84
|
||||
94
|
||||
3391
|
||||
61 22 83 47 49
|
||||
95
|
||||
4517
|
||||
42 40 30 63 89
|
||||
96
|
||||
2909
|
||||
79 59 14 39 86
|
||||
97
|
||||
2733
|
||||
85 16 62 63 37
|
||||
98
|
||||
853
|
||||
66 7 41 95 52
|
||||
99
|
||||
4261
|
||||
99 72 91 45 85
|
||||
303
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/100_10_01.txt
Executable file
303
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/100_10_01.txt
Executable file
|
|
@ -0,0 +1,303 @@
|
|||
100
|
||||
10
|
||||
1539989115
|
||||
0
|
||||
3490
|
||||
52 82 63 79 80 53 71 95 92 61
|
||||
1
|
||||
2540
|
||||
95 21 55 21 13 19 90 53 62 86
|
||||
2
|
||||
4675
|
||||
42 79 59 93 64 99 59 54 11 16
|
||||
3
|
||||
4381
|
||||
75 95 35 32 77 62 82 22 83 42
|
||||
4
|
||||
945
|
||||
44 46 21 8 17 88 22 84 87 14
|
||||
5
|
||||
3435
|
||||
57 23 59 45 78 93 88 54 66 92
|
||||
6
|
||||
4873
|
||||
89 40 78 37 82 34 35 2 98 67
|
||||
7
|
||||
4993
|
||||
53 95 25 78 4 72 49 80 42 77
|
||||
8
|
||||
2710
|
||||
84 87 30 26 72 42 78 84 23 46
|
||||
9
|
||||
3251
|
||||
62 37 38 98 93 65 69 66 45 41
|
||||
10
|
||||
1985
|
||||
91 24 78 17 68 39 76 25 52 78
|
||||
11
|
||||
4361
|
||||
14 24 79 25 25 79 2 16 6 3
|
||||
12
|
||||
1726
|
||||
95 65 58 21 67 9 14 79 3 72
|
||||
13
|
||||
4828
|
||||
89 62 44 28 80 26 3 90 64 95
|
||||
14
|
||||
3816
|
||||
4 19 38 68 43 72 22 51 55 53
|
||||
15
|
||||
4345
|
||||
95 67 76 24 93 29 26 29 97 59
|
||||
16
|
||||
2572
|
||||
2 66 70 62 21 36 44 29 83 34
|
||||
17
|
||||
4963
|
||||
97 6 72 89 33 48 1 90 42 66
|
||||
18
|
||||
3403
|
||||
68 65 85 60 14 57 4 83 81 42
|
||||
19
|
||||
3238
|
||||
20 59 8 64 30 95 16 83 92 63
|
||||
20
|
||||
5437
|
||||
33 2 10 38 59 93 55 19 68 27
|
||||
21
|
||||
5068
|
||||
51 67 84 90 83 79 43 95 46 92
|
||||
22
|
||||
2635
|
||||
98 82 42 87 85 88 87 87 56 8
|
||||
23
|
||||
3593
|
||||
8 90 67 1 85 77 35 12 88 65
|
||||
24
|
||||
4993
|
||||
85 30 20 99 70 94 76 34 50 34
|
||||
25
|
||||
4897
|
||||
86 63 24 34 35 39 98 23 13 6
|
||||
26
|
||||
3542
|
||||
73 5 75 9 2 74 78 44 23 42
|
||||
27
|
||||
2541
|
||||
4 93 23 22 76 46 81 30 13 39
|
||||
28
|
||||
3014
|
||||
40 53 33 74 46 17 48 82 49 2
|
||||
29
|
||||
2587
|
||||
98 85 60 14 72 30 25 83 18 7
|
||||
30
|
||||
2278
|
||||
12 81 20 14 69 62 81 42 50 85
|
||||
31
|
||||
3336
|
||||
59 73 75 84 46 77 27 56 94 32
|
||||
32
|
||||
3723
|
||||
44 34 83 75 3 43 84 89 71 14
|
||||
33
|
||||
5138
|
||||
46 74 26 37 57 98 59 38 64 74
|
||||
34
|
||||
5345
|
||||
2 13 92 32 71 48 98 96 31 59
|
||||
35
|
||||
1084
|
||||
41 78 29 29 77 14 14 10 21 95
|
||||
36
|
||||
1531
|
||||
28 35 39 32 33 45 32 3 2 48
|
||||
37
|
||||
4932
|
||||
83 20 14 89 49 25 95 53 63 37
|
||||
38
|
||||
1863
|
||||
28 16 74 12 59 98 30 97 58 59
|
||||
39
|
||||
545
|
||||
21 48 66 47 82 30 13 11 36 4
|
||||
40
|
||||
1477
|
||||
80 12 86 19 59 90 68 65 64 42
|
||||
41
|
||||
3653
|
||||
71 11 10 97 70 92 19 47 52 93
|
||||
42
|
||||
4983
|
||||
4 80 27 7 76 35 57 76 8 32
|
||||
43
|
||||
2558
|
||||
60 9 8 12 10 13 65 22 94 30
|
||||
44
|
||||
5156
|
||||
34 24 7 43 65 75 13 17 51 16
|
||||
45
|
||||
1977
|
||||
55 76 97 89 19 55 63 14 36 95
|
||||
46
|
||||
3136
|
||||
53 32 84 14 77 80 26 11 82 58
|
||||
47
|
||||
3271
|
||||
96 35 56 33 86 67 96 69 30 12
|
||||
48
|
||||
2748
|
||||
37 66 61 56 21 3 53 91 17 95
|
||||
49
|
||||
909
|
||||
37 48 9 57 75 93 94 53 21 21
|
||||
50
|
||||
4366
|
||||
63 16 94 22 96 54 27 3 80 74
|
||||
51
|
||||
4943
|
||||
99 26 34 6 3 67 93 80 38 38
|
||||
52
|
||||
4596
|
||||
69 46 89 24 50 25 49 78 55 4
|
||||
53
|
||||
1793
|
||||
70 66 62 55 57 77 63 32 34 31
|
||||
54
|
||||
4596
|
||||
53 76 47 48 66 38 65 53 85 62
|
||||
55
|
||||
3717
|
||||
21 31 66 57 84 98 34 43 44 39
|
||||
56
|
||||
4624
|
||||
10 36 76 78 98 96 10 85 47 97
|
||||
57
|
||||
5212
|
||||
31 8 15 5 55 20 56 19 66 57
|
||||
58
|
||||
5604
|
||||
80 37 18 50 70 15 51 48 19 9
|
||||
59
|
||||
2110
|
||||
18 21 54 83 32 36 97 49 66 54
|
||||
60
|
||||
2568
|
||||
5 3 24 70 31 65 52 66 61 13
|
||||
61
|
||||
5330
|
||||
18 76 55 21 64 97 46 22 60 47
|
||||
62
|
||||
676
|
||||
17 67 96 71 11 27 16 37 98 6
|
||||
63
|
||||
1603
|
||||
71 5 10 58 9 25 50 51 82 70
|
||||
64
|
||||
1085
|
||||
90 47 12 36 32 61 96 82 79 19
|
||||
65
|
||||
5128
|
||||
93 72 96 50 58 24 85 59 71 97
|
||||
66
|
||||
938
|
||||
14 66 53 31 98 97 61 88 28 41
|
||||
67
|
||||
4778
|
||||
49 56 92 86 95 61 76 77 74 1
|
||||
68
|
||||
1986
|
||||
52 95 77 29 25 75 30 19 27 57
|
||||
69
|
||||
2115
|
||||
7 49 6 30 4 92 90 32 33 60
|
||||
70
|
||||
616
|
||||
78 47 91 93 45 73 42 52 13 62
|
||||
71
|
||||
534
|
||||
57 26 14 49 60 21 88 9 9 14
|
||||
72
|
||||
1231
|
||||
41 81 41 83 87 29 37 96 12 90
|
||||
73
|
||||
3376
|
||||
75 56 30 89 31 3 43 23 51 76
|
||||
74
|
||||
2922
|
||||
98 76 85 44 1 96 88 64 16 12
|
||||
75
|
||||
2152
|
||||
93 66 17 38 96 51 91 22 49 89
|
||||
76
|
||||
1813
|
||||
33 36 23 62 22 26 14 37 83 37
|
||||
77
|
||||
3561
|
||||
75 53 60 45 95 44 63 3 48 35
|
||||
78
|
||||
4603
|
||||
68 26 76 22 73 56 65 52 13 91
|
||||
79
|
||||
2813
|
||||
33 52 39 85 77 31 74 44 78 69
|
||||
80
|
||||
528
|
||||
60 29 85 39 30 64 71 11 96 55
|
||||
81
|
||||
1112
|
||||
82 36 10 98 88 38 8 21 77 48
|
||||
82
|
||||
4387
|
||||
24 68 65 56 14 44 39 85 68 56
|
||||
83
|
||||
4573
|
||||
99 21 15 68 22 46 95 6 88 84
|
||||
84
|
||||
5585
|
||||
4 71 55 84 93 66 82 40 77 22
|
||||
85
|
||||
2680
|
||||
97 61 41 77 48 31 17 68 76 51
|
||||
86
|
||||
3262
|
||||
24 71 28 67 10 48 38 30 73 43
|
||||
87
|
||||
3913
|
||||
50 69 93 53 7 27 69 35 92 50
|
||||
88
|
||||
1749
|
||||
55 28 88 46 14 82 17 58 72 62
|
||||
89
|
||||
2369
|
||||
91 86 27 24 91 51 24 31 87 61
|
||||
90
|
||||
888
|
||||
46 27 77 52 5 90 66 11 66 10
|
||||
91
|
||||
3107
|
||||
58 41 81 96 43 63 75 11 98 87
|
||||
92
|
||||
4964
|
||||
17 86 19 2 30 85 52 6 40 99
|
||||
93
|
||||
5249
|
||||
47 55 76 88 79 36 59 59 31 40
|
||||
94
|
||||
5632
|
||||
82 17 55 33 39 69 4 64 75 91
|
||||
95
|
||||
893
|
||||
6 62 67 27 34 67 73 65 45 64
|
||||
96
|
||||
3432
|
||||
15 96 65 49 77 81 56 23 98 62
|
||||
97
|
||||
5507
|
||||
91 59 8 78 81 18 19 80 90 53
|
||||
98
|
||||
2007
|
||||
74 53 18 82 11 81 39 75 4 33
|
||||
99
|
||||
5336
|
||||
42 93 56 65 10 72 51 63 23 16
|
||||
303
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/100_20_01.txt
Executable file
303
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/100_20_01.txt
Executable file
|
|
@ -0,0 +1,303 @@
|
|||
100
|
||||
20
|
||||
450926852
|
||||
0
|
||||
1420
|
||||
12 27 24 42 5 27 51 48 42 31 48 51 8 1 1 28 4 44 6 57
|
||||
1
|
||||
1890
|
||||
72 97 57 16 42 69 9 44 18 49 92 84 37 77 59 81 40 6 49 88
|
||||
2
|
||||
5212
|
||||
29 53 68 44 47 38 22 73 31 78 43 28 33 92 53 96 5 18 84 88
|
||||
3
|
||||
2835
|
||||
16 16 58 75 47 66 15 95 18 23 35 63 4 57 22 99 37 51 72 43
|
||||
4
|
||||
4466
|
||||
22 36 76 32 47 21 84 72 55 37 7 86 8 46 10 79 80 77 39 25
|
||||
5
|
||||
5004
|
||||
61 28 70 66 78 65 38 12 82 34 51 99 38 75 48 97 46 47 51 81
|
||||
6
|
||||
1562
|
||||
69 50 72 31 94 3 71 30 64 43 85 27 97 2 94 15 14 27 77 3
|
||||
7
|
||||
1927
|
||||
71 41 56 6 18 7 11 22 36 7 66 24 75 14 46 6 81 17 59 3
|
||||
8
|
||||
2807
|
||||
86 42 56 6 14 10 45 25 48 69 87 36 76 14 57 77 16 42 97 78
|
||||
9
|
||||
2057
|
||||
16 86 55 52 97 11 48 92 74 97 71 83 93 79 55 98 10 84 5 97
|
||||
10
|
||||
5762
|
||||
54 2 89 7 54 41 29 5 17 15 16 24 69 64 66 5 79 3 83 74
|
||||
11
|
||||
5182
|
||||
53 45 23 92 73 64 31 44 60 38 40 54 10 8 69 51 35 69 51 71
|
||||
12
|
||||
5558
|
||||
64 86 42 45 94 9 14 90 18 80 22 34 25 73 7 51 41 3 9 50
|
||||
13
|
||||
2591
|
||||
96 43 26 70 17 15 56 35 88 78 12 49 40 15 13 60 83 6 9 70
|
||||
14
|
||||
4353
|
||||
79 92 87 72 97 71 59 24 37 89 2 43 88 71 64 17 13 94 59 23
|
||||
15
|
||||
4442
|
||||
68 73 17 48 7 86 35 64 29 95 90 5 90 6 83 98 93 58 30 43
|
||||
16
|
||||
2375
|
||||
98 99 38 86 94 2 7 82 19 1 63 70 57 54 39 46 55 65 86 51
|
||||
17
|
||||
3311
|
||||
87 84 24 63 94 26 20 7 51 18 52 56 39 59 46 87 48 36 49 97
|
||||
18
|
||||
2369
|
||||
40 83 82 61 68 57 48 34 20 11 15 71 29 49 59 44 35 28 46 57
|
||||
19
|
||||
4728
|
||||
74 61 55 92 4 78 88 91 7 11 6 12 97 38 36 18 75 68 13 77
|
||||
20
|
||||
5437
|
||||
22 7 47 73 60 84 54 59 43 92 18 30 51 21 69 71 66 73 45 90
|
||||
21
|
||||
3616
|
||||
23 8 7 49 70 20 30 5 77 99 87 77 97 60 47 93 82 81 51 58
|
||||
22
|
||||
4472
|
||||
47 62 99 53 68 21 81 47 95 81 66 55 5 8 83 97 3 12 68 75
|
||||
23
|
||||
2738
|
||||
55 3 89 20 22 3 2 96 92 79 7 92 75 35 25 44 79 89 82 4
|
||||
24
|
||||
1604
|
||||
21 21 20 97 17 39 1 7 27 53 43 78 91 81 12 18 78 53 6 12
|
||||
25
|
||||
3121
|
||||
90 50 65 58 59 64 78 53 70 47 27 79 80 96 28 59 48 14 99 2
|
||||
26
|
||||
2296
|
||||
68 71 3 59 98 51 8 60 91 48 78 52 81 61 30 9 99 88 12 4
|
||||
27
|
||||
2107
|
||||
14 95 45 29 55 83 8 77 74 32 80 19 60 89 49 45 91 78 8 28
|
||||
28
|
||||
5637
|
||||
42 70 89 98 76 12 71 61 62 58 73 16 97 58 81 78 29 63 36 54
|
||||
29
|
||||
1686
|
||||
41 60 96 61 3 16 60 14 80 33 86 21 14 32 56 67 87 81 24 39
|
||||
30
|
||||
2186
|
||||
40 4 16 83 21 3 41 88 85 65 82 37 2 59 96 65 27 29 82 30
|
||||
31
|
||||
5311
|
||||
63 58 42 8 10 1 39 97 8 86 33 85 55 89 89 50 2 15 73 71
|
||||
32
|
||||
3210
|
||||
23 16 70 83 11 88 8 92 39 60 92 56 97 99 73 87 48 81 66 89
|
||||
33
|
||||
1223
|
||||
75 30 69 73 44 80 96 65 85 47 8 29 60 7 52 29 33 84 69 33
|
||||
34
|
||||
2856
|
||||
4 80 77 2 29 77 3 73 83 89 87 56 8 79 12 80 92 36 71 85
|
||||
35
|
||||
4618
|
||||
31 71 46 56 43 2 79 19 76 40 64 23 30 38 98 14 15 8 70 2
|
||||
36
|
||||
1981
|
||||
87 59 20 7 60 14 48 99 31 72 7 19 87 1 12 70 55 60 61 69
|
||||
37
|
||||
2755
|
||||
25 75 71 15 14 60 23 92 12 54 26 52 42 67 40 10 24 24 42 20
|
||||
38
|
||||
1976
|
||||
47 52 91 55 46 45 38 19 69 29 79 39 16 63 70 30 59 57 77 64
|
||||
39
|
||||
1153
|
||||
70 25 8 3 3 39 85 66 26 57 49 4 56 42 35 19 41 87 10 94
|
||||
40
|
||||
5686
|
||||
1 86 34 73 60 32 32 25 54 93 71 46 86 3 58 51 49 61 2 3
|
||||
41
|
||||
4817
|
||||
49 48 72 13 72 97 69 79 91 65 72 59 4 29 95 4 88 57 6 41
|
||||
42
|
||||
1305
|
||||
59 53 40 47 90 98 56 36 61 39 69 22 30 23 41 23 67 85 24 37
|
||||
43
|
||||
4539
|
||||
11 54 82 76 1 65 99 10 27 8 30 76 15 21 71 9 49 45 97 36
|
||||
44
|
||||
4894
|
||||
93 98 60 15 42 86 51 23 88 87 28 34 24 25 90 62 81 69 15 74
|
||||
45
|
||||
2853
|
||||
38 36 59 43 74 6 59 37 53 57 46 63 23 48 3 30 89 15 91 53
|
||||
46
|
||||
1815
|
||||
5 9 59 44 54 14 47 76 47 5 75 32 57 33 68 20 43 7 32 49
|
||||
47
|
||||
5816
|
||||
43 78 43 13 41 99 79 83 39 56 78 72 81 92 5 69 24 87 68 77
|
||||
48
|
||||
5297
|
||||
82 80 72 16 15 93 67 58 14 80 34 92 77 2 18 88 70 58 17 13
|
||||
49
|
||||
4830
|
||||
33 88 10 18 38 54 83 99 78 2 4 72 43 12 26 22 74 61 1 37
|
||||
50
|
||||
4903
|
||||
26 52 63 16 24 54 58 29 90 17 23 26 82 32 2 43 44 82 49 34
|
||||
51
|
||||
3618
|
||||
89 30 67 18 91 92 49 35 90 84 69 46 97 38 21 63 23 73 25 31
|
||||
52
|
||||
4572
|
||||
86 62 12 3 49 57 50 49 50 86 33 30 3 67 86 67 89 84 46 15
|
||||
53
|
||||
5078
|
||||
10 8 41 11 23 39 19 89 64 65 11 49 46 93 8 22 96 63 37 32
|
||||
54
|
||||
1714
|
||||
16 45 5 98 63 13 64 79 94 53 5 3 86 80 33 82 80 14 56 45
|
||||
55
|
||||
1214
|
||||
72 77 25 9 88 70 5 82 79 5 54 81 62 75 88 41 44 73 50 50
|
||||
56
|
||||
2317
|
||||
96 90 67 28 1 73 5 92 10 16 42 4 26 59 33 69 69 84 9 81
|
||||
57
|
||||
1939
|
||||
47 52 95 44 30 16 52 45 18 58 12 46 56 51 65 81 7 9 62 46
|
||||
58
|
||||
4684
|
||||
9 39 46 14 85 43 15 42 7 60 40 95 67 7 8 21 10 38 10 93
|
||||
59
|
||||
2148
|
||||
56 95 37 39 22 9 26 21 26 78 30 20 87 65 89 54 15 67 89 13
|
||||
60
|
||||
4555
|
||||
8 86 41 76 94 2 67 51 51 25 51 56 46 6 46 42 55 76 66 47
|
||||
61
|
||||
5302
|
||||
69 15 2 92 39 76 11 30 23 71 94 57 66 59 76 53 27 18 98 50
|
||||
62
|
||||
1794
|
||||
87 98 25 59 70 38 77 70 43 93 24 85 53 30 57 52 55 70 10 70
|
||||
63
|
||||
2125
|
||||
84 59 99 95 85 66 74 2 95 99 28 31 34 67 51 26 2 69 70 21
|
||||
64
|
||||
3571
|
||||
62 22 48 11 7 21 88 20 57 6 84 44 52 41 58 69 82 4 92 41
|
||||
65
|
||||
5197
|
||||
52 43 24 55 65 32 83 82 30 62 69 1 81 32 62 80 42 58 36 12
|
||||
66
|
||||
1470
|
||||
82 85 18 56 43 78 96 13 86 60 44 11 68 63 59 46 88 66 82 18
|
||||
67
|
||||
2420
|
||||
66 93 10 16 4 41 73 92 80 33 98 72 48 7 71 10 84 11 54 28
|
||||
68
|
||||
4451
|
||||
67 6 23 56 60 52 59 91 55 57 36 6 4 8 12 81 38 1 34 22
|
||||
69
|
||||
1234
|
||||
33 46 66 23 90 88 94 2 76 79 21 68 25 89 11 99 69 51 34 60
|
||||
70
|
||||
1487
|
||||
3 51 82 84 73 76 15 80 12 7 9 62 76 51 82 6 31 38 5 69
|
||||
71
|
||||
5745
|
||||
53 97 84 22 21 14 50 38 91 69 48 18 46 81 56 90 5 16 12 49
|
||||
72
|
||||
1472
|
||||
95 79 14 32 25 86 20 54 95 82 30 21 13 9 57 79 3 81 3 38
|
||||
73
|
||||
5132
|
||||
42 46 13 40 33 35 54 45 28 26 15 48 72 13 53 34 37 39 56 80
|
||||
74
|
||||
3842
|
||||
59 71 88 47 48 81 16 19 12 41 21 32 72 27 45 56 14 56 44 52
|
||||
75
|
||||
3269
|
||||
77 18 7 92 25 32 33 65 18 52 43 42 82 74 96 75 35 83 41 45
|
||||
76
|
||||
4366
|
||||
38 33 40 61 27 75 9 35 80 38 91 79 32 59 31 54 61 27 14 34
|
||||
77
|
||||
4912
|
||||
12 13 20 51 37 38 74 66 32 21 49 74 25 98 39 94 43 29 25 3
|
||||
78
|
||||
3383
|
||||
1 3 68 74 63 55 11 26 67 84 86 82 58 31 12 84 38 93 78 61
|
||||
79
|
||||
4632
|
||||
66 32 22 85 28 96 21 18 2 74 36 3 17 98 13 55 48 70 25 96
|
||||
80
|
||||
2775
|
||||
24 28 92 6 88 19 97 32 4 76 41 64 99 48 8 64 89 64 89 99
|
||||
81
|
||||
5614
|
||||
17 48 53 13 27 35 15 51 30 16 10 90 54 74 49 14 86 22 83 49
|
||||
82
|
||||
3465
|
||||
58 8 16 32 94 41 43 23 64 75 75 10 81 76 4 18 37 84 78 78
|
||||
83
|
||||
1004
|
||||
71 42 10 8 20 77 2 18 69 75 56 72 73 75 33 6 20 25 23 34
|
||||
84
|
||||
1425
|
||||
88 26 23 43 54 36 1 87 76 36 70 2 93 78 22 27 33 73 51 78
|
||||
85
|
||||
1759
|
||||
63 26 88 30 17 24 74 74 92 79 73 49 73 11 30 20 1 81 7 79
|
||||
86
|
||||
5341
|
||||
60 95 65 53 74 52 37 10 50 71 57 88 79 71 34 54 8 10 20 64
|
||||
87
|
||||
1080
|
||||
86 44 11 24 35 60 61 76 35 82 51 53 54 54 19 30 61 46 30 55
|
||||
88
|
||||
4906
|
||||
8 74 89 2 15 43 3 31 20 70 34 59 72 10 24 58 41 32 30 63
|
||||
89
|
||||
2859
|
||||
8 82 78 11 53 30 75 31 23 22 62 88 37 96 56 35 40 38 30 24
|
||||
90
|
||||
5588
|
||||
44 28 94 33 64 86 41 93 52 39 3 97 68 97 96 66 10 68 63 58
|
||||
91
|
||||
5551
|
||||
99 4 32 27 38 6 86 61 25 8 34 98 22 75 35 85 10 40 82 25
|
||||
92
|
||||
5376
|
||||
80 42 64 35 79 8 51 26 82 22 27 94 94 41 43 78 75 33 40 93
|
||||
93
|
||||
5672
|
||||
76 81 42 40 45 31 65 39 18 79 29 95 37 30 8 15 9 79 39 73
|
||||
94
|
||||
5671
|
||||
94 56 74 40 67 80 42 83 2 90 25 93 15 73 5 29 81 64 37 45
|
||||
95
|
||||
4086
|
||||
75 38 87 96 93 82 50 11 29 55 97 95 31 84 65 31 40 36 44 93
|
||||
96
|
||||
1806
|
||||
63 50 63 69 16 2 48 57 70 77 30 6 46 22 64 45 13 62 2 37
|
||||
97
|
||||
5810
|
||||
57 12 94 23 59 59 88 81 7 3 28 1 33 8 20 41 10 82 27 64
|
||||
98
|
||||
1083
|
||||
76 43 87 32 47 47 52 40 36 20 48 15 82 98 54 84 53 44 71 92
|
||||
99
|
||||
1887
|
||||
34 51 72 13 95 21 46 97 96 61 99 66 75 68 38 51 28 99 45 59
|
||||
603
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/200_10_01.txt
Executable file
603
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/200_10_01.txt
Executable file
|
|
@ -0,0 +1,603 @@
|
|||
200
|
||||
10
|
||||
471503978
|
||||
0
|
||||
7166
|
||||
17 30 28 15 52 5 53 55 81 47
|
||||
1
|
||||
7478
|
||||
37 26 82 67 82 44 43 65 44 51
|
||||
2
|
||||
4344
|
||||
22 2 88 57 17 2 43 38 46 44
|
||||
3
|
||||
3004
|
||||
71 29 33 64 66 98 56 76 3 27
|
||||
4
|
||||
4783
|
||||
79 98 69 23 62 27 48 45 93 76
|
||||
5
|
||||
4813
|
||||
37 67 28 9 57 10 83 99 14 4
|
||||
6
|
||||
1411
|
||||
69 92 92 1 58 25 34 84 86 76
|
||||
7
|
||||
4573
|
||||
53 51 66 2 91 27 93 67 23 49
|
||||
8
|
||||
7480
|
||||
59 53 92 43 42 41 95 40 59 5
|
||||
9
|
||||
4429
|
||||
64 82 30 73 69 59 48 93 47 25
|
||||
10
|
||||
841
|
||||
11 86 67 94 48 89 63 70 76 23
|
||||
11
|
||||
9418
|
||||
67 47 53 96 46 36 93 45 45 67
|
||||
12
|
||||
8849
|
||||
27 36 93 78 18 62 91 75 64 55
|
||||
13
|
||||
5306
|
||||
64 23 45 14 94 29 94 91 10 40
|
||||
14
|
||||
4634
|
||||
59 34 7 32 83 17 32 21 4 58
|
||||
15
|
||||
9336
|
||||
31 66 70 23 48 37 81 72 29 26
|
||||
16
|
||||
4344
|
||||
43 43 58 83 81 35 69 15 69 36
|
||||
17
|
||||
10182
|
||||
42 71 58 29 57 47 29 73 46 83
|
||||
18
|
||||
5648
|
||||
56 31 17 75 93 37 44 43 68 65
|
||||
19
|
||||
10009
|
||||
88 36 41 55 67 52 2 62 89 91
|
||||
20
|
||||
7809
|
||||
71 41 56 91 19 3 66 40 48 77
|
||||
21
|
||||
6970
|
||||
86 6 34 44 65 87 25 43 68 62
|
||||
22
|
||||
6260
|
||||
6 28 62 46 49 4 60 96 13 6
|
||||
23
|
||||
3543
|
||||
54 43 81 59 45 50 69 39 36 57
|
||||
24
|
||||
4215
|
||||
92 18 44 11 22 96 44 23 85 87
|
||||
25
|
||||
7436
|
||||
75 64 95 20 92 74 34 79 35 4
|
||||
26
|
||||
2229
|
||||
83 28 50 68 41 68 68 66 25 11
|
||||
27
|
||||
6742
|
||||
2 13 88 3 38 30 77 19 21 60
|
||||
28
|
||||
1878
|
||||
60 7 19 17 26 69 31 41 44 23
|
||||
29
|
||||
3222
|
||||
62 13 50 55 2 17 10 71 40 87
|
||||
30
|
||||
2189
|
||||
83 93 25 59 90 34 57 60 20 50
|
||||
31
|
||||
9874
|
||||
73 93 88 18 79 95 21 72 83 18
|
||||
32
|
||||
1849
|
||||
55 56 1 31 17 3 56 62 76 23
|
||||
33
|
||||
10057
|
||||
3 72 6 84 61 24 36 17 26 24
|
||||
34
|
||||
7309
|
||||
71 71 45 61 81 51 26 25 50 82
|
||||
35
|
||||
9509
|
||||
34 28 29 55 67 55 11 59 98 16
|
||||
36
|
||||
10403
|
||||
40 95 2 46 18 60 6 95 6 96
|
||||
37
|
||||
4515
|
||||
13 96 54 77 1 61 86 47 83 37
|
||||
38
|
||||
1586
|
||||
62 55 71 59 36 15 2 10 51 29
|
||||
39
|
||||
638
|
||||
56 58 81 98 31 38 89 94 46 19
|
||||
40
|
||||
7434
|
||||
28 66 22 23 85 83 28 39 99 26
|
||||
41
|
||||
9737
|
||||
53 3 57 18 92 62 62 53 65 56
|
||||
42
|
||||
5477
|
||||
71 77 16 17 6 84 63 50 46 33
|
||||
43
|
||||
5976
|
||||
5 80 88 70 78 44 52 99 24 53
|
||||
44
|
||||
3293
|
||||
73 2 5 73 83 80 12 63 47 6
|
||||
45
|
||||
5869
|
||||
95 82 52 38 39 48 13 59 24 95
|
||||
46
|
||||
10358
|
||||
23 86 23 13 74 45 43 30 32 63
|
||||
47
|
||||
4698
|
||||
49 16 21 77 77 54 99 67 66 84
|
||||
48
|
||||
9855
|
||||
17 29 21 74 85 71 11 18 48 13
|
||||
49
|
||||
5305
|
||||
81 24 58 79 88 10 70 12 83 6
|
||||
50
|
||||
8401
|
||||
88 89 96 51 25 96 82 9 3 19
|
||||
51
|
||||
6004
|
||||
62 96 37 48 33 23 14 41 74 16
|
||||
52
|
||||
3369
|
||||
35 99 46 16 36 8 39 67 97 80
|
||||
53
|
||||
10335
|
||||
78 15 78 93 32 56 83 52 39 37
|
||||
54
|
||||
2868
|
||||
90 49 87 29 82 35 4 39 80 20
|
||||
55
|
||||
5297
|
||||
36 78 91 28 98 72 86 90 27 62
|
||||
56
|
||||
3744
|
||||
46 48 9 6 3 53 93 25 70 81
|
||||
57
|
||||
9148
|
||||
98 64 96 82 46 13 87 13 65 52
|
||||
58
|
||||
3270
|
||||
75 3 93 40 68 72 82 81 1 14
|
||||
59
|
||||
7616
|
||||
36 63 98 9 11 38 78 3 26 67
|
||||
60
|
||||
5131
|
||||
74 14 31 88 30 1 32 8 46 19
|
||||
61
|
||||
9674
|
||||
86 95 78 51 75 69 82 66 8 86
|
||||
62
|
||||
940
|
||||
67 88 20 48 42 85 24 67 74 1
|
||||
63
|
||||
6286
|
||||
87 9 75 1 93 2 88 51 47 53
|
||||
64
|
||||
1159
|
||||
68 61 18 4 36 28 45 54 19 21
|
||||
65
|
||||
10410
|
||||
1 24 34 77 97 18 48 85 85 33
|
||||
66
|
||||
3268
|
||||
87 38 48 48 1 10 67 10 62 68
|
||||
67
|
||||
6533
|
||||
87 50 49 6 63 70 14 95 33 28
|
||||
68
|
||||
1984
|
||||
7 47 69 1 86 67 34 59 96 25
|
||||
69
|
||||
2658
|
||||
34 42 88 32 54 95 76 64 33 69
|
||||
70
|
||||
7518
|
||||
1 30 30 79 33 72 1 90 5 71
|
||||
71
|
||||
3280
|
||||
91 97 34 40 71 64 51 28 23 60
|
||||
72
|
||||
8989
|
||||
7 49 22 14 1 19 15 48 43 69
|
||||
73
|
||||
4877
|
||||
6 79 81 20 18 60 67 57 63 99
|
||||
74
|
||||
7608
|
||||
46 19 50 86 75 31 57 85 10 53
|
||||
75
|
||||
4775
|
||||
3 80 40 40 55 29 3 78 47 77
|
||||
76
|
||||
4441
|
||||
45 30 73 25 62 43 37 18 73 27
|
||||
77
|
||||
689
|
||||
55 24 91 94 21 17 15 59 1 29
|
||||
78
|
||||
8408
|
||||
92 58 7 73 71 78 50 11 19 83
|
||||
79
|
||||
2103
|
||||
67 43 1 44 80 28 75 67 92 22
|
||||
80
|
||||
6500
|
||||
13 6 71 98 5 47 80 36 31 10
|
||||
81
|
||||
3906
|
||||
30 95 72 94 48 78 3 24 29 42
|
||||
82
|
||||
4713
|
||||
27 43 8 61 87 77 9 59 68 64
|
||||
83
|
||||
9905
|
||||
19 99 68 65 22 92 28 24 31 80
|
||||
84
|
||||
3660
|
||||
51 22 49 44 5 42 44 39 92 73
|
||||
85
|
||||
2405
|
||||
86 99 7 75 71 86 2 1 48 91
|
||||
86
|
||||
7436
|
||||
20 11 47 4 69 6 71 80 87 38
|
||||
87
|
||||
5400
|
||||
95 99 90 17 75 19 89 58 8 60
|
||||
88
|
||||
8689
|
||||
79 60 59 1 72 28 24 76 90 53
|
||||
89
|
||||
5805
|
||||
48 42 39 12 36 18 73 59 57 38
|
||||
90
|
||||
685
|
||||
83 33 49 78 54 4 28 90 40 19
|
||||
91
|
||||
9892
|
||||
91 68 28 51 24 24 98 92 25 14
|
||||
92
|
||||
9000
|
||||
78 78 22 55 55 57 17 3 49 35
|
||||
93
|
||||
2827
|
||||
41 26 10 53 5 82 27 51 26 10
|
||||
94
|
||||
1779
|
||||
61 77 96 96 40 7 90 1 35 44
|
||||
95
|
||||
2539
|
||||
90 1 2 92 56 4 4 55 90 97
|
||||
96
|
||||
5797
|
||||
57 13 88 82 8 94 13 50 99 17
|
||||
97
|
||||
6740
|
||||
4 67 90 20 19 9 83 15 30 50
|
||||
98
|
||||
5913
|
||||
21 87 69 22 7 57 43 31 5 22
|
||||
99
|
||||
1778
|
||||
68 31 44 13 12 82 63 99 52 19
|
||||
100
|
||||
9256
|
||||
87 49 74 40 44 98 68 8 12 70
|
||||
101
|
||||
1943
|
||||
62 90 16 43 66 54 74 44 11 88
|
||||
102
|
||||
2314
|
||||
69 6 90 23 39 2 12 91 72 31
|
||||
103
|
||||
5964
|
||||
79 76 7 30 41 71 69 83 32 7
|
||||
104
|
||||
2160
|
||||
69 94 14 16 60 94 38 75 81 81
|
||||
105
|
||||
5000
|
||||
35 76 47 76 11 69 74 66 21 58
|
||||
106
|
||||
753
|
||||
25 79 48 30 31 51 98 98 81 2
|
||||
107
|
||||
8317
|
||||
68 66 36 59 65 80 86 77 64 89
|
||||
108
|
||||
9608
|
||||
14 51 62 64 16 79 72 8 45 1
|
||||
109
|
||||
5659
|
||||
9 14 1 72 67 85 76 6 4 80
|
||||
110
|
||||
3727
|
||||
74 89 63 61 19 56 53 26 10 52
|
||||
111
|
||||
878
|
||||
61 87 86 13 69 79 94 47 90 15
|
||||
112
|
||||
5610
|
||||
58 1 49 81 56 46 45 55 11 25
|
||||
113
|
||||
8024
|
||||
81 65 48 25 96 71 30 39 88 11
|
||||
114
|
||||
7993
|
||||
52 53 3 90 78 85 39 91 52 97
|
||||
115
|
||||
7345
|
||||
93 19 51 67 36 52 60 78 96 90
|
||||
116
|
||||
5943
|
||||
44 21 80 21 56 42 69 49 92 62
|
||||
117
|
||||
5637
|
||||
57 98 86 70 12 66 12 23 44 69
|
||||
118
|
||||
3377
|
||||
89 90 97 96 37 82 83 92 54 34
|
||||
119
|
||||
10135
|
||||
81 45 4 99 1 91 21 68 28 66
|
||||
120
|
||||
2394
|
||||
69 77 58 64 50 48 25 88 85 54
|
||||
121
|
||||
6036
|
||||
98 54 79 68 43 70 50 9 51 84
|
||||
122
|
||||
6761
|
||||
78 86 28 61 58 21 47 38 21 62
|
||||
123
|
||||
7860
|
||||
70 2 19 36 13 82 43 60 4 71
|
||||
124
|
||||
8007
|
||||
3 3 93 57 55 12 58 2 42 70
|
||||
125
|
||||
7718
|
||||
70 88 88 86 87 94 11 8 43 60
|
||||
126
|
||||
7598
|
||||
62 39 44 10 20 17 63 86 55 54
|
||||
127
|
||||
3245
|
||||
81 56 74 57 84 45 74 62 89 52
|
||||
128
|
||||
4953
|
||||
61 24 18 88 28 68 6 41 4 71
|
||||
129
|
||||
8163
|
||||
65 91 95 59 59 60 23 66 1 9
|
||||
130
|
||||
8429
|
||||
65 86 2 73 65 93 94 94 97 99
|
||||
131
|
||||
8623
|
||||
33 80 22 43 56 30 93 54 65 41
|
||||
132
|
||||
1742
|
||||
62 58 7 25 2 5 26 9 38 30
|
||||
133
|
||||
1409
|
||||
19 54 82 37 36 31 49 75 87 23
|
||||
134
|
||||
5249
|
||||
57 57 52 70 41 30 30 43 58 60
|
||||
135
|
||||
9063
|
||||
82 42 17 97 7 71 50 9 47 1
|
||||
136
|
||||
7293
|
||||
78 32 59 29 23 29 47 10 53 67
|
||||
137
|
||||
1353
|
||||
94 5 42 33 25 82 89 79 51 55
|
||||
138
|
||||
6480
|
||||
65 43 51 99 81 20 43 10 40 64
|
||||
139
|
||||
8191
|
||||
14 80 79 34 6 13 32 97 80 21
|
||||
140
|
||||
7595
|
||||
9 86 93 96 67 94 45 39 20 16
|
||||
141
|
||||
739
|
||||
29 47 65 65 5 47 47 30 24 94
|
||||
142
|
||||
7977
|
||||
70 95 27 90 89 57 68 74 77 11
|
||||
143
|
||||
8304
|
||||
90 86 25 52 71 95 13 52 37 90
|
||||
144
|
||||
6930
|
||||
86 40 60 95 86 8 86 90 13 48
|
||||
145
|
||||
5996
|
||||
12 31 72 3 48 46 97 12 29 85
|
||||
146
|
||||
2438
|
||||
40 61 29 64 50 80 2 61 28 34
|
||||
147
|
||||
2339
|
||||
12 12 55 21 54 32 16 34 18 7
|
||||
148
|
||||
5848
|
||||
64 64 58 16 21 7 27 88 22 79
|
||||
149
|
||||
4982
|
||||
32 17 22 70 83 34 38 27 75 95
|
||||
150
|
||||
7604
|
||||
18 52 58 67 27 33 53 68 24 50
|
||||
151
|
||||
10491
|
||||
11 56 61 13 38 33 37 14 79 78
|
||||
152
|
||||
8007
|
||||
40 35 89 96 79 18 94 88 99 39
|
||||
153
|
||||
6393
|
||||
14 60 67 57 71 29 78 74 35 79
|
||||
154
|
||||
1948
|
||||
22 75 14 7 53 19 84 71 45 69
|
||||
155
|
||||
8138
|
||||
49 10 10 30 2 74 49 14 95 27
|
||||
156
|
||||
3757
|
||||
95 50 40 96 9 58 25 16 46 42
|
||||
157
|
||||
4120
|
||||
82 66 11 98 49 52 59 46 15 15
|
||||
158
|
||||
4850
|
||||
7 53 99 72 79 10 36 47 7 51
|
||||
159
|
||||
4564
|
||||
19 58 7 31 39 70 33 54 24 44
|
||||
160
|
||||
4171
|
||||
95 12 20 11 28 78 15 91 45 71
|
||||
161
|
||||
669
|
||||
39 66 78 36 39 59 36 89 20 32
|
||||
162
|
||||
4803
|
||||
71 81 6 10 70 32 47 59 35 66
|
||||
163
|
||||
5464
|
||||
34 51 71 20 72 20 83 39 61 49
|
||||
164
|
||||
6219
|
||||
89 75 48 26 70 12 24 52 97 8
|
||||
165
|
||||
2726
|
||||
63 71 39 67 38 98 71 91 69 7
|
||||
166
|
||||
6507
|
||||
85 46 58 13 48 18 7 21 78 44
|
||||
167
|
||||
6446
|
||||
60 88 7 60 57 12 6 90 13 1
|
||||
168
|
||||
3416
|
||||
91 58 17 50 11 57 55 58 53 15
|
||||
169
|
||||
918
|
||||
49 73 63 28 38 73 43 74 16 6
|
||||
170
|
||||
3139
|
||||
46 27 73 32 37 91 82 30 94 51
|
||||
171
|
||||
9351
|
||||
10 26 43 49 56 46 40 63 59 91
|
||||
172
|
||||
7171
|
||||
19 38 14 54 64 64 78 19 64 33
|
||||
173
|
||||
2127
|
||||
50 48 66 46 64 92 64 18 72 77
|
||||
174
|
||||
4461
|
||||
65 8 59 15 68 45 96 88 13 69
|
||||
175
|
||||
799
|
||||
41 14 75 49 27 86 27 22 47 28
|
||||
176
|
||||
6861
|
||||
58 58 96 94 36 84 99 43 22 8
|
||||
177
|
||||
9690
|
||||
62 89 28 63 94 15 11 60 9 8
|
||||
178
|
||||
3180
|
||||
45 44 12 96 65 99 91 20 68 48
|
||||
179
|
||||
2449
|
||||
67 16 99 43 89 8 78 32 4 7
|
||||
180
|
||||
8742
|
||||
64 20 63 73 23 87 97 67 67 55
|
||||
181
|
||||
4503
|
||||
6 69 19 19 93 61 23 1 92 51
|
||||
182
|
||||
10135
|
||||
77 67 26 19 14 42 48 42 49 89
|
||||
183
|
||||
8757
|
||||
94 80 8 81 57 25 20 95 23 61
|
||||
184
|
||||
1192
|
||||
24 81 72 82 93 35 99 84 37 82
|
||||
185
|
||||
8334
|
||||
38 82 55 69 60 64 39 37 16 39
|
||||
186
|
||||
9610
|
||||
73 27 67 13 82 74 53 30 39 89
|
||||
187
|
||||
8681
|
||||
59 5 1 85 16 40 3 12 47 47
|
||||
188
|
||||
8465
|
||||
61 44 23 32 69 89 65 87 94 24
|
||||
189
|
||||
8425
|
||||
14 38 35 34 57 4 81 13 71 79
|
||||
190
|
||||
3227
|
||||
59 53 6 57 8 43 47 60 36 86
|
||||
191
|
||||
4628
|
||||
83 16 89 69 52 12 25 92 72 60
|
||||
192
|
||||
1319
|
||||
3 48 93 63 98 28 36 52 67 67
|
||||
193
|
||||
9629
|
||||
46 16 88 49 67 68 44 51 78 10
|
||||
194
|
||||
4236
|
||||
16 31 86 56 19 46 29 91 13 61
|
||||
195
|
||||
5509
|
||||
56 79 37 37 56 23 85 76 68 60
|
||||
196
|
||||
9597
|
||||
40 75 53 54 38 3 26 32 36 68
|
||||
197
|
||||
8513
|
||||
7 14 45 60 75 70 4 81 69 72
|
||||
198
|
||||
2882
|
||||
79 67 32 97 69 81 9 57 28 9
|
||||
199
|
||||
7268
|
||||
55 70 69 44 14 14 59 71 69 47
|
||||
1
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/README
Executable file
1
contribution/trunk/tutos_META08/linux_32bits/flowshop/benchs/README
Executable file
|
|
@ -0,0 +1 @@
|
|||
Further benchmarks for the bi-objective flow-shop scheduling problem are available at http://www.lifl.fr/~liefooga/benchmarks/
|
||||
43
contribution/trunk/tutos_META08/linux_32bits/flowshop/src/FlowShop.cpp
Executable file
43
contribution/trunk/tutos_META08/linux_32bits/flowshop/src/FlowShop.cpp
Executable file
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* <FlowShop.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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 <FlowShop.h>
|
||||
|
||||
std::string FlowShop::className() const
|
||||
{
|
||||
return "FlowShop";
|
||||
}
|
||||
58
contribution/trunk/tutos_META08/linux_32bits/flowshop/src/FlowShop.h
Executable file
58
contribution/trunk/tutos_META08/linux_32bits/flowshop/src/FlowShop.h
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* <FlowShop.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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 FLOWSHOP_H_
|
||||
#define FLOWSHOP_H_
|
||||
|
||||
#include <core/moeoVector.h>
|
||||
#include <FlowShopObjectiveVector.h>
|
||||
|
||||
/**
|
||||
* Structure of the genotype for the flow-shop scheduling problem: a vector of unsigned int int.
|
||||
*/
|
||||
class FlowShop: public moeoVector < FlowShopObjectiveVector , double , double , unsigned int >
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* class name
|
||||
*/
|
||||
std::string className() const;
|
||||
|
||||
};
|
||||
|
||||
#endif /*FLOWSHOP_H_*/
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
/*
|
||||
* <FlowShopBenchmarkParser.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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 <stdexcept>
|
||||
#include <FlowShopBenchmarkParser.h>
|
||||
|
||||
FlowShopBenchmarkParser::FlowShopBenchmarkParser(const std::string _benchmarkFileName)
|
||||
{
|
||||
init(_benchmarkFileName);
|
||||
}
|
||||
|
||||
|
||||
const unsigned int FlowShopBenchmarkParser::getM()
|
||||
{
|
||||
return M;
|
||||
}
|
||||
|
||||
|
||||
const unsigned int FlowShopBenchmarkParser::getN()
|
||||
{
|
||||
return N;
|
||||
}
|
||||
|
||||
|
||||
const std::vector< std::vector<unsigned int> > FlowShopBenchmarkParser::getP()
|
||||
{
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
const std::vector<unsigned int> FlowShopBenchmarkParser::getD()
|
||||
{
|
||||
return d;
|
||||
}
|
||||
|
||||
|
||||
void FlowShopBenchmarkParser::printOn(std::ostream & _os) const
|
||||
{
|
||||
_os << "M=" << M << " N=" << N << std::endl;
|
||||
_os << "*** processing times" << std::endl;
|
||||
for (unsigned int i=0; i<M; i++)
|
||||
{
|
||||
for (unsigned int j=0; j<N; j++)
|
||||
{
|
||||
_os << p[i][j] << " ";
|
||||
}
|
||||
_os << std::endl;
|
||||
}
|
||||
_os << "*** due-dates" << std::endl;
|
||||
for (unsigned int j=0; j<N; j++)
|
||||
{
|
||||
_os << d[j] << " ";
|
||||
}
|
||||
_os << std::endl << std::endl;
|
||||
}
|
||||
|
||||
|
||||
void FlowShopBenchmarkParser::init(const std::string _benchmarkFileName)
|
||||
{
|
||||
std::string buffer;
|
||||
std::string::size_type start, end;
|
||||
std::ifstream inputFile(_benchmarkFileName.data(), std::ios::in);
|
||||
// opening of the benchmark file
|
||||
if (! inputFile)
|
||||
throw std::runtime_error("*** ERROR : Unable to open the benchmark file");
|
||||
// number of jobs (N)
|
||||
getline(inputFile, buffer, '\n');
|
||||
N = atoi(buffer.data());
|
||||
// number of machines M
|
||||
getline(inputFile, buffer, '\n');
|
||||
M = atoi(buffer.data());
|
||||
// initial and current seeds (not used)
|
||||
getline(inputFile, buffer, '\n');
|
||||
// processing times and due-dates
|
||||
p = std::vector< std::vector<unsigned int> > (M,N);
|
||||
d = std::vector<unsigned int> (N);
|
||||
// for each job...
|
||||
for (unsigned int j=0 ; j<N ; j++)
|
||||
{
|
||||
// index of the job (<=> j)
|
||||
getline(inputFile, buffer, '\n');
|
||||
// due-date of the job j
|
||||
getline(inputFile, buffer, '\n');
|
||||
d[j] = atoi(buffer.data());
|
||||
// processing times of the job j on each machine
|
||||
getline(inputFile, buffer, '\n');
|
||||
start = buffer.find_first_not_of(" ");
|
||||
for (unsigned int i=0 ; i<M ; i++)
|
||||
{
|
||||
end = buffer.find_first_of(" ", start);
|
||||
p[i][j] = atoi(buffer.substr(start, end-start).data());
|
||||
start = buffer.find_first_not_of(" ", end);
|
||||
}
|
||||
}
|
||||
// closing of the input file
|
||||
inputFile.close();
|
||||
}
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
/*
|
||||
* <FlowShopBenchmarkParser.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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 FLOWSHOPBENCHMARKPARSER_H_
|
||||
#define FLOWSHOPBENCHMARKPARSER_H_
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
* Class to handle parameters of a flow-shop instance from a benchmark file
|
||||
*/
|
||||
class FlowShopBenchmarkParser
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Ctor
|
||||
* @param _benchmarkFileName the name of the benchmark file
|
||||
*/
|
||||
FlowShopBenchmarkParser(const std::string _benchmarkFileName);
|
||||
|
||||
|
||||
/**
|
||||
* the number of machines
|
||||
*/
|
||||
const unsigned int getM();
|
||||
|
||||
|
||||
/**
|
||||
* the number of jobs
|
||||
*/
|
||||
const unsigned int getN();
|
||||
|
||||
|
||||
/**
|
||||
* the processing times
|
||||
*/
|
||||
const std::vector < std::vector < unsigned int > > getP();
|
||||
|
||||
|
||||
/**
|
||||
* the due-dates
|
||||
*/
|
||||
const std::vector < unsigned int > getD();
|
||||
|
||||
|
||||
/**
|
||||
* printing...
|
||||
*/
|
||||
void printOn(std::ostream & _os) const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
/** number of machines */
|
||||
unsigned int M;
|
||||
/** number of jobs */
|
||||
unsigned int N;
|
||||
/** p[i][j] = processing time of job j on machine i */
|
||||
std::vector < std::vector < unsigned int > > p;
|
||||
/** d[j] = due-date of the job j */
|
||||
std::vector < unsigned int > d;
|
||||
|
||||
|
||||
/**
|
||||
* Initialisation of the parameters with the data contained in the benchmark file
|
||||
* @param _benchmarkFileName the name of the benchmark file
|
||||
*/
|
||||
void init(const std::string _benchmarkFileName);
|
||||
|
||||
};
|
||||
|
||||
#endif /*FLOWSHOPBENCHMARKPARSER_H_*/
|
||||
90
contribution/trunk/tutos_META08/linux_32bits/flowshop/src/FlowShopEval.cpp
Executable file
90
contribution/trunk/tutos_META08/linux_32bits/flowshop/src/FlowShopEval.cpp
Executable file
|
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
* <FlowShopEval.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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 <FlowShopEval.h>
|
||||
|
||||
|
||||
FlowShopEval::FlowShopEval(unsigned int _M, unsigned int _N, const std::vector< std::vector<unsigned int> > & _p, const std::vector<unsigned int> & _d) :
|
||||
M(_M), N (_N), p(_p), d(_d)
|
||||
{}
|
||||
|
||||
|
||||
void FlowShopEval::operator()(FlowShop & _flowshop)
|
||||
{
|
||||
FlowShopObjectiveVector objVector;
|
||||
objVector[0] = makespan(_flowshop);
|
||||
objVector[1] = tardiness(_flowshop);
|
||||
_flowshop.objectiveVector(objVector);
|
||||
}
|
||||
|
||||
|
||||
|
||||
double FlowShopEval::makespan(const FlowShop & _flowshop)
|
||||
{
|
||||
// completion times computation for each job on each machine
|
||||
// C[i][j] = completion of the jth job of the scheduling on the ith machine
|
||||
std::vector< std::vector<unsigned int> > C = completionTime(_flowshop);
|
||||
return C[M-1][_flowshop[N-1]];
|
||||
}
|
||||
|
||||
|
||||
double FlowShopEval::tardiness(const FlowShop & _flowshop)
|
||||
{
|
||||
// completion times computation for each job on each machine
|
||||
// C[i][j] = completion of the jth job of the scheduling on the ith machine
|
||||
std::vector< std::vector<unsigned int> > C = completionTime(_flowshop);
|
||||
// tardiness computation
|
||||
unsigned int long sum = 0;
|
||||
for (unsigned int j=0 ; j<N ; j++)
|
||||
sum += (unsigned int) std::max (0, (int) (C[M-1][_flowshop[j]] - d[_flowshop[j]]));
|
||||
return sum;
|
||||
}
|
||||
|
||||
|
||||
std::vector< std::vector<unsigned int> > FlowShopEval::completionTime(const FlowShop & _flowshop)
|
||||
{
|
||||
std::vector< std::vector<unsigned int> > C(M,N);
|
||||
C[0][_flowshop[0]] = p[0][_flowshop[0]];
|
||||
for (unsigned int j=1; j<N; j++)
|
||||
C[0][_flowshop[j]] = C[0][_flowshop[j-1]] + p[0][_flowshop[j]];
|
||||
for (unsigned int i=1; i<M; i++)
|
||||
C[i][_flowshop[0]] = C[i-1][_flowshop[0]] + p[i][_flowshop[0]];
|
||||
for (unsigned int i=1; i<M; i++)
|
||||
for (unsigned int j=1; j<N; j++)
|
||||
C[i][_flowshop[j]] = std::max(C[i][_flowshop[j-1]], C[i-1][_flowshop[j]]) + p[i][_flowshop[j]];
|
||||
return C;
|
||||
}
|
||||
104
contribution/trunk/tutos_META08/linux_32bits/flowshop/src/FlowShopEval.h
Executable file
104
contribution/trunk/tutos_META08/linux_32bits/flowshop/src/FlowShopEval.h
Executable file
|
|
@ -0,0 +1,104 @@
|
|||
/*
|
||||
* <FlowShopEval.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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 FLOWSHOPEVAL_H_
|
||||
#define FLOWSHOPEVAL_H_
|
||||
|
||||
#include <vector>
|
||||
#include <core/moeoEvalFunc.h>
|
||||
#include <FlowShop.h>
|
||||
|
||||
/**
|
||||
* Evaluation of the objective vector a (multi-objective) FlowShop object
|
||||
*/
|
||||
class FlowShopEval : public moeoEvalFunc<FlowShop>
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Ctor
|
||||
* @param _M the number of machines
|
||||
* @param _N the number of jobs to schedule
|
||||
* @param _p the processing times
|
||||
* @param _d the due dates
|
||||
*/
|
||||
FlowShopEval(unsigned int _M, unsigned int _N, const std::vector< std::vector<unsigned int> > & _p, const std::vector<unsigned int> & _d);
|
||||
|
||||
|
||||
/**
|
||||
* computation of the multi-objective evaluation of a FlowShop object
|
||||
* @param _flowshop the FlowShop object to evaluate
|
||||
*/
|
||||
void operator()(FlowShop & _flowshop);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
/** number of machines */
|
||||
unsigned int M;
|
||||
/** number of jobs */
|
||||
unsigned int N;
|
||||
/** p[i][j] = processing time of job j on machine i */
|
||||
std::vector< std::vector < unsigned int > > p;
|
||||
/** d[j] = due-date of the job j */
|
||||
std::vector < unsigned int > d;
|
||||
|
||||
|
||||
/**
|
||||
* computation of the makespan
|
||||
* @param _flowshop the genotype to evaluate
|
||||
*/
|
||||
double makespan(const FlowShop & _flowshop);
|
||||
|
||||
|
||||
/**
|
||||
* computation of the tardiness
|
||||
* @param _flowshop the genotype to evaluate
|
||||
*/
|
||||
double tardiness(const FlowShop & _flowshop);
|
||||
|
||||
|
||||
/**
|
||||
* computation of the completion times of a scheduling (for each job on each machine)
|
||||
* C[i][j] = completion of the jth job of the scheduling on the ith machine
|
||||
* @param _flowshop the genotype to evaluate
|
||||
*/
|
||||
std::vector< std::vector<unsigned int> > completionTime (const FlowShop & _flowshop);
|
||||
|
||||
};
|
||||
|
||||
#endif /*FLOWSHOPEVAL_H_*/
|
||||
64
contribution/trunk/tutos_META08/linux_32bits/flowshop/src/FlowShopInit.cpp
Executable file
64
contribution/trunk/tutos_META08/linux_32bits/flowshop/src/FlowShopInit.cpp
Executable file
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* <FlowShopInit.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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 <FlowShopInit.h>
|
||||
|
||||
|
||||
FlowShopInit::FlowShopInit(unsigned int _N) : N(_N)
|
||||
{}
|
||||
|
||||
|
||||
void FlowShopInit::operator()(FlowShop & _flowshop)
|
||||
{
|
||||
// scheduling vector
|
||||
std::vector<unsigned int> scheduling(N);
|
||||
// initialisation of possible values
|
||||
std::vector<unsigned int> possibles(N);
|
||||
for (unsigned int i=0 ; i<N ; i++)
|
||||
possibles[i] = i;
|
||||
// random initialization
|
||||
unsigned int rInd; // random index
|
||||
for (unsigned int i=0; i<N; i++)
|
||||
{
|
||||
rInd = (unsigned int) rng.uniform(N-i);
|
||||
scheduling[i] = possibles[rInd];
|
||||
possibles[rInd] = possibles[N-i-1];
|
||||
}
|
||||
_flowshop.resize(N);
|
||||
_flowshop.value(scheduling);
|
||||
_flowshop.invalidate(); // IMPORTANT in case the _genotype is old
|
||||
}
|
||||
49
contribution/trunk/tutos_META08/linux_32bits/flowshop/src/FlowShopInit.h
Executable file
49
contribution/trunk/tutos_META08/linux_32bits/flowshop/src/FlowShopInit.h
Executable file
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* <FlowShopInit.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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 FLOWSHOPINIT_H_
|
||||
#define FLOWSHOPINIT_H_
|
||||
|
||||
#include <eoInit.h>
|
||||
#include <FlowShop.h>
|
||||
|
||||
/**
|
||||
* Initialization of a random genotype built by the default constructor of the FlowShop class
|
||||
*/
|
||||
typedef eoInitPermutation<FlowShop> FlowShopInit;
|
||||
|
||||
#endif /*FLOWSHOPINIT_H_*/
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* <FlowShopObjectiveVector.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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 FLOWSHOPOBJECTIVEVECTOR_H_
|
||||
#define FLOWSHOPOBJECTIVEVECTOR_H_
|
||||
|
||||
#include <core/moeoRealObjectiveVector.h>
|
||||
#include <FlowShopObjectiveVectorTraits.h>
|
||||
|
||||
/**
|
||||
* Definition of the objective vector for multi-objective flow-shop problems: a vector of doubles
|
||||
*/
|
||||
typedef moeoRealObjectiveVector < FlowShopObjectiveVectorTraits > FlowShopObjectiveVector;
|
||||
|
||||
#endif /*FLOWSHOPOBJECTIVEVECTOR_H_*/
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* <FlowShopObjectiveVectorTraits.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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 <FlowShopObjectiveVectorTraits.h>
|
||||
|
||||
|
||||
bool FlowShopObjectiveVectorTraits::minimizing (int _i)
|
||||
{
|
||||
// minimizing both
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FlowShopObjectiveVectorTraits::maximizing (int _i)
|
||||
{
|
||||
// minimizing both
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned int FlowShopObjectiveVectorTraits::nObjectives ()
|
||||
{
|
||||
// 2 objectives
|
||||
return 2;
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* <FlowShopObjectiveVectorTraits.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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 FLOWSHOPOBJECTIVEVECTORTRAITS_H_
|
||||
#define FLOWSHOPOBJECTIVEVECTORTRAITS_H_
|
||||
|
||||
#include <core/moeoObjectiveVectorTraits.h>
|
||||
|
||||
/**
|
||||
* Definition of the objective vector traits for multi-objective flow-shop problems
|
||||
*/
|
||||
class FlowShopObjectiveVectorTraits : public moeoObjectiveVectorTraits
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Returns true if the _ith objective have to be minimzed
|
||||
* @param _i index of the objective
|
||||
*/
|
||||
static bool minimizing (int _i);
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the _ith objective have to be maximzed
|
||||
* @param _i index of the objective
|
||||
*/
|
||||
static bool maximizing (int _i);
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of objectives
|
||||
*/
|
||||
static unsigned int nObjectives ();
|
||||
|
||||
};
|
||||
|
||||
#endif /*FLOWSHOPOBJECTIVEVECTORTRAITS_H_*/
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
/*
|
||||
* <FlowShopOpCrossoverQuad.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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 <FlowShopOpCrossoverQuad.h>
|
||||
|
||||
|
||||
std::string FlowShopOpCrossoverQuad::className() const
|
||||
{
|
||||
return "FlowShopOpCrossoverQuad";
|
||||
}
|
||||
|
||||
|
||||
bool FlowShopOpCrossoverQuad::operator()(FlowShop & _flowshop1, FlowShop & _flowshop2)
|
||||
{
|
||||
bool oneAtLeastIsModified;
|
||||
// computation of the 2 random points
|
||||
unsigned int point1, point2;
|
||||
do
|
||||
{
|
||||
point1 = rng.random(std::min(_flowshop1.size(), _flowshop2.size()));
|
||||
point2 = rng.random(std::min(_flowshop1.size(), _flowshop2.size()));
|
||||
}
|
||||
while (fabs((double) point1-point2) <= 2);
|
||||
// computation of the offspring
|
||||
FlowShop offspring1 = generateOffspring(_flowshop1, _flowshop2, point1, point2);
|
||||
FlowShop offspring2 = generateOffspring(_flowshop2, _flowshop1, point1, point2);
|
||||
// does at least one genotype has been modified ?
|
||||
if ((_flowshop1 != offspring1) || (_flowshop2 != offspring2))
|
||||
{
|
||||
// update
|
||||
_flowshop1.value(offspring1);
|
||||
_flowshop2.value(offspring2);
|
||||
// at least one genotype has been modified
|
||||
oneAtLeastIsModified = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// no genotype has been modified
|
||||
oneAtLeastIsModified = false;
|
||||
}
|
||||
// return 'true' if at least one genotype has been modified
|
||||
return oneAtLeastIsModified;
|
||||
}
|
||||
|
||||
|
||||
FlowShop FlowShopOpCrossoverQuad::generateOffspring(const FlowShop & _parent1, const FlowShop & _parent2, unsigned int _point1, unsigned int _point2)
|
||||
{
|
||||
FlowShop result = _parent1;
|
||||
std::vector<bool> taken_values(result.size(), false);
|
||||
if (_point1 > _point2)
|
||||
std::swap(_point1, _point2);
|
||||
/* first parent */
|
||||
for (unsigned int i=0 ; i<=_point1 ; i++)
|
||||
{
|
||||
// result[i] == _parent1[i]
|
||||
taken_values[_parent1[i]] = true;
|
||||
}
|
||||
for (unsigned int i=_point2 ; i<result.size() ; i++)
|
||||
{
|
||||
// result[i] == _parent1[i]
|
||||
taken_values[_parent1[i]] = true;
|
||||
}
|
||||
/* second parent */
|
||||
unsigned int i = _point1+1;
|
||||
unsigned int j = 0;
|
||||
while (i<_point2 && j<_parent2.size())
|
||||
{
|
||||
if (! taken_values[_parent2[j]])
|
||||
{
|
||||
result[i] = _parent2[j];
|
||||
i++;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* <FlowShopOpCrossoverQuad.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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 FLOWSHOPOPCROSSOVERQUAD_H_
|
||||
#define FLOWSHOPOPCROSSOVERQUAD_H_
|
||||
|
||||
#include <eoOp.h>
|
||||
#include <FlowShop.h>
|
||||
|
||||
/**
|
||||
* Quadratic crossover operator for flow-shop (modify the both genotypes)
|
||||
*/
|
||||
class FlowShopOpCrossoverQuad : public eoQuadOp < FlowShop >
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* the class name (used to display statistics)
|
||||
*/
|
||||
std::string className() const;
|
||||
|
||||
|
||||
/**
|
||||
* eoQuad crossover - _flowshop1 and _flowshop2 are the (future) offspring, i.e. _copies_ of the parents
|
||||
* @param _flowshop1 the first parent
|
||||
* @param _flowshop2 the second parent
|
||||
*/
|
||||
bool operator()(FlowShop & _flowshop1, FlowShop & _flowshop2);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* generation of an offspring by a 2 points crossover
|
||||
* @param _parent1 the first parent
|
||||
* @param _parent2 the second parent
|
||||
* @param _point1 the first point
|
||||
* @param _point2 the second point
|
||||
*/
|
||||
FlowShop generateOffspring(const FlowShop & _parent1, const FlowShop & _parent2, unsigned int _point1, unsigned int _point2);
|
||||
|
||||
};
|
||||
|
||||
#endif /*FLOWSHOPOPCROSSOVERQUAD_H_*/
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* <FlowShopOpMutationExchange.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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 FLOWSHOPOPMUTATIONEXCHANGE_H_
|
||||
#define FLOWSHOPOPMUTATIONEXCHANGE_H_
|
||||
|
||||
#include <eoSwapMutation.h>
|
||||
#include <FlowShop.h>
|
||||
|
||||
/**
|
||||
* Exchange mutation operator for the flow-shop
|
||||
*/
|
||||
typedef eoSwapMutation<FlowShop> FlowShopOpMutationExchange;
|
||||
|
||||
#endif /*FLOWSHOPOPMUTATIONEXCHANGE_H_*/
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* <FlowShopOpMutationShift.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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 FLOWSHOPOPMUTATIONSHIFT_H_
|
||||
#define FLOWSHOPOPMUTATIONSHIFT_H_
|
||||
|
||||
#include <eoShiftMutation.h>
|
||||
#include <FlowShop.h>
|
||||
|
||||
/**
|
||||
* Shift mutation operator for flow-shop
|
||||
*/
|
||||
typedef eoShiftMutation<FlowShop> FlowShopOpMutationShift;
|
||||
|
||||
#endif /*FLOWSHOPOPMUTATIONSHIFT_H_*/
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* <make_eval_FlowShop.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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 MAKE_EVAL_FLOWSHOP_H_
|
||||
#define MAKE_EVAL_FLOWSHOP_H_
|
||||
|
||||
|
||||
#include <utils/eoParser.h>
|
||||
#include <utils/eoState.h>
|
||||
#include <eoEvalFuncCounter.h>
|
||||
#include <FlowShop.h>
|
||||
#include <FlowShopBenchmarkParser.h>
|
||||
#include <FlowShopEval.h>
|
||||
|
||||
/*
|
||||
* This function creates an eoEvalFuncCounter<eoFlowShop> that can later be used to evaluate an individual.
|
||||
* @param eoParser& _parser to get user parameters
|
||||
* @param eoState& _state to store the memory
|
||||
*/
|
||||
eoEvalFuncCounter<FlowShop> & do_make_eval(eoParser& _parser, eoState& _state)
|
||||
{
|
||||
// benchmark file name
|
||||
std::string benchmarkFileName = _parser.getORcreateParam(std::string(), "BenchmarkFile", "Benchmark file name (benchmarks are available at www.lifl.fr/~liefooga/benchmarks)", 'B',"Representation", true).value();
|
||||
if (benchmarkFileName == "")
|
||||
{
|
||||
std::string stmp = "*** Missing name of the benchmark file\n";
|
||||
stmp += " Type '-B=the_benchmark_file_name' or '--BenchmarkFile=the_benchmark_file_name'\n";
|
||||
stmp += " Benchmarks files are available at www.lifl.fr/~liefooga/benchmarks";
|
||||
throw std::runtime_error(stmp.c_str());
|
||||
}
|
||||
// reading of the parameters contained in the benchmark file
|
||||
FlowShopBenchmarkParser fParser(benchmarkFileName);
|
||||
unsigned int M = fParser.getM();
|
||||
unsigned int N = fParser.getN();
|
||||
std::vector< std::vector<unsigned int> > p = fParser.getP();
|
||||
std::vector<unsigned int> d = fParser.getD();
|
||||
// build of the initializer (a pointer, stored in the eoState)
|
||||
FlowShopEval* plainEval = new FlowShopEval(M, N, p, d);
|
||||
// turn that object into an evaluation counter
|
||||
eoEvalFuncCounter<FlowShop>* eval = new eoEvalFuncCounter<FlowShop> (* plainEval);
|
||||
// store in state
|
||||
_state.storeFunctor(eval);
|
||||
// and return a reference
|
||||
return *eval;
|
||||
}
|
||||
|
||||
#endif /*MAKE_EVAL_FLOWSHOP_H_*/
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* <make_genotype_FlowShop.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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 MAKE_GENOTYPE_FLOWSHOP_H_
|
||||
#define MAKE_GENOTYPE_FLOWSHOP_H_
|
||||
|
||||
#include <utils/eoParser.h>
|
||||
#include <utils/eoState.h>
|
||||
#include <FlowShop.h>
|
||||
#include <FlowShopInit.h>
|
||||
#include <FlowShopBenchmarkParser.h>
|
||||
|
||||
/*
|
||||
* This function creates an eoInit<eoFlowShop> that can later be used to initialize the population (see make_pop.h).
|
||||
* @param eoParser& _parser to get user parameters
|
||||
* @param eoState& _state to store the memory
|
||||
*/
|
||||
eoInit<FlowShop> & do_make_genotype(eoParser& _parser, eoState& _state)
|
||||
{
|
||||
// benchmark file name
|
||||
std::string benchmarkFileName = _parser.getORcreateParam(std::string(), "BenchmarkFile", "Benchmark file name (benchmarks are available at www.lifl.fr/~liefooga/benchmarks/)", 'B',"Representation", true).value();
|
||||
if (benchmarkFileName == "")
|
||||
{
|
||||
std::string stmp = "*** Missing name of the benchmark file\n";
|
||||
stmp += " Type '-B=the_benchmark_file_name' or '--BenchmarkFile=the_benchmark_file_name'\n";
|
||||
stmp += " Benchmarks files are available at www.lifl.fr/~liefooga/benchmarks";
|
||||
throw std::runtime_error(stmp.c_str());
|
||||
}
|
||||
// reading of number of jobs to schedule contained in the benchmark file
|
||||
FlowShopBenchmarkParser fParser(benchmarkFileName);
|
||||
unsigned int N = fParser.getN();
|
||||
// build of the initializer (a pointer, stored in the eoState)
|
||||
eoInit<FlowShop>* init = new FlowShopInit(N);
|
||||
// store in state
|
||||
_state.storeFunctor(init);
|
||||
// and return a reference
|
||||
return *init;
|
||||
}
|
||||
|
||||
#endif /*MAKE_GENOTYPE_FLOWSHOP_H_*/
|
||||
132
contribution/trunk/tutos_META08/linux_32bits/flowshop/src/make_op_FlowShop.h
Executable file
132
contribution/trunk/tutos_META08/linux_32bits/flowshop/src/make_op_FlowShop.h
Executable file
|
|
@ -0,0 +1,132 @@
|
|||
/*
|
||||
* <make_op_FlowShop.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
* 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 MAKE_OP_FLOWSHOP_H_
|
||||
#define MAKE_OP_FLOWSHOP_H_
|
||||
|
||||
#include <utils/eoParser.h>
|
||||
#include <utils/eoState.h>
|
||||
#include <eoOp.h>
|
||||
#include <eoGenOp.h>
|
||||
#include <eoCloneOps.h>
|
||||
#include <eoOpContainer.h>
|
||||
#include <eoProportionalCombinedOp.h>
|
||||
#include <FlowShopOpCrossoverQuad.h>
|
||||
#include <FlowShopOpMutationShift.h>
|
||||
#include <FlowShopOpMutationExchange.h>
|
||||
|
||||
/*
|
||||
* This function builds the operators that will be applied to the eoFlowShop
|
||||
* @param eoParameterLoader& _parser to get user parameters
|
||||
* @param eoState& _state to store the memory
|
||||
*/
|
||||
eoGenOp<FlowShop> & do_make_op(eoParameterLoader& _parser, eoState& _state)
|
||||
{
|
||||
|
||||
/////////////////////////////
|
||||
// Variation operators
|
||||
////////////////////////////
|
||||
|
||||
// the crossover
|
||||
////////////////
|
||||
|
||||
// a first crossover
|
||||
eoQuadOp<FlowShop> *cross = new FlowShopOpCrossoverQuad;
|
||||
// store in the state
|
||||
_state.storeFunctor(cross);
|
||||
|
||||
// relative rate in the combination
|
||||
double cross1Rate = _parser.createParam(1.0, "crossRate", "Relative rate for the only crossover", 0, "Variation Operators").value();
|
||||
// creation of the combined operator with this one
|
||||
eoPropCombinedQuadOp<FlowShop> *propXover = new eoPropCombinedQuadOp<FlowShop>(*cross, cross1Rate);
|
||||
// store in the state
|
||||
_state.storeFunctor(propXover);
|
||||
|
||||
|
||||
// the mutation
|
||||
///////////////
|
||||
|
||||
// a first mutation : the shift mutation
|
||||
eoMonOp<FlowShop> *mut = new FlowShopOpMutationShift;
|
||||
_state.storeFunctor(mut);
|
||||
// its relative rate in the combination
|
||||
double mut1Rate = _parser.createParam(0.5, "shiftMutRate", "Relative rate for shift mutation", 0, "Variation Operators").value();
|
||||
// creation of the combined operator with this one
|
||||
eoPropCombinedMonOp<FlowShop> *propMutation = new eoPropCombinedMonOp<FlowShop>(*mut, mut1Rate);
|
||||
_state.storeFunctor(propMutation);
|
||||
|
||||
// a second mutation : the exchange mutation
|
||||
mut = new FlowShopOpMutationExchange;
|
||||
_state.storeFunctor(mut);
|
||||
// its relative rate in the combination
|
||||
double mut2Rate = _parser.createParam(0.5, "exchangeMutRate", "Relative rate for exchange mutation", 0, "Variation Operators").value();
|
||||
// addition of this one to the combined operator
|
||||
propMutation -> add(*mut, mut2Rate);
|
||||
|
||||
// end of crossover and mutation definitions
|
||||
////////////////////////////////////////////
|
||||
|
||||
// First read the individual level parameters
|
||||
eoValueParam<double>& pCrossParam = _parser.createParam(0.25, "pCross", "Probability of Crossover", 'c', "Variation Operators" );
|
||||
// minimum check
|
||||
if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) )
|
||||
throw std::runtime_error("Invalid pCross");
|
||||
|
||||
eoValueParam<double>& pMutParam = _parser.createParam(0.35, "pMut", "Probability of Mutation", 'm', "Variation Operators" );
|
||||
// minimum check
|
||||
if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) )
|
||||
throw std::runtime_error("Invalid pMut");
|
||||
|
||||
// the crossover - with probability pCross
|
||||
eoProportionalOp<FlowShop> * propOp = new eoProportionalOp<FlowShop> ;
|
||||
_state.storeFunctor(propOp);
|
||||
eoQuadOp<FlowShop> *ptQuad = new eoQuadCloneOp<FlowShop>;
|
||||
_state.storeFunctor(ptQuad);
|
||||
propOp -> add(*propXover, pCrossParam.value()); // crossover, with proba pcross
|
||||
propOp -> add(*ptQuad, 1-pCrossParam.value()); // nothing, with proba 1-pcross
|
||||
|
||||
// now the sequential
|
||||
eoSequentialOp<FlowShop> *op = new eoSequentialOp<FlowShop>;
|
||||
_state.storeFunctor(op);
|
||||
op -> add(*propOp, 1.0); // always do combined crossover
|
||||
op -> add(*propMutation, pMutParam.value()); // then mutation, with proba pmut
|
||||
|
||||
// return a reference
|
||||
return *op;
|
||||
}
|
||||
|
||||
#endif /*MAKE_OP_FLOWSHOP_H_*/
|
||||
15
contribution/trunk/tutos_META08/linux_32bits/hybrid_lesson/current_param
Executable file
15
contribution/trunk/tutos_META08/linux_32bits/hybrid_lesson/current_param
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
###### General ######
|
||||
# --help=0 # -h : Prints this message
|
||||
# --stopOnUnknownParam=1 # Stop if unkown param entered
|
||||
|
||||
###### Configuration ######
|
||||
--instancePath=../tsp/benchs/berlin52.tsp # Path to the instance.
|
||||
# --seed=1224772208 # Seed for rand.
|
||||
--popSize=100 # Size of the population.
|
||||
--maxGen=1000 # Maximum number of generations.
|
||||
--crossRate=1 # Probability of crossover.
|
||||
--mutRate=0.01 # Probability of mutation.
|
||||
--nbOffspring=100 # Number of offspring.
|
||||
--crossType=Partial # Crossover to use, it can be 'Partial', 'Order' or 'Edge'.
|
||||
--selectionType=Best # Type of the selection: 'Best', 'First' or 'Random'.
|
||||
BIN
contribution/trunk/tutos_META08/linux_32bits/hybrid_lesson/hybrid_ga
Executable file
BIN
contribution/trunk/tutos_META08/linux_32bits/hybrid_lesson/hybrid_ga
Executable file
Binary file not shown.
195
contribution/trunk/tutos_META08/linux_32bits/hybrid_lesson/hybrid_ga.cpp
Executable file
195
contribution/trunk/tutos_META08/linux_32bits/hybrid_lesson/hybrid_ga.cpp
Executable file
|
|
@ -0,0 +1,195 @@
|
|||
/*
|
||||
* <tsp.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Thomas Legrand
|
||||
*
|
||||
* 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 <eo>
|
||||
#include <mo>
|
||||
#include <tsp>
|
||||
|
||||
void manage_configuration_file(eoParser & _parser);
|
||||
|
||||
int
|
||||
main (int _argc, char* _argv [])
|
||||
{
|
||||
eoParser parser(_argc, _argv);
|
||||
|
||||
manage_configuration_file(parser);
|
||||
|
||||
unsigned int seed=atoi( (parser.getParamWithLongName("seed")->getValue()).c_str() );
|
||||
std::string instancePath=parser.getParamWithLongName("instancePath")->getValue();
|
||||
unsigned int populationSize=atoi( (parser.getParamWithLongName("popSize")->getValue()).c_str() );
|
||||
unsigned int maxGen=atoi( (parser.getParamWithLongName("maxGen")->getValue()).c_str() );
|
||||
double crossoverRate=atof( (parser.getParamWithLongName("crossRate")->getValue()).c_str() );
|
||||
double mutationRate=atof( (parser.getParamWithLongName("mutRate")->getValue()).c_str() );
|
||||
unsigned int nbOffspring=atoi( (parser.getParamWithLongName("nbOffspring")->getValue()).c_str() );
|
||||
std::string crossoverType=parser.getParamWithLongName("crossType")->getValue();
|
||||
std::string selectionType=parser.getParamWithLongName("selectionType")->getValue();
|
||||
|
||||
// random number generator
|
||||
srand (seed);
|
||||
|
||||
// load test instance
|
||||
Graph::load(instancePath.c_str());
|
||||
|
||||
// the evaluation function
|
||||
RouteEval full_evaluation ;
|
||||
// the genotype (through a genotype initializer)
|
||||
RouteInit init ;
|
||||
// crossover
|
||||
eoQuadOp <Route>*crossover;
|
||||
if(crossoverType.compare("Partial")==0)
|
||||
{
|
||||
crossover=new PartialMappedXover();
|
||||
}
|
||||
else if (crossoverType.compare("Order")==0)
|
||||
{
|
||||
crossover=new OrderXover();
|
||||
}
|
||||
else if (crossoverType.compare("Edge")==0)
|
||||
{
|
||||
crossover=new EdgeXover();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw std::runtime_error("[tsp.cpp]: the crossover type '"+crossoverType+"' is not correct.");
|
||||
}
|
||||
|
||||
// mutation (hybridization)
|
||||
TwoOptInit two_opt_initializer;
|
||||
|
||||
TwoOptNext two_opt_next_move_generator;
|
||||
|
||||
TwoOptIncrEval two_opt_incremental_evaluation;
|
||||
|
||||
moMoveSelect<TwoOpt>* two_opt_selection;
|
||||
|
||||
if(selectionType.compare("Best")==0)
|
||||
{
|
||||
two_opt_selection= new moBestImprSelect<TwoOpt>();
|
||||
}
|
||||
else if (selectionType.compare("First")==0)
|
||||
{
|
||||
two_opt_selection= new moFirstImprSelect<TwoOpt>();
|
||||
}
|
||||
else if (selectionType.compare("Random")==0)
|
||||
{
|
||||
two_opt_selection= new moRandImprSelect<TwoOpt>();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw std::runtime_error("[hill_climbing.cpp]: the type of selection '"+selectionType+"' is not correct.");
|
||||
}
|
||||
|
||||
moHC <TwoOpt> hill_climbing_mutation (two_opt_initializer, two_opt_next_move_generator, two_opt_incremental_evaluation,
|
||||
*two_opt_selection, full_evaluation);
|
||||
|
||||
eoSGATransform <Route> transform (*crossover, crossoverRate, hill_climbing_mutation, mutationRate) ;
|
||||
|
||||
|
||||
/*** the representation-independent things ***/
|
||||
|
||||
// initialization of the population
|
||||
eoPop <Route> population (populationSize, init) ;
|
||||
apply <Route> (full_evaluation, population) ;
|
||||
// select
|
||||
eoDetTournamentSelect <Route> select_one ;
|
||||
eoSelectNumber <Route> select (select_one, nbOffspring) ;
|
||||
// replace
|
||||
eoGenerationalReplacement <Route> genReplace;
|
||||
eoWeakElitistReplacement <Route> replace(genReplace);
|
||||
// stopping criteria
|
||||
eoGenContinue <Route> continu (maxGen) ;
|
||||
// algorithm
|
||||
eoEasyEA <Route> ea (continu, full_evaluation, select, transform, replace) ;
|
||||
|
||||
|
||||
|
||||
/*** Go ! ***/
|
||||
|
||||
// initial solution
|
||||
std :: cout << "[From] " << population.best_element () << std :: endl ;
|
||||
|
||||
// run the algo
|
||||
ea(population);
|
||||
|
||||
// final solution
|
||||
std :: cout << "[To] " << population.best_element () << std :: endl ;
|
||||
|
||||
delete(crossover);
|
||||
delete(two_opt_selection);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
manage_configuration_file(eoParser & _parser)
|
||||
{
|
||||
std::ofstream os;
|
||||
|
||||
_parser.createParam(std::string("../tsp/benchs/berlin52.tsp"), "instancePath", "Path to the instance.",
|
||||
0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam((unsigned int)time(0), "seed", "Seed for rand.", 0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam((unsigned int)100, "popSize", "Size of the population.", 0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam((unsigned int)1000, "maxGen", "Maximum number of generations.", 0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam((double)1.0, "crossRate", "Probability of crossover.", 0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam((double)0.01, "mutRate", "Probability of mutation.", 0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam((unsigned int)100, "nbOffspring", "Number of offspring.", 0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam(std::string("Partial"), "crossType", "Crossover to use, it can be 'Partial', 'Order' or 'Edge'.",
|
||||
0, "Configuration", false);
|
||||
|
||||
_parser.getORcreateParam(std::string("Best"), "selectionType", "Type of the selection: 'Best', 'First' or 'Random'.",
|
||||
0, "Configuration", false);
|
||||
|
||||
if (_parser.userNeedsHelp())
|
||||
{
|
||||
_parser.printHelp(std::cout);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
os.open("current_param");
|
||||
if(!os.is_open())
|
||||
{
|
||||
throw std::runtime_error("[tsp.cpp]: the file current_param cannot be created.");
|
||||
}
|
||||
os <<_parser;
|
||||
os.close();
|
||||
}
|
||||
9
contribution/trunk/tutos_META08/linux_32bits/hybrid_lesson/param
Executable file
9
contribution/trunk/tutos_META08/linux_32bits/hybrid_lesson/param
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
###### Configuration ######
|
||||
--instancePath=../tsp/benchs/berlin52.tsp # Path to the instance.
|
||||
--popSize=100 # Size of the population.
|
||||
--maxGen=1000 # Maximum number of iterations.
|
||||
--crossRate=1 # Probability of crossover.
|
||||
--mutRate=0.01 # Probability of mutation.
|
||||
--nbOffspring=100 # Number of selected parents.
|
||||
--crossType=Partial # Crossover to use, it can be 'Partial', 'Order' or 'Edge'.
|
||||
--selectionType=Best # Type of the selection: 'Best', 'First' or 'Random'.
|
||||
93
contribution/trunk/tutos_META08/linux_32bits/tsp/benchs/README
Executable file
93
contribution/trunk/tutos_META08/linux_32bits/tsp/benchs/README
Executable file
|
|
@ -0,0 +1,93 @@
|
|||
All the instances in this directory come from the TSPLIB database. All the TSPLIB instances can be downloaded at this address:
|
||||
http://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95/tsp/
|
||||
|
||||
The accepted format is:
|
||||
|
||||
NAME: instance_name
|
||||
TYPE: TSP
|
||||
COMMENT: comments about the instance
|
||||
DIMENSION: number of towns.
|
||||
EDGE_WEIGHT_TYPE: EUC_2D
|
||||
NODE_COORD_SECTION
|
||||
1 565.0 575.0
|
||||
2 25.0 185.0
|
||||
3 345.0 750.0
|
||||
.
|
||||
.
|
||||
.
|
||||
.
|
||||
.
|
||||
.
|
||||
EOF
|
||||
|
||||
Compatibility bugs with some TSPLIB instances (soon corrected):
|
||||
|
||||
==> some instances have a space after a section title, for example "NAME :" instead of "NAME:".
|
||||
==> several instances have the "COMMENT:" section before the "TYPE:" section.
|
||||
==> several section are not yet implemented ("DISPLAY_DATA_TYPE:", ...).
|
||||
|
||||
Already corrected bugs:
|
||||
|
||||
==> some instances have several lines with the keyword "COMMENTS:"
|
||||
|
||||
For instance, the Berlin52 instance:
|
||||
|
||||
NAME: berlin52
|
||||
TYPE: TSP
|
||||
COMMENT: 52 locations in Berlin (Groetschel)
|
||||
DIMENSION: 52
|
||||
EDGE_WEIGHT_TYPE: EUC_2D
|
||||
NODE_COORD_SECTION
|
||||
1 565.0 575.0
|
||||
2 25.0 185.0
|
||||
3 345.0 750.0
|
||||
4 945.0 685.0
|
||||
5 845.0 655.0
|
||||
6 880.0 660.0
|
||||
7 25.0 230.0
|
||||
8 525.0 1000.0
|
||||
9 580.0 1175.0
|
||||
10 650.0 1130.0
|
||||
11 1605.0 620.0
|
||||
12 1220.0 580.0
|
||||
13 1465.0 200.0
|
||||
14 1530.0 5.0
|
||||
15 845.0 680.0
|
||||
16 725.0 370.0
|
||||
17 145.0 665.0
|
||||
18 415.0 635.0
|
||||
19 510.0 875.0
|
||||
20 560.0 365.0
|
||||
21 300.0 465.0
|
||||
22 520.0 585.0
|
||||
23 480.0 415.0
|
||||
24 835.0 625.0
|
||||
25 975.0 580.0
|
||||
26 1215.0 245.0
|
||||
27 1320.0 315.0
|
||||
28 1250.0 400.0
|
||||
29 660.0 180.0
|
||||
30 410.0 250.0
|
||||
31 420.0 555.0
|
||||
32 575.0 665.0
|
||||
33 1150.0 1160.0
|
||||
34 700.0 580.0
|
||||
35 685.0 595.0
|
||||
36 685.0 610.0
|
||||
37 770.0 610.0
|
||||
38 795.0 645.0
|
||||
39 720.0 635.0
|
||||
40 760.0 650.0
|
||||
41 475.0 960.0
|
||||
42 95.0 260.0
|
||||
43 875.0 920.0
|
||||
44 700.0 500.0
|
||||
45 555.0 815.0
|
||||
46 830.0 485.0
|
||||
47 1170.0 65.0
|
||||
48 830.0 610.0
|
||||
49 605.0 625.0
|
||||
50 595.0 360.0
|
||||
51 1340.0 725.0
|
||||
52 1740.0 245.0
|
||||
EOF
|
||||
60
contribution/trunk/tutos_META08/linux_32bits/tsp/benchs/berlin52.tsp
Executable file
60
contribution/trunk/tutos_META08/linux_32bits/tsp/benchs/berlin52.tsp
Executable file
|
|
@ -0,0 +1,60 @@
|
|||
NAME: berlin52
|
||||
TYPE: TSP
|
||||
COMMENT: 52 locations in Berlin (Groetschel)
|
||||
DIMENSION: 52
|
||||
EDGE_WEIGHT_TYPE: EUC_2D
|
||||
NODE_COORD_SECTION
|
||||
1 565.0 575.0
|
||||
2 25.0 185.0
|
||||
3 345.0 750.0
|
||||
4 945.0 685.0
|
||||
5 845.0 655.0
|
||||
6 880.0 660.0
|
||||
7 25.0 230.0
|
||||
8 525.0 1000.0
|
||||
9 580.0 1175.0
|
||||
10 650.0 1130.0
|
||||
11 1605.0 620.0
|
||||
12 1220.0 580.0
|
||||
13 1465.0 200.0
|
||||
14 1530.0 5.0
|
||||
15 845.0 680.0
|
||||
16 725.0 370.0
|
||||
17 145.0 665.0
|
||||
18 415.0 635.0
|
||||
19 510.0 875.0
|
||||
20 560.0 365.0
|
||||
21 300.0 465.0
|
||||
22 520.0 585.0
|
||||
23 480.0 415.0
|
||||
24 835.0 625.0
|
||||
25 975.0 580.0
|
||||
26 1215.0 245.0
|
||||
27 1320.0 315.0
|
||||
28 1250.0 400.0
|
||||
29 660.0 180.0
|
||||
30 410.0 250.0
|
||||
31 420.0 555.0
|
||||
32 575.0 665.0
|
||||
33 1150.0 1160.0
|
||||
34 700.0 580.0
|
||||
35 685.0 595.0
|
||||
36 685.0 610.0
|
||||
37 770.0 610.0
|
||||
38 795.0 645.0
|
||||
39 720.0 635.0
|
||||
40 760.0 650.0
|
||||
41 475.0 960.0
|
||||
42 95.0 260.0
|
||||
43 875.0 920.0
|
||||
44 700.0 500.0
|
||||
45 555.0 815.0
|
||||
46 830.0 485.0
|
||||
47 1170.0 65.0
|
||||
48 830.0 610.0
|
||||
49 605.0 625.0
|
||||
50 595.0 360.0
|
||||
51 1340.0 725.0
|
||||
52 1740.0 245.0
|
||||
EOF
|
||||
|
||||
108
contribution/trunk/tutos_META08/linux_32bits/tsp/benchs/eil101.tsp
Executable file
108
contribution/trunk/tutos_META08/linux_32bits/tsp/benchs/eil101.tsp
Executable file
|
|
@ -0,0 +1,108 @@
|
|||
NAME: eil101
|
||||
TYPE: TSP
|
||||
COMMENT: 101-city problem (Christofides/Eilon)
|
||||
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
|
||||
58
contribution/trunk/tutos_META08/linux_32bits/tsp/benchs/eil51.tsp
Executable file
58
contribution/trunk/tutos_META08/linux_32bits/tsp/benchs/eil51.tsp
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
NAME : eil51
|
||||
COMMENT : 51-city problem (Christofides/Eilon)
|
||||
TYPE : TSP
|
||||
DIMENSION : 51
|
||||
EDGE_WEIGHT_TYPE : EUC_2D
|
||||
NODE_COORD_SECTION
|
||||
1 37 52
|
||||
2 49 49
|
||||
3 52 64
|
||||
4 20 26
|
||||
5 40 30
|
||||
6 21 47
|
||||
7 17 63
|
||||
8 31 62
|
||||
9 52 33
|
||||
10 51 21
|
||||
11 42 41
|
||||
12 31 32
|
||||
13 5 25
|
||||
14 12 42
|
||||
15 36 16
|
||||
16 52 41
|
||||
17 27 23
|
||||
18 17 33
|
||||
19 13 13
|
||||
20 57 58
|
||||
21 62 42
|
||||
22 42 57
|
||||
23 16 57
|
||||
24 8 52
|
||||
25 7 38
|
||||
26 27 68
|
||||
27 30 48
|
||||
28 43 67
|
||||
29 58 48
|
||||
30 58 27
|
||||
31 37 69
|
||||
32 38 46
|
||||
33 46 10
|
||||
34 61 33
|
||||
35 62 63
|
||||
36 63 69
|
||||
37 32 22
|
||||
38 45 35
|
||||
39 59 15
|
||||
40 5 6
|
||||
41 10 17
|
||||
42 21 10
|
||||
43 5 64
|
||||
44 30 15
|
||||
45 39 10
|
||||
46 32 39
|
||||
47 25 32
|
||||
48 25 55
|
||||
49 48 28
|
||||
50 56 37
|
||||
51 30 40
|
||||
EOF
|
||||
2399
contribution/trunk/tutos_META08/linux_32bits/tsp/benchs/pr2392.tsp
Executable file
2399
contribution/trunk/tutos_META08/linux_32bits/tsp/benchs/pr2392.tsp
Executable file
File diff suppressed because it is too large
Load diff
5922
contribution/trunk/tutos_META08/linux_32bits/tsp/benchs/rl5915.tsp
Executable file
5922
contribution/trunk/tutos_META08/linux_32bits/tsp/benchs/rl5915.tsp
Executable file
File diff suppressed because it is too large
Load diff
13519
contribution/trunk/tutos_META08/linux_32bits/tsp/benchs/usa13509.tsp
Executable file
13519
contribution/trunk/tutos_META08/linux_32bits/tsp/benchs/usa13509.tsp
Executable file
File diff suppressed because it is too large
Load diff
50
contribution/trunk/tutos_META08/linux_32bits/tsp/src/city_swap.cpp
Executable file
50
contribution/trunk/tutos_META08/linux_32bits/tsp/src/city_swap.cpp
Executable file
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* <city_swap.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 <utils/eoRNG.h>
|
||||
|
||||
#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 ;
|
||||
}
|
||||
55
contribution/trunk/tutos_META08/linux_32bits/tsp/src/city_swap.h
Executable file
55
contribution/trunk/tutos_META08/linux_32bits/tsp/src/city_swap.h
Executable file
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* <city_swap.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 <eoOp.h>
|
||||
|
||||
#include "route.h"
|
||||
|
||||
/** Its swaps two vertices
|
||||
randomly choosen */
|
||||
class CitySwap : public eoMonOp <Route>
|
||||
{
|
||||
|
||||
public :
|
||||
|
||||
bool operator () (Route & __route) ;
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
169
contribution/trunk/tutos_META08/linux_32bits/tsp/src/edge_xover.cpp
Executable file
169
contribution/trunk/tutos_META08/linux_32bits/tsp/src/edge_xover.cpp
Executable file
|
|
@ -0,0 +1,169 @@
|
|||
/*
|
||||
* <edge_xover.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 <assert.h>
|
||||
|
||||
#include <utils/eoRNG.h>
|
||||
|
||||
#include "edge_xover.h"
|
||||
#include "route_valid.h"
|
||||
|
||||
#define MAXINT 1000000
|
||||
|
||||
void
|
||||
EdgeXover :: build_map (const Route & __par1, const Route & __par2)
|
||||
{
|
||||
|
||||
unsigned int len = __par1.size () ;
|
||||
|
||||
/* Initialization */
|
||||
_map.clear () ;
|
||||
_map.resize (len) ;
|
||||
|
||||
for (unsigned int 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 int __vertex, std :: vector <std :: set <unsigned int> > & __map)
|
||||
{
|
||||
|
||||
std :: set <unsigned int> & neigh = __map [__vertex] ;
|
||||
|
||||
for (std :: set <unsigned int> :: iterator it = neigh.begin () ; it != neigh.end () ; it ++)
|
||||
{
|
||||
__map [* it].erase (__vertex) ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
EdgeXover :: add_vertex (unsigned int __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 int len = __par1.size () ;
|
||||
|
||||
/* Go ! */
|
||||
__child.clear () ;
|
||||
|
||||
unsigned int cur_vertex = rng.random (len) ;
|
||||
|
||||
add_vertex (cur_vertex, __child) ;
|
||||
|
||||
for (unsigned int i = 1 ; i < len ; i ++)
|
||||
{
|
||||
|
||||
unsigned int len_min_entry = MAXINT ;
|
||||
|
||||
std :: set <unsigned int> & neigh = _map [cur_vertex] ;
|
||||
|
||||
for (std :: set <unsigned int> :: iterator it = neigh.begin () ; it != neigh.end () ; it ++)
|
||||
{
|
||||
unsigned int l = _map [* it].size () ;
|
||||
if (len_min_entry > l)
|
||||
{
|
||||
len_min_entry = l ;
|
||||
}
|
||||
}
|
||||
|
||||
std :: vector <unsigned int> cand ; /* Candidates */
|
||||
|
||||
for (std :: set <unsigned> :: iterator it = neigh.begin () ; it != neigh.end () ; it ++)
|
||||
{
|
||||
unsigned int l = _map [* it].size () ;
|
||||
if (len_min_entry == l)
|
||||
{
|
||||
cand.push_back (* it) ;
|
||||
}
|
||||
}
|
||||
|
||||
if (! cand.size ())
|
||||
{
|
||||
|
||||
/* Oh no ! Implicit mutation */
|
||||
for (unsigned int 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) ;
|
||||
|
||||
assert (valid (__route1)) ;
|
||||
assert (valid (__route2)) ;
|
||||
|
||||
__route1.invalidate () ;
|
||||
__route2.invalidate () ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
72
contribution/trunk/tutos_META08/linux_32bits/tsp/src/edge_xover.h
Executable file
72
contribution/trunk/tutos_META08/linux_32bits/tsp/src/edge_xover.h
Executable file
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* <edge_xover.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 <vector>
|
||||
#include <set>
|
||||
|
||||
#include <eoOp.h>
|
||||
|
||||
#include "route.h"
|
||||
|
||||
/** Edge Crossover */
|
||||
class EdgeXover : public eoQuadOp <Route>
|
||||
{
|
||||
|
||||
public :
|
||||
|
||||
bool operator () (Route & __route1, Route & __route2) ;
|
||||
|
||||
private :
|
||||
|
||||
void cross (const Route & __par1, const Route & __par2, Route & __child) ; /* Binary */
|
||||
|
||||
void remove_entry (unsigned int __vertex, std :: vector <std :: set <unsigned> > & __map) ;
|
||||
/* Updating the map of entries */
|
||||
|
||||
void build_map (const Route & __par1, const Route & __par2) ;
|
||||
|
||||
void add_vertex (unsigned int __vertex, Route & __child) ;
|
||||
|
||||
std :: vector <std :: set <unsigned int> > _map ; /* The handled map */
|
||||
|
||||
std :: vector <bool> visited ; /* Vertices that are already visited */
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
207
contribution/trunk/tutos_META08/linux_32bits/tsp/src/graph.cpp
Executable file
207
contribution/trunk/tutos_META08/linux_32bits/tsp/src/graph.cpp
Executable file
|
|
@ -0,0 +1,207 @@
|
|||
/*
|
||||
* <graph.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 "graph.h"
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
namespace Graph
|
||||
{
|
||||
|
||||
static std :: vector <std :: pair <double, double> > vectCoord ; // Coordinates
|
||||
|
||||
static std :: vector <std :: vector <unsigned int> > dist ; // Distances Mat.
|
||||
|
||||
unsigned size ()
|
||||
{
|
||||
return dist.size () ;
|
||||
}
|
||||
|
||||
void computeDistances ()
|
||||
{
|
||||
|
||||
// Dim.
|
||||
unsigned int numCities = vectCoord.size () ;
|
||||
dist.resize (numCities) ;
|
||||
for (unsigned int i = 0 ; i < dist.size () ; i ++)
|
||||
{
|
||||
dist [i].resize (numCities) ;
|
||||
}
|
||||
|
||||
// Computations.
|
||||
for (unsigned int i = 0 ; i < dist.size () ; i ++)
|
||||
{
|
||||
for (unsigned int j = i + 1 ; j < dist.size () ; j ++)
|
||||
{
|
||||
double distX = (double)(vectCoord [i].first - vectCoord [j].first) ;
|
||||
double distY = (double)(vectCoord [i].second - vectCoord [j].second) ;
|
||||
dist [i] [j] = dist [j] [i] = (unsigned int) (sqrt ((float) (distX * distX + distY * distY)) + 0.5) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void load (const char * _fileName)
|
||||
{
|
||||
unsigned int i, dimension;
|
||||
|
||||
std::string string_read, buffer;
|
||||
|
||||
std :: ifstream file (_fileName) ;
|
||||
|
||||
cout << endl << "\tLoading [" << _fileName << "]" << endl << endl;
|
||||
|
||||
if( file.is_open() )
|
||||
{
|
||||
// Read NAME:
|
||||
file >> string_read;
|
||||
if (string_read.compare("NAME:")!=0)
|
||||
{
|
||||
cout << "ERROR: \'NAME:\' espected, \'" << string_read << "\' found" << endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
// Read instance name
|
||||
file >> string_read;
|
||||
cout << "\t\tInstance Name = " << string_read << endl;
|
||||
// Read TYPE:
|
||||
file >> string_read;
|
||||
if (string_read.compare("TYPE:")!=0)
|
||||
{
|
||||
cout << "ERROR: \'TYPE:\' espected, \'" << string_read << "\' found" << endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
// Read instance type;
|
||||
file >> string_read;
|
||||
cout << "\t\tInstance type = " << string_read << endl;
|
||||
if (string_read.compare("TSP")!=0)
|
||||
{
|
||||
cout << "ERROR: only TSP type instance can be loaded" << endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
// Read COMMENT:
|
||||
file >> string_read;
|
||||
if (string_read.compare("COMMENT:")!=0)
|
||||
{
|
||||
cout << "ERROR: \'COMMENT:\' espected, \'" << string_read << "\' found" << endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
// Read comments
|
||||
cout << "\t\tInstance comments = ";
|
||||
file >> string_read;
|
||||
buffer = string_read+"_first";
|
||||
while((string_read.compare("DIMENSION:")!=0) && (string_read.compare(buffer)!=0))
|
||||
{
|
||||
if(string_read.compare("COMMENT:")!=0)
|
||||
{
|
||||
cout << string_read << " ";
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << endl << "\t ";
|
||||
}
|
||||
buffer = string_read;
|
||||
file >> string_read;
|
||||
}
|
||||
|
||||
cout << endl;
|
||||
|
||||
// Read dimension;
|
||||
file >> dimension ;
|
||||
cout << "\t\tInstance dimension = " << dimension << endl;
|
||||
vectCoord.resize (dimension) ;
|
||||
|
||||
// Read EDGE_WEIGHT_TYPE
|
||||
file >> string_read;
|
||||
if (string_read.compare("EDGE_WEIGHT_TYPE:")!=0)
|
||||
{
|
||||
cout << "ERROR: \'EDGE_WEIGHT_TYPE:\' espected, \'" << string_read << "\' found" << endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// Read edge weight type
|
||||
file >> string_read;
|
||||
cout << "\t\tInstance edge weight type = " << string_read << endl;
|
||||
if (string_read.compare("EUC_2D")!=0)
|
||||
{
|
||||
cout << "ERROR: only EUC_2D edge weight type instance can be loaded" << endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// Read NODE_COORD_SECTION
|
||||
file >> string_read;
|
||||
if (string_read.compare("NODE_COORD_SECTION")!=0)
|
||||
{
|
||||
cout << "ERROR: \'NODE_COORD_SECTION\' espected, \'" << string_read << "\' found" << endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// Read coordonates.
|
||||
for(i=0;i<dimension;i++)
|
||||
{
|
||||
// Read index
|
||||
file >> string_read;
|
||||
//Read Coordinate
|
||||
file >> vectCoord [i].first >> vectCoord [i].second ;
|
||||
}
|
||||
|
||||
// Read EOF
|
||||
file >> string_read;
|
||||
if(string_read.compare("EOF")!=0)
|
||||
{
|
||||
cout << "ERROR: \'EOF\' espected, \'" << string_read << "\' found" << endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
cout << endl;
|
||||
|
||||
file.close () ;
|
||||
|
||||
computeDistances () ;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << _fileName << " does not exist !!!" << endl ;
|
||||
exit(EXIT_FAILURE) ;
|
||||
}
|
||||
}
|
||||
|
||||
float distance (unsigned int _from, unsigned int _to)
|
||||
{
|
||||
return (float)(dist [_from] [_to]) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
60
contribution/trunk/tutos_META08/linux_32bits/tsp/src/graph.h
Executable file
60
contribution/trunk/tutos_META08/linux_32bits/tsp/src/graph.h
Executable file
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* <graph.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 graph_h
|
||||
#define graph_h
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
namespace Graph
|
||||
{
|
||||
void load (const char * _file_name) ;
|
||||
/* Loading cities
|
||||
(expressed by their coordinates)
|
||||
from the given file name */
|
||||
|
||||
float distance (unsigned int _from, unsigned int _to) ;
|
||||
|
||||
unsigned int size () ; // How many cities ?
|
||||
}
|
||||
|
||||
#endif
|
||||
50
contribution/trunk/tutos_META08/linux_32bits/tsp/src/mix.h
Executable file
50
contribution/trunk/tutos_META08/linux_32bits/tsp/src/mix.h
Executable file
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* <mix.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 <utils/eoRNG.h>
|
||||
|
||||
template <class T> void mix (std :: vector <T> & __vect)
|
||||
{
|
||||
for (unsigned int i = 0 ; i < __vect.size () ; i ++)
|
||||
{
|
||||
std :: swap (__vect [i], __vect [rng.random (__vect.size ())]) ;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
119
contribution/trunk/tutos_META08/linux_32bits/tsp/src/order_xover.cpp
Executable file
119
contribution/trunk/tutos_META08/linux_32bits/tsp/src/order_xover.cpp
Executable file
|
|
@ -0,0 +1,119 @@
|
|||
/*
|
||||
* <order_xover.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 <assert.h>
|
||||
#include <vector>
|
||||
|
||||
#include <utils/eoRNG.h>
|
||||
|
||||
#include "order_xover.h"
|
||||
#include "route_valid.h"
|
||||
|
||||
void OrderXover :: cross (const Route & __par1, const Route & __par2, Route & __child)
|
||||
{
|
||||
|
||||
unsigned int cut = rng.random (__par1.size ()) ;
|
||||
|
||||
/* To store vertices that have
|
||||
already been crossed */
|
||||
std::vector<bool> v;
|
||||
v.resize(__par1.size());
|
||||
|
||||
for (unsigned int i = 0 ; i < __par1.size () ; i ++)
|
||||
{
|
||||
v [i] = false ;
|
||||
}
|
||||
|
||||
/* Copy of the left partial
|
||||
route of the first parent */
|
||||
for (unsigned int i = 0 ; i < cut ; i ++)
|
||||
{
|
||||
__child [i] = __par1 [i] ;
|
||||
v [__par1 [i]] = true ;
|
||||
}
|
||||
|
||||
/* Searching the vertex of the second path, that ended
|
||||
the previous first one */
|
||||
unsigned int from = 0 ;
|
||||
for (unsigned int i = 0 ; i < __par2.size () ; i ++)
|
||||
{
|
||||
if (__par2 [i] == __child [cut - 1])
|
||||
{
|
||||
from = i ;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
||||
/* Selecting a direction
|
||||
Left or Right */
|
||||
char direct = rng.flip () ? 1 : -1 ;
|
||||
|
||||
/* Copy of the left vertices from
|
||||
the second parent path */
|
||||
unsigned int l = cut ;
|
||||
|
||||
for (unsigned int i = 0 ; i < __par2.size () ; i ++)
|
||||
{
|
||||
unsigned int bidule /* :-) */ = (direct * i + from + __par2.size ()) % __par2.size () ;
|
||||
if (! v [__par2 [bidule]])
|
||||
{
|
||||
__child [l ++] = __par2 [bidule] ;
|
||||
v [__par2 [bidule]] = true ;
|
||||
}
|
||||
}
|
||||
|
||||
v.clear();
|
||||
}
|
||||
|
||||
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) ;
|
||||
|
||||
assert (valid (__route1)) ;
|
||||
assert (valid (__route2)) ;
|
||||
|
||||
__route1.invalidate () ;
|
||||
__route2.invalidate () ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
57
contribution/trunk/tutos_META08/linux_32bits/tsp/src/order_xover.h
Executable file
57
contribution/trunk/tutos_META08/linux_32bits/tsp/src/order_xover.h
Executable file
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* <order_xover.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 <eoOp.h>
|
||||
|
||||
#include "route.h"
|
||||
|
||||
/** Order Crossover */
|
||||
class OrderXover : public eoQuadOp <Route>
|
||||
{
|
||||
|
||||
public :
|
||||
|
||||
bool operator () (Route & __route1, Route & __route2) ;
|
||||
|
||||
private :
|
||||
|
||||
void cross (const Route & __par1, const Route & __par2, Route & __child) ;
|
||||
} ;
|
||||
|
||||
#endif
|
||||
53
contribution/trunk/tutos_META08/linux_32bits/tsp/src/part_route_eval.cpp
Executable file
53
contribution/trunk/tutos_META08/linux_32bits/tsp/src/part_route_eval.cpp
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* <part_route_eval.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 "graph.h"
|
||||
|
||||
PartRouteEval :: PartRouteEval (float __from, float __to) : from (__from), to (__to)
|
||||
{}
|
||||
|
||||
void PartRouteEval :: operator () (Route & __route)
|
||||
{
|
||||
float len = 0 ;
|
||||
|
||||
for (unsigned int i = (unsigned int) (__route.size () * from) ; i < (unsigned int ) (__route.size () * to) ; i ++)
|
||||
{
|
||||
len += Graph :: distance (__route [i], __route [(i + 1) % Graph :: size ()]) ;
|
||||
}
|
||||
|
||||
__route.fitness (len) ;
|
||||
}
|
||||
62
contribution/trunk/tutos_META08/linux_32bits/tsp/src/part_route_eval.h
Executable file
62
contribution/trunk/tutos_META08/linux_32bits/tsp/src/part_route_eval.h
Executable file
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* <part_route_eval.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 <eoEvalFunc.h>
|
||||
|
||||
#include "route.h"
|
||||
|
||||
/** Route Evaluator */
|
||||
class PartRouteEval : public eoEvalFunc <Route>
|
||||
{
|
||||
|
||||
public :
|
||||
|
||||
/** Constructor */
|
||||
PartRouteEval (float __from, float __to) ;
|
||||
|
||||
void operator () (Route & __route) ;
|
||||
|
||||
private :
|
||||
|
||||
float from, to ;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
#endif
|
||||
45
contribution/trunk/tutos_META08/linux_32bits/tsp/src/part_two_opt_init.cpp
Executable file
45
contribution/trunk/tutos_META08/linux_32bits/tsp/src/part_two_opt_init.cpp
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* <part_two_opt_init.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 <utils/eoRNG.h>
|
||||
|
||||
#include "part_two_opt_init.h"
|
||||
|
||||
void PartTwoOptInit :: operator () (TwoOpt & __move, const Route & __route)
|
||||
{
|
||||
__move.first = rng.random (__route.size () - 6) ;
|
||||
__move.second = __move.first + 2 ;
|
||||
}
|
||||
54
contribution/trunk/tutos_META08/linux_32bits/tsp/src/part_two_opt_init.h
Executable file
54
contribution/trunk/tutos_META08/linux_32bits/tsp/src/part_two_opt_init.h
Executable file
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* <part_two_opt_init.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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_two_opt_init_h
|
||||
#define part_two_opt_init_h
|
||||
|
||||
#include <moMoveInit.h>
|
||||
|
||||
#include "two_opt.h"
|
||||
|
||||
/** It sets the first couple of edges */
|
||||
class PartTwoOptInit : public moMoveInit <TwoOpt>
|
||||
{
|
||||
|
||||
public :
|
||||
|
||||
void operator () (TwoOpt & __move, const Route & __route) ;
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
57
contribution/trunk/tutos_META08/linux_32bits/tsp/src/part_two_opt_next.cpp
Executable file
57
contribution/trunk/tutos_META08/linux_32bits/tsp/src/part_two_opt_next.cpp
Executable file
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* <part_two_opt_next.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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_two_opt_next.h"
|
||||
#include "graph.h"
|
||||
|
||||
bool TwoOptNext :: operator () (TwoOpt & __move, const Route & __route)
|
||||
{
|
||||
if (__move.first == Graph :: size () - 4 && __move.second == __move.first + 2)
|
||||
{
|
||||
return false ;
|
||||
}
|
||||
else
|
||||
{
|
||||
__move.second ++ ;
|
||||
if (__move.second == Graph :: size () - 1)
|
||||
{
|
||||
__move.first ++ ;
|
||||
__move.second = __move.first + 2 ;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
}
|
||||
53
contribution/trunk/tutos_META08/linux_32bits/tsp/src/part_two_opt_next.h
Executable file
53
contribution/trunk/tutos_META08/linux_32bits/tsp/src/part_two_opt_next.h
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* <part_two_opt_next.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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_two_opt_next_h
|
||||
#define part_two_opt_next_h
|
||||
|
||||
#include <moNextMove.h>
|
||||
#include "two_opt.h"
|
||||
|
||||
/** It updates a couple of edges */
|
||||
class PartTwoOptNext : public moNextMove <TwoOpt>
|
||||
{
|
||||
|
||||
public :
|
||||
|
||||
bool operator () (TwoOpt & __move, const Route & __route) ;
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
118
contribution/trunk/tutos_META08/linux_32bits/tsp/src/partial_mapped_xover.cpp
Executable file
118
contribution/trunk/tutos_META08/linux_32bits/tsp/src/partial_mapped_xover.cpp
Executable file
|
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
* <partial_mapped_xover.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 <assert.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <utils/eoRNG.h>
|
||||
|
||||
#include "partial_mapped_xover.h"
|
||||
#include "route_valid.h"
|
||||
#include "mix.h"
|
||||
|
||||
void PartialMappedXover :: repair (Route & __route, unsigned __cut1, unsigned __cut2)
|
||||
{
|
||||
|
||||
std::vector<unsigned int> v; // Number of times a cities are visited ...
|
||||
|
||||
v.resize(__route.size ());
|
||||
|
||||
for (unsigned int i = 0 ; i < __route.size () ; i ++)
|
||||
{
|
||||
v [i] = 0 ;
|
||||
}
|
||||
|
||||
for (unsigned int i = 0 ; i < __route.size () ; i ++)
|
||||
{
|
||||
v [__route [i]] ++ ;
|
||||
}
|
||||
|
||||
std :: vector <unsigned int> vert ;
|
||||
|
||||
for (unsigned int i = 0 ; i < __route.size () ; i ++)
|
||||
{
|
||||
if (! v [i])
|
||||
{
|
||||
vert.push_back (i) ;
|
||||
}
|
||||
}
|
||||
|
||||
mix (vert) ;
|
||||
|
||||
for (unsigned int i = 0 ; i < __route.size () ; i ++)
|
||||
{
|
||||
if (i < __cut1 || i >= __cut2)
|
||||
{
|
||||
if (v [__route [i]] > 1)
|
||||
{
|
||||
__route [i] = vert.back () ;
|
||||
vert.pop_back () ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
v.clear();
|
||||
}
|
||||
|
||||
bool PartialMappedXover :: operator () (Route & __route1, Route & __route2)
|
||||
{
|
||||
unsigned int cut1 = rng.random (__route1.size ()), cut2 = rng.random (__route2.size ()) ;
|
||||
|
||||
if (cut2 < cut1)
|
||||
{
|
||||
std :: swap (cut1, cut2) ;
|
||||
}
|
||||
|
||||
// Between the cuts
|
||||
for (unsigned int i = cut1 ; i < cut2 ; i ++)
|
||||
{
|
||||
std :: swap (__route1 [i], __route2 [i]) ;
|
||||
}
|
||||
|
||||
// Outside the cuts
|
||||
repair (__route1, cut1, cut2) ;
|
||||
repair (__route2, cut1, cut2) ;
|
||||
|
||||
// Debug
|
||||
assert (valid (__route1)) ;
|
||||
assert (valid (__route2)) ;
|
||||
|
||||
__route1.invalidate () ;
|
||||
__route2.invalidate () ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
57
contribution/trunk/tutos_META08/linux_32bits/tsp/src/partial_mapped_xover.h
Executable file
57
contribution/trunk/tutos_META08/linux_32bits/tsp/src/partial_mapped_xover.h
Executable file
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* <partial_mapped_xover.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 <eoOp.h>
|
||||
|
||||
#include "route.h"
|
||||
|
||||
/** Partial Mapped Crossover */
|
||||
class PartialMappedXover : public eoQuadOp <Route>
|
||||
{
|
||||
|
||||
public :
|
||||
|
||||
bool operator () (Route & __route1, Route & __route2) ;
|
||||
|
||||
private :
|
||||
|
||||
void repair (Route & __route, unsigned __cut1, unsigned __cut2) ;
|
||||
} ;
|
||||
|
||||
#endif
|
||||
48
contribution/trunk/tutos_META08/linux_32bits/tsp/src/route.h
Executable file
48
contribution/trunk/tutos_META08/linux_32bits/tsp/src/route.h
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* <route.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 <eoVector.h>
|
||||
#include <eoScalarFitness.h>
|
||||
|
||||
// A float that has to be minimized.
|
||||
typedef eoScalarFitness< float, std::greater<float> > tspFitness ;
|
||||
|
||||
typedef eoVector <tspFitness, unsigned int> Route ; // [Fitness (length), Gene (city)]
|
||||
|
||||
#endif
|
||||
51
contribution/trunk/tutos_META08/linux_32bits/tsp/src/route_eval.cpp
Executable file
51
contribution/trunk/tutos_META08/linux_32bits/tsp/src/route_eval.cpp
Executable file
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* <route_eval.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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"
|
||||
#include "graph.h"
|
||||
|
||||
void RouteEval :: operator () (Route & __route)
|
||||
{
|
||||
|
||||
float len = 0.0 ;
|
||||
|
||||
for (unsigned int i = 0 ; i < Graph :: size () ; i ++)
|
||||
{
|
||||
len += Graph :: distance (__route [i], __route [(i + 1) % Graph :: size ()]) ;
|
||||
}
|
||||
|
||||
__route.fitness (len) ;
|
||||
}
|
||||
55
contribution/trunk/tutos_META08/linux_32bits/tsp/src/route_eval.h
Executable file
55
contribution/trunk/tutos_META08/linux_32bits/tsp/src/route_eval.h
Executable file
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* <route_eval.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 <eoEvalFunc.h>
|
||||
|
||||
#include "route.h"
|
||||
|
||||
/** Route Evaluator */
|
||||
class RouteEval : public eoEvalFunc <Route>
|
||||
{
|
||||
|
||||
public :
|
||||
|
||||
void operator () (Route & __route) ;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
#endif
|
||||
63
contribution/trunk/tutos_META08/linux_32bits/tsp/src/route_init.cpp
Executable file
63
contribution/trunk/tutos_META08/linux_32bits/tsp/src/route_init.cpp
Executable file
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* <route_init.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 <utils/eoRNG.h>
|
||||
|
||||
#include "route_init.h"
|
||||
#include "graph.h"
|
||||
|
||||
void RouteInit :: operator () (Route & __route)
|
||||
{
|
||||
|
||||
// Init.
|
||||
__route.clear () ;
|
||||
for (unsigned int i = 0 ; i < Graph :: size () ; i ++)
|
||||
{
|
||||
__route.push_back (i) ;
|
||||
}
|
||||
|
||||
// Swap. cities
|
||||
|
||||
for (unsigned int i = 0 ; i < Graph :: size () ; i ++)
|
||||
{
|
||||
//unsigned int j = rng.random (Graph :: size ()) ;
|
||||
|
||||
unsigned int j = (unsigned int) (Graph :: size () * (rand () / (RAND_MAX + 1.0))) ;
|
||||
unsigned int city = __route [i] ;
|
||||
__route [i] = __route [j] ;
|
||||
__route [j] = city ;
|
||||
}
|
||||
}
|
||||
53
contribution/trunk/tutos_META08/linux_32bits/tsp/src/route_init.h
Executable file
53
contribution/trunk/tutos_META08/linux_32bits/tsp/src/route_init.h
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* <route_init.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 <eoInit.h>
|
||||
|
||||
#include "route.h"
|
||||
|
||||
class RouteInit : public eoInit <Route>
|
||||
{
|
||||
|
||||
public :
|
||||
|
||||
void operator () (Route & __route) ;
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
68
contribution/trunk/tutos_META08/linux_32bits/tsp/src/route_valid.cpp
Executable file
68
contribution/trunk/tutos_META08/linux_32bits/tsp/src/route_valid.cpp
Executable file
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* <route_valid.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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_valid.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
bool valid (Route & __route)
|
||||
{
|
||||
|
||||
std::vector<unsigned int> t;
|
||||
t.resize(__route.size());
|
||||
|
||||
for (unsigned int i = 0 ; i < __route.size () ; i ++)
|
||||
{
|
||||
t [i] = 0 ;
|
||||
}
|
||||
|
||||
for (unsigned int i = 0 ; i < __route.size () ; i ++)
|
||||
{
|
||||
t [__route [i]] ++ ;
|
||||
}
|
||||
|
||||
for (unsigned int i = 0 ; i < __route.size () ; i ++)
|
||||
{
|
||||
if (t [i] != 1)
|
||||
{
|
||||
t.clear();
|
||||
return false ;
|
||||
}
|
||||
}
|
||||
|
||||
t.clear();
|
||||
return true ; // OK.
|
||||
}
|
||||
44
contribution/trunk/tutos_META08/linux_32bits/tsp/src/route_valid.h
Executable file
44
contribution/trunk/tutos_META08/linux_32bits/tsp/src/route_valid.h
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* <route_valid.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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_valid_h
|
||||
#define route_valid_h
|
||||
|
||||
#include "route.h"
|
||||
|
||||
bool valid (Route & __route) ;
|
||||
|
||||
#endif
|
||||
41
contribution/trunk/tutos_META08/linux_32bits/tsp/src/tsp
Executable file
41
contribution/trunk/tutos_META08/linux_32bits/tsp/src/tsp
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* <tsp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr)
|
||||
*
|
||||
* This software is governed by the CeCILL license under French law and
|
||||
* abiding by the rules of distribution of free software. You can use,
|
||||
* modify and/ or redistribute the software under the terms of the CeCILL
|
||||
* license as circulated by CEA, CNRS and INRIA at the following URL
|
||||
* "http://www.cecill.info".
|
||||
*
|
||||
* As a counterpart to the access to the source code and rights to copy,
|
||||
* modify and redistribute granted by the license, users are provided only
|
||||
* with a limited warranty and the software's author, the holder of the
|
||||
* economic rights, and the successive licensors have only limited liability.
|
||||
*
|
||||
* In this respect, the user's attention is drawn to the risks associated
|
||||
* with loading, using, modifying and/or developing or reproducing the
|
||||
* software by the user in light of its specific status of free software,
|
||||
* that may mean that it is complicated to manipulate, and that also
|
||||
* therefore means that it is reserved for developers and experienced
|
||||
* professionals having in-depth computer knowledge. Users are therefore
|
||||
* encouraged to load and test the software's suitability as regards their
|
||||
* requirements in conditions enabling the security of their systems and/or
|
||||
* data to be ensured and, more generally, to use and operate it in the
|
||||
* same conditions as regards security.
|
||||
* The fact that you are presently reading this means that you have had
|
||||
* knowledge of the CeCILL license and that you accept its terms.
|
||||
*
|
||||
* ParadisEO WebSite : http://paradiseo.gforge.inria.fr
|
||||
* Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*
|
||||
*/
|
||||
#ifndef __tsp
|
||||
#define __tsp
|
||||
|
||||
#include "tsp.h"
|
||||
|
||||
#endif
|
||||
60
contribution/trunk/tutos_META08/linux_32bits/tsp/src/tsp.h
Executable file
60
contribution/trunk/tutos_META08/linux_32bits/tsp/src/tsp.h
Executable file
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* <tsp.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr)
|
||||
*
|
||||
* This software is governed by the CeCILL license under French law and
|
||||
* abiding by the rules of distribution of free software. You can use,
|
||||
* modify and/ or redistribute the software under the terms of the CeCILL
|
||||
* license as circulated by CEA, CNRS and INRIA at the following URL
|
||||
* "http://www.cecill.info".
|
||||
*
|
||||
* As a counterpart to the access to the source code and rights to copy,
|
||||
* modify and redistribute granted by the license, users are provided only
|
||||
* with a limited warranty and the software's author, the holder of the
|
||||
* economic rights, and the successive licensors have only limited liability.
|
||||
*
|
||||
* In this respect, the user's attention is drawn to the risks associated
|
||||
* with loading, using, modifying and/or developing or reproducing the
|
||||
* software by the user in light of its specific status of free software,
|
||||
* that may mean that it is complicated to manipulate, and that also
|
||||
* therefore means that it is reserved for developers and experienced
|
||||
* professionals having in-depth computer knowledge. Users are therefore
|
||||
* encouraged to load and test the software's suitability as regards their
|
||||
* requirements in conditions enabling the security of their systems and/or
|
||||
* data to be ensured and, more generally, to use and operate it in the
|
||||
* same conditions as regards security.
|
||||
* The fact that you are presently reading this means that you have had
|
||||
* knowledge of the CeCILL license and that you accept its terms.
|
||||
*
|
||||
* ParadisEO WebSite : http://paradiseo.gforge.inria.fr
|
||||
* Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __tsp_h
|
||||
#define __tsp_h
|
||||
|
||||
#include "city_swap.h"
|
||||
#include "edge_xover.h"
|
||||
#include "graph.h"
|
||||
#include "mix.h"
|
||||
#include "order_xover.h"
|
||||
#include "partial_mapped_xover.h"
|
||||
#include "part_route_eval.h"
|
||||
#include "part_two_opt_init.h"
|
||||
#include "part_two_opt_next.h"
|
||||
#include "route_eval.h"
|
||||
#include "route.h"
|
||||
#include "route_init.h"
|
||||
#include "route_valid.h"
|
||||
#include "two_opt.h"
|
||||
#include "two_opt_incr_eval.h"
|
||||
#include "two_opt_init.h"
|
||||
#include "two_opt_next.h"
|
||||
#include "two_opt_rand.h"
|
||||
#include "two_opt_tabu_list.h"
|
||||
|
||||
#endif
|
||||
72
contribution/trunk/tutos_META08/linux_32bits/tsp/src/two_opt.cpp
Executable file
72
contribution/trunk/tutos_META08/linux_32bits/tsp/src/two_opt.cpp
Executable file
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* <two_opt.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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"
|
||||
|
||||
TwoOpt TwoOpt :: operator ! () const
|
||||
{
|
||||
TwoOpt move = * this ;
|
||||
std :: swap (move.first, move.second) ;
|
||||
|
||||
return move ;
|
||||
}
|
||||
|
||||
void TwoOpt :: operator () (Route & __route)
|
||||
{
|
||||
|
||||
std :: vector <unsigned int> seq_cities ;
|
||||
|
||||
for (unsigned int i = second ; i > first ; i --)
|
||||
{
|
||||
seq_cities.push_back (__route [i]) ;
|
||||
}
|
||||
|
||||
unsigned int j = 0 ;
|
||||
for (unsigned int i = first + 1 ; i < second + 1 ; i ++)
|
||||
{
|
||||
__route [i] = seq_cities [j ++] ;
|
||||
}
|
||||
}
|
||||
|
||||
void TwoOpt :: readFrom (std :: istream & __is)
|
||||
{
|
||||
__is >> first >> second ;
|
||||
}
|
||||
|
||||
void TwoOpt :: printOn (std :: ostream & __os) const
|
||||
{
|
||||
__os << first << ' ' << second ;
|
||||
}
|
||||
61
contribution/trunk/tutos_META08/linux_32bits/tsp/src/two_opt.h
Executable file
61
contribution/trunk/tutos_META08/linux_32bits/tsp/src/two_opt.h
Executable file
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* <two_opt.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 <eoPersistent.h>
|
||||
|
||||
#include <utility>
|
||||
#include <moMove.h>
|
||||
|
||||
#include "route.h"
|
||||
|
||||
class TwoOpt : public moMove <Route>, public std :: pair <unsigned, unsigned>, public eoPersistent
|
||||
{
|
||||
|
||||
public :
|
||||
|
||||
TwoOpt operator ! () const ;
|
||||
|
||||
void operator () (Route & __route) ;
|
||||
|
||||
void readFrom (std :: istream & __is) ;
|
||||
|
||||
void printOn (std :: ostream & __os) const ;
|
||||
} ;
|
||||
|
||||
#endif
|
||||
53
contribution/trunk/tutos_META08/linux_32bits/tsp/src/two_opt_incr_eval.cpp
Executable file
53
contribution/trunk/tutos_META08/linux_32bits/tsp/src/two_opt_incr_eval.cpp
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* <two_opt_incr_eval.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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 "graph.h"
|
||||
|
||||
tspFitness TwoOptIncrEval :: operator () (const TwoOpt & __move, const Route & __route)
|
||||
{
|
||||
// From
|
||||
unsigned int v1 = __route [__move.first], v1_next = __route [__move.first + 1] ;
|
||||
|
||||
// To
|
||||
unsigned int v2 = __route [__move.second], v2_next = __route [__move.second + 1] ;
|
||||
|
||||
return __route.fitness ()
|
||||
+ Graph :: distance (v1, v2)
|
||||
+ Graph :: distance (v1_next, v2_next)
|
||||
- Graph :: distance (v1, v1_next)
|
||||
- Graph :: distance (v2, v2_next) ;
|
||||
}
|
||||
51
contribution/trunk/tutos_META08/linux_32bits/tsp/src/two_opt_incr_eval.h
Executable file
51
contribution/trunk/tutos_META08/linux_32bits/tsp/src/two_opt_incr_eval.h
Executable file
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* <two_opt_incr_eval.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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_optincr_eval_h
|
||||
#define two_optincr_eval_h
|
||||
|
||||
#include <moMoveIncrEval.h>
|
||||
#include "two_opt.h"
|
||||
|
||||
class TwoOptIncrEval : public moMoveIncrEval <TwoOpt>
|
||||
{
|
||||
public :
|
||||
|
||||
tspFitness operator () (const TwoOpt & __move, const Route & __route) ;
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
45
contribution/trunk/tutos_META08/linux_32bits/tsp/src/two_opt_init.cpp
Executable file
45
contribution/trunk/tutos_META08/linux_32bits/tsp/src/two_opt_init.cpp
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* <two_opt_init.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
*
|
||||
* Sébastien Cahon, Jean-Charles Boisson
|
||||
*
|
||||
* 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)
|
||||
{
|
||||
Route route=_route;
|
||||
|
||||
_move.first = 0 ;
|
||||
_move.second = 2 ;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue