Supply Chain Lab Wagner–Whitin Lot-Sizing Lab Home
Inventory & Ordering

Wagner–Whitin Lot-Sizing

EOQ assumes demand is flat. Real demand is lumpy - so which months should get an order? Edit twelve demands, set setup vs holding cost, and watch four policies compete: the Wagner–Whitin dynamic program finds the provably cheapest plan and shows you its whole reasoning matrix.

How to use it

Dynamic lot-sizing

Monthly demand

Economics

High K → batch months together. High h → order little and often. Wagner–Whitin finds the exact break-points.

Total cost

–
Saved vs lot-for-lot
–
Orders placed
ZIO ✓
Zero-inventory ordering

Swipe the chart and the matrix sideways to read the numbers.

The optimal plan: red bars = order quantities (annotated with the months they cover), navy steps = inventory carried.

The DP: cell (t,j) = setup + holding cost of ordering in month t to cover through month j. Red cells are the choices on the optimal path; W–W is a shortest path through this matrix.

Try these experiments

  1. Push K to $400: Wagner–Whitin merges months into big batches, and the gap to lot-for-lot explodes.
  2. Find a demand pattern where Silver–Meal picks a different plan than W–W - the heuristic is myopic; the DP looks all the way ahead.
  3. Note orders always equal a whole number of future months’ demand - the zero-inventory-ordering property, provable, and the reason the DP only needs 78 cells.

About this tool

The concept

When demand varies month to month, no fixed order quantity is right. Dynamic lot-sizing decides which months get an order - batching demand forward against holding cost.

How it works

Wagner–Whitin (1958) dynamic programming: F(j) = mint≤j [F(t−1) + K + holding(t..j)]. The ZIO property guarantees an order arrives only when inventory hits zero, so the search space collapses.

Winning strategy

Trust break-even months: batch another month in only while its added holding cost is below K. Silver–Meal does that greedily and is usually within 1–2%; W–W is exactly optimal.

Background: Dynamic lot-size model · Wagner & Whitin (1958), Management Science