Refinery blending

Linear program: barrels of each crude stream into each product, to maximize daily profit

Crude streams

StreamOctane (RON)Sulfur (ppm)Vapor pressure (psi)Cost ($/bbl)Max supply (bbl/day)

Products

ProductMin octane (RON)Max sulfur (ppm)Max vapor pressure (psi)Price ($/bbl)Min production (bbl/day)Max production (bbl/day)

A min octane of 0 means no octane spec (diesel). Edited cells are highlighted. Change any number and solve again to see what the change is worth.

Optimal blend (bbl/day)

This problem has more than one optimal blend: different blends reach the same maximum profit. The solver returns one of them, so your blend can differ from another solution while the profit is the same.

Product quality vs spec

Highlighted values sit exactly on their spec.

Constraints

A binding constraint is at its limit. The value column is the shadow price (dual value): the change in daily profit from relaxing that limit by one unit, other things fixed. It holds for small changes; solve again to price a large one. A constraint with slack is worth $0. A binding constraint can also be worth $0 when another constraint would stop profit from rising.