METRIC and VARI-METRIC

Manuel D. Rossetti, PhD P.E.

Agenda

  • METRIC: the four steps as a procedure, run on the utility’s transformers
  • What METRIC gets exactly right, what it approximates, and in which direction
  • VARI-METRIC: splitting the depot’s backorders, and the pipeline’s variance
  • Fitting a negative binomial to two moments, and the one unproved step
  • VARI-METRIC on the transformers, against METRIC

METRIC

METRIC, the Multi-Echelon Technique for Recoverable Item Control, is due to Sherbrooke (1968): the earliest repairable-item model still in use, and the ancestor of every model in this chapter.

metric(S_0, S_1 ... S_J):
    // Step 1, the demand the depot faces
    lambda_j0 <- (1 - phi_j) * lambda_j
    lambda_0  <- sum over j of lambda_j0
    // Step 2, the depot's pipeline and backorders
    mu_0   <- lambda_0 * T_0
    Bbar_0 <- G1(S_0), Poisson with mean mu_0
    // Step 3, the delay imposed on everybody
    Wbar <- Bbar_0 / lambda_0
    // Step 4, each storeroom in turn
    mu_j   <- phi_j*lambda_j*T_j
              + (1 - phi_j)*lambda_j*(O_j + Wbar)
    Bbar_j <- G1(S_j), Poisson with mean mu_j

Every step is last session’s: the pass-up rates, Palm at the depot, Little’s Law, and the storeroom pipeline.

No loop. A straight line from rates to answers, in time proportional to the number of storerooms. The depot does not depend on the storerooms, so step 2 is never revisited.

It evaluates; it does not choose. Its arguments are stock levels and its returns are backorders. The allocation search calls it many times.

METRIC on the Utility’s Transformers

Four storerooms: \(\lambda_j = 45\), \(\phi_j = 0.3\), \(T_j = 30\) days, \(O_j = 10\) days; depot \(T_0 = 60\) days. The plan: \(S_0 = 16\), \(S_j = 4\) each, twenty units.

\[ \begin{aligned} \lambda_0 &= 4(0.7)(45) = 126 \text{ a year} &&\text{step 1}\\ \mu_0 &= 126\left(\tfrac{60}{365}\right) = 20.7123, \quad \bar{B}_0 = G^{1}(16) = 5.0201 &&\text{step 2}\\ \bar{W} &= \tfrac{5.0201}{126} = 0.03984 \text{ years} = 14.54 \text{ days} &&\text{step 3}\\ \mu_j &= (0.3)(45)\left(\tfrac{30}{365}\right) + (0.7)(45)\left(\tfrac{10 + 14.54}{365}\right) = 1.1096 + 2.1180 = 3.2276 &&\text{step 4}\\ \bar{B}_j &= G^{1}(4) = 0.4055, \quad 4(0.4055) = 1.6218 \text{ owed in all} &&\text{four storerooms} \end{aligned} \]

The check. \(\bar{I}_j = 4 - 3.2276 + 0.4055 = 1.1779\), so \(\bar{I}_j - \bar{B}_j = 0.7724 = S_j - \mu_j\). Run it at both levels every time.

Interpretation. Twenty transformers, sixteen of them where no crew can reach them, leave about 1.6 crews waiting at any moment across the utility. Whether the twenty are in the right places is the next session’s question.

Every Mean METRIC Computes Is Exact

Recall the warning on the storeroom pipeline: Palm slightly outside its warrant. Before criticizing, establish what is right.

  • The depot’s pipeline is Poisson with mean \(\lambda_0 T_0\): Palm applies there with no qualification. So \(\bar{B}_0\) is exact.
  • The wait \(\bar{W}\) is exact: Little’s Law assumes nothing.
  • The storeroom’s pipeline mean is exact: Little’s Law on the storeroom’s own resupply gives \(E[X_j] = \lambda_j E[\text{resupply duration}]\), with no independence assumed.

What is not exact

The claim that \(X_j\) is Poisson, variance equal to mean. Two requests arriving while the depot is empty both wait for the same repairs, so their delays move together. The count is more variable than a Poisson with the same mean.

Known From the Start, and in the Unsafe Direction

It was known when the model was published. Looking back, Sherbrooke (1986) writes that METRIC “understated base backorders”, and that “the simplicity of METRIC seemed to overshadow the lack of precision.”

The direction is the unsafe one. Backorders are a tail quantity, so a distribution that is too tight produces too few of them. A utility sizing spares with METRIC believes it is doing better than it is.

How much does it matter? Graves (1985) compares the stock levels the models choose, which is what a planner cares about: METRIC’s differ from optimal by at least one unit in 11% of cases, VARI-METRIC’s in 1%. Sherbrooke adds that the tenfold improvement means more than the percentages, which depend on the number of bases and the demands.

Do not fix it by padding a rate

The means are already right; the second moment is missing. Inflating a lead time until the answer matches breaks the agreement that exists, only approximately repairs the one that does not, and fails on the next item.

