The GA Procedure

Setting Crossover Parameters

There are two crossover parameters that need to be specified: the crossover probability and the crossover operator. Members of the current generation that have passed the selection process either go to the crossover operator or are passed unchanged into the next generation, according to the crossover probability. To set the probability, you use a SetCrossProb call:

call SetCrossProb(prob);

where prob is a real number between 0 and 1. A value of 1 implies that the crossover operator is always applied, while 0 effectively turns off crossover. If you do not explicitly set the crossover probability with this call, a default value of 0 is used.

The GA procedure enables you to choose your crossover operator from several standard crossover operators appropriate for each type of encoding, or to code your own crossover operator as a subroutine. To specify one of the crossover operators provided by the GA procedure, use a SetCross call. See the section Crossover Operators for more detail on the available operators. To supply your own operator, use a SetCrossRoutine call:

call SetCrossRoutine( 'routine');

where routine is the name of your crossover subroutine. See the section Defining User Genetic Operators for a description of defining genetic operators with user subroutines. If the crossover probability is greater than 0, you must use a SetCross or SetCrossRoutine call to set the crossover operator.

After initialization, you can reset any of the crossover parameters or their properties during the optimization process by calling one of the preceding routines from a user update routine. This makes it possible to adapt the crossover operators as desired in the optimization process.