The GA Procedure

 

Getting Started: GA Procedure

The optimization problem is described by using programming statements, which initialize problem data and specify the objective, genetic operators, and other optimization parameters. The programming statements are executed once, and are followed by a RUN statement to begin the optimization process. The GA procedure enables you to define subroutines and designate them to be called during the optimization process to calculate objective functions, perform genetic mutation or crossover operations, or monitor and control the optimization. All variables created within a subroutine are local to that routine; to access a global variable defined within the GA procedure, the subroutine must have a parameter with the same name as the variable.

To set up a genetic algorithm optimization, your program needs to perform the following steps:

  1. Initialize the problem data, such as cost coefficients and parameter limits.

  2. Specify five basic optimization parameters:

    Encoding:

    the general structure and form of the solution

    Objective:

    the function to be optimized

    Selection:

    how members of the current solution generation are chosen to propagate the next generation

    Crossover:

    how the attributes of parent solutions are combined to produce new offspring solutions

    Mutation:

    how random variation is introduced into the new offspring solutions to maintain genetic diversity

  3. Generate a population of solutions for the initial generation.

  4. Control the execution of the algorithm and record your results.

The following sections discuss each of these items in detail.