Dynamic lot-size model

The dynamic lot-size model in inventory theory, is a generalization of the economic order quantity model that takes into account that demand for the product varies over time. The model was introduced by Harvey M. Wagner and Thomson M. Whitin in 1958.

Problem setup
We have available a forecast of product demand $dt$ over a relevant time horizon t=1,2,...,N (for example we might know how many widgets will be needed each week for the next 52 weeks). There is a setup cost $st$ incurred for each order and there is an inventory holding cost $i_{t}$ per item per period ($s_{<VAR >t</VAR >}$ and $<VAR >i</VAR >_{<VAR >t</VAR >}$ can also vary with time if desired). The problem is how many units $<VAR >x</VAR >_{<VAR >t</VAR >}$ to order now to minimize the sum of setup cost and inventory cost. Let us denote inventory:

$$I=I_{0}+\sum_{j=1}^{t-1}x_{j}-\sum_{j=1}^{t-1}d_{j}\geq0$$

The functional equation representing minimal cost policy is:

$$f_{t}(I)=\underset{x_{t}\geq 0 \atop I+x_{t}\geq d_{t}}{\min}\left[ i_{t-1}I+H(x_{t})s_{t}+f_{t+1}\left( I+x_{t}-d_{t} \right) \right]$$

Where H is the Heaviside step function. Wagner and Whitin proved the following four theorems:


 * There exists an optimal program such that I$<VAR >x</VAR >_{<VAR >t</VAR >}$=0; ∀t
 * There exists an optimal program such that ∀t: either $<VAR >x</VAR >_{<VAR >t</VAR >}$=0 or $$x_{t}=\textstyle \sum_{j=t}^{k} d_{j}$$ for some k (t≤k≤N)
 * There exists an optimal program such that if $<VAR >d</VAR ><SUB ><VAR >t*</VAR >$ is satisfied by some $<VAR >x</VAR ><SUB ><VAR >t**</VAR >$, t**<t*, then $<VAR >d</VAR >_{<VAR >t</VAR >}$, t=t**+1,...,t*-1, is also satisfied by $<VAR >x</VAR ><SUB ><VAR >t**</VAR >$
 * Given that I = 0 for period t, it is optimal to consider periods 1 through t - 1 by themselves

Planning Horizon Theorem
The precedent theorems are used in the proof of the Planning Horizon Theorem. Let

$$F(t)= \min\left[ {\underset{1\leq j < t}{\min}\left[ s_{j}+ \sum_{h=j}^{t-1}\sum_{k=h+1}^{t}i_{h}d_{k}+F(j-1) \right] \atop s_{t}+F(t-1)} \right]$$

denote the minimal cost program for periods 1 to t. If at period t* the minimum in F(t) occurs for j = t** ≤ t*, then in periods t > t* it is sufficient to consider only t** ≤ j ≤ t. In particular, if t* = t**, then it is sufficient to consider programs such that $<VAR >x</VAR ><SUB ><VAR >t*</VAR >$ > 0.

The algorithm
Wagner and Whitin gave an algorithm for finding the optimal solution by dynamic programming. Start with t*=1:


 * 1)  Consider the policies of ordering at period t**, t** = 1, 2, ..., t*, and filling demands $<VAR >d</VAR ><SUB ><VAR >t</VAR >$ , t = t**, t** + 1, ... , t*, by this order
 * 2) Add H($<VAR >x</VAR >_{<VAR >t**</VAR >}$)$<VAR >s</VAR >_{<VAR >t**</VAR >}$+$<VAR >i</VAR >_{<VAR >t**</VAR >}$$<VAR >I</VAR >_{<VAR >t**</VAR >}$ to the costs of acting optimally for periods 1 to t**-1 determined in the previous iteration of the algorithm
 * 3) From these t* alternatives, select the minimum cost policy for periods 1 through t*
 * 4) Proceed to period t*+1 (or stop if t*=N)

Because this method was perceived by some as too complex, a number of authors also developed approximate heuristics (e.g., the Silver-Meal heuristic ) for the problem.