call MarkPareto
(result, n, objectives, minmax ) ;
The MarkPareto call identifies the Pareto-optimal set from a population of solutions. The inputs to the MarkPareto call are as follows:
result |
is a one-dimensional array to accept the results of the evaluation. Its size should be the same as the size of the population being evaluated; result if solution is Pareto optimal, and 0 otherwise. |
n |
is a variable to receive the number of Pareto-optimal solutions. |
objectives |
is a two-dimensional array that contains the multiple objective values for each solution. It should be dimensioned , where is the size of the population, and is greater than or equal to the number of objectives to be considered. |
minmax |
is a one-dimensional array to specify how the objective values are to be used. It should be of size , where is greater than or equal to the number of objectives to be considered. minmax if objective is to be minimized, minmax if objective is to be maximized, minmax if objective is not to be considered, and minmax designates an objective that prevents the member from being considered for Pareto optimality if it is nonzero. |
The MarkPareto call is used to identify the Pareto-optimal subset from a population of solutions. See the section Optimizing Multiple Objectives for a full discussion of Pareto optimality. MarkPareto can be called from a user update routine, which is called after the individual solution objective values have been calculated and before selection takes place. To make best use of this routine, in your encoding you need to set up a segment to record all the objective values you intend to use in the Pareto-optimal set evaluation. In a user objective function, you should calculate the multiple objectives and write them to the chosen segment. In an update routine (designated with a SetUpdateRoutine call), you can use a GetSolutions call to retrieve these segments, and then pass them to a MarkPareto call. The following statements shows how this could be done:
subroutine update(popsize); array objectives[1,1] /nosym; call dynamic_array(objectives, popsize, 3); array pareto[1] /nosym; call dynamic_array(pareto, popsize); array minmax[3] /nosym (1 -1 0); call GetSolutions(objectives, popsize, 2); call MarkPareto(pareto, npareto, objectives, minmax); do i = 1 to popsize; objectives[i,3] = pareto[i]; end; call UpdateSolutions(objectives, popsize, 2); call SetElite(npareto); endsub;
This is an example of a user update routine that might be used in a multiobjective optimization problem. It is assumed that a user objective function has calculated two different objectives and placed their values in the first two elements of segment 2 of the problem encoding. The first objective is to be maximized, and the second is to be minimized. Segment 2 has three elements, and the third element is used to mark the Pareto-optimal solutions. After dynamically allocating the necessary arrays from the popsize (population size) parameter, the update routine first retrieves the current solutions into the objectives array with the GetSolutions call. It then passes the objectives array directly to the MarkPareto call to perform the Pareto-optimal evaluations. Note that the minmax array directs the MarkPareto call to maximize the first element, minimize the second, and ignore the third. After the MarkPareto call, the update routine writes the results back to the third element of the objectives array, and writes the objectives array back to the solution population with the UpdateSolutions call. This marks the solutions that compose the Pareto-optimal set. The update routine then sets the elite parameter equal to the number of Pareto-optimal solutions with the SetElite call. It is assumed that the user has provided a fitness comparison function (designated with a SetCompareRoutine call) that always selects a Pareto-optimal solution over a non-Pareto-optimal one, so the elite setting guarantees that all the Pareto-optimal solutions are retained from generation to generation. Example 4.3 illustrates the use of the MarkPareto call.