Two Levels by Hand, and the Delay the Depot Imposes

Manuel D. Rossetti, PhD P.E.

Agenda

  • A depot and a storeroom run together by hand, one event at a time
  • What the ledger establishes, and how to average a column that is a function of time
  • The depot is a single location, and can be solved first
  • From the depot’s backorders to a wait, by Little’s Law
  • What the depot’s stock does to four storerooms at once

Why a Ledger First

Last session solved a storeroom on the condition that \(\mu_j\) was known, and \(\mu_j\) contains \(\bar{W}_j\), the wait at the depot. Every example set that wait to zero.

The formulas of the second half of today produce \(\bar{W}_j\) in one line. A reader who meets that line first cannot tell whether it is right, or even what it is counting.

You should be able to perform by hand the bookkeeping that the worksheet would otherwise perform for you. So we run a depot and a storeroom together and watch the wait appear as a consequence of the depot being empty.

The System and the Rules

The system diagram with one storeroom. One row per event, at the week it occurs, with the state recorded after the event. Review is continuous: no periods, no buckets.

Stock levels. \(S_j = 2\) at the storeroom, \(S_0 = 2\) at the depot: the whole serviceable population.

Times. Local rebuild \(T_j = 4\) weeks; depot repair \(T_0 = 8\) weeks; shipment \(O_j = 2\) weeks.

Failures. Seven in 26 weeks, in weeks 2, 5, 8, 11, 12, 15 and 17. Those in weeks 5 and 15 are rebuilt locally; the other five go to the depot.

Let \(I_j(t)\), \(B_j(t)\) represent the storeroom’s on-hand and backorders, and \(X_j(t)\) its units in resupply: rebuilds, shipments in transit, and requests the depot has not filled. Let \(I_0(t)\), \(B_0(t)\), \(X_0(t)\) be the same at the depot.

The check on every row, the base-stock identity rearranged:

\[ X_j = S_j - I_j + B_j, \qquad X_0 = S_0 - I_0 + B_0 \]

Weeks 0 to 12: Where the Luck Runs Out

Week Event \(I_j\) \(B_j\) \(X_j\) \(I_0\) \(B_0\) \(X_0\) What happened
0 start 2 0 0 2 0 0 Both locations full
2 failure, request to depot 1 0 1 1 0 1 Depot ships, due wk 4; carcass due wk 10
4 shipment arrives 2 0 0 1 0 1 Shelf back to 2; depot carcass still on the bench
5 failure, rebuilt locally 1 0 1 1 0 1 Local rebuild, back wk 9
8 failure, request to depot 0 0 2 0 0 2 Depot ships its last; carcass due wk 16
9 local rebuild returns 1 0 1 0 0 2 One back on the shelf
10 depot repair completes 1 0 1 1 0 1 Week-2 carcass repaired
10 shipment arrives 2 0 0 1 0 1 Shelf back to 2
11 failure, request to depot 1 0 1 0 0 2 Depot ships its one unit; carcass due wk 19
12 failure, request backordered 0 0 2 0 1 3 Depot has nothing to ship

Weeks 12 to 25: The Backorder Arrives

Week Event \(I_j\) \(B_j\) \(X_j\) \(I_0\) \(B_0\) \(X_0\) What happened
12 (carried from the last slide) 0 0 2 0 1 3 One shipment in transit, one request unassigned
13 shipment arrives 1 0 1 0 1 3 Week-11 shipment; \(B_0\) untouched
15 failure, rebuilt locally 0 0 2 0 1 3 Back wk 19
16 depot repair completes, ships 0 0 2 0 0 2 Straight out: \(B_0\) lasted 4 weeks
17 failure backordered, request backordered 0 1 3 0 1 3 A crew waits. Whose doing? The depot's.
18 shipment arrives, clears the crew 0 0 2 0 1 3 \(B_j\) lasted 1 week
19 depot repair completes, ships 0 0 2 0 0 2 Against week 17: \(B_0\) lasted 2 weeks
19 local rebuild returns 1 0 1 0 0 2 One on the shelf
20 depot repair completes 1 0 1 1 0 1 Depot shelf again
21 shipment arrives 2 0 0 1 0 1 Storeroom full
25 depot repair completes 2 0 0 2 0 0 Back to the start: fixed population

What the Ledger Establishes

The identity held on every row, at both levels. Read \(X_j\) against \(2 - I_j + B_j\) and \(X_0\) against \(2 - I_0 + B_0\): forty checks, forty agreements. That is the only thing standing between a hand ledger and an undetected arithmetic error.

The storeroom was short once, and it was not its own doing. Rerun it with a depot that never makes anyone wait:

  • the week-12 request arrives in week 14 instead of week 18;
  • the shelf holds two transformers from week 14 and one from week 15;
  • the week-17 failure is met from stock.

The storeroom’s only backorder disappears. Its failures, its shop and its stock level never changed. The backorder was manufactured at the depot and delivered.

Averaging a Column That Is a Function of Time

\[ \bar{B}_0 = \frac{1(16-12) + 1(19-17)}{26} = \frac{6}{26} = 0.2308 \]

The shaded area is six backorder-weeks. Averaging over time weights each level by how long it was held.

Follow the five requests instead: three waited nothing, one 4 weeks, one 2:

\[ \bar{W} = \frac{0+0+0+4+2}{5} = 1.20 \text{ weeks} \]

Divide the time average by the rate, \(\lambda_0 = 5/26\) a week:

\[ \frac{\bar{B}_0}{\lambda_0} = \frac{6/26}{5/26} = 1.20 \text{ weeks} \]

The two agree because both are the same six backorder-weeks divided by the same five requests. That is Little’s Law, in the one setting where you can see all of it.

Do Not Average the Rows

The \(B_0\) column of the ledger holds twenty entries, five of them 1. Is \(5/20 = 0.25\) the depot’s average backorder level?

No. It is an average over the events the ledger happened to record, not over anything the system did. A ledger with more rows in the quiet stretches would give a different number; the busy fortnight around week 17 is over-represented.

Whenever a quantity carries \((t)\), integrate it over time. Do not average the rows.

The time average, \(0.2308\), is close to \(0.25\) here, which is what makes the mistake hard to notice.

The Depot Is a Single Location

Its demand is Poisson. Each storeroom’s requests are a thinned Poisson stream, and a superposition of independent Poisson streams is Poisson at the sum of the rates, \(\lambda_0\).

It replenishes one for one. Every request arrives with a carcass, and the carcass goes on the bench at once.

It waits for nobody. Its supplier is its own shop, with capacity to spare.

Thus Palm’s theorem applies with no qualification:

\[ \mu_0 = \lambda_0 T_0, \qquad \bar{B}_0(S_0) = G^{1}(S_0) \]

on the Poisson distribution with mean \(\mu_0\).

Notice what is absent

No \(S_j\), no \(O_j\), no \(T_j\). The depot can be solved first, once, and on its own, and the storerooms follow. No circle to iterate.

From Backorders to a Wait

Take the system to be the requests the depot has accepted and not yet filled. Its average content is \(\bar{B}_0\), and requests present themselves at rate \(\lambda_0\). By Little’s Law,

\[ \begin{aligned} \bar{W} &= \frac{\bar{B}_0(S_0)}{\lambda_0} &&\text{average content over arrival rate}\\ \mu_j &= \phi_j\lambda_j T_j + (1-\phi_j)\lambda_j\left(O_j + \bar{W}\right) &&\text{one } \bar{W} \text{ for every storeroom} \end{aligned} \]

No storeroom subscript. The depot clears backorders first come first served, whoever raised them, so a request from a large storeroom waits no longer than one from a small one.

\(\bar{W}\) averages over all requests, including those filled at once. In the ledger the two delayed requests averaged three weeks while \(\bar{W}\) is 1.20. Both are correct. The pipeline formula wants \(\bar{W}\), because it multiplies by the rate of all requests.

What a Unit at the Depot Buys

Recall that one more unit at a location removes \(G^{0}\) of its backorders. Divide by \(\lambda_0\):

\[ \begin{aligned} \bar{B}_0(S_0) - \bar{B}_0(S_0 + 1) &= G^{0}(S_0) &&\text{the marginal value, at the depot}\\ \bar{W}(S_0) - \bar{W}(S_0 + 1) &= \frac{G^{0}(S_0)}{\lambda_0} &&\text{Little's Law on both} \end{aligned} \]

The delay falls with depot stock, by less with every unit: the same diminishing returns as a storeroom.

It is not the same decision. A unit at a storeroom helps that storeroom. A unit at the depot shortens \(\bar{W}\), which shrinks the pipeline at every storeroom at once.

That asymmetry is what makes multi-echelon stocking a subject of its own, and the last session of this chapter makes the two kinds of unit compete on even terms.

What the Depot’s Stock Does to Four Storerooms

Four storerooms alike, \(\lambda_j = 45\), \(\phi_j = 0.3\); the depot repairs in \(T_0 = 60\) days.

\[ \lambda_0 = 4(0.7)(45) = 126 \text{ a year}, \qquad \mu_0 = \frac{126}{1 \text{ year}} \times 60 \text{ days} \times \frac{1 \text{ year}}{365 \text{ days}} = 20.7123 \text{ units} \]

\(S_0\) \(\bar{B}_0\) \(\bar{W}\) (days) \(\mu_j\) \(\bar{B}_j\) at \(S_j=4\)
16 5.0201 14.54 3.2276 0.4055
18 3.4443 9.98 2.8337 0.2638
20 2.1763 6.30 2.5167 0.1748
22 1.2550 3.64 2.2863 0.1238
24 0.6565 1.90 2.1367 0.0964
26 0.3105 0.90 2.0502 0.0825

Across the first row. \(\bar{W} = 5.0201/126\) years, which is 14.54 days, and

\[ \begin{aligned} \mu_j &= 1.1096 + 31.5\left(\tfrac{10 + 14.54}{365}\right)\\ &= 1.1096 + 2.1180 = 3.2276 \end{aligned} \]

The check. The 17th depot unit should cut the wait by \(G^{0}(16)/\lambda_0 = 0.8217/126\) years, or 2.38 days; computing \(\bar{W}(17) = 12.16\) days gives the same drop.

Six Units, Four Storerooms

From \(S_0 = 16\) to \(22\): the delay falls from 14.5 days to 3.6, and each storeroom’s pipeline from 3.23 units to 2.29.

Those six units did that at all four storerooms at once. Backorders at \(S_j = 4\) fall from 0.4055 to 0.1238, about 70%, at each of the four, for one purchase of six. Eight units bought at the storerooms, two apiece, would do something comparable by forward stocking alone.

Where this stops being obvious

The same six are, by the measure that matters, the most expensive in the table: they sit at the depot doing nothing for anyone until a request arrives. Whether they belong there or at the storerooms is the positioning question, and nothing so far decides it.

Every quantity in the storeroom pipeline is now available: rates and \(T_0\) give \(\mu_0\); \(\mu_0\) gives \(\bar{B}_0\); Little gives \(\bar{W}\); \(\bar{W}\) gives each \(\mu_j\).

What We Did Today

The ledger ran two levels by hand. The identity held on forty checks, and the storeroom’s only backorder was manufactured at the depot.

A function of time is averaged over time. Six backorder-weeks over 26 weeks; averaging the rows gives a number that is not an average of anything.

Little’s Law turned backorders into a wait, 1.20 weeks twice on the ledger, and \(\bar{W} = \bar{B}_0/\lambda_0\) in general, shared by every storeroom.

The depot is solved first, on its own. Its pipeline is \(\lambda_0T_0\), Poisson, with no storeroom quantity in it.

A depot unit helps every storeroom at once. Six of them cut each storeroom’s backorders by about 70%.

For Next Time

Read before next session: METRIC and VARI-METRIC.

Today’s material was Working Two Levels by Hand and The Delay the Depot Imposes.

Next session:

  • METRIC: the four steps collected into a procedure, run on the utility’s transformers
  • What METRIC approximates, and in which direction it errs
  • VARI-METRIC: carrying the pipeline’s variance, and fitting a distribution to two moments

Recall the warning on the storeroom pipeline: Palm slightly outside its warrant. Next session pays that debt.

⌂ Index