The OPTLP Procedure

Example 11.2 Using the Interior Point Solver

You can also solve the oil refinery problem described in Example 11.1 by using the interior point solver. You can create the input data set from an external MPS-format flat file by using the SAS macro %MPS2SASD or SAS DATA step code, both of which are described in Getting Started: OPTLP Procedure. You can use the following SAS code to solve the problem:

proc optlp data=ex1
  objsense  = max
  algorithm = ip
  primalout = ex1ipout
  dualout   = ex1idout
  logfreq   = 1;
run;

The optimal solution is displayed in Output 11.2.1.

Output 11.2.1: Interior Point Solver: Primal Solution Output

Primal Solution

Obs Objective Function ID RHS ID Variable
Name
Variable
Type
Objective
Coefficient
Lower
Bound
Upper Bound Variable Value Variable
Status
Reduced Cost
1 profit   a_l D -175 0 110 110.000   10.2083
2 profit   a_h D -165 0 165 0.000   -22.8125
3 profit   br D -205 0 80 80.000   2.8125
4 profit   na_l N 0 0 1.7977E308 7.450   0.0000
5 profit   na_i N 0 0 1.7977E308 21.800   0.0000
6 profit   h_o N 0 0 1.7977E308 77.300   0.0000
7 profit   j_1 N 350 0 1.7977E308 72.667   0.0000
8 profit   j_2 N 350 0 1.7977E308 33.042   -0.0000


The iteration log is displayed in Output 11.2.2.

Output 11.2.2: Log: Solution Progress

NOTE: The problem EX1 has 8 variables (0 free, 0 fixed).                        
NOTE: The problem has 6 constraints (3 LE, 3 EQ, 0 GE, 0 range).                
NOTE: The problem has 19 constraint coefficients.                               
WARNING: The objective sense has been changed to maximization.                  
NOTE: The LP presolver value AUTOMATIC is applied.                              
NOTE: The LP presolver removed 3 variables and 3 constraints.                   
NOTE: The LP presolver removed 6 constraint coefficients.                       
NOTE: The presolved problem has 5 variables, 3 constraints, and 13 constraint   
      coefficients.                                                             
NOTE: The LP solver is called.                                                  
NOTE: The Interior Point algorithm is used.                                     
NOTE: The deterministic parallel mode is enabled.                               
NOTE: The Interior Point algorithm is using up to 4 threads.                    
                                           Primal        Bound         Dual     
      Iter   Complement  Duality Gap       Infeas       Infeas       Infeas     
         0  4.06515E+01  2.05269E+00  5.68712E-15  0.00000E+00  2.70189E-01     
         1  6.98840E+00  3.06315E+00  4.78073E-15  0.00000E+00  5.33713E-02     
         2  5.99555E+00  3.57653E-01  1.14391E-14  2.33455E-17  4.88028E-02     
         3  1.39762E+00  1.01631E-01  3.22447E-14  8.64647E-18  1.04677E-02     
         4  1.03056E+00  6.83923E-02  5.55505E-14  3.90553E-17  5.86194E-03     
         5  2.52016E-02  2.98995E-04  3.43995E-14  2.33591E-17  2.08475E-04     
         6  2.52303E-04  3.02383E-06  2.38565E-14  3.15810E-17  2.08475E-06     
         7  6.82704E-04  3.62810E-08  2.15560E-15  3.96702E-17  4.54026E-06     
         8  6.82704E-06  3.62808E-10  3.03457E-15  5.75749E-17  4.54026E-08     
         9  0.00000E+00  5.05681E-16  2.88989E-15  0.00000E+00  6.73817E-15     
NOTE: Optimal.                                                                  
NOTE: Objective = 1347.9166667.                                                 
NOTE: The Interior Point solve time is 0.00 seconds.                            
NOTE: The data set WORK.EX1IPOUT has 8 observations and 10 variables.           
NOTE: The data set WORK.EX1IDOUT has 6 observations and 10 variables.