Explore: The Final Buy

Chapter 7, Single-Period Stochastic Inventory

This explorer solves the two one-time purchases of Chapter 7 and shows where the critical ratio puts the order on the demand distribution. The first is the last order for the mower deck belt: it costs $50, sells for $95, and scraps at $12, and demand over the fourteen remaining weeks has mean 465.37 and variance 8,582.54 belts squared. The second is the utility’s one-time buy of spare transformers: each costs $3,800 and scraps at $900, a shortage is covered by an emergency purchase at $9,500, and failures are Poisson with mean 6.

Let \(c_{u}\) represent the cost of a unit short and \(c_{o}\) the cost of a unit left over. The best quantity available for the period satisfies

\[ F(Q^{*}) = \frac{c_{u}}{c_{u} + c_{o}} \]

and the expected cost of any \(Q\) is \((c_{u} + c_{o})G^{1}(Q) + c_{o}(Q - E[X])\), where \(G^{1}(Q)\) is the expected shortage. For a count, \(Q^{*}\) is the smallest whole number whose distribution function reaches the ratio. The page runs in your browser and records nothing. Its formulas are a restatement in JavaScript of the book’s code, and they are tested against that code. For an item of your own, use the general explorer.

The Purchase

The first plot is the demand distribution function. The dashed red line is the critical ratio, and the optimal quantity, the gray vertical line, is where the distribution function first reaches it. The red dot is your quantity. Notice that the ratio is the probability of having too much at the optimum.

The second plot is the expected cost against the quantity available. The red dot is your quantity. Notice how flat the bottom is: a few units either way cost little.

Things to Try

  1. Press Use the optimal quantity with the normal model. The critical ratio is \(45/83 = 0.5422\) and the order is 475.18 belts, at an expected cost of $3,050.43 and an expected profit of $17,891.01.
  2. Set \(Q = 465\), the mean, and then \(Q = 700\). The first costs $3,068.88, 0.6% more than the optimum; the second costs $8,930.03, nearly three times as much.
  3. Switch the belt’s demand model. The normal says 475, the lognormal 466, and the gamma and the exact negative binomial both 469, where \(F(468) = 0.5392\) falls short of the ratio and \(F(469) = 0.5434\) clears it.
  4. Back on the normal, raise the penalty to $40. The ratio rises to \(85/123 = 0.6911\) and the order to 511.58 belts.
  5. With no penalty, set 120 belts already on hand. The level stays at 475.18, so the order is 355.18. With 600 on hand the order is zero.
  6. Choose the spare transformers. The ratio is \(5{,}700/8{,}600 = 0.6628\); \(F(6) = 0.6063\) falls short and \(F(7) = 0.7440\) clears it, so buy 7, at an expected cost of $7,802.36.

Check What You Found

Check what you found

1. For the belt under the normal model, a penalty of $40 for each dealer turned away raises the order from 475.18 to 511.58 belts. What moved it?

2. With 120 belts already on hand, the optimal order is 355.18 belts. With 600 on hand it is zero. Why?