diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 9563bd84..692bf4d0 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -15,7 +15,7 @@ CXXFLAGS = -g -Wall check_PROGRAMS = t-eoPareto t-eofitness t-eoRandom t-eobin t-eoStateAndParser t-eoCheckpointing t-eoSSGA \ t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoVector -TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA +TESTS=run_tests t-eoVector t-eoRandom t-eoSSGA t-eoPareto # removing temporarily t-eoESFull #noinst_PROGRAMS = t-eofitness t-eobin t-eoStateAndParser t-eoCheckpointing t-eoExternalEO t-eoESFull t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA diff --git a/eo/test/t-eoPareto.cpp b/eo/test/t-eoPareto.cpp index 6ed5c293..592ba5c4 100644 --- a/eo/test/t-eoPareto.cpp +++ b/eo/test/t-eoPareto.cpp @@ -1,6 +1,9 @@ #include +//#include +//#include + using namespace std; typedef vector fitness_type; @@ -43,7 +46,7 @@ class Init : public eoInit } }; -// Test pareto dominance and perf2worth +// Test pareto dominance and perf2worth, and while you're at it, test the eoGnuPlot monitor as well void the_main() { @@ -51,6 +54,7 @@ void the_main() Eval eval; Mutate mutate; + unsigned num_gen = 10; unsigned pop_size = 50; eoPop pop(pop_size, init); @@ -80,9 +84,22 @@ void the_main() eoCommaReplacement replace; unsigned long generation = 0; - eoGenContinue gen(10, generation); + eoGenContinue gen(num_gen, generation); eoCheckPoint cp(gen); + eoMOFitnessStat fitness0(0, "FirstObjective"); + eoMOFitnessStat fitness1(1, "SecondObjective"); + + cp.add(fitness0); + cp.add(fitness1); + + eoGnuplot1DSnapshot snapshot("pareto"); + + cp.add(snapshot); + + snapshot.add(fitness0); + snapshot.add(fitness1); + // Three algos eoEasyEA ea1(cp, eval, breeder1, replace); eoEasyEA ea2(cp, eval, breeder2, replace); diff --git a/eo/test/t-eoRandom.cpp b/eo/test/t-eoRandom.cpp index 3197dccf..c21b9cdc 100644 --- a/eo/test/t-eoRandom.cpp +++ b/eo/test/t-eoRandom.cpp @@ -24,7 +24,7 @@ */ /** -CVS Info: $Date: 2001-02-19 12:23:13 $ $Author: maartenkeijzer $ $Revision: 1.10 $ +CVS Info: $Date: 2001-03-14 10:14:27 $ $Author: maartenkeijzer $ $Revision: 1.11 $ */ //----------------------------------------------------------------------------- @@ -45,6 +45,7 @@ main() { try { // throws an error eoUniformGenerator utest( 10000000U, 10000U); + throw; // if this succeeds something is wrong, make sure that that is noticed } catch (logic_error& e) {