VARI-METRIC: Splitting the Depot’s Backorders

Due to Slay (1980), with the derivation Graves (1985) published. The depot owes \(B_0\) units. How many are owed to storeroom \(j\)? It fills requests first come first served, so each outstanding backorder came from \(j\) with probability equal to \(j\)’s share of depot demand. Let

\[ f_j = \frac{\lambda_{j0}}{\lambda_0} = \frac{(1-\phi_j)\lambda_j}{\sum_{k}(1-\phi_k)\lambda_k} \]

and let \(B_{0j}\) represent the units owed to \(j\). Given \(B_0\), \(B_{0j}\) is binomial with \(B_0\) trials and success probability \(f_j\), a proved result (Simon 1971; Graves).

\[ \begin{aligned} E[B_{0j} \mid B_0] = f_jB_0, &\quad \mathit{Var}[B_{0j} \mid B_0] = f_j(1-f_j)B_0 &&\text{binomial moments}\\ \mathit{Var}[B_{0j}] &= E\big[\mathit{Var}[B_{0j} \mid B_0]\big] + \mathit{Var}\big[E[B_{0j} \mid B_0]\big] &&\text{law of total variance}\\ &= f_j(1-f_j)\bar{B}_0 + f_j^{2}\,\mathit{Var}[B_0] &&\text{substitute} \end{aligned} \]

and \(E[B_{0j}] = f_j\bar{B}_0\).

The Pipeline’s Two Moments

Two independent pieces: local repair and transit, which Palm covers exactly (Poisson, mean equal to variance), and \(B_{0j}\):

\[ \begin{aligned} \mu_j &= \lambda_j\left[\phi_j T_j + (1-\phi_j)O_j\right] + f_j\bar{B}_0 &&\text{means add}\\ \sigma_j^{2} &= \lambda_j\left[\phi_j T_j + (1-\phi_j)O_j\right] + f_j(1-f_j)\bar{B}_0 + f_j^{2}\,\mathit{Var}[B_0] &&\text{independent variances add} \end{aligned} \]

No mean changes. Since \(\bar{W} = \bar{B}_0/\lambda_0\),

\[ f_j\bar{B}_0 = \frac{\lambda_{j0}}{\lambda_0}\bar{B}_0 = \lambda_{j0}\bar{W} = (1-\phi_j)\lambda_j\bar{W} \]

the term METRIC already had.

METRIC is this model with two terms dropped. Set the last two terms of \(\sigma_j^{2}\) to zero and \(\sigma_j^{2} = \mu_j\): the Poisson assumption.

The two models are fitted to the same first moment and differ only in what they do with the second.

The Depot’s Backorder Variance

Let \(E[B^{2}(s)] = \sum_{x > s}(x-s)^{2}g(x)\) represent the second moment of the shortfall at stock level \(s\). Sherbrooke gives a recursion, attributed to Michael Konvalinka:

\[ \begin{aligned} E[B^{2}(0)] &= E[X^{2}] = \mu_0 + \mu_0^{2} &&\text{start: Poisson second moment}\\ E[B^{2}(s)] &= E[B^{2}(s-1)] - E[B(s)] - E[B(s-1)], \quad s \ge 1 &&\text{walk up one level at a time}\\ \mathit{Var}[B_0] &= E[B^{2}(S_0)] - \bar{B}_0^{2} &&\text{variance from two moments} \end{aligned} \]

It uses only first order loss values already computed, so the whole table costs one pass.

It subtracts, so it loses precision at large \(s\) where \(E[B^{2}]\) is small. If you need it far out in the tail, sum directly and compare.

Fitting a Distribution to Two Moments

We have \(\mu_j\) and \(\sigma_j^{2} > \mu_j\). Recall that the negative binomial is the family to reach for when the variance to mean ratio exceeds one. Matching its two moments,

\[ p = \frac{\mu_j}{\sigma_j^{2}}, \qquad \beta = \frac{1-p}{p}, \qquad r = \frac{\mu_j}{\beta} \]

and every single-location measure applies unchanged on that distribution.

Why this family

A negative binomial is a Poisson whose rate is itself random, drawn from a gamma. That is the situation: each storeroom’s pipeline would be Poisson if the depot delay were fixed, and what spoils it is that the delay varies. It is the title of Slay’s paper: Poisson with a Gamma Prior.

Sherbrooke adds the practical reasons: its variance is never less than its mean, it is discrete, and it is easy to compute recursively.

Near One Is Not One, and One Unproved Step

A ratio near one is still fitted. The fit divides by \(1 - p\), so code that ported VARI-METRIC used a Poisson for any ratio between 0.9 and 1.1.

At \(S_0 = 24\) in the four-storeroom system the ratio is 1.0641. At \(S_j = 4\):

Model \(\bar{B}_j\)
Poisson 0.0964
Negative binomial 0.1095
Simulation, 30 × 1,000 years \(0.1101 \pm 0.0007\)

Six percent above the mean still matters, because the stock level sits in the tail.

Evidence, not proof

The fit needs \(\sigma_j^{2} > \mu_j\). Sherbrooke reports that extensive calculations show \(\mathit{Var}[B(s)]/E[B(s)]\) is above one except at \(s = 0\), and states plainly that neither he nor Graves could prove it.

Thus the method is known to work and not known to be safe. Test the ratio before fitting: negative binomial above one, Poisson at one to within rounding, a gamma below one.

The Procedure

varimetric(S_0, S_1 ... S_J):
    // Steps 1 to 3 are METRIC, unchanged
    // Step 3a, NEW: the depot's backorder variance
    EB2 <- mu_0 + mu_0^2
    for s = 1 to S_0:
        EB2 <- EB2 - G1(s) - G1(s-1)
    VarB_0 <- EB2 - Bbar_0^2
    // Step 4, each storeroom, to two moments
    f_j      <- (1 - phi_j)*lambda_j / lambda_0
    base     <- lambda_j*(phi_j*T_j + (1 - phi_j)*O_j)
    mu_j     <- base + f_j*Bbar_0
    sigma2_j <- base + f_j*(1 - f_j)*Bbar_0
                     + f_j^2*VarB_0
    c <- sigma2_j / mu_j
    if c > 1:  fit negative binomial
    else if c = 1:  Poisson with mean mu_j
    else:  fit gamma
    Bbar_j <- G1(S_j) on that distribution

Notice how little changed: one extra loop over the depot’s stock levels and two extra terms per storeroom.

It still has no fixed point, still runs in one pass, and still evaluates a plan rather than choosing one.

Sherbrooke: the computation is “only slightly more complicated than that of METRIC”.

VARI-METRIC on the Utility’s Transformers

The same system and the same plan, \(S_0 = 16\), \(S_j = 4\). Only the model has changed.

\[ \begin{aligned} E[B^{2}(16)] &= 41.8229, \quad \mathit{Var}[B_0] = 41.8229 - 5.0201^{2} = 16.6215 &&\text{from } E[B^{2}(0)] = 449.7129\\ f_j &= 31.5/126 = 0.25, \quad 45\left(\tfrac{(0.3)(30) + (0.7)(10)}{365}\right) = 1.9726 &&\text{share; the Poisson part}\\ \mu_j &= 1.9726 + (0.25)(5.0201) = 3.2276 &&\text{METRIC's figure}\\ \sigma_j^{2} &= 1.9726 + (0.25)(0.75)(5.0201) + (0.25)^{2}(16.6215) = 3.9527 &&1.9726 + 0.9413 + 1.0388\\ p &= \tfrac{3.2276}{3.9527} = 0.8166, \quad \beta = 0.2246, \quad r = 14.3674 &&\text{the fit; ratio } 1.2246 \end{aligned} \]

Same plan, same system, same mean. What does VARI-METRIC report at \(S_j = 4\)?

\(\bar{B}_j = 0.4815\) against METRIC’s 0.4055: about 19% more. Across four storerooms, 1.9259 crews waiting rather than 1.6218.

The Check, and the Direction

The check. The on-hand identity holds whatever the distribution: \(\bar{I}_j = 4 - 3.2276 + 0.4815 = 1.2539\), and \(\bar{I}_j - \bar{B}_j = 0.7724 = S_j - \mu_j\). Run it on both models: it is the one relation that must agree, the means being shared.

Interpretation. The whole 19% came from the two terms of \(\sigma_j^{2}\). The plan and the system did not change; the model now admits it does not know how long a request will wait, only what that wait averages.

The direction is not accidental

Sherbrooke states that VARI-METRIC’s backorders exceed METRIC’s in all cases except when stock levels are zero, where the two agree. Wherever they differ, VARI-METRIC is the pessimistic one, and the extra backorders are ones METRIC was concealing.

What We Did Today

METRIC is four steps in a straight line, with no loop: twenty transformers leave about 1.6 crews waiting.

Every mean it computes is exact. What it gets wrong is the pipeline’s variance, and the error is in the unsafe direction.

VARI-METRIC splits the depot’s backorders binomially and carries two extra variance terms; drop them and it is METRIC.

A negative binomial is fitted to two moments, a Poisson with a gamma rate, after testing the ratio, because one step is unproved.

On the same plan VARI-METRIC reports 19% more backorders, and it is never below METRIC.

For Next Time

Read before next session: Spending a Budget Across Items, Building These Models in a Worksheet and Designing the Software.

Today’s material was METRIC and VARI-METRIC.

Next session:

  • Choosing the plan: marginal analysis against a budget
  • Why two echelons break the convexity, and what flushout is
  • Many items, one budget; the worksheet and the software that do it

Bring the marginal value \(G^{0}(S_j)\) from the first session. It becomes the whole search.

⌂ Index