Vous êtes sur la page 1sur 2

u1screre uemand Systems: Deterministic Models

IQ'

Chap. 4

The Wagner-Whitin algorithm obtains a!t optimum solution to the -deterministic dynamic order size problem over a finite horizon. It requires that all
period demands be satisfied, that the time periods in the planning horizon be
of a fixed determinate length, and that orders be placed to assure the arrival of
the goods at the beginning of a time period. The Wagner-Whitin algorithm is
a dynamic programming approach which can be used to determine the minimum controllable cost policy. It uses seveial theorems to simplify the computations as explained by the following three-step procedure:

183

Wagner-Whitin Algorithm

fw-l = Zvw - l

fu-1

The order prior to the final order occurs in


period v and is sufficient to satisfy demand in
periods v through w - 1.

fv - l

= Z1 u-1 + fo

The first order occurs in period 1 and is sufficient to satisfy demand in periods 1 through
u - l.

Example 2

1. Calculate the total 'Variable cost matrix for all possible ordering alterna-

tives for a time horizon consisting of N periods. The total variable cost
includes ordering and holding costs. Define ZC<! to be the total variable
cost in periods c through e of placing an order in period c which satisfies
requirements in periods c through .e:

An item has a unit purchase cost of $50, an ordering cost per order of $100, and
a holding cost fraction per period of 0.02. Determine the order quantities by the
Wagner-Whitin algorithm from the demand given below. Assume the initial
inventory is zero at the beginning of period 1.
Period
Demand

......,
~

Zc~

C + hP

l..t

(Qa - Qc;)

for

c ~ e ~ N,

75

3
33

2
0

4
28

10

i=c

The total variable cost matrix shown in Thble 4-1 is calculated as follows:

where

C = ordering cost per order,

= holding cost fraction per period,

= unit purchase cost,


=

E Rk,

= demand rate in period k.

2. Define f~ to be the minimum possible cost in periods 1 through e, given


that the inventory level at the end of period e is zero. The algorithm starts
with / 0 = 0 and calculates / 1, / 2 , , f N in that order. Then h is calculated in ascending order using the formula

fr = Min(Zc~ + fc _ 1)

for c

Z wN

+ f w- 1

E (Qu

- Qci),

i- c

Zu

100 + 1(75 - 75)

100,

+ (108 - 108)]

= 166,

Z 14 ::= 100 + 1[(136 - 75) + (136 - 75)

+ (136 - 108) + (136 - 136)]


Z 15 = 100

= 250,

+ 1[(136 - 75) + (136 - 75)


+ (136 - 108) + (136 _ . 136) + (136 - 136)] = 250,

Z 16 = 100 + 1[046 - 75) + (146 - 75) + (146 - 108)

= 1, 2, . . . , e.

In other words, for each period all combinations of ordering alternatives


and supplementary .h strategies are compared. The best (lowest cost)
combination is recorded as the fe strategy to satisfy requirements for
periods 1 through e. The vaiue of IN is the cost of the optimal order

schedule.
3. To translate the optimum solution (jN) obtained by the algorithm to order
quantities, appiy the following:
JN

hP

Z 13 = 100 + 1[(108 - 75) + (108 - 75)

k-c

Rk

c +

Z 12 = 100 + 1[(75 - 75) + (75 - 75)1 = 100.

Qa

+ (l46 - 136) + (146 - 136) + (146 - 146)] = 300,


TABLE 4-1

Total Variable Cost Matrix Zce

z=
c
1

The final order occurs at period w and is sufficient to satisfy demand in periods w through

3
4

N.

=
100

100
100

166
133
100

250
189
128
100

250
189
128
100
100

300
229
158
120
1io
100

Discrete Demand Systems: Deterministic Models

184

Z 22

100 + 1[(0 - 0)]

Chap. 4

100,

/ 3 = Min(Z13

Z 23 = 100 + 1[(33 - O) + (33 - 33)] = 133,

= 166

Z 24 = 100 + 1[(61 - O) + (61 - 33) + (61 - 61)1 = 189,


Z 26 = 100 + 1[(71 - O) + (71 - 33) + (71 - 61)

= (250

Z 35 = 100

=
z4-o; =
z.s =
Z 46 =

128,

= 228

1[(61 - 33) + (61 - 61) + (61 - 61)] = 128,

100 + 1[(28 - 28)]

100,

100 + 1((38 - 28) + (38 - 28) + (38 - 38)]

100 + 1[(0 - 0)]

Z 56

=
=

100 + 1[(10 - 0) + (10 - 10)]


100 + 1[(10 - 10)J

/6
158,

110,

100.

The minimum possible cost in periods 1 through e Cf~> shown in Thb1e 4-2, is
determined as follows:
f~

Min(Z + fc-t) for c = l, 2, ... , 6.

f o = 0,
/ 1

= Min(Z 11 + / 0 ) = (100 +
= 100

/~ =

for

for

TABLE 4-2

c
I

Z 11 + fo,

z,2

+ fo.

Total Variab!e Cost Alternatives and f.

100

100
200

166
233
200

250
289
228
266

.250
289
228
266
328

300
329
258+286
338
328

100

100

166

21.8

228

2
3

5
6

f.

z34 + f2,

+ 0, 189 + 100, 128 + 100, 100 + 166, 100 + 228)


for

= (300

Z 35 + /

2,

+ fo, Zu + /,, Z36 + /2, Z46 + f3, Zs6 +f., Z66 + fs)

+ 0, 229 + 100, 158 + 100, 120 + 166, 110 + 228, 100 + 228)
for

z36 + /2.

Period
Demand
Order Quantity
Cumulative
Variabk Cost

1
75
75

2
0
0

3
33
71

4
28
0

5
0
0

6
10
0

100

100

238

248

258

258

0)

Min(Z, 7 + / 0 , Z 22 + /;) = Min(100 + 0, 100 + 100)

- 100

for

In the exa.mple/6 = IN is the combination of Z 36 andf2 , so the last order will be


placed in period 3 and wiil satisfy the req~rements from periods 3 through 6, or
33 + 28 . + 0 + 10 = 71 units;/2 is the combination of Z 12 andf0 , so the order
will be placed in period 1 and will satisfy requirements from periods 1 through 2,
or 75 + 0 = 75 units. The optimal order schedule and cumulative variable costs
ar~ as follows:

120,

100,

+ fo.

+ 0, 189 + 100, 128 + 100, 100 + 166)

= Min(Z,6

= 258

100 + 1[(28 - 28) + (28 - 28)]

100,

Z 55

Z 66

100 ..,. 1((71 - 33) + (71 - 61) + (71 - 61) + (71 - 71)]

Z 36

= (250

1[(61 - 33) + (61 - 61)1

z13

+ /,, Z33 + / 2) = (166 + 0, 133 + 100,100 + lOOt

fs = Min(Z,s + fo, Z2s + f,, Z3s + f2, Z,.s + f3, Zss +f... )

Z 33 = 100 + I [(33 - 33)] = 100,


J

for

= 228

+ (71 - 61) + (71 - 71)] = 229,

= w:-.

+J0 , Z 23

f 4 = Min(Z 14 + f 0 , Z 24 + f 1 , Z 3 + / 2, Z 44 + f 3)

Z 2s = 100 + 1{(61 - O) + (61 - 33) + (61 - 61) + (61 - 61)1 = 189,

Z 34

185

Wagner-Whitin Algorithm

258

The example illustrates the three-step procedure for the Wagner-Whitin


algorithm. The frrst step develops the total variable cost matrix for all possible ordering alternatives for the time horizon as shown in Table 4-1. Each row
in Table 4-1 gives the total variable cost of placing an order in the respective period for the demand in that period and all future periods. For example,
row 4 in Table 4-1 contains 100, 100, and 120, which are the total variabie
costs of placing an order in period 4 for the demands in periods 4, 5, and 6
successively.
The second step is to derive Thble 4-2 from the cost matrix developed in
Table 4-1. The frrst row (c = 1) in Thble 4-2 is always the same as the first row
in Table 4-1. Ali subsequent rows in Thble 4-2 are obtained by adding the
smallest value in the preceding column (e = c - i) of Thble 4-2 to each of the
corresponding row entries in Table 4-1. For example, row 4 in Table 4-2 is
obtained by adding 166 (smaliest value in preceding column 3 ofThble 4-2) to
100, 100, ar..d 120 (corresponding values in row 4 of Thble 4-1). The resulting
entries in row 4 in Table 4-2 become 266, 266, and 286 respectively.