Invalidate individuals in order to force evaluation in Island. Remove some debug messages.

This commit is contained in:
quemy 2013-11-22 08:31:46 +01:00
commit 84b3601f90
2 changed files with 4 additions and 2 deletions

View file

@ -140,7 +140,6 @@ void paradiseo::smp::Island<EOAlgo,EOT,bEOT>::receive(void)
std::lock_guard<std::mutex> lock(this->m);
while (!listImigrants.empty())
{
//std::cout << "On reçoit dans l'île : " << listImigrants.size() << std::endl;
eoPop<bEOT> base_offspring = std::move(listImigrants.front());
// Convert objects from base to our objects type
@ -149,8 +148,12 @@ void paradiseo::smp::Island<EOAlgo,EOT,bEOT>::receive(void)
offspring.push_back(std::move(convertFromBase(indi)));
// Evaluate objects to integrate
// We first invalidate the individuals in order to explicitly force the evaluation
for(auto& indi : offspring)
{
indi.invalidate();
eval(indi);
}
intPolicy(pop, offspring);
listImigrants.pop();

View file

@ -118,7 +118,6 @@ void paradiseo::smp::IslandModel<EOT>::operator()()
thread.join();
running = false;
std::cout << "hhhhhhh" << listEmigrants.size() << std::endl;
}
template<class EOT>