Posted by Derek on .
Riverside Oil Company in eastern Kentucky produces regular and supreme gasoline. Each barrel of regular sells for $21 and must have an octane rating of at least 90. Each barrel of supreme sells for $25 and must have an octane rating of at least 97. Each of these types of gasoline are manufactured by mixing different quantities of the following three inputs:
Input______Cost/barrel__Oct rating__Barrels avbl (in 1000s)
1_________$17.25__100__150
2_________$15.75__87__350
3_________$17.75__110__300
Riverside has orders for 300,000 barrels of regular and 450,000 barrels of supreme. How should the company allocate the available inputs to the production of regular and supreme gasoline if they want to maximize profits?
I just need to figure out the MAX and constraints.

Linear programming 
MathMate,
The constraints and the objective function can be obtained from the instructions and data.
First start off with defining the variables, x1,x2,x3 for the quantity (in 1000's of barrels) of each type of gasoline available for regular product, and x4,x5,x6 for supreme.
Since the company is buying, the quantities x1,x2,... cannot be negative. So constraints are:
x1≥0 (input 1 for regular)
...
x4≥0 (input 1 for supreme)
...
The availability tells us that:
x1+x4≤150
x2+x5≤350
...
The order quantity requirements (in 1000's of barrels)
x1+x2+x3=300
...
The octane requirement is such that the weighted average of the octane level must be greater than 90 and 97 for each type of gasoline. The sums (x1+x2+x3) and (x4+x5+x6) are 300 and 450 respectively:
(100x1+87x2+110x3)/300≥90
...
Profit is selling price  cost, so the objective function is:
P(x1,x2,x3,x4,x5,x6)
=300*$21($17.25x1+$15.75x2+$17.75x3)
+...
Can you take it from here? 
Linear programming 
Derek,
Yes, thank you so much.

Linear programming :) 
MathMate,
You're welcome!

Linear programming 
rainusa,
That's great formular. Could you create a spreadsheet model for this problem and solve it using Solver?

Linear programming 
Hibe,
Is there a spreadsheet model to complete this on excel?