GAGETVAL Call

CALL GAGETVAL (values, id<, index>) ;

The GAGETVAL subroutine gets objective function values for members of the population in a genetic algorithm optimization. The GAGETVAL call returns the following output argument:

values

names a matrix that contains objective function values for solutions in the current population that are specified by index. If index is not present, then values for all solutions in the population are returned. Each row in values corresponds to one solution.

The input arguments to the GAGETVAL call are as follows:

id

is the identifier for the genetic algorithm optimization problem, which was returned by the GASETUP function.

index

is a matrix of indices of the requested objective function values. If index is not specified, then all objective function values are returned.

The GAGETVAL call is used to retrieve objective function values of the current solution population. If the elite parameter of the GASETSEL call is nonzero, then the first elite members of the population have the most optimal objective function values of the population, and those elite members are sorted in ascending order of objective function value for a minimization problem or in descending order for a maximization problem.

See the GASETUP function for an example.