Putting the spread inside the problem
Ravensworth's plan was computed from one demand figure per product and then measured against many. That ordering is the thing to change. The three formulations below all move the uncertainty inside the statement, so the plan is chosen knowing that demand varies. None of them removes the variation, and none of them produces a plan that is good in every week, because there is only ever one plan and there are many weeks.
★ What you walk out with tonight. Three formulations you can tell apart in a meeting and say what each one takes in. The trade stated plainly and then measured by hand in the page: a better 5th percentile costs you mean. The exact list of things you would have to measure before any of this could be solved for Ravensworth. And a clear sight of the assumption that carries the most weight and gets the least scrutiny, which is the set of futures you decided to protect against.
LiveWhy one more solve does not make the problem go away4 min▶
It is easy to hear "stochastic optimisation" as the fix for what session 7 found, and it is not. The mill still commits one production plan on Monday and then lives through one week. Writing the distribution into the problem changes which single plan you get and it cannot change the fact that a single plan faces many futures. The shortfall against a figure computed at the average does not vanish; the plan is simply chosen with the shortfall in view instead of in ignorance of it.
What actually changes is the objective you are optimising. At the moment the objective is profit in one imagined average week. It can become expected profit across the whole distribution, or profit in the worst week of some set, or profit subject to a promise about how often the plan works. Those are three different numbers and they pick three different plans.
Notice what does not change at all. The mill still has 131 milling hours, 77 blending hours and 29 tonnes of premium protein, and every formulation below is still subject to those. Uncertainty here is on the demand side. Uncertain capacity is a different and harder problem, because then feasibility itself becomes a question of chance.
Self-studyThe words, and what each one commits you to4 min▶
- Scenario. One complete set of values for the uncertain inputs. A draw from session 7 is a scenario.
- Expected value formulation. Maximise the average objective across many scenarios, all of them in the problem at once. Commits you to a probability for every scenario.
- Two-stage problem. Some decisions are made before the uncertainty resolves and some after. Ravensworth's production is a first-stage decision; nothing here is second stage.
- Uncertainty set. The collection of futures a robust formulation promises to survive. Commits you to a boundary: inside it you are protected, outside it you are not.
- Robust formulation. Maximise the worst objective over the uncertainty set. Commits you to the set, and pays for the protection in average performance.
- Price of robustness. The average performance given up to buy that worst-case floor. Always positive unless the set is trivial.
- Chance constraint. A requirement that a condition hold in at least a stated fraction of futures. Commits you to naming the fraction.
- Conservatism. How wide the set or how high the fraction. The dial that turns a formulation from useless to paralysing, and it is set by a person.
Three questions, three different plans
15 min liveSide by side, with the deterministic version kept on the left for comparison. Read across the rows rather than down the columns: what each one wants from you, what it gives back, what it buys and what it costs. The row that decides most arguments is the last one, and it is the row that tends to be missing when one of these is proposed.
LiveExpected value is still one plan for many futures4 min▶
This is the honest limit and it deserves saying before anyone gets attached to the idea. Put five hundred scenarios in the problem, weight them, maximise the average, and what comes back is one vector of tonnages. It is a better-informed vector than the one computed at the mean, because it knows that light weeks exist and that tonnes made in a light week earn nothing. It is still a single commitment facing a distribution.
There is a second thing worth being clear about. Maximising an average is a statement that you are indifferent between a steady plan and a volatile one with the same mean. If that is not true of the business, the expected value formulation is optimising the wrong thing, and it will do so very competently.
The case where a two-stage version genuinely changes the picture is when some decision can wait. If the mill could hold part of its protein unallocated and blend late, that later decision is second stage, it is allowed to see the week, and the value of having it is exactly the sort of thing a stochastic formulation is good at pricing. Ravensworth as written has no second stage, so the plan is one commitment and nothing else.
LiveWhat a chance constraint actually promises4 min▶
"Feasible in 95 percent of weeks" sounds like a guarantee and is a statement about a model of the weeks. It is only as good as the distribution it was computed against, and it says nothing whatever about the other 5 percent. A plan that fails gently in one week in twenty and a plan that fails catastrophically in one week in twenty satisfy the same chance constraint.
That is why the fraction is rarely the interesting question. The interesting question is what happens on the wrong side of it, and answering that means going back to a simulation and reading the tail rather than the threshold. A chance constraint is a good way to write a service promise into a model and a poor way to think about risk on its own.
Self-studyWhat you would have to measure before any of this could be solved here5 min▶
Nothing above has been solved for Ravensworth, and the reason is that the inputs each formulation needs do not exist for the mill. The list is short and worth writing out, because it is the same list every time somebody proposes one of these.
- A demand distribution somebody will defend. Not just a mean and a spread but the shape, fitted to a stated number of weeks of order history, with a view on whether it is stable across the season.
- Whether the products move together. Two independent demands and two demands that rise and fall with the same customer give very different tails, and the difference is larger than most people expect.
- A scenario set and its probabilities, for the expected value version. Sampling from the fitted distribution is the usual route, and then the number of scenarios is a convergence question of exactly the kind session 7 measured.
- An uncertainty set, for the robust version. A boundary in demand space, with somebody prepared to say what is inside it and what is deliberately outside.
- A fraction, for the chance-constrained version, named by whoever owns the consequence rather than by whoever writes the model.
- What a bad week actually breaks. Until that is written down, there is no basis for choosing how much mean to spend, and the conservatism dial gets set by temperament.
Every item on that list is a measurement or a decision, and none of them is a solver feature. That is the honest state of the problem, and it is a more useful thing to hand a client than a plan computed from assumed inputs.
You are buying a floor, and the price is the average
12 min liveThe trade underneath all three formulations is the same one and it can be stated without any mathematics: a plan that does better in the bad weeks does worse in the ordinary ones. Session 7 measured one point on that trade, the plan Ravensworth actually has. Everything else is direction, and tonight it gets found by hand rather than quoted.
...
LiveWhat the grid search is and is not4 min▶
Press the button and the page walks every whole-tonne plan in a range, checks it against the three capacity rows, simulates the feasible ones, and reports the best few by average and the best few by 5th percentile. They are different plans, which is the trade made visible with no formulation at all.
It is worth being exact about what that is. It is enumeration, and it works here only because Ravensworth has two active products and whole tonnes, so the grid has a few hundred entries. Add a third active product and it has tens of thousands; add a week-by-week horizon and it stops being possible. A stochastic or robust formulation is what you reach for when you can no longer afford to look at every plan, and its job is to get the same answer without the enumeration.
It is also not a robust solution in the technical sense. Nothing here maximises a worst case over a declared set. It samples one distribution, at a stated seed and draw count, and reads a percentile off it, which is a different object and a weaker promise.
LiveLook for ties in the bad-week column3 min▶
In the results, several different plans often share exactly the same 5th percentile. That is not a rounding artefact and it is worth a minute. If the draw sitting at that percentile is one where demand came in below the plan on both products, then everything the mill made was surplus to that week, what got sold was the demand itself, and the profit for that draw does not depend on the plan at all.
The consequence is useful and slightly deflating: over part of the range, raising production does not move the bad week. The tail is being set by the demand draw rather than by the decision, and no amount of extra production buys anything there. Knowing which part of a distribution your decision can actually reach is worth more than the percentile itself.
LiveWhy the box is usually too pessimistic3 min▶
A box is the easiest set to write and the easiest to defend line by line, because each product gets its own honest range. The trouble is what it implies jointly. It says that every product can sit at its worst value in the same week, and if there are three products with independent demand, the corner it protects against is a week nobody has ever seen.
The ellipse and the budget set are both attempts to fix that by limiting how many things may go wrong at once. Both are more realistic and both introduce a new dial that somebody has to set. There is no version of this where the conservatism is derived rather than chosen, and pretending otherwise is the main way robust plans get oversold.
Self-studyWhere serious people disagree5 min▶
The unresolved argument is not about any of the mathematics above. It is whether a business should plan for the worst plausible week or the average one, and it is decided by facts about the business rather than by the model.
One camp plans for the average and holds its nerve. A mill runs fifty-odd weeks a year; good and bad both turn up, and what accumulates is the average. Every pound of mean given up to protect a 5th percentile is given up in all fifty-odd weeks, most of which were never going to be bad. On this view robustness is an insurance premium paid continuously against an event that is survivable, and the discipline is to stop buying it.
The other camp says the business does not experience the average, it experiences weeks, and weeks are where things break. Three bad ones in a quarter can breach a covenant, empty a cash buffer or lose a customer, and a strong August repays none of that. On this view the mean is the right number only for a firm with enough balance sheet to be indifferent to sequence, and the floor is what should be optimised.
Both positions are held by people who run real operations and neither is a misunderstanding of the other. What settles it in a particular case is a small number of facts nobody usually writes down: how much buffer exists, whether bad weeks cluster, and what precisely a bad week breaks. Notice that the argument is about the business and not the formulation, and that a robust model does not resolve it, it just moves the same judgement into the width of a set.
Find the trade by hand, then price it
15 min hands onSix steps, using the live box above and a page console. The aim is to leave able to describe all three formulations from memory, and able to say out loud what you would need before promising any of them to a client.
Confirm the point on the curve
Leave the plan at 33 and 63 and read the measured mean and 5th percentile. Check them against the diagram. This is the only point on the trade with numbers behind it, and everything below moves away from it.
Run the grid and compare the two winners
Press the search button. Write down the best plan by mean and the best plan by 5th percentile, and how far apart they are in tonnes. Then write down what each one gives up to the other, as money a week.
Say the trade in one sentence with a price on it
"Giving up X a week on the average buys Y a week on the bad week." Fill in both numbers from your own run, with the draw count and seed attached. Then decide, out loud, whether you would sign that trade for Ravensworth and say what fact made you decide.
Draw your own uncertainty set
On paper, over Standard demand and Dairy demand, draw the boundary you would actually defend to a plant manager. Mark the worst corner or point of it. Then say what week you have just declared yourself willing to lose money in, because that is the other half of drawing the boundary.
Hunt for the ties
In the search results, find two plans with the same 5th percentile and different means. Work out why the bad week is identical, and say in one sentence what that tells you about the range over which production can move the tail at all.
Write the honest handover
One short paragraph you would send to somebody asking for a robust plan: what you can say today, what you would have to measure first, and which item on that list is a decision rather than a measurement. Session 9 turns the attention onto the solver itself.
The habit to keep. When somebody proposes a robust or stochastic formulation, ask for three things before the maths: the distribution and what it was fitted to, the set or the fraction and who chose it, and what a bad week breaks. If those are not available, the honest deliverable is a measured trade and a list, not a plan.
Three questions
A colleague says moving to an expected value formulation will fix the shortfall session 7 measured. What is wrong with that?
The mill commits once and lives through one week. Putting the distribution inside the problem improves the choice; it cannot make one vector of tonnages good in every week. It also assumes indifference between a steady plan and a volatile one with the same mean.
What does a robust formulation cost, and why is it unavoidable?
The plan optimised for the worst point of a set is not the plan optimised for the centre of it. Unless the set is trivial those are different plans, so the floor is bought with mean. That price is called the price of robustness and it is always there.
Two teams are given identical demand data and produce robust plans that differ substantially. What is the most likely explanation?
The set is an input, and it is chosen rather than measured. Two defensible boundaries over the same data put the worst case in different places, so they produce different plans and different prices of robustness. Asking to see the set is the first question about any robust plan.
Homework
Thirty minutes, most of it on one decision your own operation already makes under uncertainty.
Write the three formulations for your own problem
Pick a recurring commitment made before the facts are known. Write one paragraph each: the inputs an expected value version would need, the set a robust version would need, and the fraction a chance-constrained version would need. Mark every item you could not supply today.
Ask what a bad one breaks
Find the person who owns the consequence and ask them what happens in the worst month they can remember, specifically. Bring the answer. It is the fact that decides where on the trade curve the business should sit, and it is almost never in any model. Session 9 asks a different question entirely: whether the solver producing all these numbers is correct.