Make the rules explicit before running the model

This original exercise starts with 40 units on hand and seven days of demand: 12, 18, 15, 21, 14, 20 and 10. A replenishment order contains 60 units and arrives at the beginning of the day three days after it is placed. Orders are placed at the end of a day. An order placed after day two therefore arrives before demand on day five.

Unfilled demand is lost, not backordered. At each day’s end, inventory position equals units on hand plus units already on order. Place one 60-unit order when that position is at or below the policy threshold. The rule must count orders in transit so it does not keep ordering the same shortage every day.

ASCM describes safety stock as protection against forecast error and demand variation. This deterministic teaching case does not estimate an appropriate safety stock or a service guarantee; it lets you inspect how a chosen threshold interacts with one supplied demand sequence.

Sources[1]

Run the 25-unit threshold one day at a time

After day one, 28 units remain, so the 25-unit rule does not order. Day two leaves ten units and triggers an order for day five. Only ten of day three’s 15 units can be filled, and no stock is available for day four’s demand of 21. The order arrives on day five, too late to recover those lost sales.

Original seven-day case: threshold 25, order quantity 60, three-day lead time
DayDemandReceiptsFulfilledLostEnding stockOrder placed
1120120280
21801801060
315010500
421002100
51460140460
6200200260
71001001660

The table shows all seven days. A second order is placed after day seven but arrives outside the observed horizon. It must remain in the order record even though it does not affect any displayed fulfillment. Leaving it out would understate the policy’s committed purchases.

Compare an earlier ordering threshold

At a threshold of 40, the first order is placed after day one and arrives before demand on day four. Day three still loses five units, but day four can be filled. The policy orders again after day four, and that second order arrives on day seven.

Fictional policy comparison over the same seven days
MetricThreshold 25Threshold 40
Demand110110
Fulfilled units84105
Lost units265
Receipts within horizon60120
Ending stock1655
Units still on order600
Orders placed22

The 25-unit policy fills 84 of 110 requested units and loses 26. The 40-unit policy fills 105 and loses five. Their unit fill rates are approximately 76.36% and 95.45%. These are fractions of units filled in this particular sequence, not probabilities that a future cycle will avoid a stockout.

Both policies place two orders, but only one reaches the baseline before the horizon ends. The earlier policy ends with 55 units on hand; the baseline ends with 16 on hand and 60 in transit. Timing changes both the customer outcome and what inventory you see at the cutoff.

Prove that the model conserves units

For the 25-unit policy, beginning stock 40 plus receipts 60 minus fulfilled units 84 equals ending stock 16. For the 40-unit policy, 40 plus 120 minus 105 equals 55. Fulfilled plus lost must also equal demand on every day and across the full period.

Add checks that no inventory, fulfillment or demand value is negative, that fulfillment does not exceed available stock, and that an order arrives once at the scheduled time. A stockout is not permission for inventory to become negative when your model assumes lost sales. Negative stock would silently introduce a different backorder model.

Make the end-of-horizon order book visible. Comparing policies solely on ending physical stock can reward a policy whose large delivery happens just after measurement. The pipeline is part of the state, not an optional note.

Do not optimize a policy from one path and one metric

The higher threshold fills more units in this sequence but also brings more inventory into the observed period. To choose a policy, you would need the cost of inventory, consequences of lost demand, ordering costs, capacity and a defensible set of demand and lead-time scenarios. None is supplied as a real business fact here.

As a further exercise, rerun the same rules with a quiet demand week and with a longer lead time. Keep the implementation unchanged except for the intended input. Report whether the ranking changes rather than selecting only the scenario that supports your favorite threshold.

Avoid presenting the 40-unit threshold as optimal. Two policies evaluated on one fictional path cannot establish an optimum, a confidence interval or expected service. What you have demonstrated is reproducible simulation and careful definition of a comparison.

Package the case as an inspectable planning project

Deliver the input sequence, rule specification, daily result table, pending-order list and checks. The provided Python file runs with the standard library and regenerates both cases. Its tests include the baseline totals, the earlier-ordering totals and conservation identities.

Write a short memo identifying why the stockout occurred and which additional business information would be needed before changing a policy. Distinguish an expediting decision about an existing order from changing the normal replenishment rule. Those interventions solve different problems and may have different costs.

For an application, explain the exact artifact you built and the event-ordering bug you learned to avoid. “Compared two fictional replenishment policies and reconciled stock, fulfillment and orders in transit” is accurate. “Reduced stockouts by 81% for a retailer” would not be.