The GA Procedure

Objective Function

r = Objective ( selected, seg, type<, parameter1, parameter2, …> ) ;

The Objective call evaluates a standard objective function from within a user subroutine. The inputs to the function are as follows:

selected  

is an array that specifies the solution to be evaluated.

seg

is the desired segment of the solution to be evaluated.

type

is objective function name, which also determines the number and type of parameters expected.

parameter1-n

are optional parameters applicable to particular objective functions.

The accepted values for type and the corresponding parameters are summarized in Table 3.3.

Table 3.3: Objective Function Types

type

encodings

parameters

'TSP'

sequence

distances


The parameters are as follows:

distances  

is a matrix of distances between locations, such that $ distances[i,j]$ is the distance between location $i$ and $j$.

The Objective call should be made only from within a user objective function. The precise actions of the standard objective functions are described in the section Objective Functions.