PGARestart
reseeds a population from the best string
- Provided by: pgapack (Version: 1.1.1-3)
- Report a bug
reseeds a population from the best string
#include "pgapack.h" void PGARestart(ctx, source_pop, dest_pop) PGAContext *ctx int source_pop int dest_pop
restart.c
Perform an unspecified test to determine if the current evolution is
not evolving fast enough, and if so, restart the evolution.
PGAContext *ctx; PGAEvaluateMS(ctx, PGA_OLDPOP, f, comm);
PGAFitness (ctx, PGA_OLDPOP);
}
:
if (StagnantEvolution()) {
PGARestart(ctx, PGA_OLDPOP, PGA_NEWPOP);
PGAEvaluate(ctx, PGA_NEWPOP, EvalFunc);
PGAUpdateGeneration(ctx);
}