blendingsect2p2

blendingsect2p2 - sum{i in gas_types}...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
## Blending problem from Section 2.2 in Course Notes ## Sunoco Oil makes two types of gasoline using 3 types of crudes. set gas_types; # i set crudes; # j #parameters for the gas_types param min_octane{gas_types} >0; param max_sulfur{gas_types} >0; param revenue{gas_types}; param demand{gas_types}; # parameters for the crudes param octane{crudes} >0; param sulfur{crudes} >=0,<=100; param cost{crudes}>0; param limits{crudes}; var blend{i in gas_types, j in crudes} >=0; # number of barrels of crude j blended in gas_types i var gas_amounts{i in gas_types}; # total number of barrels of gas_types i var crude_amounts{j in crudes}; # total number of barrels of crude j maximize profit:
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: sum{i in gas_types} revenue[i]*gas_amounts[i]- sum{j in crudes} cost[j]*crude_amounts[j]; subject to gasdemandconstr {i in gas_types}: gas_amounts[i] &gt;= demand[i]; subject to crudelimits {j in crudes}: crude_amounts[j] &lt;= limits[j]; subject to octanelimits {i in gas_types}: sum{j in crudes} octane[j]*blend[i,j] &gt;= gas_amounts[i]*min_octane[i]; subject to sulfurbounds {i in gas_types}: sum{j in crudes} sulfur[j]*blend[i,j] &lt;= gas_amounts[i]*max_sulfur[i]; subject to totalcrudes {j in crudes}: sum{i in gas_types} blend[i,j] = crude_amounts[j]; subject to totalgas {i in gas_types}: sum{j in crudes} blend[i,j] = gas_amounts[i];...
View Full Document

Ask a homework question - tutors are online