All posts

Dynamic Lot-Sizing for Lumpy CPG Demand: When One Fixed Batch Size Stops Working

Dynamic Lot-Sizing for Lumpy CPG Demand: When One Fixed Batch Size Stops Working

If you've read our post on Economic Production Quantity, you know how to size a run when demand is steady. EOQ and EPQ both assume a constant demand rate — a smooth, flat line you can plan around. Under that assumption, one fixed batch size is the right answer, every time.

Then a display promo hits in week 4 and demand quadruples. Two weeks later a retailer reset pulls orders forward. The following month is quiet. Your "optimal" fixed batch is now too big for the slow weeks and too small for the spike. The steady-demand math didn't lie — the demand pattern just stopped being steady.

That's the real world of CPG: time-phased, lumpy, non-stationary demand. When net requirements change period to period, the right run size changes each period too. Choosing those run sizes across a planning horizon is the job of dynamic lot-sizing.

The one tradeoff that governs every lot-sizing decision

Every lot-sizing rule — from the crudest to the provably optimal — is trying to balance exactly two costs:

  • Setup cost. Every production order means a changeover: cleaning, teardown, purge, first-article checks, scrap, and lost run time. That's the true, floor-level cost of pressing "go" one more time. (We break this down in The Hidden Cost of Changeovers.)
  • Holding cost. Every unit you build before it's needed sits in inventory, tying up cash, occupying space, and — critically for food and beverage — burning down its shelf life.

The dynamic lot-size model generalizes EOQ to the realistic case where demand for a product varies over time across a planning horizon — say, known weekly requirements for the next 52 weeks. It was introduced by Harvey M. Wagner and Thomson M. Whitin in 1958. The objective is simple to state and hard to eyeball: choose order quantities that minimize the sum of setup cost plus holding cost over the whole horizon, where both costs can themselves change period to period.

Make fewer, bigger runs and you save on setups but pay to carry inventory. Make more, smaller runs and you cut inventory but eat changeover after changeover. Dynamic lot-sizing finds where those two curves cross — and it moves the crossing point week by week as demand changes.

The MRP lot-sizing menu, crude to optimal

Most planning systems offer a menu of lot-sizing rules that turn time-phased net requirements into planned production orders. Here's the ladder from simplest to optimal.

Lot-for-Lot (L4L). Produce exactly each period's net requirement — nothing more, nothing carried. Holding cost goes to zero. The catch: you incur a setup every single period. L4L is right when setups are cheap and fast, or when shelf life is so tight you can't build ahead anyway.

Fixed Order Quantity (the EOQ "one number"). Always run the same quantity. This is the steady-demand answer, and it's exactly what breaks under lumpiness — a fixed 300-case run can't serve a 100-case week and a 400-case week sensibly.

Periodic Order Quantity (POQ). Instead of a fixed quantity, fix a coverage interval — e.g., "every run covers two weeks of demand." Run sizes flex with demand, but the rhythm is fixed and easy for planners to follow. It's a close cousin of EPEI, the production wheel.

Least-Unit-Cost and Part-Period Balancing. These extend a run by adding future periods as long as doing so lowers cost-per-unit (LUC) or until accumulated holding cost roughly equals the setup cost (PPB). Both are reasonable middle-ground heuristics.

Silver-Meal. A forward heuristic (Silver & Meal, 1973) that computes the average setup-plus-holding cost per period as a function of how many future periods the current run covers, and stops extending the run the first time that average cost increases — i.e., stop as soon as C(T) > C(T−1). Simple, transparent, and often very close to optimal.

Wagner-Whitin. The provably optimal solution via dynamic programming. Wagner and Whitin proved a structural insight that makes it tractable: an optimal plan produces only when on-hand inventory is zero — you never trigger a fresh setup while you're still carrying stock from a prior run. That theorem collapses the search space and lets the DP find the true minimum-cost plan.

Historically, the exact DP was considered too heavy to run routinely, which is why heuristics like Silver-Meal exist. That's no longer the constraint it was: faster exact algorithms (Federgruen–Tzur; Wagelmans–Van Hoesel–Kolen, running in O(n log n)) mean a modern scheduler can solve Wagner-Whitin optimally at real CPG SKU-and-horizon scale. You don't have to settle for a heuristic just to get an answer fast.

A worked example: one line, one SKU, eight weeks

Let's make it concrete. One SKU, an 8-week horizon, with a promo spike in week 4. Setup cost is $300 per run; holding cost is $1 per case per week.

Week 1 2 3 4 5 6 7 8
Net requirement (cases) 100 120 90 400 110 95 130 105

Now run each rule.

Lot-for-Lot: eight separate runs. Holding = $0, setups = 8 × $300 = $2,400.

