call GetSolutions
( sol, n, seg ) ;
The GetSolutions call retrieves solutions from the current generation. The inputs to the GetSolutions subroutine are as follows:
sol |
is an array to receive the solution elements. |
n |
is the number of solutions to get. |
seg |
is the segment of the solution to retrieve. |
The GetSolutions subroutine is used to retrieve solutions from the current generation. You would normally call it from an update or finalize subroutine for post processing or analysis. If the elite parameter has been set with a SetElite call, then the first elite members of the population are the fittest, and they are sorted in order, starting with the most fit. The sol variable should have two dimensions, with the first dimension representing the solution number, and the second representing the element within the solution. For example, if the encoding of the problem was I10, then would be the value of the third element of the second solution in the current population. For real, integer, Boolean, and sequence encoding, each solution element is mapped to the corresponding element of the sol array. The seg parameter specifies the solution segment desired. For example, if the encoding was set in the SetEncoding call to 'R10I5', then segment 1 is R10 and segment 2 is I5.