Question: / * * * Homework 8 Program * * * / * Always check the log after running a program. This allows you to identify

/*** Homework 8 Program ***/
*Always check the log after running a program. This allows
you to identify errors;
*RUN the libname statement first;
*To create a library;
libname BUAD5623'/home/u45422697/sasuser.v94/BUAD5623';
/**Example 4.2: A Sparse View of the Oil Blending Problem */
title 'Example 4.2';
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
. jet_1 recipe_1-1
eq . recipe_2.
. 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 SPARSEDATA;
run;
/** Example 4.3: Sensitivity Analysis: Changes in Objective Coefficients */
title 'Example 4.3';
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
. jet_1 recipe_1-1
eq . recipe_2.
. 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 SPARSEDATA
rangeprice primalout=solution;
run;
proc print data=solution;
run;
/**Example 4.4: Additional Sensitivity Analysis */
title 'Example 4.4a';
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;
run;
title 'Example 4.4b';
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
. jet_1 recipe_1-1
eq . recipe_2.
. 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
pricesen . change .
. arabian_light change 1
. arabian_heavy change 1.2
. brega change 1.5
. jet_1 change -1
. jet_2 change -1
;
proc lp sparsedata primalin=solution;
run;
/**Example 4.5: Price Parametric Programming for the Oil Blending Problem */
title 'Example 4.5';
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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!