Parallel MOEO
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@849 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
35a6b78f8f
commit
53abc21464
15 changed files with 934 additions and 4 deletions
25
trunk/paradiseo-peo/tutorial/Lesson7/make_para_eval.h
Normal file
25
trunk/paradiseo-peo/tutorial/Lesson7/make_para_eval.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#include <peo>
|
||||
#include <es.h>
|
||||
#include <moeo>
|
||||
|
||||
peoMoeoPopEval<FlowShop> & do_make_para_eval(eoParser& _parser, eoState& _state)
|
||||
{
|
||||
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());
|
||||
}
|
||||
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();
|
||||
|
||||
FlowShopEval* plainEval = new FlowShopEval(M, N, p, d);
|
||||
peoMoeoPopEval<FlowShop>* eval = new peoMoeoPopEval<FlowShop> (* plainEval);
|
||||
_state.storeFunctor(eval);
|
||||
return *eval;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue