Add policy and element of policy for migration
This commit is contained in:
parent
4ec6e3f606
commit
2cd7f1f423
6 changed files with 202 additions and 6 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue