From 30c1832e7d3b84fe5ba6aec65ebc94df03428995 Mon Sep 17 00:00:00 2001 From: jboisson Date: Wed, 17 Dec 2008 17:32:23 +0000 Subject: [PATCH] moExponentialCoolingSchedule.h has been transformed to moGeometricCoolingSchedule.h git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1303 331e1502-861f-0410-8da2-ba01fb791d7f --- trunk/paradiseo-mo/src/mo.h | 6 +----- trunk/paradiseo-mo/src/moBestImprSelect.h | 14 +------------- trunk/paradiseo-mo/src/moGenSolContinue.h | 3 --- ...lingSchedule.h => moGeometricCoolingSchedule.h} | 10 +++++----- trunk/paradiseo-mo/src/moHCMoveLoopExpl.h | 2 +- trunk/paradiseo-mo/src/moImprBestFitAspirCrit.h | 3 --- trunk/paradiseo-mo/src/moItRandNextMove.h | 3 --- trunk/paradiseo-mo/src/moNoAspirCrit.h | 5 ----- trunk/paradiseo-mo/src/moSimpleMoveTabuList.h | 4 ---- 9 files changed, 8 insertions(+), 42 deletions(-) rename trunk/paradiseo-mo/src/{moExponentialCoolingSchedule.h => moGeometricCoolingSchedule.h} (90%) diff --git a/trunk/paradiseo-mo/src/mo.h b/trunk/paradiseo-mo/src/mo.h index 34d58ab38..887e47ff4 100755 --- a/trunk/paradiseo-mo/src/mo.h +++ b/trunk/paradiseo-mo/src/mo.h @@ -41,11 +41,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include @@ -72,9 +72,5 @@ #include #include #include -#include -#include -#include - #endif diff --git a/trunk/paradiseo-mo/src/moBestImprSelect.h b/trunk/paradiseo-mo/src/moBestImprSelect.h index c3aa6c2b5..9919f3b4b 100755 --- a/trunk/paradiseo-mo/src/moBestImprSelect.h +++ b/trunk/paradiseo-mo/src/moBestImprSelect.h @@ -57,14 +57,6 @@ class moBestImprSelect:public moMoveSelect < M > */ void init (const Fitness & _fitness) { - //Code only used to avoid warning because _fitness is not used in this procedure. - Fitness fitness; - fitness=(Fitness)_fitness; - - //std::cout.precision(10); - - //std::cout << "old fitness = " << _fitness << std::endl; - first_time = true; } @@ -88,8 +80,6 @@ class moBestImprSelect:public moMoveSelect < M > first_time = false; } - //std::cout << "best fitness = " << best_fitness << std::endl; - return true; } @@ -107,9 +97,7 @@ class moBestImprSelect:public moMoveSelect < M > _move = best_move; _fitness = best_fitness; - - - //std::cout << "Final fitness = " << best_fitness << std::endl; + } private: diff --git a/trunk/paradiseo-mo/src/moGenSolContinue.h b/trunk/paradiseo-mo/src/moGenSolContinue.h index f838e5447..476b28022 100755 --- a/trunk/paradiseo-mo/src/moGenSolContinue.h +++ b/trunk/paradiseo-mo/src/moGenSolContinue.h @@ -65,9 +65,6 @@ class moGenSolContinue:public moSolContinue < EOT > */ bool operator () (const EOT & _solution) { - //code only used for avoiding warning because _sol is not used in this function. - const EOT solution(_solution); - return (++generationNumber < generationMaximumNumber); } diff --git a/trunk/paradiseo-mo/src/moExponentialCoolingSchedule.h b/trunk/paradiseo-mo/src/moGeometricCoolingSchedule.h similarity index 90% rename from trunk/paradiseo-mo/src/moExponentialCoolingSchedule.h rename to trunk/paradiseo-mo/src/moGeometricCoolingSchedule.h index 038f438fe..c0cc6fc5a 100644 --- a/trunk/paradiseo-mo/src/moExponentialCoolingSchedule.h +++ b/trunk/paradiseo-mo/src/moGeometricCoolingSchedule.h @@ -1,5 +1,5 @@ /* - + Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 (C) OPAC Team, LIFL, 2002-2008 @@ -33,8 +33,8 @@ Contact: paradiseo-help@lists.gforge.inria.fr */ -#ifndef _moExponentialCoolingSchedule_h -#define _moExponentialCoolingSchedule_h +#ifndef _moGeometricCoolingSchedule_h +#define _moGeometricCoolingSchedule_h #include @@ -43,7 +43,7 @@ An other very simple cooling schedule, the temperature decrease according to a ratio while the temperature is greater than a given threshold. */ -class moExponentialCoolingSchedule: public moCoolingSchedule +class moGeometricCoolingSchedule: public moCoolingSchedule { public: @@ -52,7 +52,7 @@ class moExponentialCoolingSchedule: public moCoolingSchedule \param _threshold the threshold. \param _ratio the ratio used to descrease the temperature. */ - moExponentialCoolingSchedule (double _threshold, double _ratio):threshold (_threshold), ratio (_ratio) + moGeometricCoolingSchedule (double _threshold, double _ratio):threshold (_threshold), ratio (_ratio) {} //! Function which proceeds to the cooling. diff --git a/trunk/paradiseo-mo/src/moHCMoveLoopExpl.h b/trunk/paradiseo-mo/src/moHCMoveLoopExpl.h index 44f806ecb..18e12b444 100755 --- a/trunk/paradiseo-mo/src/moHCMoveLoopExpl.h +++ b/trunk/paradiseo-mo/src/moHCMoveLoopExpl.h @@ -116,7 +116,7 @@ class moHCMoveLoopExpl:public moMoveLoopExpl < M > //The best move is applied on the new solution. best_move(_new_solution); - //The fitness is set (avoid an additional fitness compuation). + //The fitness is set (avoid an additional fitness computation). _new_solution.fitness (best_fitness); } diff --git a/trunk/paradiseo-mo/src/moImprBestFitAspirCrit.h b/trunk/paradiseo-mo/src/moImprBestFitAspirCrit.h index 5f98dca38..bd6164118 100755 --- a/trunk/paradiseo-mo/src/moImprBestFitAspirCrit.h +++ b/trunk/paradiseo-mo/src/moImprBestFitAspirCrit.h @@ -72,9 +72,6 @@ class moImprBestFitAspirCrit:public moAspirCrit < M > */ bool operator () (const M & _move, const Fitness & _fitness) { - //code only used for avoiding warning because _move is not used in this function. - const M move(_move); - if (first_time) { best_fitness = _fitness; diff --git a/trunk/paradiseo-mo/src/moItRandNextMove.h b/trunk/paradiseo-mo/src/moItRandNextMove.h index 0bb3ef155..7799e6c9e 100755 --- a/trunk/paradiseo-mo/src/moItRandNextMove.h +++ b/trunk/paradiseo-mo/src/moItRandNextMove.h @@ -72,9 +72,6 @@ class moItRandNextMove:public moNextMove < M > */ bool operator () (M & _move, const EOT & _solution) { - //code only used to avoid warning because _solution is not used in this function. - const EOT solution(_solution); - if (iteration_number > iteration_maximum_number) { iteration_number = 0; diff --git a/trunk/paradiseo-mo/src/moNoAspirCrit.h b/trunk/paradiseo-mo/src/moNoAspirCrit.h index cbff69ec7..701a4564a 100755 --- a/trunk/paradiseo-mo/src/moNoAspirCrit.h +++ b/trunk/paradiseo-mo/src/moNoAspirCrit.h @@ -58,11 +58,6 @@ class moNoAspirCrit:public moAspirCrit < M > */ bool operator () (const M & _move, const typename M::EOType::Fitness & _fitness) { - //Code only used to avoid warning because _move and _fitness are not used in this procedure. - const M move(_move); - typename M::EOType::Fitness fitness; - fitness=(typename M::EOType::Fitness)_fitness; - return false; } diff --git a/trunk/paradiseo-mo/src/moSimpleMoveTabuList.h b/trunk/paradiseo-mo/src/moSimpleMoveTabuList.h index e7f51c032..47d9592b9 100755 --- a/trunk/paradiseo-mo/src/moSimpleMoveTabuList.h +++ b/trunk/paradiseo-mo/src/moSimpleMoveTabuList.h @@ -69,8 +69,6 @@ class moSimpleMoveTabuList: public moTabuList < M > bool operator () (const M & _move, const EOT & _solution) { moveIterator it; - //code only used to avoid warning because _solution is not used in this function. - EOT solution=(EOT)_solution; it=tabuList.begin(); // The code is !(*it)==_move instead of (*it)!=_move because people designing their specific move representation @@ -85,8 +83,6 @@ class moSimpleMoveTabuList: public moTabuList < M > void add(const M & _move, const EOT & _solution) { - //code only used to avoid warning because _solution is not used in this function. - const EOT solution(_solution); if (memory_size!=0) {