The GA Procedure |
SetCross Call |
sets the crossover operator
The inputs to the SetCross subroutine are as follows:
type |
is the name of the crossover operator to be applied. |
seg |
is optional, and specifies a segment of the solution to which the operator should be applied. If seg is not specified, then it defaults to a value of 1. seg needs to be specified only if multisegment encoding is used. |
pname |
is optional, and specifies the name of a particular property to be set for the crossover operator. |
pvalue |
specifies the value to be assigned to the corresponding property name. |
The SetCross routine is used to assign a standard crossover operator. For multisegment encoding, the operator can be assigned to a particular solution segment with the seg parameter; otherwise a default segment of 1 is assumed. You can set different crossover operators for different segments with multiple SetCross calls. When a crossover event occurs, all segments in the parent solutions for which a crossover operator has been designated will undergo crossover. If more than one SetCross call is made for the same segment, then the last call nullifies any previous call for that segment. Also, a SetCrossRoutine call nullifies all previous SetCross calls, and a SetCross call nullifies a previous SetCrossRoutine call. Properties for the chosen crossover operator can be set with optional pname-pvalue pairs. It is also possible to set or reset operator properties with a SetProperty call.
The accepted values for type and the corresponding properties are summarized in Table 3.4. See the section Crossover Operators for a full description of the available operators.
type |
encodings |
properties |
real, integer |
||
sequence |
||
real |
||
sequence |
||
sequence |
||
real, integer, Boolean |
'alpha' |
|
real, integer, Boolean |
'alpha' |
|
real, integer, Boolean |
'alpha', 'p' |
Copyright © SAS Institute, Inc. All Rights Reserved.