Ignore:
Timestamp:
Oct 29, 2008 12:16:26 PM (14 years ago)
Author:
liveletlive
Message:

Changes made to include the following items:
1) Hard restart
2) SBX
3) Random population replacement proportion
4) Definitions and macros for the above functions in pgapack.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/optimizer/src/pgapack/pgapack/source/parallel.c

    r986 r1202  
    127127        if (rank == 0) {
    128128            Restarted = PGA_FALSE;
    129             if ((ctx->ga.restart == PGA_TRUE) &&
    130                 (ctx->ga.ItersOfSame % ctx->ga.restartFreq == 0)) {
    131                 ctx->ga.ItersOfSame++;
    132                 Restarted = PGA_TRUE;
    133                 PGARestart(ctx, PGA_OLDPOP, PGA_NEWPOP);
     129            if (PGARestartCondition(ctx)) {
     130                        Restarted = PGA_TRUE;
     131                        PGARestart(ctx, PGA_OLDPOP, PGA_NEWPOP);
    134132            } else {
    135                 PGASelect(ctx, PGA_OLDPOP);
    136                 CreateNewGeneration(ctx, PGA_OLDPOP, PGA_NEWPOP);
     133                        PGASelect(ctx, PGA_OLDPOP);
     134                        CreateNewGeneration(ctx, PGA_OLDPOP, PGA_NEWPOP);
    137135            }
    138136        }
Note: See TracChangeset for help on using the changeset viewer.