POQ (2-week coverage): runs cover {1,2}, {3,4}, {5,6}, {7,8} — four setups = $1,200. Holding comes from the second week of each pair: 120 + 400 + 95 + 105 = $720. Total = $1,920. Notice the pain: grouping the 400-case promo week with week 3 forces you to carry that huge spike quantity a week early.

Silver-Meal: starting at week 1, the average cost per period falls (300 → 210 → 200) then jumps to 450 when you try to fold in the 400-case week — so the first run stops at weeks 1–3. Restart at week 4: average cost falls (300 → 205 → 200) then rises, so the second run covers weeks 4–6. The last run covers weeks 7–8. Three runs.

Wagner-Whitin: the DP lands on the same plan — produce {1,2,3}, {4,5,6}, {7,8}. Three setups = $900. Holding = (120 + 180) + (110 + 190) + 105 = $705. Total = $1,605.

Rule Setups Holding $ Total $
Lot-for-Lot 8 0 2,400
POQ (2) 4 720 1,920
Silver-Meal 3 705 1,605
Wagner-Whitin 3 705 1,605

Three lessons jump out:

  1. L4L over-changes-over. With a $300 setup, running eight times is the most expensive option by far — it spends $2,400 to avoid $705 of holding.
  2. A rigid interval can trap a spike. POQ's fixed 2-week grouping forced the 400-case promo into an early build, inflating holding. The smarter plans isolate the promo week and produce it fresh.
  3. Silver-Meal tied the optimum here — but not always. In this instance the heuristic matched Wagner-Whitin. On other demand patterns it won't, which is exactly why an exact solver earns its keep.

Choosing a rule in the real world

There's no single winner. Pick by the shape of your costs and constraints:

  • Use Lot-for-Lot when setups are cheap and fast (think SMED-enabled lines), when the SKU is highly perishable and you can't build ahead, or when it's a low-volume, made-to-order item.
  • Use POQ or Silver-Meal when you want transparency. Planners can see and explain "we cover two weeks" or "we extend until cost-per-period ticks up." These are "good enough" and easy to audit.
  • Let a solver run Wagner-Whitin when the setup-to-holding ratio is high, demand is genuinely lumpy, and the cost of getting it wrong is large. Fast exact algorithms make this practical per SKU across the horizon.

And remember: lot-sizing never lives alone on a real line. Your run sizes have to respect minimum run quantities, finite capacity, and changeover sequencing. A lot-sizing rule might say "make 210 cases," but if your minimum run is 500, or the line is already at capacity that week per rough-cut capacity planning, the plan has to bend. Because promo weeks stack setups, the sequence you run them in matters too — see sequence-dependent changeover scheduling.

Watch-outs specific to CPG

Shelf life caps how far forward you can build. The math will happily consolidate six weeks of demand into one run to save setups — but if the product only holds four weeks, that plan is illegal. Treat shelf life as a hard constraint on run coverage, not a soft preference.

Your setup cost must be real. The entire tradeoff hinges on the setup-to-holding ratio. If your $300 is a stale standard that ignores true changeover time, purge, and scrap, every rule will make bad calls. Measure changeover the way you measure it for OEE and schedulable run rate.

Don't conflate lot-sizing with safety stock. Dynamic lot-sizing assumes you know the time-phased requirements. Forecast error is a separate problem, buffered with safety stock and service-level targets, and often segmented by demand variability via ABC-XYZ analysis. Size lots to the plan; buffer the uncertainty separately.

Beware planning nervousness. Re-solving every period on a rolling horizon can churn your plan — a small forecast update reshuffles every run. Time fences and a frozen zone tame that instability so the near-term schedule stays executable even as the math keeps optimizing the back half.

Takeaways

  • When net requirements vary period to period, a single fixed batch size is provably suboptimal. Size runs dynamically.
  • Every rule trades setup cost against holding cost — get those two numbers right first.
  • Lot-for-Lot minimizes inventory but maximizes changeovers; POQ/Silver-Meal are transparent and usually good; Wagner-Whitin is optimal and now fast enough to run routinely.
  • Isolate promo spikes — don't let a rigid coverage interval force an expensive early build.
  • Respect shelf life, minimum runs, capacity, and forecast error as separate constraints layered on top of the lot-sizing math.

Inside CPG Scheduler, lot-sizing isn't a setting you tune once and forget. The agentic scheduler evaluates the setup-to-holding tradeoff per SKU across the horizon — solving Wagner-Whitin where it pays and applying transparent heuristics where they don't — while honoring shelf life, minimum run sizes, capacity, and your frozen zone. The result is run sizes that flex with demand instead of fighting it.

Sources

More from the journal