PERODIC REVIEW: WAGNER-WHITIN MODEL
Wagner and Whitin 1958
Features of the dynamic economic lot-sizing model
- Demand: different in each period, unlike the EOQ model
- having zero-inventory ordering(ZIO)
- finite horizon, consisting of T T T period
- place order and receive order instantly
- holding costs are assessed based on the on-hand inventor
MIP Formulation
decision variables:
variables | meaning |
---|---|
q t q_t qt | number of units orderd |
y t y_t yt | 1 if we order ,0 otherwise |
x t x_t xt | inventory level |
parameters:
parameters | meaning |
---|---|
d t d_t dt | demand |
K K K | fixed cost |
h h h | holding cost |
c c c | purchase cost |
the Wagner-Whitin model
KaTeX parse error: Undefined control sequence: \mbox at position 74: …& \tag{3.33}\\ \̲m̲b̲o̲x̲{s.t.}\quad &x_…
M: large number, could be set to ∑ s = t T d s \sum_{s=t}^Td_s ∑s=tTds
Dynamic Programming Algorithm
http://t.csdn.cn/iyQ5Q
Let θ t \theta_t θt be the optimal cost in period t t t. We can define θ t \theta_t θt recursively in terms of θ s \theta_s θs for later periods s s s.
First define θ T + 1 ≡ 0 \theta_{T+1}\equiv0 θT+1≡0
Then
θ
t
=
min
t
<
s
≤
T
+
1
{
K
+
h
∑
i
=
t
s
−
1
(
i
−
t
)
d
i
+
θ
s
}
(3.39)
\theta_t=\min_{t<s{\leq}T+1}\left\{K+h\sum_{i=t}^{s-1}(i-t)d_i+\theta_s\right\}\tag{3.39}
θt=t<s≤T+1min{K+hi=t∑s−1(i−t)di+θs}(3.39)
Algorithm:
- θ T + 1 ← 0 \theta_{T+1}\leftarrow0 θT+1←0
- f o r t = T , . . . , 1 d o \mathbf{for}{\quad}t=T,...,1\mathbf{do} fort=T,...,1do
- θ t ← right-hand side of(3.39) {\quad}{\quad}\theta_t{\leftarrow}\text{right-hand side of(3.39)} θt←right-hand side of(3.39)
- s t ← argmin in right-hand side of(3.39) {\quad}{\quad}s_t{\leftarrow}\text{argmin in right-hand side of(3.39)} st←argmin in right-hand side of(3.39)
- e n d f o r \mathbf{end}\quad\mathbf{for} endfor
- r e t u r n θ t , s ( t ) for all t = 1 , . . . T \mathbf{return}\quad\theta_t,s(t)\quad\text{for all}{\quad}t=1,...T returnθt,s(t)for allt=1,...T
equivalent problem
The Wagner-Whitin model is equivalent to a network with
T
+
1
T+1
T+1 modes in which each node represents a time period and an arc from period
t
t
t to period
s
s
s represents ordering in period
t
t
t to satisfy the demands of period
t
,
t
+
1
,
.
.
.
s
−
1
t,t+1,...s-1
t,t+1,...s−1. The cost the this arc is
K
+
h
∑
i
=
t
s
−
1
(
i
−
t
)
d
i
K+h\sum_{i=t}^{s-1}(i-t)d_i
K+hi=t∑s−1(i−t)di
solving the Wagner-Whitin problem is equivalent to finding a shortest path through the network below:
eg1: a 4-period planning horizon model
parameters | meaning | value |
---|---|---|
d t d_t dt | demand | [90,120,80,70] |
K K K | fixed cost | 500 |
h h h | holding cost | 2 per period |
absorbing state
θ
5
=
0
\theta_5=0
θ5=0
no need for comparison the only arc from node 4 to node 5 is weighted
K
K
K
θ
4
=
K
+
h
(
0
⋅
d
4
)
+
θ
5
,
s
(
4
)
=
5
\theta_4=K+h(0{\cdot}d_4)+\theta_5,s(4)=5
θ4=K+h(0⋅d4)+θ5,s(4)=5
comparing arc
K
K
K with arc
K
+
h
D
4
K+hD_4
K+hD4
θ
3
=
min
{
K
+
h
(
0
⋅
d
3
)
+
θ
4
,
K
+
h
(
0
⋅
d
3
+
1
⋅
d
4
)
+
θ
5
}
=
min
{
1000
,
640
}
=
640
,
s
(
3
)
=
5
\begin{aligned} \theta_3&=\min\{K+h(0{\cdot}d_3)+\theta_4,K+h(0{\cdot}d_3+1{\cdot}d_4)+\theta_5\}\\ &=\min\{1000,640\}\\ &=640\end{aligned},s(3)=5
θ3=min{K+h(0⋅d3)+θ4,K+h(0⋅d3+1⋅d4)+θ5}=min{1000,640}=640,s(3)=5
comparison of
K
K
K,
K
+
h
D
3
K+hD_3
K+hD3,
K
+
h
D
3
+
2
h
D
4
K+hD_3+2hD_4
K+hD3+2hD4
θ
2
=
min
{
K
+
h
(
0
⋅
d
2
)
+
θ
3
,
K
+
h
(
0
⋅
d
2
+
1
⋅
d
3
)
+
θ
4
,
K
+
h
(
0
⋅
d
2
+
1
⋅
d
3
+
2
⋅
d
4
)
+
θ
5
}
=
min
{
1140
,
1160
,
940
}
=
940
,
s
(
2
)
=
5
\begin{aligned} \theta_2& \begin{aligned}=\min\{&K+h(0{\cdot}d_2)+\theta_3,K+h(0{\cdot}d_2+1{\cdot}d_3)+\theta_4,\\ &K+h(0{\cdot}d_2+1{\cdot}d_3+2{\cdot}d_4)+\theta_5\}\end{aligned}\\ &=\min\{1140,1160,940\}\\ &=940\end{aligned},s(2)=5
θ2=min{K+h(0⋅d2)+θ3,K+h(0⋅d2+1⋅d3)+θ4,K+h(0⋅d2+1⋅d3+2⋅d4)+θ5}=min{1140,1160,940}=940,s(2)=5
θ 1 = min { K + h ( 0 ⋅ d 1 ) + θ 2 , K + h ( 0 ⋅ d 1 + 1 ⋅ d 2 ) + θ 3 , K + h ( 0 ⋅ d 1 + 1 ⋅ d 2 + 2 ⋅ d 3 ) + θ 4 , K + h ( 0 ⋅ d 1 + 1 ⋅ d 2 + 2 ⋅ d 3 + 3 ⋅ d 4 ) + θ 5 } = min { 1440 , 1380 , 1560 , 1480 } = 1380 , s ( 1 ) = 3 \begin{aligned} \theta_1& \begin{aligned}=\min\{ &K+h(0{\cdot}d_1)+\theta_2,\\ &K+h(0{\cdot}d_1+1{\cdot}d_2)+\theta_3,\\ &K+h(0{\cdot}d_1+1{\cdot}d_2+2{\cdot}d_3)+\theta_4,\\ &K+h(0{\cdot}d_1+1{\cdot}d_2+2{\cdot}d_3+3{\cdot}d_4)+\theta_5 \}\end{aligned}\\ &=\min\{1440,1380,1560,1480\}\\ &=1380\end{aligned},s(1)=3 θ1=min{K+h(0⋅d1)+θ2,K+h(0⋅d1+1⋅d2)+θ3,K+h(0⋅d1+1⋅d2+2⋅d3)+θ4,K+h(0⋅d1+1⋅d2+2⋅d3+3⋅d4)+θ5}=min{1440,1380,1560,1480}=1380,s(1)=3
in period 1 we order and s ( 1 ) = 3 , Q 1 = d 1 + d 2 = 210 s(1)=3,Q_1=d_1+d_2=210 s(1)=3,Q1=d1+d2=210, and Q 3 = d 3 + d 4 = 150 Q_3=d_3+d_4=150 Q3=d3+d4=150, total cost is 1380