Resources

Parametric Programming for the Oil Blending (lp5)

/***************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                */
/*                                                             */
/*    NAME: LP5                                                */
/*   TITLE: Parametric Programming for the Oil Blending (lp5)  */
/* PRODUCT: OR                                                 */
/*  SYSTEM: ALL                                                */
/*    KEYS: LP                                                 */
/*   PROCS: LP                                                 */
/*    DATA:                                                    */
/*                                                             */
/* SUPPORT:                             UPDATE:                */
/*     REF:                                                    */
/*    MISC:                                                    */
/*                                                             */
/***************************************************************/

data oil;
      format _type_ $8. _col_ $14. _row_ $16. ;
      input _type_ $ _col_ $ _row_ $ _coef_ ;
datalines;
max      .             profit                    .
.        arabian_light profit                 -175
.        arabian_heavy profit                 -165
.        brega         profit                 -205
.        jet_1         profit                  300
.        jet_2         profit                  300
eq       .             napha_l_conv              .
.        arabian_light napha_l_conv           .035
.        arabian_heavy napha_l_conv           .030
.        brega         napha_l_conv           .045
.        naphtha_light napha_l_conv             -1
eq       .             napha_i_conv              .
.        arabian_light napha_i_conv           .100
.        arabian_heavy napha_i_conv           .075
.        brega         napha_i_conv           .135
.        naphtha_inter napha_i_conv             -1
eq       .             heating_oil_conv          .
.        arabian_light heating_oil_conv       .390
.        arabian_heavy heating_oil_conv       .300
.        brega         heating_oil_conv       .430
.        heating_oil   heating_oil_conv         -1
eq       .             recipe_1                  .
.        naphtha_inter recipe_1                 .3
.        heating_oil   recipe_1                 .7
eq       .             recipe_2                  .
.        jet_1         recipe_1                 -1
.        naphtha_light recipe_2                 .2
.        heating_oil   recipe_2                 .8
.        jet_2         recipe_2                 -1
.        _rhs_         profit                    0
upperbd  .             available                 .
.        arabian_light available               110
.        arabian_heavy available               165
.        brega         available                80
;

proc lp data=oil sparsedata printlevel=-2
   primalout=solution;
run;


data sen;
   format _type_ $8. _col_ $14. _row_ $6.;
   input _type_ $ _col_ $ _row_ $ _coef_;
   datalines;
pricesen .             change   .
.        arabian_light change   1
.        arabian_heavy change 1.2
.        brega         change 1.5
.        jet_1         change  -1
.        jet_2         change  -1
;

data;
   set oil sen;
run;


proc lp sparsedata primalin=solution pricephi=-30;
run;