In short: The monthly plan and the daily schedule are different objects, because the plan is a linear program producing rates and averages while the plant runs in batches, tanks and hours. Component tank capacity is the constraint the plan cannot see, and it is what pushes the scheduler away from the planned recipe. The pooling problem is a specific non-convexity in blending that most people in the industry have met without knowing it has a name. Quality giveaway is the clearest place where scheduling constraints turn into cash, and it can be sized per day rather than argued about.
The monthly plan says the reformer runs at 42,000 barrels a day at 98 research octane severity, and the gasoline blend recipe uses 18 percent reformate. The scheduler is running 39,500 with a two-day dip to 34,000 because a component tank ran low, and the blend that went out on the fourteenth carried 0.4 octane above specification because there was no time to re-certify a tighter recipe before the vessel's laycan closed.
At the end of the month the planning economics show a margin, the actual accounts show a smaller one, and the variance report attributes the difference to price and to operations. Some of it is really the difference between a plan built in averages and a plant that runs in batches, tanks and hours.
The plan and the schedule are different objects
The monthly or multi-period plan is a linear program over aggregate periods. It decides run rates, unit severities, purchase and sale volumes and broad recipe structure, and it optimises margin against a set of prices. Its outputs are rates and averages.
The schedule is a different animal. It decides which tank feeds which unit on which day, when a blend runs and into which tank, when a vessel loads, when a line is switched and what interface material that switch creates. Its variables include discrete decisions: a blend either runs or does not, a tank is either receiving or delivering, a unit is either on this feed or that one. Discrete decisions make it a mixed integer problem, and the quality constraints make parts of it non-convex.
Pinto, Joly and Moro laid out both layers and the interface between them in Computers and Chemical Engineering in 2000, and the structural point has held: the plan and the schedule cannot simply be the same model at different time resolutions, because the constraints that bind at the daily level do not exist as objects in the monthly one.
The consequence is that a plan can be optimal and unschedulable. Nothing in the monthly LP prevents it from specifying a set of rates that would require a tank to be simultaneously filling and emptying, or a blend component to be available before the unit that makes it has run.
What the monthly plan assumes about a month
Four assumptions do most of the damage, and each is visible once you go looking.
Rates are continuous and constant. The plan runs a unit at 42,000 for the month. The plant runs it at 44,000 for eleven days, 38,000 for six while a heat exchanger fouls, and takes it down for two. The average matches and the yields do not, because unit yields are non-linear in rate and severity, so the yield at the average rate differs from the average of the yields.
Inventory is a period-end number. The plan carries opening and closing stock by product. It has no representation of the level in any tank on any given day, so it cannot know that the closing position was reached by way of a tank that was full on the ninth.
Everything is available when needed. Component streams, tank space and jetty access are all implicitly available. The plan does not model the jetty queue, which is its own problem covered in N18, or the tank turnover that governs whether a component can be received at all.
Quality blends linearly. Most planning models use linear or index-based blending for octane, vapour pressure, viscosity and cloud point. Several of these blend non-linearly in reality, and the error is largest exactly at the recipe edges where an optimiser likes to sit.
None of that makes the plan useless. It makes the plan a statement about direction and economics rather than a set of instructions, and treating it as instructions is what produces the monthly argument between planning and operations.
Tanks are the constraint the plan cannot see
Run the arithmetic on a single component tank and the coupling becomes obvious.
A gasoline blender produces 30,000 barrels a day of finished product, and one component makes up 20 percent of the recipe, so the draw is 6,000 barrels a day. The component tank holds 40,000 barrels nominal, with a heel and an ullage allowance leaving 32,000 usable. That is 5.3 days of cover, and only if the tank starts full.
Now the tank has to be refilled by the unit that produces the component, which is running at a rate the plan set for other reasons, and it cannot receive while it is settling or while it is being sampled for certification. Sampling and certification of a blend component commonly takes hours during which the tank is in neither service, and a tank in a settling cycle is capacity that exists on the tank list and not on the day.
Multiply that across fifteen component tanks, three product graders and a crude tank farm with its own segregation rules, and you have the actual constraint set. It is why schedulers spend their time on tank line-ups rather than on economics, and why a plan handed down as a set of rates gets translated rather than executed.
The practical implication is that any scheduling model worth building has to represent tanks explicitly as state variables with levels, quality and service status, over a time grid fine enough to capture a settling cycle. That is a considerably larger model than the plan, over a shorter horizon, which is the standard shape.
The pooling problem, and why the recursion lands where it started
There is a specific mathematical trap in refinery blending that everyone in the industry has run into without necessarily knowing it has a name.
When streams of different quality mix in a common tank and the pooled material then feeds several products with different quality limits, the constraints involve a flow multiplied by a quality, and products of variables make the problem bilinear and non-convex. Haverly published the canonical counterexample in the ACM SIGMAP Bulletin in 1978, showing that the successive linear programming approach used in commercial planning systems, where you guess the pool quality, solve a linear problem, update the pool quality from the solution and repeat, converges to a point that depends on the starting guess and can be strictly worse than the true optimum.
The reason this matters operationally is that recursion is still how many systems solve it, and the failure is silent. The model reports convergence, the solution satisfies every constraint, and there is no diagnostic saying that a different starting point would have produced a better answer.
Two defences are cheap. Solve from several starting points and compare the objective values; if they differ, you have a non-convexity and the best of them is a lower bound rather than an answer. And check whether your solver offers a global method for the bilinear terms, since the pooling problem has had substantial algorithmic attention and modern global solvers handle instances of realistic size.
The economics of which crudes to buy and how they blend is a separate decision with its own treatment in N6. The point here is narrower: even with the crude slate fixed, the scheduling model's arithmetic can quietly give up value.
Giveaway is a scheduling cost with a price per day
Quality giveaway is the clearest place where scheduling constraints turn into cash, and it is straightforward to size.
A gasoline blend targeting 95.0 research octane will be aimed at 95.4 if the scheduler cannot re-blend before the vessel loads, because the cost of a failed certification is a cargo that cannot ship. That 0.4 octane is given away on every barrel.
Take 30,000 barrels a day of that grade and an octane value of 0.40 per barrel per octane number, and substitute your own from your component economics. The giveaway is 4,800 a day, or roughly 1.75 million a year on one grade.
The same applies to sulphur in diesel blended to 8 parts per million against a 10 ppm limit, to vapour pressure aimed low in the shoulder season, and to flash point on jet.
What decides the size of the control margin is scheduling flexibility rather than blending skill. A blender that can run again before the ship arrives can aim closer to the limit. A tank system that allows a certified product tank to be topped and re-certified allows a tighter aim. An online analyser with a validated model against the certifying laboratory method allows a tighter aim again. Each of those is an investment case that can be appraised directly against the giveaway figure computed above, which is the number that usually justifies them and rarely gets computed.
Méndez, Grossmann, Harjunkoski and Kaboré set out a formulation that optimises blending and short-term scheduling together in Computers and Chemical Engineering in 2006, and the reason for solving them jointly is exactly this: the recipe you can afford to aim at depends on the schedule around it.
Reconciling the schedule back to the plan
The reconciliation is where the organisation learns something, and in most refineries it is done as a single margin variance with a narrative attached.
A useful decomposition separates the variance into terms that have different owners.
Price variance, meaning realised prices against planned prices, which belongs to the market rather than to anyone in the building. Volume variance, from throughput above or below plan. Yield variance, from actual unit yields against the planned yield vectors at the rates that were actually run, which requires re-running the yield model at actual conditions rather than comparing to the plan's assumption. Giveaway, computed per grade as above. And schedule infeasibility, meaning value lost because the planned operation could not be executed as specified.
That last category is the one worth creating, because it does not exist in most variance reports and it is the direct measure of the gap this piece is about. Compute it by re-solving the planning model with the schedule's realised constraints imposed, and comparing its objective to the original plan's. The difference is what the plan was promising that the plant could never have delivered.
Run that for six months and a pattern appears. Either the number is small, in which case the planning model is well calibrated to the plant and you can trust it, or it is persistently large in the same place, which tells you exactly which constraint to add to the planning model.
The limit
Scheduling models are the hardest thing in this domain to keep alive. The plant changes: a tank is repurposed, a line is rerouted, a unit gets a revamp, a product specification changes. Every one of those changes the model, and a scheduling model that is three months out of date produces answers the schedulers correctly ignore, at which point it stops being maintained at all. The maintenance burden is the main reason these projects fail, and it is a resourcing question rather than a technical one.
The second limit is the horizon. Detailed scheduling is credible over one to three weeks. Beyond that the arrival dates, the demand and the unit availability are uncertain enough that the discrete decisions are guesses, and the model's precision is misleading. The right structure is a rolling schedule with a frozen near term, a firm middle and a soft tail, re-solved daily.
And there is a measurement limit underneath the reconciliation. Yield accounting depends on meters, tank gauges and laboratory results that do not perfectly close, and the reconciliation of measured flows to a mass balance is its own discipline with its own error bars. A variance analysis that attributes a difference smaller than the measurement uncertainty to a cause is telling a story about noise.
Take last month's blends, compute the average giveaway per grade against specification, multiply by volume and by your component value, and put the annual figure in front of whoever decides on analyser and tankage investment.