The OPTLSO Procedure

Example 3.3 Using QPS Format

In this example, the entire problem definition is first described in the following PROC OPTMODEL step and is then saved as a QPS data set in the subsequent PROC OPTLSO step. In this case, no FCMP function needs to be defined.

proc optmodel;
   var x{1..13} >= 0 <= 1;
   for {i in 10..12} x[i].ub = 100;
   min z = 5*sum{i in 1..4} x[i]
      - 5*sum{i in 1..4} x[i]**2 - sum{i in 5..13} x[i];
   con a1: 2*x[1] + 2*x[2] + x[10] + x[11] <= 10;
   con a2: 2*x[1] + 2*x[3] + x[10] + x[12] <= 10;
   con a3: 2*x[1] + 2*x[3] + x[11] + x[12] <= 10;
   con a4: -8*x[1] + x[10] <= 0;
   con a5: -8*x[2] + x[11] <= 0;
   con a6: -8*x[3] + x[12] <= 0;
   con a7: -2*x[4] - x[5] + x[10] <= 0;
   con a8: -2*x[6] - x[7] + x[11] <= 0;
   con a9: -2*x[8] - x[9] + x[12] <= 0;
   save qps qpdata;
quit;

proc optlso
   primalout = solution
   qpsdata   = qpdata;
   performance nthreads=2;
run;

proc print data=solution;
run;

Note that in this case the objective definition is taken directly from the QPS data set qpdata. Output 3.3.1 shows the output from running these steps.

Output 3.3.1: Using QPS Format

The OPTLSO Procedure

Performance Information
Execution Mode Single-Machine
Number of Threads 2

Problem Summary
Problem Type QP
   
QPS Data Set QPDATA
   
Number of Variables 13
Integer Variables 0
Continuous Variables 13
   
Number of Constraints 9
Linear Constraints 9
Nonlinear Constraints 0
   
Objective Definition Source QPDATA
Objective Sense Minimize

Solution Summary
Solution Status Function convergence
Objective -15.00099016
Infeasibility 0.0009901585
Iterations 33
Evaluations 3956
Cached Evaluations 476
Global Searches 1
Population Size 160
Seed 1

Obs _sol_ _id_ _value_
1 0 _obj_ -15.0010
2 0 _inf_ 0.0010
3 0 x[1] 1.0000
4 0 x[2] 1.0000
5 0 x[3] 1.0000
6 0 x[4] 1.0000
7 0 x[5] 1.0000
8 0 x[6] 1.0000
9 0 x[7] 1.0000
10 0 x[8] 1.0000
11 0 x[9] 1.0000
12 0 x[10] 3.0000
13 0 x[11] 3.0000
14 0 x[12] 3.0010
15 0 x[13] 1.0000
16 0 z -15.0010