## Gasoline Blending

### Problem

Sunco oil has three different processes that can be used to manufacture various types of gasoline. Each process involves blending oils in the company's catalytic cracker.

### Process 1

Running process 1 for an hour costs $5 and requires 2 barrels of crude oil 1 and 3 barrels of crude oil 2. The output from running process 1 for an hour is 2 barrels of gas 1 and 1 barrel of gas 2.

### Process 2

Running process 2 for an hour costs $4 and requires 1 barrel of crude 1 and 3 barrels of crude 2. The output from process 2 for an hour is 3 barrels of gas 2.

### Process 3

Running process 3 for an hour costs $1 and requires 2 barrels of crude 2 and 3 barrels of gas 2. The output from running process 3 for an hour is 2 barrels of gas 3.

Each week, 200 barrels of crude 1, at $2/ barrel, and 300 barrels of crude 2 at $3/barrel, may be purchased. All gas produced can be sold at the following per-barrel prices: gas 1, $9; gas 2, $10; gas 3, $24. Formulate an LP whose solution will maximize revenues less costs. Assume that only 100 hours of time on the catalytic cracker are available each week.

- Let x[i] = no. of hours process i is run per week (where i =1,2,3)
- Let o[i] = no. of barrels of oil i that is purchased per week (i =1,2)
- Let g[i] = no. of barrels of gas i sold per week (i=1,2,3)

### Model

Model sunco Variables x[1:3] = 30, >=0 o[1] = 100, >=0, <=200 o[2] = 100, >=0, <=300 g[1:3] = 100, >=0 obj profit End Variables Equations ! minimize (-profit) = maximize (profit) obj = -profit ! profit per week = revenue - costs profit = 9*g[1]+10*g[2]+24*g[3]-5*x[1]-4*x[2]-x[3]-2*o[1]-3*o[2] ! consumption of crude 1 2*x[1] + x[2] = o[1] ! consumption of crude 2 3*x[1] + 3*x[2] + 2*x[3] = o[2] ! generation of gas 1 2*x[1] = g[1] ! generation (and consumption) of gas 2 x[1] + 3*x[2] - 3*x[3] = g[2] ! generation of gas 3 2*x[3] = g[3] ! cat cracker available 100 hours per week x[1] + x[2] + x[3] <= 100 End Equations End Model

### Solution

Run process 2 for 100 hours/week = $1500/week

If gas 1 price rises above $11.5/barrel, the optimal solution is to run process 1.

If gas 3 price rises above $26/barrel, the optimal solution is to run processes 2 and 3 for equal periods of time (50 hours).