A stock level at the depot and one at each storeroom, for every item. Nine items and four storerooms is forty-five numbers, competing for the same money. Minimize the total expected backorders at the storerooms,
\[ \mathit{EBO} = \sum_{\text{items}}\;\sum_{j=1}^{J}\bar{B}_j(S_j) \qquad\text{subject to}\qquad \sum_{\text{items}}\Big(c_0S_0 + \sum_{j=1}^{J}c_jS_j\Big) \le \text{budget} \]
where \(c_j\) and \(c_0\) represent the item’s unit cost at storeroom \(j\) and at the depot.
Notice what the objective leaves out
No crew waits at a depot, so a depot backorder costs nothing directly. It costs by lengthening \(\bar{W}\), which inflates every storeroom’s pipeline. Depot stock is valued entirely for what it does elsewhere, which is what makes this one multi-echelon problem rather than five separate ones.
For each item and location, the delta value is what the next unit buys per dollar. Recall that the next unit removes \(G^{0}(S)\) backorders:
\[ \delta(S) = \frac{\bar{B}(S) - \bar{B}(S+1)}{c} = \frac{G^{0}(S)}{c} \]
Buy repeatedly, each time taking the candidate with the largest delta value, until the budget runs out. The earliest published reference is Gross (1956); Sherbrooke calls it “the increase in system effectiveness per dollar,” and notes that calling it the greedy heuristic is “hardly an improvement.”
It works only if delta values decline as you buy. At one location they do: \(G^{0}\) is nonincreasing, so \(\bar{B}\) is convex, and a sum of convex functions is convex.
Were that not so, a one-step look would undervalue an item whose next two units together are worth more than the first alone, and other items would be bought prematurely.
Fix the depot and vary a storeroom: convex. But moving the depot moves every storeroom’s pipeline at once, and across the best splits there is no assurance of convexity.
| Units | \(S_0\) | At storerooms | \(\mathit{EBO}\) | Reduction |
|---|---|---|---|---|
| 10 | 10 | 0 | 18.6080 | 0.9967 |
| 11 | 11 | 0 | 17.6154 | 0.9927 |
| 12 | 12 | 0 | 16.6303 | 0.9850 |
| 13 | 9 | 4 | 15.6433 | 0.9870 |
| 14 | 10 | 4 | 14.6587 | 0.9846 |
| ⋮ | ||||
| 19 | 15 | 4 | 9.9647 | 0.8842 |
| 20 | 12 | 8 | 9.1088 | 0.8559 |
| 21 | 13 | 8 | 8.2462 | 0.8627 |
The best split of each total, by VARI-METRIC. Read the Reduction column: where does it rise, and which plan is the bad one?
It rises at 13 and at 21. So totals 12 and 20 lie above the line through their neighbors:
\[ \frac{17.6154 + 15.6433}{2} = 16.6294 < 16.6303 \]
Plan 12 is never worth buying.
Each row of the last table is the smallest entry of a comparison like this one.
| \(S_0\) | Forward | \(\mathit{EBO}\) |
|---|---|---|
| 13 | 0 | 15.6584 |
| 12 | 1 | 15.6519 |
| 11 | 2 | 15.6485 |
| 10 | 3 | 15.6461 |
| 9 | 4 | 15.6433 |
| 8 | 5 | 15.6744 |
No forward stock. A storeroom holding nothing owes its whole pipeline, so \(\mathit{EBO} = 4(1.9726) + \bar{B}_0(S_0) = 7.8904 + G^{1}(13) = 7.8904 + 7.7680 = 15.6584\).
Nine at the depot, one at each storeroom. \(\bar{B}_0(9) = 11.7143\) and \(\mathit{Var}[B_0] = 20.6612\):
\[ \begin{aligned} \mu_j &= 1.9726 + 0.25(11.7143) = 4.9012\\ \sigma_j^{2} &= 1.9726 + (0.25)(0.75)(11.7143) + (0.25)^{2}(20.6612) = 5.4604\\ p &= 4.9012/5.4604 = 0.8976, \quad r = 42.959, \quad g(0) = p^{r} = 0.0096\\ \bar{B}_j(1) &= \mu_j - G^{0}(0) = 4.9012 - 0.9904 = 3.9108 \end{aligned} \]
Four storerooms owe \(4(3.9108) = 15.6433\).
Convexification. Strike out 12 and 20. The procedure moves from 11 straight to 13 and from 19 straight to 21, buying two at a time and quoting the average of the two reductions as its delta value.
| Units bought | 10 | 11 | 12 | 13 | … | 19 | 20 | 21 |
|---|---|---|---|---|---|---|---|---|
| Best \(S_0\) | 10 | 11 | 12 | 9 | 15 | 12 | 13 |
Flushout. The best depot stock falls as the total rises. Going from twelve transformers to thirteen, the depot drops from twelve to nine and four appear at the storerooms. Sherbrooke’s name: depot stock is flushed out to the bases.
Why. A depot unit buys \(G^{0}(S_0)/\lambda_0\) off the delay, shared by four storerooms. While the depot is nearly empty that delay is enormous and pooling dominates; once it is comfortable, a unit does more on the shelf a crew can reach.
The model answers the positioning question as a function of the budget: not “forward stocked?” but “forward stocked at what total investment?”, and not monotonically.
Items combine by the same rule, with reductions divided by unit cost. The utility also stocks a voltage regulator: $9,500, 12 failures a year per storeroom, a fifth rebuilt locally in 45 days, depot repair 90 days, shipment 10 days.
| Step | Bought | \(\delta\) per $1,000 | Spend | \(\mathit{EBO}\), transformer | \(\mathit{EBO}\), regulator |
|---|---|---|---|---|---|
| 1 | transformer | 0.2632 | $3,800 | 27.6027 | 11.7041 |
| 12 | transformer, two | 0.2595 | $49,400 | 15.6433 | 11.7041 |
| 19 | transformer, two | 0.2261 | $79,800 | 8.2462 | 11.7041 |
| 28 | transformer | 0.1148 | $114,000 | 2.5852 | 11.7041 |
| 29 | regulator | 0.1053 | $123,500 | 2.5852 | 10.7042 |
| 41 | regulator | 0.0734 | $214,700 | 1.3122 | 3.5973 |
The delta column never rises: that is what convexification bought. Steps 12 and 19 jump the struck-out totals.
No regulator until $114,000 has gone into transformers. Each first unit removes one whole backorder, so the transformer, at less than half the price, removes about a quarter of a backorder per thousand dollars against a tenth. It stays ahead because it fails nearly four times as often.
\[ \begin{aligned} \mathit{EBO} &= 7.8904 + G^{1}(0) = 7.8904 + 20.7123 = 28.6027 &&\text{the transformer with no stock anywhere}\\ \delta_{1} &= \frac{G^{0}(0)}{3{,}800} = \frac{1.0000}{3{,}800} = 0.2632 \text{ per } \$1{,}000 &&\text{step 1: the first unit, at the depot}\\ \delta_{12} &= \frac{17.6154 - 15.6433}{2 \times 3{,}800} = \frac{1.9721}{7{,}600} = 0.2595 \text{ per } \$1{,}000 &&\text{step 12: two units, over total 12}\\ \delta_{29} &= \frac{0.9999}{9{,}500} = 0.1053 \text{ per } \$1{,}000 &&\text{step 29: the regulator's first unit} \end{aligned} \]
A jump over a struck-out total buys two units, so its reduction is the fall across both and its cost is two units. That average is what keeps the delta column from rising.
Step 1, each item’s curve. For \(S_0 = 0, 1, 2, \ldots\): the depot delay by VARI-METRIC; then for \(n = 0, 1, 2, \ldots\) units at the storerooms, spread by marginal analysis, record \(\mathit{EBO}(S_0, n)\).
Step 2, best split, convexified. For each total \(T = S_0 + n\) keep the least \(\mathit{EBO}\); drop every total whose reduction is exceeded by the next one.
Step 3, delta values on what survives: drop in \(\mathit{EBO}\) per dollar.
Step 4, merge the items. While the next buy fits the budget, buy the item whose next delta is largest. Return the levels, and \(\mathit{EBO}\) against cost.
Every step of the merge is an efficient plan for the money spent so far, so the output is the whole schedule of backorders against budget.
That is more useful than one plan: a utility can ask whether the step from $114,000 to $123,500 is worth it, which it can answer and the model cannot.
The last buy can overshoot badly if it is an expensive unit. Take the levels reached as minimums and rerun.
Let \(\theta\) represent a charge per dollar held, and minimize
\[ w(\theta) = \sum_j \bar{B}_j(S_j) + \theta\Big(c_0S_0 + \sum_j c_jS_j\Big) \]
At a fixed \(\theta\) the storerooms no longer compete, and each solves a newsvendor: buy while the chance of needing the next unit exceeds its price,
\[ S_j = \min\left\{S : G(S) \ge 1 - \theta c_j\right\} \]
The depot still needs a search, because moving it moves every storeroom.
The multiplier’s scale is set by the unit cost
A storeroom stocks nothing once \(\theta \ge 1/c_j\), so the useful range is \((0, 1/c_j)\): for a $3,800 transformer, \(2.6 \times 10^{-4}\). Search far above it and the algorithm reports, correctly and uselessly, that no root exists.
Both items, a budget of $250,000:
| Search | Spend | Storeroom backorders | Depot, transformer | Inside budget |
|---|---|---|---|---|
| Marginal analysis | $247,000 | 2.8792 | 19 | yes |
| Lagrangian, bisection | $247,000 | 2.8792 | 19 | yes |
| Lagrangian, enumeration | $250,800 | 2.6840 | 20 | no, by $800 |
Stock levels are integers, so cost is a step function of \(\theta\): at \(5.1356 \times 10^{-5}\) the plan costs $250,800, at \(5.1361 \times 10^{-5}\) it costs $247,000. No multiplier spends exactly $250,000, so a search must choose a side.
Bisection returns the side that satisfies the constraint. Enumeration keeps the smallest absolute gap, and $800 over is closer than $3,000 under.
A planner who must not overspend wants bisection or marginal analysis. One asking what the budget nearly buys learns from the enumeration that $800 more removes another 0.2 backorders. Never read the enumeration’s answer as respecting the budget.
| If the question is … | Use | Sheet | Code |
|---|---|---|---|
| how to spend a budget across items and locations | Allocation | Allocate |
MarginalAnalysisAlgorithm |
| what a given plan delivers, quoted to someone | VARI-METRIC | Storeroom |
VariMetricModel |
| what a given plan delivers, as a first estimate | METRIC | Depot, Storeroom |
VMItem |
| whether the approximations hold for this system | Simulation | none | inventory.simulation |
Read from the top and stop at the first row that fits. Notice that METRIC sits below VARI-METRIC.
The utility’s transformer plan: METRIC gives 0.4055 backorders per storeroom and VARI-METRIC 0.4815, because the depot’s backorders vary.
Chapter10Models.xlsx, ordered the way the chapter solves: Depot, then Storeroom, then Allocate, plus Ledger.
Depot. One row per unit of pipeline. \(G\) from POISSON.DIST, \(G^{0}\) its complement, \(G^{1}\) the recursion filled down. The fourth column is the one VARI-METRIC adds, the second-moment recursion:
E24: =$B$13+$B$13^2
E25: =E24-D25-D24
The stock level is the only decision typed; \(\bar{B}_0\) and \(\mathit{Var}[B_0]\) read out by INDEX.
Storeroom. METRIC closes in one cell, since \(G^{1}(s) = \mu(1 - F(s-1)) - s(1 - F(s))\) for a Poisson.
VARI-METRIC does not: the fitted \(r = 14.3674\) is not an integer and NEGBINOM.DIST truncates it, quietly computing the wrong distribution. The sheet builds the mass function by its own recursion,
\[ g(0) = p^{r}, \qquad g(x) = g(x-1)\,\frac{r+x-1}{x}(1-p) \]
and one cell holds the on-hand identity, which must read zero.
The Storeroom sheet at the chapter’s plan. Notice the ratio of the two backorder figures, 1.1875: VARI-METRIC reports about nineteen percent more on a plan neither model changed.
Notice the residual at the bottom, which reads zero to ten places. That is the reason to trust the nineteen percent: both models satisfy the same identity, so the difference is in the tail, not in the bookkeeping.
Allocate lays the search flat: one row per total, one column per split. Read the best \(S_0\) column down: it climbs to 11 and drops to 8 at total 12, one unit earlier than the VARI-METRIC table, because the sheet runs METRIC.
The convexity flag looks forward:
M9: =IF(OR(L9="",L10=""),"",
IF(L10>L9,"drop",""))
Ledger dots the level column with a weeks-held column, =SUMPRODUCT(G5:G23,K5:K23), so the wrong average is harder to write.
The depot shop offers, for a fee, to hold transformer turnaround at 45 days instead of 60. The plan is \(S_0 = 16\), \(S_j = 4\). On Depot, type 45 into B10, one number on a sheet that never mentions a storeroom. What happens to the storerooms?
| Cell | What it is | Before | After |
|---|---|---|---|
Depot!B13 |
\(\mu_0\) | 20.7123 | 15.5342 |
Depot!B17 |
\(\bar{B}_0\) | 5.0201 | 1.3500 |
Depot!B20 |
\(\bar{W}\), days | 14.54 | 3.91 |
Storeroom!B22 |
\(\mu_j\) | 3.2276 | 2.3101 |
Storeroom!B34 |
\(\bar{B}_j\) | 0.4815 | 0.1523 |
Across four storerooms, 1.9259 falls to 0.6091: 68%. A quarter cut in repair time removed two thirds of the waiting, because the delay divides a backorder level that is itself falling steeply.
The check. \(1.3500/126 = 0.010714\) years, which is 3.91 days, as B20 reports.
Put 60 back, and buy the reduction instead by raising the depot stock:
Depot!B16 |
16 | 18 | 20 | 21 | 22 |
|---|---|---|---|---|---|
Depot!B20, days |
14.54 | 9.98 | 6.30 | 4.84 | 3.64 |
Storeroom!B34 |
0.4815 | 0.3280 | 0.2199 | 0.1807 | 0.1501 |
Six more depot transformers do what the contract does. At the carrying charge of 0.25 a year,
\[ 6 \times 0.25 \times \$3{,}800 = \$5{,}700 \text{ a year} \]
so the contract is worth up to $5,700 a year. A shop asking $4,000 should be taken; one asking $9,000 should be refused and the money spent on stock.
Where should the six go?
Allocate at a total of 38 says 18 at the depot and 5 per storeroom, not 22 and 4. It runs METRIC; judged by VARI-METRIC, 18-and-5 gives 0.6157 against 0.6005, about 2.5% worse, in the direction METRIC’s error predicts.
val item = VMItem(itemNumber = 1, stockLevel = 16,
cost = 3800.0, leadTime = days(60.0))
repeat(4) {
item.addBaseItem(demandRate = 45.0,
repairTime = days(30.0), repairProb = 0.3,
shipTime = days(10.0), stockLevel = 4,
cost = 3800.0)
}
item.usesMetric = false // VARI-METRIC
println(item.report().toText())Each name is a symbol: leadTime is \(T_0\), demandRate \(\lambda_j\), repairTime \(T_j\), repairProb \(\phi_j\), shipTime \(O_j\), stockLevel \(S_j\). Times are years; days converts at the call site.
location | S | mu | Var | Bbar | Ibar | Wbar (days)
-------------+----+---------+---------+--------+--------+-------------
depot | 16 | 20.7123 | 20.7123 | 5.0201 | 0.3078 | 14.5424
storeroom 1 | 4 | 3.2276 | 3.9527 | 0.4815 | 1.2539 |
Storerooms 2 to 4 print the same row. Set usesMetric = true and Var falls to 3.2276 while mu stays: no mean changes. curveReport(10..21) prints the efficient curve with totals 12 and 20 marked kept = false.
The report gives the depot’s delay as 14.5424 days, from \(\bar{B}_0 = 5.0201\). Each storeroom sends up \(\lambda_j(1 - \phi_j) = 45(0.7)\) a year. Check the delay.
By Little’s law the delay is the depot’s backorders over its arrival rate:
\[ \lambda_0 = 4(45)(0.7) = 126 \text{ a year}, \qquad \bar{W} = \frac{\bar{B}_0}{\lambda_0} = \frac{5.0201}{126} = 0.039842 \text{ year} = 14.54 \text{ days} \]
Marginal analysis buys by delta value, \(G^{0}(S)/c\), and needs convexity.
Two echelons break it. Convexification strikes out totals 12 and 20, and the depot’s stock falls as the budget rises: flushout, the positioning answer as a function of money.
Across items, the transformer is bought first for $114,000, on arithmetic, not unit price.
The sheets price a contract: six depot units, $5,700 a year, is what a 45-day turnaround is worth.
A priced budget lands on either side of the limit: bisection respects it, and enumeration may overspend by $800 for 0.2 fewer backorders.
The software reports each location in the chapter’s symbols, and the depot’s 14.54-day delay checks by Little’s law.
The chapter in one line. The depot’s wait couples the levels; Palm, Little and a second moment compute it; marginal analysis spends against it.
Read before next session: the opening of Multi-Echelon Systems with Batch Ordering, What Batching Changes and The Item and the Network.
Today’s material was Spending a Budget Across Items, Building These Models in a Worksheet and Using the Software.
Next session:
Every simplification of this chapter rested on \(Q = 1\). Next chapter gives it up.