The OPTLP Procedure

Example 12.2 Using the Interior Point Algorithm

You can also solve the oil refinery problem described in Example 12.1 by using the interior point algorithm. 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 12.2.1.

Output 12.2.1: Interior Point Algorithm: 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 U 10.2083
2 profit   a_h D -165 0 165 0.000 L -22.8125
3 profit   br D -205 0 80 80.000 U 2.8125
4 profit   na_l N 0 0 1.7977E308 7.450 B 0.0000
5 profit   na_i N 0 0 1.7977E308 21.800 B 0.0000
6 profit   h_o N 0 0 1.7977E308 77.300 B 0.0000
7 profit   j_1 N 350 0 1.7977E308 72.667 B 0.0000
8 profit   j_2 N 350 0 1.7977E308 33.042 B -0.0000



The iteration log is displayed in Output 12.2.2.

Output 12.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   Time   
         0  8.5854E+01  1.9793E+01  3.0659E+00  1.9225E-02  1.4035E-01      0   
         1  1.2776E+01  4.0585E+00  3.0659E-02  1.9225E-04  1.8805E-02      0   
         2  3.1694E+00  5.7554E-01  2.4563E-03  1.5402E-05  5.4311E-03      0   
         3  4.6729E-01  7.9027E-02  2.2921E-04  1.4373E-06  2.4468E-04      0   
         4  5.7860E-03  9.6069E-04  3.2729E-06  2.0522E-08  2.8762E-06      0   
         5  5.7862E-05  9.6045E-06  3.2731E-08  2.0524E-10  2.8763E-08      0   
         6  1.5657E-04  1.1524E-07  9.8105E-11  2.8290E-12  8.2666E-08      0   
         7  0.0000E+00  5.0568E-16  2.8899E-15  0.0000E+00  3.0766E-15      0   
NOTE: The Interior Point solve time is 0.00 seconds.                            
NOTE: The CROSSOVER option is enabled.                                          
NOTE: The crossover basis contains 0 primal and 0 dual superbasic variables.    
                           Objective                                            
      Phase Iteration        Value         Time                                 
       P C          1    0.000000E+00         0                                 
       P 2          2    1.347917E+03         0                                 
       D 2          3    1.347917E+03         0                                 
NOTE: The Crossover time is 0.00 seconds.                                       
NOTE: Optimal.                                                                  
NOTE: Objective = 1347.9166667.                                                 
NOTE: The data set WORK.EX1IPOUT has 8 observations and 10 variables.           
NOTE: The data set WORK.EX1IDOUT has 6 observations and 10 variables.