The GA Procedure

 
ReadParent Call

call ReadParent ( selected, seg, n, destination ) ;

The ReadParent call reads selected solution elements into an array in a user crossover subroutine. The inputs to the ReadParent subroutine are as follows:

selected

is a parameter passed to the user subroutine by the GA procedure, which points to the selected solution family.

seg

is the segment of the desired parent solution to be obtained.

n

is the number of the parent, starting at 1.

destination    

is an array in which to store the solution elements.

The ReadParent subroutine is called inside a user crossover operator subroutine to obtain the elements of selected parent solutions. Normally you would then manipulate and combine the elements of the two parents and use a WriteChild call to create the child offspring and complete the action of the crossover operator.