The OPTLSO Procedure

Example 3.10 Multiobjective Optimization

The following optimization problem is discussed in Huband et al. (2006); Custódio et al. (2011). This example illustrates how to use PROC FCMP to define multiple nonlinear objectives. This problem minimizes

\[ f_1(x) = (x_1-1)^2 + (x_1-x_2)^2 \text { and } f_2(x) = (x_1 - x_2)^2 + (x_2 - 3)^2 \]

subject to $0 \le x_1, x_2 \le 5.$ The VARIABLES= VARDATA option in the PROC OPTLSO statement specifies the variables and their respective bounds. The objective functions are defined by using PROC FCMP, and the objective function names and other properties are described in the SAS data set objdata. The problem description is then passed to the OPTLSO procedure by using the options VARIABLES= VARDATA and OBJECTIVE= OBJDATA.

data vardata;
   input _id_ $ _lb_ _ub_;
   datalines;
x1 0 5
x2 0 5
;
proc fcmp outlib=sasuser.myfuncs.mypkg;
   function fdef1(x1, x2);
      return ((x1-1)**2 + (x1-x2)**2);
   endsub;

   function fdef2(x1, x2);
      return ((x1-x2)**2 + (x2-3)**2);
   endsub;
run;

data objdata;
   input _id_ $ _function_ $ _sense_ $;
   datalines;
f1 fdef1 min
f2 fdef2 min
;
options cmplib = sasuser.myfuncs;
proc optlso
   primalout = solution
   variables = vardata
   objective = objdata
   logfreq = 50
;
run;

proc transpose data=solution out=pareto label=_sol_ name=_sol_;
   by _sol_;
   var _value_;
   id _id_;
run;

proc gplot data=pareto;
   plot f2*f1;
run;

quit;

Output 3.10.1 shows the ODS tables that are produced.

Output 3.10.1: Multiobjective: ODS Tables

The OPTLSO Procedure

Performance Information
Execution Mode Single-Machine
Number of Threads 4

Problem Summary
Problem Type NLP
   
Objective Definition Set OBJDATA
Variables VARDATA
   
Number of Variables 2
Integer Variables 0
Continuous Variables 2
   
Number of Constraints 0
Linear Constraints 0
Nonlinear Constraints 0
   
Objective Definition Source OBJDATA
Objective Sense Minimize

Solution Summary
Solution Status Function convergence
Nondominated 5000
Progress 6.9766249E-7
Infeasibility 0
Iterations 444
Evaluations 23647
Cached Evaluations 103
Global Searches 1
Population Size 80
Seed 1



Output 3.10.2 shows the iteration log.

Output 3.10.2: Multiobjective: Log

 
 
NOTE: The OPTLSO procedure is executing in single-machine mode.                 
NOTE: The OPTLSO algorithm is using up to 4 threads.                            
NOTE: The problem has 2 variables (0 integer, 2 continuous).                    
NOTE: The problem has 0 constraints (0 linear, 0 nonlinear).                    
NOTE: The problem has 2 FCMP function definitions.                              
NOTE: The deterministic parallel mode is enabled.                               
        Iteration    Nondom        Progress    Infeasibility    Evals     Time  
                1         7               .                0       84        0  
               51       962     0.000070835                0     2885        0  
              101      1689     0.000017074                0     5613        1  
              151      2289     0.000009575                0     8249        2  
              201      2933     0.000004561                0    10906        2  
              251      3429     0.000051118                0    13573        4  
              301      3876     0.000001452                0    16163        5  
              351      4386     0.000000716                0    18757        6  
              401      4796     0.000002728                0    21375        7  
              444      5000     0.000000698                0    23647        9  
NOTE: Function convergence criteria reached.                                    
NOTE: There were 2 observations read from the data set WORK.VARDATA.            
NOTE: There were 2 observations read from the data set WORK.OBJDATA.            
NOTE: The data set WORK.SOLUTION has 25000 observations and 3 variables.        
 
 



When solving a multiobjective problem with 2 objectives, it can be useful to create a plot with PROC GPLOT of the Pareto-optimal set returned by PROC OPTLSO.

Output 3.10.3 shows a plot of the Pareto-optimal set found by PROC OPTLSO.

Output 3.10.3: Multiobjective: Plot of Pareto-optimal Set

Multiobjective: Plot of Pareto-optimal Set