From bd390cd217ffe594e8b83196bb9165a923fce81f Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 18 Aug 2010 18:22:28 +0200 Subject: [PATCH] - useless comments and files removed --- application/cma_sa/main.cpp | 19 ++++--------- readme | 57 ------------------------------------- src/doCMASA.h | 45 ++++++++++++++--------------- 3 files changed, 27 insertions(+), 94 deletions(-) delete mode 100644 readme diff --git a/application/cma_sa/main.cpp b/application/cma_sa/main.cpp index 607997cfe..4fc41bbb1 100644 --- a/application/cma_sa/main.cpp +++ b/application/cma_sa/main.cpp @@ -74,13 +74,6 @@ int main(int ac, char** av) eoInitFixedLength< EOT >* init = new eoInitFixedLength< EOT >( dimension_size, *gen ); state.storeFunctor(init); - - // doStats< Distrib >* stats = - // //new doStatsUniform< EOT >(); - // //new doStatsNormalMono< EOT >(); - // new doStatsNormalMulti< EOT >(); - // state.storeFunctor(stats); - //----------------------------------------------------------------------------- @@ -173,15 +166,13 @@ int main(int ac, char** av) distribution_continue->add( *distrib_stat ); - eoMonitor* stdout_monitor = new eoStdoutMonitor(); - state.storeFunctor(stdout_monitor); + // eoMonitor* stdout_monitor = new eoStdoutMonitor(); + // state.storeFunctor(stdout_monitor); + // stdout_monitor->add(*distrib_stat); + // distribution_continue->add( *stdout_monitor ); - stdout_monitor->add(*distrib_stat); - distribution_continue->add( *stdout_monitor ); - - eoFileMonitor* file_monitor = new eoFileMonitor("distribution.txt"); + eoFileMonitor* file_monitor = new eoFileMonitor("distribution_bounds.txt"); state.storeFunctor(file_monitor); - file_monitor->add(*distrib_stat); distribution_continue->add( *file_monitor ); diff --git a/readme b/readme deleted file mode 100644 index 64629f58e..000000000 --- a/readme +++ /dev/null @@ -1,57 +0,0 @@ -This package contains the source code for BOPO problems. - -# Step 1 - Configuration ------------------------- -Rename the "install.cmake-dist" file as "install.cmake" and edit it, inserting the FULL PATH -to your ParadisEO distribution. -On Windows write your path with double antislash (ex: C:\\Users\\...) - - -# Step 2 - Build process ------------------------- -ParadisEO is assumed to be compiled. To download ParadisEO, please visit http://paradiseo.gforge.inria.fr/. -Go to the BOPO/build/ directory and lunch cmake: -(Unix) > cmake .. -(Windows) > cmake .. -G"Visual Studio 9 2008" - -Note for windows users: if you don't use VisualStudio 9, enter the name of your generator instead of "VisualStudio 9 2008". - - -# Step 3 - Compilation ----------------------- -In the bopo/build/ directory: -(Unix) > make -(Windows) Open the VisualStudio solution and compile it, compile also the target install. -You can refer to this tutorial if you don't know how to compile a solution: http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.VisualCTutorial - - -# Step 4 - Execution ---------------------- -A toy example is given to test the components. You can run these tests as following. -To define problem-related components for your own problem, please refer to the tutorials available on the website : http://paradiseo.gforge.inria.fr/. -In the bopo/build/ directory: -(Unix) > ctest -Windows users, please refer to this tutorial: http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.VisualCTutorial - -In the directory "application", there are several directory such as p_eoco which instantiate NSGAII on BOPO problems. - -(Unix) After compilation you can run the script "bopo/run.sh" and see results in "NSGAII.out". Parameters can be modified in the script. - -(Windows) Add argument "NSGAII.param" and execute the corresponding algorithms. -Windows users, please refer to this tutorial: http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.VisualCTutorial - - -# Documentation ---------------- -The API-documentation is available in doc/html/index.html - - -# Things to keep in mind when using BOPO ----------------------------------------- -* By default, the EO random generator's seed is initialized by the number of seconds since the epoch (with time(0)). It is available in the status file dumped at each execution. Please, keep in mind that if you start two run at the same second without modifying the seed, you will get exactly the same results. - -* Execution times are measured with the boost:timer, that measure wallclock time. Additionaly, it could not measure times larger than approximatively 596.5 hours (or even less). See http://www.boost.org/doc/libs/1_33_1/libs/timer/timer.htm - -* The q-quantile computation use averaging at discontinuities (in R, it correspond to the R-2 method, in SAS, SAS-5). For more explanations, see http://en.wikipedia.org/wiki/Quantile#Estimating_the_quantiles_of_a_population and http://stat.ethz.ch/R-manual/R-devel/library/stats/html/quantile.html - -* You can send a SIGUSR1 to a process to get some information (written down in the log file) on the current state of the search. diff --git a/src/doCMASA.h b/src/doCMASA.h index 1536f08f6..c0c0cb865 100644 --- a/src/doCMASA.h +++ b/src/doCMASA.h @@ -100,17 +100,15 @@ public: _sa_continue(sa_continue), _cooling_schedule(cooling_schedule), _initial_temperature(initial_temperature), - _replacor(replacor) + _replacor(replacor), - // , + _pop_results_destination("ResPop")//, - // _pop_results_destination("ResPop"), + // directory where populations state are going to be stored. + // _ofs_params("ResParams.txt"), + // _ofs_params_var("ResVars.txt"), - // // directory where populations state are going to be stored. - // _ofs_params("ResParams.txt"), - // _ofs_params_var("ResVars.txt"), - - // _bounds_results_destination("ResBounds") + // _bounds_results_destination("ResBounds") { //------------------------------------------------------------- @@ -118,13 +116,13 @@ public: // iteration for plotting. //------------------------------------------------------------- - // { - // std::stringstream os; - // os << "rm -rf " << _pop_results_destination; - // ::system(os.str().c_str()); - // } + { + std::stringstream os; + os << "rm -rf " << _pop_results_destination; + ::system(os.str().c_str()); + } - // ::mkdir(_pop_results_destination.c_str(), 0755); // create a first time the + ::mkdir(_pop_results_destination.c_str(), 0755); // create a first time //------------------------------------------------------------- @@ -291,12 +289,12 @@ public: // at each iteration for plotting. //------------------------------------------------------------- - // { - // std::ostringstream os; - // os << _pop_results_destination << "/" << number_of_iterations; - // std::ofstream ofs(os.str().c_str()); - // ofs << current_pop; - // } + { + std::ostringstream os; + os << _pop_results_destination << "/" << number_of_iterations; + std::ofstream ofs(os.str().c_str()); + ofs << current_pop; + } //------------------------------------------------------------- @@ -380,8 +378,9 @@ public: } while ( _cooling_schedule( temperature ) && - _monitoring_continue( selected_pop ) && - _distribution_continue( distrib ) ); + _distribution_continue( distrib ) && + _monitoring_continue( selected_pop ) + ); } private: @@ -427,7 +426,7 @@ private: // iteration for plotting. //------------------------------------------------------------- - // std::string _pop_results_destination; + std::string _pop_results_destination; // std::ofstream _ofs_params; // std::ofstream _ofs_params_var;