Function PGASetFitnessMinType

Function Documentation

void PGASetFitnessMinType(PGAContext *ctx, int fitness_type)

Set the type of algorithm used if a minimization problem is specified to determine how values are remapped for maximization.

Description

Valid choices are PGA_FITNESSMIN_RECIPROCAL and PGA_FITNESSMIN_CMAX to do the mapping using the reciprocal of the evaluation function, or by subtracting the worst evaluation function value from each evaluation function value, respectively. The default is PGA_FITNESSMIN_CMAX. See Constants for Fitness Minimization Strategies for the constants and section String Evaluation and Fitness in the user guide for details.

Example

PGAContext *ctx;

...
PGASetFitnessMinType (ctx, PGA_FITNESSMIN_CMAX);

Parameters
  • ctx – context variable

  • fitness_type – symbolic constant to specify fitness minimization type

Returns

None