From 483f815610d67b2090236f609d3fd2f19e716686 Mon Sep 17 00:00:00 2001 From: LPTK Date: Wed, 10 Jul 2013 17:49:08 +0200 Subject: [PATCH] intermediate commit 6 --- eo/NEWS | 3 ++- mo/src/continuator/moCheckpoint.h | 10 ++++++---- mo/src/coolingSchedule/moTrikiCoolingSchedule.h | 6 +++--- mo/src/neighborhood/moRealNeighborhood.h | 1 - 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/eo/NEWS b/eo/NEWS index 4161ff613..a90d996d3 100644 --- a/eo/NEWS +++ b/eo/NEWS @@ -1,5 +1,6 @@ * current release: - - added an EOT& parameter to the moCoolingSchedule::update interface because some cooling schedules need it + - added an EOT& parameter to the moCoolingSchedule::update interface method because some cooling schedules need it + - eoMonitor's are no more executed in moCheckpoint::init to prevent access to uninitialized data * release 1.3.1 (2012-07-27) - the eo::mpi modules is no longer dependent from boost::mpi diff --git a/mo/src/continuator/moCheckpoint.h b/mo/src/continuator/moCheckpoint.h index 6cc3d0fb5..950b96fa0 100644 --- a/mo/src/continuator/moCheckpoint.h +++ b/mo/src/continuator/moCheckpoint.h @@ -109,14 +109,16 @@ public : stats[i]->init(_sol); counter = 1; + for (unsigned i = 0; i < moupdaters.size(); ++i) + moupdaters[i]->init(); + //for (unsigned i = 0; i < updaters.size(); ++i) // updaters[i]->init(); - for (unsigned i = 0; i < moupdaters.size(); ++i) - moupdaters[i]->init(); /* - * Removed because there was no reason for it to be done here. - * It caused premature monitoring of eoParams with undefined values + * Removed because there was no reason for it to be done here + * It caused premature monitoring of eoParams with uninitialized values + * (eoUpdater's don't have a init function) * for (unsigned int i = 0; i < monitors.size(); ++i) (*monitors[i])(); diff --git a/mo/src/coolingSchedule/moTrikiCoolingSchedule.h b/mo/src/coolingSchedule/moTrikiCoolingSchedule.h index 4bb09d649..eb078120a 100644 --- a/mo/src/coolingSchedule/moTrikiCoolingSchedule.h +++ b/mo/src/coolingSchedule/moTrikiCoolingSchedule.h @@ -187,7 +187,7 @@ public: chainStat.acceptedSolutions = accepted; generated++; - cout << "gen " << generated << endl; + //cout << "gen " << generated << endl; if (_acceptedMove) @@ -263,7 +263,7 @@ public: /// if (avgFitness/(prevAvgFitness-delta) > xi) - equilibrium_not_reached++; + equilibrium_not_reached++, chainStat.equilibriumNotReached = true; else equilibrium_not_reached = 0; } if (equilibrium_not_reached > K1) @@ -274,7 +274,7 @@ public: //chainStat.reinitializing = true; reinitializing = true; - chainStat.equilibriumNotReached = true; + //chainStat.equilibriumNotReached = true; alpha = lambda1; delta = sigma/mu1; diff --git a/mo/src/neighborhood/moRealNeighborhood.h b/mo/src/neighborhood/moRealNeighborhood.h index e839d16fa..cd06e1c68 100644 --- a/mo/src/neighborhood/moRealNeighborhood.h +++ b/mo/src/neighborhood/moRealNeighborhood.h @@ -27,7 +27,6 @@ Lionel Parreaux #define __moRealNeighborhood_h__ #include -#include // FIXME: Why don't we use eoFunctorBase on the mother classes #include "neighborhood/moRealNeighbor.h" template