Modification Lesson4 of PSO
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@739 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
a261f9c857
commit
0aa45121a7
1 changed files with 3 additions and 1 deletions
|
|
@ -115,12 +115,14 @@ int main (int __argc, char *__argv[])
|
||||||
eoSyncEasyPSO < Indi > psa(checkpoint, eval, velocity, flight);
|
eoSyncEasyPSO < Indi > psa(checkpoint, eval, velocity, flight);
|
||||||
psa (pop);
|
psa (pop);
|
||||||
pop.sort ();
|
pop.sort ();
|
||||||
|
std::cout << "Final population :\n" << pop << std::endl;
|
||||||
#else
|
#else
|
||||||
//Parallel algorithm
|
//Parallel algorithm
|
||||||
peoPSO < Indi > psa(checkpoint, eval, velocity, flight);
|
peoPSO < Indi > psa(checkpoint, eval, velocity, flight);
|
||||||
psa(pop);
|
psa(pop);
|
||||||
peo :: run();
|
peo :: run();
|
||||||
peo :: finalize();
|
peo :: finalize();
|
||||||
|
if(getNodeRank()==1)
|
||||||
|
std::cout << "Final population :\n" << pop << std::endl;
|
||||||
#endif
|
#endif
|
||||||
std::cout << "Final population :\n" << pop << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue