Setting Both Policies

Manuel D. Rossetti, PhD P.E.

Agenda

  • Why neither location’s policy can be computed first
  • A shortage cost for a hub that has none
  • The two-level iteration, and what its stopping test does and does not mean
  • Validating it against exact costs
  • The cutout in job lots, where nothing exact reaches
  • The same models on a worksheet, and in code
  • What the chapter established

A Circle

The storeroom’s policy needs the hub’s, through the wait.

The hub’s policy needs the storeroom’s, through the orders it passes up.

Neither can be computed first.

Under one-for-one ordering (chapter 9), the depot could be solved first, because its demand contained no storeroom policy. Batching breaks that.

What Each Location Minimizes

Chapter 8’s cost, at each location:

\[ C_i(r_i, Q_i) = \frac{k_i \lambda_i}{Q_i} + h\,\bar{I}_i(r_i, Q_i) + b_i\,\bar{B}_i(r_i, Q_i) \]

The storeroom’s \(b_j\) is the shortage cost of its crews.

The hub has no shortage cost of its own, yet this formula needs one.

A Target Becomes a Cost

Recall from chapter 4: a service constraint and a penalty are the same thing seen from two sides.

Set the hub’s \(b_0\) from a ready rate target \(\gamma_0\), through the critical ratio:

\[ \frac{b_0}{b_0 + h} = \gamma_0 \quad\Longleftrightarrow\quad b_0 = \frac{\gamma_0\, h}{1 - \gamma_0} \]

With \(\gamma_0 = 0.8\): \(b_0 = 4h = \$2.2115\) per unit per week.

It is a stated input, and we will price it. It prices \(b_0\); it is not the service the hub actually delivers, and it is not a fill rate.

Hold One Side, Solve the Other

The way out is the one chapter 4 took for a different coupling:

  1. Guess the wait at the hub.
  2. With the guess, the storeroom’s lead time is known: a chapter 8 location. Solve it.
  3. With the storeroom’s policy, the hub’s demand is known: a chapter 8 location. Solve it.
  4. The hub’s policy gives a wait. It replaces the guess.

Repeat until nothing moves.

The Algorithm

twoLevel():
    E[W] <- 0,  Var[W] <- 0             // step 0: the hub never delays anyone
    loop:
        // step 1: the storeroom against the wait
        (r_j, Q_j) <- optimize, lead time demand over O_j + W
        // step 2: the hub against the storeroom's orders
        (r_0, Q_0) <- optimize, lead time demand by the recipe or the
                      convolution, b_0 from gamma_0
        // step 3: the wait the hub's policy implies
        E[W], Var[W] <- Little's law and its distributional form,
                        or the order's wait by the lead-time shift
        // step 4: stop when the four integers repeat
        if (r_j, Q_j, r_0, Q_0) == previous: return them

Read Step 0

It is the only guess in the procedure.

A wait of zero says the hub always has stock.

That is the assumption a planner makes by default when modeling a location alone.

So the first pass is the uncoupled planner’s answer, and every pass after it is a correction.

Read Step 4, Too

The test is that the four integers stopped moving.

Not that any optimality condition holds.

The iteration finds a fixed point of a heuristic: a pair of policies, each optimal given the other.

Nothing shows the pair is the best pair. A fixed point of a biased map is a biased answer that has stopped moving.

Two Routes Through Each Step

The moment route

  • the recipe at the hub, two moments at the storeroom
  • works for any customers

The exact route

  • the convolution, the order’s own wait, conditioning
  • needs customers who take one unit each

Both Policies for the Hub With Other Demand

The system of deck 2, but now both batches are chosen.

  • Both locations pay \(k = \$82.50\) an order
  • The hub’s target is \(\gamma_0 = 0.8\)
  • Two cutouts a week at the hub’s own customers and two at the storeroom
  • \(L_0 = 3\) weeks, \(O_j = 1\) week

The Trace, by the Moment Route

Pass Storeroom \((r_j, Q_j)\) Storeroom cost Hub \((r_0, Q_0)\) Hub cost \(E[W]\), weeks \(\sigma_W\)
1 \((-1, 26)\) $13.09 \((2, 47)\) $20.99 0.5634 1.5988
2 \((0, 29)\) $14.35 \((2, 48)\) $21.71 0.6166 1.8033
3 \((0, 29)\) $14.65 \((2, 48)\) $21.71 0.6166 1.8033

Pass 1 ignores the hub: with no wait, the storeroom holds a reorder point of \(-1\) against a week of transit.

The hub’s answer implies a wait of 0.56 weeks, standard deviation 1.6.

Pass 2 raises the storeroom’s reorder point by one and its batch by three. Pass 3 changes nothing.

Notice the Pass 3 Cost

The storeroom’s policy is the same at passes 2 and 3.

Its cost is not: $14.35, then $14.65.

Each pass prices the storeroom against the wait the pass before it left. Pass 2 pays against 0.56 weeks; pass 3 against 0.62.

The Exact Route

Also three passes. It reaches hub \((2, 48)\) and storeroom \((3, 28)\).

Its storeroom holds three more units. Why?

Its orders of 28 wait for their last unit: 1.75 weeks on average.

The moment route carries a customer’s wait, 0.62 weeks.

Priced exactly: the moment route’s answer costs $34.35 a week, the exact route’s $33.54.

Validating the Iteration

An iteration never checked against an exact answer is one you are asked to trust.

We do not have to ask.

In Axsäter’s setting there is an exact cost. With one-unit customers the chapter’s own route gives one everywhere.

Four Checks

System Fixed point, exactly Exact optimum Gap
Part I, batches held: hub \((11, 8)\), \(S_j = 3\) $7.4337 $7.0195 at \((9, 3)\) 5.9%
One batching storeroom, hub at one batch $3.5354 $3.4111 3.6%
Part II, both batches chosen, exact route $33.5370 $33.3955 nearby 0.4%
Part II, both batches chosen, moment route $34.3462 $33.3955 nearby 2.9%

In every case the fixed point holds more at the hub than the exact optimum does.

Read the Gaps in Domain Terms

The exact optima run the hub at a low ready rate: 0.60 in Part I.

A unit at the hub protects every storeroom a little.

A unit at a storeroom protects its own crews a lot.

A hub target of 0.8 already asks for more protection than the system wants.

The target is the input to choose with care; the route matters less. Repeat this comparison on your own items whenever an exact cost is available.

The Cutout in Job Lots

Chapter 8’s cutout is drawn in job lots. Nothing exact in Parts I and II reaches it.

A lot can carry the position past the reorder point, and the undershoot varies.

The moment route needs only two moments at each location.

Those are available.

The Setting

Crews draw cutouts in lots of 1, 2 or 4 with probabilities 0.40, 0.40, 0.20 (chapter 8’s lots).

  • Lots reach the storeroom at 150 a year; the hub serves 250 lots a year of its own
  • Supplier: two months. Transfer to the storeroom: one month.
  • $82.50 an order, $28.75 a unit a year to hold, $287.50 a unit a year owed
  • \(\gamma_0 = 0.8\), so \(b_0 = \$115\) a year. This example works in years.

Demand? Compound Poisson at both locations. Review? Continuous. Replenishment? Each location’s position reaching its reorder point, for its batch. Unmet demand? Backordered.

The Moments

\[ E[Y] = 0.4(1) + 0.4(2) + 0.2(4) = 2.0, \qquad E[Y^{2}] = 0.4 + 1.6 + 3.2 = 5.2 \]

So 300 units a year at the storeroom and 500 of the hub’s own.

A lot is at most 4 and the storeroom’s batch will be near 50, so every storeroom order is exactly \(Q_j\).

The hub, by the recipe with compound Poisson customers, at \(Q_j = 49\):

\[ \text{mean} = 800 \times \tfrac{2}{12} = 133.33, \qquad \text{variance} = (250 + 150)\tfrac{2}{12}(5.2) + \tfrac{49^{2}}{6} = 346.67 + 400.17 = 746.83 \]

The Trace

Pass Storeroom \((r_j, Q_j)\) Hub \((r_0, Q_0)\)
1 \((22, 48)\) \((120, 92)\)
2 \((25, 49)\) \((120, 92)\)
3 \((25, 49)\) \((120, 92)\)
  • Storeroom: $1,371.26 a year; hub: $2,279.69 a year
  • The hub’s orders wait 0.0054 years on average: about two days

What It Says

The coupling moves the storeroom’s reorder point by three units, from the planner who ignores the hub to the converged answer.

The hub’s policy does not move at all: the storeroom’s batch barely changes, and the hub’s lead time demand barely changes with it.

The storeroom’s batch contributes 400 of the 747 units squared of the hub’s variance: more than all the customers together. A hub serving a storeroom that orders fifty at a time faces a demand its customers never place.

And Its Limit

Nothing exact covers this case.

The assumption that breaks is stated: customers who take one unit each.

What remains is to check the answer by simulation, which chapter 11 builds.

The Models on a Worksheet

Chapter10Models.xlsx, one sheet per section, no macros:

  • Part I: Hub, Delay (a row a day), Exact (Axsäter’s recursion down a grid), Storeroom (the three routes)
  • Part II: Orders, HubGeneral (exact, recipe, shortcut), OrderDelay, RandomLead
  • Part III: Iterate: the iteration by hand

A sheet cannot run chapter 8’s search by itself. You type each pass’s policies; the sheet prices them and their four neighbours and hands the wait to the next pass.

The Iterate Sheet

Reading It

The last column reads “no” on every pass: no neighbour of any typed policy is cheaper.

Passes 2 and 3 agree: the stopping test of the algorithm, read off a sheet.

What a Larger Hub Batch Does

The utility is offered a price break for ordering cutouts twelve at a time instead of eight.

Before weighing the price: what does the larger batch do to the system, with everything else held?

Step 1. On Hub, \(r_0 = 9\), \(Q_0 = 8\). Exact!B28 reads $7.0195 a week.

Step 2. Type 12 into Hub!B19, and read down the sheets.

Two Cells Typed

Cell What it is \(Q_0 = 8\) \(Q_0 = 12\)
Hub!B22 \(\bar{B}_0\) 1.0273 0.6984
Hub!B23 \(\overline{\mathit{RR}}_0\) 0.6030 0.7242
Hub!B27 \(\bar{W}\), weeks 0.2568 0.1746
Storeroom!E19 backorders per storeroom 0.0726 0.0567
Exact!B28 system cost per week $7.0195 $7.7367

The hub holds more, so it owes less, and the crews wait less.

And the system costs $0.72 a week more. The cheapest \(S_j\) is still 3.

Now Move the Reorder Point

Holding more at the hub is more protection than the system wants, so lower Hub!B18.

At 7, Exact!B28 reads $7.5379: the cheapest reorder point for a batch of twelve.

The check. On Storeroom, exact and conditioned backorders at \(Q_0 = 12\) are 0.0567 and 0.0568, apart only by the day grid. ✓

Is the Price Break Worth It?

Without an ordering cost the larger batch cannot pay for itself: it only adds stock.

Its best version costs $0.52 a week more than the present policy: $27 a year.

The hub buys about 208 cutouts a year. A thirteen-cent discount pays for it.

A planner who changed the batch and left the reorder point would have priced the offer at $0.72 a week instead of $0.52.

The Same Models in Code

inventory.multiechelon, one class per idea:

  • BatchedHub: the convolution, the recipe, the shortcut, the hub’s measures
  • HubDelay: a customer’s wait, or an order’s
  • StoreroomWithDelay: the three routes
  • AxsaterBatchOrdering: the exact yardstick
  • TwoLevelIteration: the algorithm, and the exact price of any policy
for ((hr, sr) in listOf(HubRoute.MOMENTS to StoreRoute.MOMENTS,
                        HubRoute.EXACT to StoreRoute.CONDITIONED)) {
    val result = TwoLevelIteration(problem, hr, sr).solve()
    println(TwoLevelIteration.exactSystemCost(problem, result.policy, b))
}

What It Prints

### Part III: the two-level iteration
  moments route, 3 passes:
    1  hub (2, 47), storeroom (-1, 26)  E[W] 0.5634
    2  hub (2, 48), storeroom (0, 29)  E[W] 0.6166
    3  hub (2, 48), storeroom (0, 29)  E[W] 0.6166
    priced exactly: 34.3462 a week
  exact route, 3 passes:
    1  hub (2, 48), storeroom (-1, 26)  E[W] 1.6250
    2  hub (2, 48), storeroom (3, 28)  E[W] 1.7500
    3  hub (2, 48), storeroom (3, 28)  E[W] 1.7500
    priced exactly: 33.5370 a week

Every number the chapter prints has a test behind it.

What the Chapter Established (1)

A storeroom that batches passes up its customers’ demand in whole batches. Lumpier, and more regular. Countable from the Poisson table.

One move carries the chapter: condition on the position, then average. Chapter 8’s \((r, Q)\) measures, Axsäter’s equation (1), the order-count law, a random lead time.

With one-for-one storerooms, everything is exact. The wait’s distribution is the ready rate at a shorter lead time.

What the Chapter Established (2)

Conditioning a storeroom on the wait is exact, and for a batching storeroom the wait is its order’s own.

Little’s law gets the mean right, and the mean is not enough. 30% low on the running example.

The recipe is sound; the shortcut over-stocks.

A random lead time: build at each value, then average.

The iteration converges fast, and its answer depends most on the hub’s target.

Where We Are

  • The two policies come from a fixed point, each optimal given the other
  • The hub’s shortage cost comes from a target, and the target matters most
  • Checked exactly, the fixed points land within 0.4% to 5.9% of the optimum
  • Job lots are handled by moments, and simulation is what checks them

Next: chapter 11, where a system’s behavior is generated rather than solved for.

⌂ Index