| The LP Procedure |
Typically, mathematical programming models are very sparse. This means that only a small percentage of the coefficients are nonzero. The sparse problem input is ideal for these models. The oil blending problem in the section "An Introductory Example" has a sparse form. This example shows the same problem in a sparse form with the data given in a different order. In addition to representing the problem in a concise form, the sparse format
The model in the sparse format is solved by invoking PROC LP with the SPARSEDATA option as follows.
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
upperbd . available .
. arabian_light available 110
. arabian_heavy available 165
. brega available 80
;
proc lp data=oil sparsedata;
run;
The output from PROC LP follows.
Output 3.2.1: Output for the Sparse Oil Blending Problem
The LP Procedure
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.