GASETSEL Call |
The GASETSEL subroutine sets the selection parameters for a genetic algorithm optimization.
The input arguments to the GASETSEL call are as follows:
is the identifier for the genetic algorithm optimization problem, which was returned by the GASETUP function.
specifies the number of solution population members to carry over unaltered to the next generation in the GAREGEN call. If nonzero, then elite members with the best objective function values are carried over without crossover or mutation.
specifies the selection method to use.
is a parameter used to control the selection pressure.
This module sets the selection parameters that are used in the GAREGEN call to select solutions for the crossover operation. You can choose between two variants of the "tournament" selection method in which a group of different solutions is picked at random from the current solution population and the solution from that group with the best objective value is selected. In the first variation, chosen by setting type to 0, the most optimal solution is always selected, and the parm parameter is used to specify the size of the group, always two or greater. The larger the group size, the greater the selective pressure. In the second variation, chosen by setting type to 1, the group size is set to 2 and the best solution is chosen with probability specified by parm. If parm is 1, the best solution is always picked; a parm value of 0.5 is equivalent to pure random selection. The parm value must be between 0.5 and 1. When type is 0, the selective pressure is greater than when type is 1. Higher selective pressure leads to faster convergence of the genetic algorithm, but is more likely to give premature convergence to a local optimum.
In order to ensure that the best solution of the current solution population is always carried over to the next generation, an elite value of 1 should be specified. Higher values of elite generally lead to faster convergence of the algorithm, but they increase the chances of premature convergence to a local optimum. If GASETSEL is not called, the optimization uses the default values of 1 for elite, 1 for type, and 2 for parm.
See the GASETUP function for an example.