New lessons for peo : version 1.0

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@784 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
canape 2007-11-12 14:06:06 +00:00
commit d55413b5e4
16 changed files with 51 additions and 14 deletions

View file

@ -21,6 +21,13 @@ ADD_CUSTOM_COMMAND(
ARGS -E copy_if_different
${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson3/schema.xml
${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson3)
ADD_CUSTOM_COMMAND(
TARGET install
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different
${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson3/Lesson3.pdf
${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson3)
######################################################################################

Binary file not shown.

View file

@ -17,7 +17,7 @@
* economic rights, and the successive licensors have only limited liability.
*
* In this respect, the user's attention is drawn to the risks associated
* with loading, using, modifying and/or developing or reproducing the
* with loading, using, modifying and/syncor developing or reproducing the
* software by the user in light of its specific status of free software,
* that may mean that it is complicated to manipulate, and that also
* therefore means that it is reserved for developers and experienced
@ -60,7 +60,7 @@ int main (int __argc, char *__argv[])
const float CROSS_RATE = 0.8;
const double EPSILON = 0.01;
const float MUT_RATE = 0.3;
// MIG_FREQ define the frequence of the migration.
// MIG_FREQ define the frequency of the migration.
const unsigned int MIG_FREQ = 10;
// MIG_SIZE define the size of each migration.
const unsigned int MIG_SIZE = 5;
@ -122,9 +122,9 @@ int main (int __argc, char *__argv[])
// You can choose between :
//
// - Synchrone communication : peoSyncIslandMig<Indi> mig(MIG_FREQ,mig_select,mig_replace,topology,pop,pop);
// - Asynchrone communication : peoAsyncIslandMig<Indi> mig(mig_cont,mig_select,mig_replace,topology,pop,pop);
// With a grid, you should use an asynchrone communication
// - Synchronous communication : peoSyncIslandMig<Indi> mig(MIG_FREQ,mig_select,mig_replace,topology,pop,pop);
// - Asynchronous communication : peoAsyncIslandMig<Indi> mig(mig_cont,mig_select,mig_replace,topology,pop,pop);
// With a grid, you should use an asynchronous communication
peoAsyncIslandMig<Indi> mig(mig_cont,mig_select,mig_replace,topology,pop,pop2);
checkpoint.add(mig);
peoAsyncIslandMig<Indi> mig2(mig_cont2,mig_select2,mig_replace2,topology,pop2,pop);

View file

@ -50,10 +50,10 @@ double f (const Indi & _indi)
int main (int __argc, char *__argv[])
{
// In this lesson, we define two algorithms of the PSO witch represente two islands.
// In this lesson, we define two algorithms of the PSO witch represents two islands.
// Obviously, you can define more algorithms.
// The parameters are commun between the two algorithms.
// The parameters are common between the two algorithms.
/*****************************************************************************************/
peo :: init( __argc, __argv );
const unsigned int VEC_SIZE = 2;
@ -68,7 +68,7 @@ int main (int __argc, char *__argv[])
const double C2 = 2.;
// C3 is used for the calculation of one of the strategies of the island model.
const double C3 = 2.;
// MIG_FREQ define the frequence of the migration.
// MIG_FREQ define the frequency of the migration.
const unsigned int MIG_FREQ = 10; // The optimal value is 1 or 2 for the component peoPSOVelocity.
rng.reseed (time(0));
/*****************************************************************************************/