Definition · The lot-sizing problemDemands d₁, ..., d_T are known. An order placed in period t arrives in time for period t and costs a fixed setup charge K whatever its size. Stock carried from one period into the next costs h per unit per period. Shortages are not allowed and there is no stock at the start or required at the end.
A plan says how much to order in each period. Its cost is K times the number of orders, plus h times the total unit-periods of holding.
Theorem · An optimal plan orders only when stock has run outThere is an optimal plan in which every order arrives in a period that begins with nothing in stock. Consequently every order covers a consecutive run of periods, the runs partition 1 through T, and the quantity ordered at the start of a run is exactly the demand over that run.
So the search is over the 2^(T−1) ways of choosing where the runs break — one binary choice at each of the T−1 boundaries — rather than over quantities.
Take an optimal plan and suppose period t both begins with stock s > 0 and places an order of size q > 0. Let ε be the smaller of s and q.
Reduce the earlier order by ε and increase period t's order by ε: the number of orders is unchanged or falls by one, and ε units are held for fewer periods, so holding cost strictly falls. The plan is no more expensive.
Repeat while any period both holds and orders. Each step removes at least one such period and never creates one, so the process ends, and it ends at a plan that is optimal and orders only into an empty stock.
□
That is the whole of the modelling work. What is left is the recursion, and it is the one from “Filling the Table from the End” with the stages relabelled: let F(t) be the cheapest way to cover periods 1 through t exactly, with F(0) = 0. The last order in such a plan went in some period j, covering j through t, so F(t) is the smallest over j of F(j−1) plus K plus the holding on the run j to t. Holding on that run is h times Σ (i − j) dᵢ, because period i's demand sits in stock for i − j periods.
demand d1..d6 = 10 62 12 130 154 129 K = 54 h = 2
F(0) = 0
F(1) = 54 order at 1
F(2) = min( 178 , 108 ) = 108 order at 2
F(3) = min( 226 , 132 , 162 ) = 132 order at 2
F(4) = min( 1006 , 652 , 422 , 186 ) = 186 order at 4
F(5) = min( 2238 , 1576 , 1038 , 494 , 240 ) = 240 order at 5
F(6) = min( 3528, 2608, 1812, 1010, 498, 294 ) = 294 order at 6
reading the argmins backwards from t = 6:
last order at 6, covering 6 so F(5) is next
last order at 5, covering 5 so F(4) is next
last order at 4, covering 4 so F(3) is next
last order at 2, covering 2 to 3 so F(1) is next
last order at 1, covering 1
five orders: 10 in p1, 74 in p2, 130 in p4, 154 in p5, 129 in p6
Five orders at 54 each is 270, and the plan's holding is 24 — the whole of it is period 3's demand of 12 carried one period at 2 per unit — so 294. The lab prices the plan again that way, from the demand and the two charges rather than from F, and prints the result beside the recursion's. It also enumerates all 32 order patterns and prices each of them; the best is 294 and it breaks at the same places.
Why the argmin column is worth more than the value column
Look at the row for F(4). The candidates are 1006, 652, 422 and 186, and the last of them wins by a wide margin: covering period 4's demand of 130 from any earlier order means carrying 130 units for at least one period at 2 each, which is 260 on its own against a setup charge of 54. The value column tells you the answer; the argmin column tells you why, and it is where the structure of the instance is visible.
Example · Flat demand, and the block structureSet every demand to 40, the setup to 90 and the holding rate to 1. The table comes out 0, 90, 130, 210, 260, 340, 390, the plan is three orders of 80 covering periods 1 to 2, 3 to 4 and 5 to 6, and the cost is 390.
Even blocks, because nothing distinguishes one period from another. Now move the setup charge up and down with the slider and watch where the breaks go: raise it and the intervals lengthen, raise the holding rate instead and they shorten. The plan is the balance of the two and neither alone decides it.
Example · One period that dwarfs the restDemands 8, 6, 200, 7, 9, 5 with a setup of 60 and a holding rate of 3. The cheapest plan costs 234 with three orders, and the middle one is placed in period 3 itself.
Carrying 200 units even one period would cost 600, which is ten setup charges, so no optimal plan holds that demand at all. The instance is worth meeting because it shows the theorem doing real work: the search is over partitions, and this one is forced to break just before period 3.
What the model left out
Demand is known exactly, and known in advance for the whole horizon. Orders arrive instantly. Shortages are impossible rather than expensive. There is no capacity on an order and no minimum size, no discount for ordering more, and the setup charge is the same in every period. Each of those is a real feature of real ordering and each of them is absent here; several of them would break the theorem rather than merely complicate the arithmetic, which is the sort of omission worth knowing about before quoting a plan.