Add integration method, observer pattern from policy to island
This commit is contained in:
parent
1a23b618fc
commit
477dbe49a9
5 changed files with 67 additions and 13 deletions
|
|
@ -51,10 +51,13 @@ int main(void)
|
|||
{
|
||||
// Emigration policy
|
||||
eoPeriodicContinue<Indi> criteria(25); // We mig each gen
|
||||
eoDetTournamentSelect<Indi> selectOne(2);
|
||||
eoSelectNumber<Indi> who(selectOne, 5);
|
||||
Policy<Indi> pol;
|
||||
pol.push_back(PolicyElement<Indi>(select, criteria));
|
||||
pol.push_back(PolicyElement<Indi>(who, criteria));
|
||||
|
||||
Island<eoEasyEA,Indi> test(param.popSize, chromInit, replace, pol, genCont, plainEval, select, transform, replace);
|
||||
|
||||
test();
|
||||
cout << test.getPop() << endl;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue