Add policy and element of policy for migration

This commit is contained in:
quemy 2012-11-07 18:20:29 +01:00
commit 2cd7f1f423
6 changed files with 202 additions and 6 deletions

View file

@ -1,4 +1,4 @@
#include <island.h>
#include <smp.h>
#include <eo>
#include "smpTestClass.h"
@ -49,7 +49,14 @@ int main(void)
try
{
Island<eoEasyEA,Indi> test(genCont, plainEval, select, transform, replace);
// Emigration policy
eoGenContinue<Indi> criteria(1); // We mig each gen
Policy<Indi> pol;
pol.push_back(PolicyElement<Indi>(select, genCont));
Island<eoEasyEA,Indi> test(param.popSize, chromInit, replace, pol, genCont, plainEval, select, transform, replace);
test();
cout << test.getPop() << endl;
}
catch(exception& e)
{