diff --git a/edo/application/cmaes/main.cpp b/edo/application/cmaes/main.cpp index ed7f10a44..47a09f998 100644 --- a/edo/application/cmaes/main.cpp +++ b/edo/application/cmaes/main.cpp @@ -28,7 +28,7 @@ Authors: #include //#include -#include +#include #include #include @@ -67,7 +67,7 @@ int main(int ac, char** av) eoEvalFunc< RealVec >* plainEval = new Rosenbrock< RealVec >(); state.storeFunctor(plainEval); - eoEvalFuncCounterBounder< RealVec > eval(*plainEval, max_eval); + eoEvalCounterThrowException< RealVec > eval(*plainEval, max_eval); eoRndGenerator< double >* gen = new eoUniformGenerator< double >(-5, 5); state.storeFunctor(gen); @@ -145,7 +145,7 @@ int main(int ac, char** av) eo::log << eo::progress << "Best solution after random init: " << pop.best_element().fitness() << std::endl; do_run(*algo, pop); - } catch (eoEvalFuncCounterBounderException& e) { + } catch (eoMaxEvalException& e) { eo::log << eo::warnings << "warning: " << e.what() << std::endl; } diff --git a/edo/application/eda/main.cpp b/edo/application/eda/main.cpp index 6e024545b..6b0311fe0 100644 --- a/edo/application/eda/main.cpp +++ b/edo/application/eda/main.cpp @@ -28,7 +28,7 @@ Authors: #include // #include -#include +#include #include #include @@ -69,7 +69,7 @@ int main(int ac, char** av) state.storeFunctor(plainEval); unsigned long max_eval = parser.getORcreateParam((unsigned long)0, "maxEval", "Maximum number of evaluations (0 = none)", 'E', "Stopping criterion").value(); // E - eoEvalFuncCounterBounder< EOT > eval(*plainEval, max_eval); + eoEvalCounterThrowException< EOT > eval(*plainEval, max_eval); eoRndGenerator< double >* gen = new eoUniformGenerator< double >(-5, 5); state.storeFunctor(gen); @@ -169,7 +169,7 @@ int main(int ac, char** av) try { do_run(*algo, pop); - } catch (eoEvalFuncCounterBounderException& e) { + } catch (eoMaxEvalException& e) { eo::log << eo::warnings << "warning: " << e.what() << std::endl; } catch (std::exception& e) { diff --git a/eo/src/eoSIGContinue.cpp b/eo/src/eoSIGContinue.cpp index 2f126ea91..0e4299c71 100644 --- a/eo/src/eoSIGContinue.cpp +++ b/eo/src/eoSIGContinue.cpp @@ -36,3 +36,9 @@ // --- Global variables - but don't know what else to do - MS --- bool existSIGContinue = false; bool call_func = false; + +void set_bool(int) +{ + call_func = true; +} + diff --git a/eo/src/eoSIGContinue.h b/eo/src/eoSIGContinue.h index a0afae040..416cad692 100644 --- a/eo/src/eoSIGContinue.h +++ b/eo/src/eoSIGContinue.h @@ -42,10 +42,7 @@ extern bool existSIGContinue; extern bool call_func; -void set_bool(int) -{ - call_func = true; -} +void set_bool(int); /** A continuator that stops if a given signal is received during the execution diff --git a/eo/src/es/make_es.h b/eo/src/es/make_es.h index 540609741..84c4fa823 100644 --- a/eo/src/es/make_es.h +++ b/eo/src/es/make_es.h @@ -145,7 +145,7 @@ void run_ea(eoAlgo >& _ga, eoPop >& _ga, eoPop EOT; diff --git a/eo/test/t-eoFitnessAssembledEA.cpp b/eo/test/t-eoFitnessAssembledEA.cpp index e04535673..3dfb063ba 100644 --- a/eo/test/t-eoFitnessAssembledEA.cpp +++ b/eo/test/t-eoFitnessAssembledEA.cpp @@ -95,7 +95,7 @@ public: }; // checks for help demand, and writes the status file and make_help; in libutils -void make_help(eoParser & _parser); +// void make_help(eoParser & _parser); // now use all of the above, + representation dependent things int main(int argc, char* argv[]){ diff --git a/eo/test/t-eoGA.cpp b/eo/test/t-eoGA.cpp index fafed297d..bc2d3df30 100644 --- a/eo/test/t-eoGA.cpp +++ b/eo/test/t-eoGA.cpp @@ -1,5 +1,6 @@ #include +#include #include #include #include "binary_value.h" diff --git a/eo/test/t-eoReal.cpp b/eo/test/t-eoReal.cpp index 163b0ea86..7d5bd4cf8 100644 --- a/eo/test/t-eoReal.cpp +++ b/eo/test/t-eoReal.cpp @@ -1,5 +1,6 @@ #include +#include #include #include "real_value.h" #include diff --git a/eo/tutorial/Lesson4/RealEA.cpp b/eo/tutorial/Lesson4/RealEA.cpp index 1775b12b7..ef7ad6521 100644 --- a/eo/tutorial/Lesson4/RealEA.cpp +++ b/eo/tutorial/Lesson4/RealEA.cpp @@ -1,5 +1,6 @@ #include +#include #include #include "real_value.h" #include diff --git a/eo/tutorial/Lesson5/OneMaxEA.cpp b/eo/tutorial/Lesson5/OneMaxEA.cpp index 14a0f4c5e..b75e57e51 100644 --- a/eo/tutorial/Lesson5/OneMaxEA.cpp +++ b/eo/tutorial/Lesson5/OneMaxEA.cpp @@ -116,7 +116,7 @@ void run_ea(eoAlgo& _ga, eoPop& _pop) // checks for help demand, and writes the status file // and make_help; in libutils -void make_help(eoParser & _parser); +// void make_help(eoParser & _parser); // now use all of the above, + representation dependent things int main(int argc, char* argv[]) diff --git a/eo/tutorial/Lesson5/OneMaxLibEA.cpp b/eo/tutorial/Lesson5/OneMaxLibEA.cpp index febcca445..3943379f0 100644 --- a/eo/tutorial/Lesson5/OneMaxLibEA.cpp +++ b/eo/tutorial/Lesson5/OneMaxLibEA.cpp @@ -89,7 +89,7 @@ void run_ea(eoAlgo& _ga, eoPop& _pop); // checks for help demand, and writes the status file // and make_help; in libutils - just a declaration, code in libeoutils.a -void make_help(eoParser & _parser); +// void make_help(eoParser & _parser); // now use all of the above, + representation dependent things // from here on, no difference with eoOneMax.cpp diff --git a/moeo/tutorial/Lesson2/FlowShopEA.cpp b/moeo/tutorial/Lesson2/FlowShopEA.cpp index 4f7a28913..445f4b227 100644 --- a/moeo/tutorial/Lesson2/FlowShopEA.cpp +++ b/moeo/tutorial/Lesson2/FlowShopEA.cpp @@ -47,7 +47,7 @@ // how to initialize the population #include // checks for help demand, and writes the status file and make_help; in libutils -void make_help(eoParser & _parser); +// void make_help(eoParser & _parser); // definition of the representation #include diff --git a/moeo/tutorial/Lesson3/FlowShopEA2.cpp b/moeo/tutorial/Lesson3/FlowShopEA2.cpp index 1752bab4f..1985eb75e 100644 --- a/moeo/tutorial/Lesson3/FlowShopEA2.cpp +++ b/moeo/tutorial/Lesson3/FlowShopEA2.cpp @@ -55,7 +55,7 @@ // simple call to the algo #include // checks for help demand, and writes the status file and make_help; in libutils -void make_help(eoParser & _parser); +// void make_help(eoParser & _parser); // definition of the representation #include diff --git a/moeo/tutorial/Lesson4/FlowShopDMLS.cpp b/moeo/tutorial/Lesson4/FlowShopDMLS.cpp index a2e864a77..a84a33dcf 100644 --- a/moeo/tutorial/Lesson4/FlowShopDMLS.cpp +++ b/moeo/tutorial/Lesson4/FlowShopDMLS.cpp @@ -48,7 +48,7 @@ // how to initialize the population #include // checks for help demand, and writes the status file and make_help; in libutils -void make_help(eoParser & _parser); +// void make_help(eoParser & _parser); // definition of the representation #include