Function PGASetStoppingRuleType
Defined in File stop.c
Function Documentation
-
void PGASetStoppingRuleType(PGAContext *ctx, int stoprule)
Specify a stopping criterion.
Description
If called more than once the different stopping criterion are ORed together. Valid choices are
PGA_STOP_MAXITER
,PGA_STOP_TOOSIMILAR
, orPGA_STOP_NOCHANGE
to specify iteration limit reached, population too similar, or no change in the best solution found in a given number of iterations, respectively. The default is to stop when a maximum iteration limit is reached (by default, 1000 iterations). The constants can be found in Constants for Stopping Conditions and more details are in section Stopping Criteria of the user guide.Example
PGAContext *ctx; ... PGASetStoppingRuleType (ctx, PGA_STOP_TOOSIMILAR);
- Parameters:
ctx – context variable
stoprule – symbolic constant to specify stopping rule
- Returns:
None