## Oil Refinery Problem (optlp1)

```/***************************************************************/
/*                                                             */
/*          S A S   S A M P L E   L I B R A R Y                */
/*                                                             */
/*    NAME: optlp1                                             */
/*   TITLE: Oil Refinery Problem (optlp1)                      */
/* PRODUCT: OR                                                 */
/*  SYSTEM: ALL                                                */
/*    KEYS: OR                                                 */
/*   PROCS: OPTLP                                              */
/*    DATA:                                                    */
/*                                                             */
/* SUPPORT:                             UPDATE:                */
/*     REF:                                                    */
/*    MISC: Example 1 from the OPTLP chapter of                */
/*          Mathematical Programming.                          */
/*                                                             */
/***************************************************************/

data ex1;
input field1 \$ field2 \$ field3 \$ field4 field5 \$ field6;
datalines;
NAME        .          EX1      .     .         .
ROWS        .          .        .     .         .
N          profit     .        .     .         .
E          napha_l    .        .     .         .
E          napha_i    .        .     .         .
E          htg_oil    .        .     .         .
L          blend1     .        .     .         .
L          blend2     .        .     .         .
L          blend3     .        .     .         .
COLUMNS     .          .        .     .         .
.           a_l        profit   -175  napha_l   .035
.           a_l        napha_i  .100  htg_oil   .390
.           a_h        profit   -165  napha_l   .030
.           a_h        napha_i  .075  htg_oil   .300
.           br         profit   -205  napha_l   .045
.           br         napha_i  .135  htg_oil   .430
.           na_l       napha_l  -1    blend2    -1
.           na_i       napha_i  -1    blend1    -1
.           h_o        htg_oil  -1    blend3    -1
.           j_1        profit   350   blend1    .3
.           j_1        blend3   .7    .         .
.           j_2        profit   350   blend2    .2
.           j_2        blend3   .8    .         .
BOUNDS      .          .        .     .         .
UP          .          a_l      110   .         .
UP          .          a_h      165   .         .
UP          .          br       80    .         .
ENDATA      .          .        .     .         .
;

title1 'The OPTLP Procedure';
proc optlp data=ex1
objsense  = max
algorithm = primal
primalout = ex1pout
dualout   = ex1dout
logfreq   = 1;
run;
%put &_OROPTLP_;

title2 'Primal Solution';
proc print data=ex1pout label ;
run;

title2 'Dual Solution';
proc print data=ex1dout label ;
run;

```