Add notion of base EOT for heterogeneous model. Island can be templated on a EOT regardless the EOT of its model. Island must have a conversion function from and to base EOT. Base EOT is optionnal and would be considered as EOT. In that case, conversion functions would be identity function.
This commit is contained in:
parent
c90fdc579f
commit
f67ee442c7
11 changed files with 86 additions and 58 deletions
|
|
@ -19,6 +19,7 @@ set (TEST_LIST
|
|||
t-smpIsland
|
||||
t-smpTopo
|
||||
t-smpMI_Homogeneous
|
||||
#t-smpMI_Heterogeneous
|
||||
)
|
||||
|
||||
######################################################################################
|
||||
|
|
|
|||
|
|
@ -82,15 +82,6 @@ int main(void)
|
|||
eoPop<Indi> pop2(param.popSize, chromInit);
|
||||
Island<eoEasyEA,Indi> test2(pop2, intPolicy_2, migPolicy_2, genCont_2, plainEval, select, transform, replace);
|
||||
|
||||
// Topology
|
||||
Topology<Complete> topo;
|
||||
|
||||
IslandModel<Indi> model(topo);
|
||||
model.add(test);
|
||||
model.add(test2);
|
||||
|
||||
//model();
|
||||
|
||||
test();
|
||||
test2();
|
||||
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ using namespace std;
|
|||
int main(void)
|
||||
{
|
||||
typedef struct {
|
||||
unsigned popSize = 100;
|
||||
unsigned popSize = 10;
|
||||
unsigned tSize = 2;
|
||||
double pCross = 0.8;
|
||||
double pMut = 0.7;
|
||||
unsigned maxGen = 100;
|
||||
unsigned maxGen = 10;
|
||||
} Param;
|
||||
|
||||
Param param;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue