Function PGASetNumIslands
Defined in File parallel.c
Function Documentation
-
void PGASetNumIslands(PGAContext *ctx, int n)
Set the number of islands to use in an island model GA.
Description
The default is one. Currently must be the same as the number of processes in the default communicator.
Example
PGAContext *ctx, double f (PGAContext *ctx, int p, int pop, double *aux); ctx = PGACreate (&argc, argv, PGA_DATATYPE_BINARY, 100, PGA_MAXIMIZE); PGASetNumIslands (ctx, 10); PGASetUp (ctx); PGARun (ctx, f); PGADestroy (ctx);
- Parameters:
ctx – context variable
n – number of islands
- Returns:
None