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 OPTLP procedure is executing in single-machine mode. |
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 4.0651E+01 2.0527E+00 5.6871E-15 0.0000E+00 2.7019E-01 0 |
1 6.9884E+00 3.0632E+00 4.7807E-15 0.0000E+00 5.3371E-02 0 |
2 5.9956E+00 3.5765E-01 1.1439E-14 2.3345E-17 4.8803E-02 0 |
3 1.3976E+00 1.0163E-01 3.2245E-14 8.6465E-18 1.0468E-02 0 |
4 1.0306E+00 6.8392E-02 5.5550E-14 3.9055E-17 5.8619E-03 0 |
5 2.5202E-02 2.9900E-04 3.4399E-14 2.3359E-17 2.0848E-04 0 |
6 2.5230E-04 3.0238E-06 2.3857E-14 3.1581E-17 2.0848E-06 0 |
7 6.8270E-04 3.6281E-08 2.1556E-15 3.9670E-17 4.5403E-06 0 |
8 6.8270E-06 3.6281E-10 3.0346E-15 5.7575E-17 4.5403E-08 0 |
9 0.0000E+00 5.0568E-16 2.8899E-15 0.0000E+00 6.7382E-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. |