37 BarrelBarrow Marginal values – the additional profit to be made of a constraint is relaxed – are one of the benefits of optimizing planning problems with Linear Programming as they can help us understand the economic drivers of the solution. Refinery planning models are normally written with a balance row for each hydrocarbon material being tracked. As equality rows they are always constraining and so we can see a marginal value for each stream – but what exactly do they mean when thinking about refinery operations? Stream rows are in the general form of adding up all the ways of acquiring a material balanced against the sum of all the ways of using it.  In GRTMPS we use the convention that inputs are negative and consumptions are positive, so a generic description could be

Sell + Transport out + into Inventory + feed Unit +  Blend component - Buy  – Transport in – from Inventory – Unit rundown – Blended = 0
 
The Marginal Value on a constraint indicates how much the objective value would change with a 1 unit relaxation of the RHS.   If the limit  on this equation changed from 0 to 1, you would be able to use one more barrel (or tonne or m3 – whatever your model primary quantity unit is) of the stream than you actually had and this is how much the value of the solution would increase.   Mathematically this value derives from the sum of the incentives on the variables in the equation that would be able to change their activity if the RHS were changed.  However, if we are thinking about the physical world I find it useful to think of it as “the money I could make if someone walked up to the refinery gate and delivered a barrel full of X to use however I wanted.” 
 
My goal is to make as much money as possible out of this freebie, but I have to respect the limitations of the ongoing operations – represented by the rest of the solution to the model.  Consider, for example, the marginal value on a final product that is worth selling.
 
37 MVequalsPriceNew3
 
If there is no constraint on the sales option, then the marginal value is equal to the sales price.  You give it to me and I sell it.  Simple.
 
But suppose that the amount sold is already at maximum.  I can’t just sell my free extra barrel, so I have to look for other options.  What is the next best thing to do?  If there is a secondary market, then the free barrel could be sold through that channel, and the marginal value will be equal to that lower price.  
37 MVequals2nd
If that secondary market is at another location then the marginal value will be equal to the price at that location, less the cost of getting it there. 
37 MVequalsPriceTranCost
So the transport cost must be $0.50/BBL.  Note that the marginal value of the stream at the second location is still equal to its price.  If you were given the free barrel there, rather than at the refinery, then you would be able to sell it without paying to move it.

If I have no other profitable direct disposals, however, then the next best thing will be to substitute the free barrel of product for one that was blended.  That recovers the components to do something else with.    In this case the components could be diverted to the premium gasoline product, as that sale is not hitting a limit – but the marginal value will not be equal to the premium price.
37 MVwhenNoAltDisposal
The marginal value is considerably lower than the price of either product.   I’m no longer earning a whole extra barrel’s worth of revenue.  Now my free gasoline is worth at most the delta between the cost of making that last barrel of regular and the premium sale price.  
 
The connection between the premium price and the marginal value for regular can easily be demonstrated.  Raise the premium price and the marginal value on the regular goes up as well. 
37 MVPremiumUp
However, there isn't a one-to-one switch between the two grades.  Some additional components must be added to raise the octane, and this will have a cost, or some of the low octane components diverted to other uses, reducing the amount sold as premium.
 
If there are no available profitable uses for a component, then the next best thing for it may be backing out unit throughputs to save processing costs, diverting feeds to other uses, and so on, possibly back to reducing feed purchases.   In this sort of situation, the marginal value is effectively a reflection of the cost of producing the last barrel of product. 
37 MVBothLimited
This is also why in an unconstrained sale opportunity the quantity sold balances at the point where the marginal value equals the sales price.   If it cost less than that to make it, you would sell more, and if it cost more than that to make it, you would sell less.
 
Clearly, the marginal values on a stream depend on both the prices in the model and the constraints that are limiting in the solution.  If you have forced an activity to a certain level, for example, or added a feasibility purchase or sale, then you must bear these in mind when interpreting a marginal value.

The same sort of analysis can be applied to the crudes that you purchase and the intermediate streams that pass between units and become blend components.   How well do you understand the next best options in your planning problem?   Try predicting where a free bit of something should go, then give it to the model and see if you were right.  
 
 
 Thanks to Doug Keene, Fábio Oliveira, Nuno Braz and Pedro Alves for their questions about stream MVs
 

From Kathy's Desk, 20th June 2018.

and the pictures updated to be in focus 5th May 2019

 

Comments and suggestions gratefully received via the usual e-mail addresses or here.
You may also use this form to ask to be added to the distribution list so that you are notified via e-mail when new articles are posted.