9
Computers Opns Res. Vol. 17, No. 3, PP. 255-263, 1990 0305-0548/90 53.00 + 0.00 Printed in Great Britain. All rights reserved Copyright C 1990Pergamon Press plc LOT-TREES: A UNIFYING VIEW AND EFFICIENT IMPLEMENTATION OF FORWARD PROCEDURES FOR THE DYNAMIC LOT-SIZE PROBLEM MICHAEL BASTIAN* Lehr und Forschungsgebiet, Unternehmensforschung (OR), RWTH Aachen, Templergraben 55, 5100 Aachen, F.R.G. (Receiwd December 1988; revised September 1989) Scope and PurpostGiven the demand values of a sequence of periods, the set-up cost and the holding cost rate, the problem under consideration is to decide on the size of the first lot to be produced. A forward solution algorithm and its implementation on a tree structure is presented that is quick and “perfect” in the sense that termination occurs as soon as the number of demand values taken into account permits to specify an optimal decision. Abstract-Since the original work of Wagner and Whitin [l. Mgmt Sci. 5, 89-96 (1958)] a number of planning horizon results and associated forward solution procedures for the dynamic lot-size problem have been published; among them the papers of Zabel[2. Mgmt Sci. 10,465-471 (1964)], Lundin/Morton [3. Opns Res. 23,711-734 (1975)] and Chand/Morton [4. Naval Res. Log. Q. 33, 111-122 (1986)]. This paper introduces “lot-trees”, a data structure that serves as a unifying framework for the exposition of these approaches, and at the same time leads to efficient implementations. 1. INTRODUCTION This paper considers the classic dynamic lot-size model without backlogging. For ease of exposition it is assumed that the holding cost h, charged for each unit in stock at the end of a period, as well as the set-up cost A are stationary. Initial stock is zero, therefore a lot-size decision has to be made that raises inventory at the beginning of the first period with positive demand; let this be period number one. Given the demand di, i = 1,2,. . . , of subsequent periods the problem is to lix (at least) ql, the size of the first lot. Let a regeneration point be a period with an ending inventory of zero. If there exists periods p and f B p with the property that for each n 2 f, p is a regeneration point of an optimal policy that minimizes the sum of set-up and holding costs over periods 1 to n, then p is called a planning horizon, and f is a forecast horizon for p. In this situation, the policy that minimizes the cost up to the end of period p is called optimal, because it is part of a long run optimal policy, independently of the demand after period f. See Lundin/Morton [3] for a further discussion on planning and forecast horizons. If p is known to be a planning horizon, then each solution of the following finite horizon problem is optimal: DLSP(p): Determine a positive number R of replenishments and set-up periods ti (i = 1,2, . . . , R; l=t,<t,<~~~<t,<p+l=t,+,)suchthat R XL ri+1-1 M + 1 (j - ti)dj i=l j-n+1 1 is minimized, where M denotes the ratio A/h. An exact solution to DLSP(p) is easily computed using the Wagner-Whitin algorithm [l]. Thus, the determination of (the lirst part of) an optimal policy reduces to the problem of finding a planning horizon. Situations, where planning horizons are known in advance, are hardly found in *Michael Bastian is Professor of Operations Research at Aachen Institute of Technology, F.R.G. He received his diploma in industrial engineering at Karlsruhe University (F.R.G.), MS in operations research at Stanford Umversity, and a doctoral degree from the Department of Business Administration at Gottingen University (F.R.G.). His main research interests are in the field of mathematical programming and production planning. He has published papers in Mathematical Programming, Journal of the Operational Research Society, Methoden des Operations Research and other German journals. 255

Lot-trees: A unifying view and efficient implementation of forward procedures for the dynamic lot-size problem

Embed Size (px)

Citation preview

Page 1: Lot-trees: A unifying view and efficient implementation of forward procedures for the dynamic lot-size problem

Computers Opns Res. Vol. 17, No. 3, PP. 255-263, 1990 0305-0548/90 53.00 + 0.00 Printed in Great Britain. All rights reserved Copyright C 1990 Pergamon Press plc

LOT-TREES: A UNIFYING VIEW AND EFFICIENT IMPLEMENTATION OF FORWARD PROCEDURES FOR THE

DYNAMIC LOT-SIZE PROBLEM

MICHAEL BASTIAN*

Lehr und Forschungsgebiet, Unternehmensforschung (OR), RWTH Aachen, Templergraben 55, 5100 Aachen, F.R.G.

(Receiwd December 1988; revised September 1989)

Scope and PurpostGiven the demand values of a sequence of periods, the set-up cost and the holding cost rate, the problem under consideration is to decide on the size of the first lot to be produced. A forward solution algorithm and its implementation on a tree structure is presented that is quick and “perfect” in the sense that termination occurs as soon as the number of demand values taken into account permits to specify an optimal decision.

Abstract-Since the original work of Wagner and Whitin [l. Mgmt Sci. 5, 89-96 (1958)] a number of planning horizon results and associated forward solution procedures for the dynamic lot-size problem have been published; among them the papers of Zabel[2. Mgmt Sci. 10,465-471 (1964)], Lundin/Morton [3. Opns Res. 23,711-734 (1975)] and Chand/Morton [4. Naval Res. Log. Q. 33, 111-122 (1986)]. This paper introduces “lot-trees”, a data structure that serves as a unifying framework for the exposition of these approaches, and at the same time leads to efficient implementations.

1. INTRODUCTION

This paper considers the classic dynamic lot-size model without backlogging. For ease of exposition it is assumed that the holding cost h, charged for each unit in stock at the end of a period, as well as the set-up cost A are stationary. Initial stock is zero, therefore a lot-size decision has to be made that raises inventory at the beginning of the first period with positive demand; let this be period number one.

Given the demand di, i = 1,2,. . . , of subsequent periods the problem is to lix (at least) ql, the size of the first lot. Let a regeneration point be a period with an ending inventory of zero. If there exists periods p and f B p with the property that for each n 2 f, p is a regeneration point of an optimal policy that minimizes the sum of set-up and holding costs over periods 1 to n, then p is called a planning horizon, and f is a forecast horizon for p. In this situation, the policy that minimizes the cost up to the end of period p is called optimal, because it is part of a long run optimal policy, independently of the demand after period f. See Lundin/Morton [3] for a further discussion on planning and forecast horizons.

If p is known to be a planning horizon, then each solution of the following finite horizon problem is optimal:

DLSP(p): Determine a positive number R of replenishments and set-up periods ti (i = 1,2, . . . , R; l=t,<t,<~~~<t,<p+l=t,+,)suchthat

R

XL

ri+1-1 M + 1 (j - ti)dj i=l j-n+1 1

is minimized, where M denotes the ratio A/h.

An exact solution to DLSP(p) is easily computed using the Wagner-Whitin algorithm [l]. Thus, the determination of (the lirst part of) an optimal policy reduces to the problem of finding a planning horizon. Situations, where planning horizons are known in advance, are hardly found in

*Michael Bastian is Professor of Operations Research at Aachen Institute of Technology, F.R.G. He received his diploma in industrial engineering at Karlsruhe University (F.R.G.), MS in operations research at Stanford Umversity, and a doctoral degree from the Department of Business Administration at Gottingen University (F.R.G.). His main research interests are in the field of mathematical programming and production planning. He has published papers in Mathematical Programming, Journal of the Operational Research Society, Methoden des Operations Research and other German journals.

255

Page 2: Lot-trees: A unifying view and efficient implementation of forward procedures for the dynamic lot-size problem

256 MICHAEL BASTIAN

practice. On the other hand, choosing p by a rule of thumb may have unpleasant effects, because it is well-known that even the first lot-size decision is sometimes very sensitive to the choice of the horizon [YJ.

To avoid these problems, a large portion of the literature on solution techniques for the dynamic lot-size problem concentrates on heuristics that aggregate subsequent demands to one lot until a local minimum of some reasonable objective function (e.g. average unit cost, average cost per period) is reached. (For recent surveys cf. [6,7].) Most of the standard heuristics use demand data of only very few periods. Nevertheless, they behave quite well on the average. For some demand patterns (e.g. decreasing or sporadic demand), where the results of simple heuristics are not as satisfactory, more complicated modifications have been worked out [8].

Another direction of research aims at the determination of planning horizon results. The idea is to apply a forward procedure based on the Wagner-Whitin algorithm that successively solves larger finite horizon problems until a planning horizon is discovered. Milestones on this approach are the papers of Wagner/Whitin [1], Zabel [2], Lundin/Morton [3] and Chand/Morton [4]. If f is a forecast horizon for the planning horizon p, then n 2 f is also a forecast horizon for p. A forward algorithm that is guaranteed to disclose a planning horizon using demand data just up to the minimal forecast horizon is called perfect. A perfect procedure has been devised by Chand and Morton [4].

This paper takes the unifying view that forward algorithms perform a sequence of operations on a tree structure. It turns out that this view leads to very efficient implementations. Furthermore, the essential features of known (and further) variants become very crisp, because their only difference is in the rules that are applied to prune the tree.

Section 2 recalls the Wagner-Whitin algorithm and introduces the tree structure. In Section 3, a rule of Zabel is used to prune lot-trees; the result is an implementation of a planning horizon procedure suggested by Lundin and Morton [3]. More implementational details are considered in Section 4, and Section 5 contains a numerical example. Stronger rules for pruning lot-trees are developed in Section 6. They lead to a perfect planning horizon procedure described in Section 7.

2. A LOT-TREE FOR THE WAGNER-WHITIN ALGORITHM

In the sequel we shall measure the cost of a finite horizon policy by the ratio of the sum of its actual set-up and holding costs and the holding cost rate h. Using this measure, let Kj denote the minimal cost for periods 1 to j - 1 given that j - 1 is a regeneration point. Notice that Kj is the optimal objective value of problem DLSP(j - 1 ), and Kj+ 1 = Kj if dj = 0. Initialize K, := 0. K, + 1, the minimal cost of the first n periods, may be computed using the following recursion (Wagner-Whitin algorithm):

Kj+I :=min K, + M + i (i - t)di 1 1 < t <j, d, > 0 j=l,2 ,..., n. I i=f

This reflects the fact that the cost of periods 1 to j is the sum of the cost encountered during the last cycle and the cost of the optimal history before that cycle. Furthermore, in an optimal solution, set-ups may only occur in periods with positive demand.

When K,, 1 is computed, the optimal policy up to the horizon n is easily obtained by a backward recursion: ifs is the last set-up period, look where K, assumes its minimum, and proceed backwards.

Define a lot-tree for the dynamic lot-size model to be a tree structure with the following properties: each node j of the tree represents a period j with dj>O and holds the value Kj. Node 1 is the root. Node j is an offspring of node p if there is an optimal solution to DLSP(j - 1) that has its last set-up in period p, i.e.

Kj=K,+M+j~l(i-p)di. i=p

In case of a tie, p is taken to be the largest of the potential parent nodes. Following any path in a lot-tree from the root to some leaf j (excluding j) yields a list of set-up periods that corresponds to an optimal policy given that j - 1 is a planning horizon.

It is now pretty obvious how the information generated during the computations of the

Page 3: Lot-trees: A unifying view and efficient implementation of forward procedures for the dynamic lot-size problem

Lot-trees 257

Wagner-Whitin algorithm may be arranged in a lot-tree: the initialization K I :=0 corresponds to defining the root of the tree. During each iteration ii ,&&node j is generated, and if it turns out that p < j is the last set-up period in an optimal policy for periods 1 to j - 1, then node j is connected to node p. In case p = j - 1, j - 1 forms the root of a new lot-tree, and j - 2 is a planning horizon in accordance with a well-known result due to Wagner and Whitin [l].

3. PRUNING LOT-TREES

Suppose that, after the insertion of node /I into a lot-tree, some theoretical result ensures that node i < fl will never have an offspring, no matter what the future demand sequence looks like. If i is a leaf, then the branch leading to i as well as i itself may be deleted without any loss of information concerning optimal policies. Of course, this procedure may be applied recursively. Pruning the true is valuable, because it reduces the number of policies that still have to be considered.

Given the demand data of up to period /l, a node i G /I of the corresponding lot-tree is called fl-inactive if no node t > fi will be inserted as an offspring of i.

It is obvious that no b-inactive leaf is part of an optimal policy. A node is called a candidate if it is not known to be b-inactive. Notice, that if the root of a lot-tree is p-inactive, then the second set-up (after the set-up in period 1) corresponds to one of the offsprings of the root. And if in addition this lot-tree has a stem, i.e. the root has just one offspring, then the first lot-size decision is determined.

There are several results in the literature that may be used to identify p-inactive nodes and to prune a lot-tree. The following one has been given by Zabel [2]:

Theorem I (Zabel). If /I is an offspring of ~1, then all nodes i < p are /?-inactive.

Thus, if p is the parent node of 8, then a recursive procedure may be started that deletes leaves i < p. In case this pruning leads to a lot-tree having a p-inactive root and a stem, a planning horizon is determined. Otherwise, at least the set of candidate nodes is smaller which simplifies computations in subsequent iterations. Apart from the data structure this is Lundin and Morton’s “procedure 1” to generate a “simple protective planning horizon” (cf. [3] for an extensive computational study).

In order to improve on this approach, one has to look for further rules for identifying b-inactive nodes and pruning the tree; this is done in Section 6. The next section contains some considerations on the implementation of lot-tree procedures, and will also be helpful to understand Section 6.

4. IMPLEMENTING LOT-TREES

Lot-trees have been implemented in PASCAL, however, any language that supports pointer variables would be appropriate. In order to update the tree efficiently, two pointer structures are maintained: the tree itself and a pointered list of candidate nodes (CN), embedded into the tree. Access to the first node of CN, which is the node most recently generated, is possible through the pointer CNP.

Each node is represented by a record of six fields:

j Kj vj(B) NOSj DADj NCNj

When a new node is to be inserted, all potential parent nodes should be considered. These are the candidate nodes in the list CN. For such a node j, NCN, is a pointer to the next candidate node in this list (the one previously generated). The tree structure is used for pruning, which is done from the leaves down to the root. Therefore an inverted tree structure is implemented. DADj is a pointer to the parent node of j. NOS, is an integer, that holds the number of offsprings of node j.

Assume that /I is the last node that has been inserted and let t be the next period with positive demand. In this situation, Vi(p) is stored for-candidate nodes j:

V,(p) = Kj + M + f: (i - j)di. i=j

cm 17:3-n

Page 4: Lot-trees: A unifying view and efficient implementation of forward procedures for the dynamic lot-size problem

258 MICHAEL BASTIAN

V,(p) is the conditional minimum value of DLSP(/3) given that the last set-up was in period j. As no cost is associated with periods of zero demand and empty stock, V,(a) is also the minimal cost up to the end of period t - 1, given that the last set-up was in period j. If the next node t is to be inserted into the current lot-tree then its parent node cl(t) is the largest node which attains

and K, = v,,,,,(B).

min { V,(Q) I j is in the list of candidate nodes}

If K, 2 V&I) = K, + M then p(t) = /? and /? - 1 is a planning horizon according to the theorem of Wagner and Whitin. The procedure may be stopped (or continued with a new lot-tree having root B). The demand value d, of period t is now used to update

for all candidate nodes j. Vj(t)‘= Vj(P) + (t - j)d,

If t is inserted into the current lot-tree, all predecessors of p(t) in CN are t-inactive due to Zabel’s theorem and may be deleted from this list. If such a deleted node happens to be a leaf of the tree, it is completely eliminated. Also, parent nodes of eliminated nodes are recursively deleted, if they do not have other offsprings.

The computational operations associated with the insertion of a new node are given in more detail below. Notice, that the number of arithmetic operations is quite small, and passing through a pointered list is fast. Two subroutines are used: INSERT(t, p) generates a new node t, and inserts it as an offspring of node p into the lot-tree as well as into the list of candidate nodes. PRUNE(i) recursively deletes leaves on the path from node i to the root:

procedure INSERT@, PC); generate a new node and transfer t into its first field; transfer CNP into NCN, and let CNP point to the new node; NO&:= 0; NOS,,:= NOS, + 1;

K:= f$(B); V,(t),= K, + M; vj(t)l= V,(/l) + (t - j)d, for all candidate nodes j; let DAD, point to node ,u;

procedure PRUNE(i); DOWHILE NOS, = 0

i:=node identified by the pointer DADi; NOSi I= NOSi - 1

ENDDO;

Basic lot-tree iteration

Given a lot-tree and a node p(p) that is known to be the parent node of the current last node /3, let t be the next period with positive demand:

- read (t, d,) from the input file; -determine p(t) from V,,~o(fl) = min{ V,(fi) 1 j in CN}; - IF p(t) = /I, i.e. K, = V&/l) = K, + M

THEN terminate ELSE INSERT@, p(t));

FOR each node j preceding p(t) in the list CN PRUNE(j); eliminate j from CN;

ENDFOR;

(* /? - 1 is a planning horizon *)

(* by Theorem 1 *)

(* t-inactive leaves are deleted *) (* t-inactive nodes are deleted from CN *)

IF NO%,,, = 1 AND root < cl(t) THEN implement the decision along the stem

(* a planning horizon has been found *) ENDIF;

ENDIF.

Page 5: Lot-trees: A unifying view and efficient implementation of forward procedures for the dynamic lot-size problem

Lot-trees

5. NUMERICAL EXAMPLE

Consider an example with M = 280 and the following demand data [S, p. 653:

period j 1 2 7 11 15 22 25 26

259

demand dj 179 44 10 123 55 19 174 16

Each node j of the tree to be generated will be represented by the pair (j, Kj).

K, :=0, V/,(l):= M = 280. (* initialization of the root *) CURRENT NODE /I = 1, NEXT NODE t = 2:

~(2) = 1, K, = 1’1(1) = 280. l’*(2)= K,+ M =560, I’,(2)= 1/,(1)+44=324.

CURRENT NODE /I = 2, NEXT NODE t = 7: p(7) = 1, K, = 324. I’,(7) = K, + M = 604, 1/,(7) = 1/,(2) + lO(5) = 610. I’, (7) = I’, (2) + 10(6) = 384.

CURRENT NODE p = 7, NEXT NODE t = 11: p(ll)= 1, K,, = 384. l’,,(ll)=K,, +M=664, I’,(ll)= I’,(7)+ 123(4)= 1096. l’z(ll)= I’*(7)+ 123(g)= 1717, Vi(ll)= I’i(7)+ 123(10)= 1614.

CURRENT NODE /I = 11, NEXT NODE c = 15: /.#5)= 11, K,,=664. I’i5(15)=Ki5+M=944, I’,,(15)=I’,,(11)+55(4)=884, l’,(15)= 1/,(11)+55(g)= 1536, I’z(15)= I’,(ll)+55(13)=2432. Vi(15) = I’r(11) + 55(14) = 2384.

Node 15 is an offspring of node 11. Thus p( 12) = 11 and nodes 1 to 10 form a planning horizon. K, 1, the minimal cost for periods 1 to 10, equals 384. It is attained by producing the demand of periods 1, 2 and 7 in period 1.

6. IMPROVED PRUNING OF LOT-TREES

A deficiency of the lot-tree algorithm as considered in the last three sections is that it is not perfect. Even if the current lot-tree does not have a stem, the demand data used so far may well be sufficient to make an optimal lot size decision for period 1, but this is not realized, because the set of candidate nodes is larger than necessary. Our goal in this section is to further shrink the set of candidate nodes.

Theorem 2. If for two candidate nodes i and p > i the inequality Vi(B) 2 V,(p) holds, then i is b-inactive.

Proof Let Vi(p) 2 V,(8). It will be shown that i may not be the parent node of any node t 2 /I.

vi(p)> V#), i<p and B<t

=> v,(p) + i (r- i)d,>, v,(P) + i @- i)dr r=&9+ 1 r=p+ 1

=> vi(r) B VP(t) *

On the left side of this inequality we have the conditional minimal cost of DLSP(t) given the last set-up is in period i, and on the right side we have the cost for the same time window if the last set-up is in period p. Notice, that if t > /I then the inequality is strict. For t = B, our definition of a lot-tree forces us not to choose i as a parent node for /?. cl

The elimination of r-inactive candidate nodes according to Theorem 2 is an easy task that may be performed during the same pass that determines the parent node p(t) of c and updates the

Page 6: Lot-trees: A unifying view and efficient implementation of forward procedures for the dynamic lot-size problem

260 MICHAEL BASTIAN

Vi-values to Vi(t). Applying Theorem 2 to the numerical example of Section 5 leads to an elimination of node 2 during the insertion of node 7 (F/,(7) = 610 > V,(7) = 604) and reveals a planning horizon after the insertion of node 11.

For v > u define R&v, u):= (I’,(/?) - F/,(/?))/(u - u).

The next theorem indicates that the set of candidate nodes may be further reduced using a criterion based on R,. It is closely related to Theorem 3 in [4].

Theorem 3. Let u, v, w be three candidate nodes of a lot-tree satisfying u -=z u < w. If R&w, v) < R&v, u), then u is p-inactive.

Proof. It has to be shown that no node t 2 /3 is an offspring of node o, no matter what the demand sequence after period /I will look like.

Assume first that i d, c R&U, u).

But this means that node t will not be a son of node u.

Assume now the contrary: i d, Z R& u). r=/r+ 1

As R&w, U) < R&U, U) we have:

and hence

or equivalently

In other words: if u is a potential parent node of t, then also w > v is, which proves that u is p-inactive. cl

So far, we have only pruned nodes that have been in CN before the current node p was inserted. There are, however, conditions under which even p itself may be excluded from further considerations.

Corollary. Let w and u < w be two candidate nodes of a lot-tree, and assume that /? > w is the last node inserted.

If K,, 1 + M < V,,,(/?) + (p + 1 - w)RB(w, v) then w is p-inactive.

Proof. Let t denote the next period with positive demand. Notice from definition, that w is B-inactive if /3 is not an offspring of w, and w is t-inactive independently of the values oft and d,.

K, + 1 + M < K,.(fi) + !B + 1 - W$(W, 0)

~Kg+l+M-~w(~)-(t-w)d,d(t-~)Rb(~,u)-(t--)d,

* R,(t, w) d R,(w v),

since K,+1 + M = w, Kv(/R + (t - 44 = K&), and R&w 4 - 4 = Kv(~) - V,(fl) + (t - w)d, - (t - u)d,)/(w - u) = R,(w, 0).

Page 7: Lot-trees: A unifying view and efficient implementation of forward procedures for the dynamic lot-size problem

Lot-trees 261

Hence, w is r-inactive by Theorem 3. Also, fi is not an offspring of w, because otherwise t’ c w could not be a candidate node. cl

Consider now implementational consequences. Assume that a lot-tree is given which has been pruned during the insertion of node /I using the above results, i.e. it satisfies:

V”(P) < V,(P) and R&u, U) < R&w, u) for all candidate nodes t( < u < w.

The iteration that inserts node t starts with a first pass through the list CN, updates v,(a) to vi(t) for candidate nodes j and eliminates nodes that are inactive due to Theorem 2. If the last node p in the updated list CN satisfies V,(t) 2 K,, 1 + M, then b is a planning horizon (Wagner/Whitin). Otherwise, Theorem 2 (using l’,(t) = K,, 1 + M), Theorem 3 as well as the corollary are applied in a second pass through CN that may, however, be restricted to a few top nodes of the list.

This claim is obviously true for the application of Theorem 2 using V,(t). Considering Theorem 3, let w and u < w be any nodes that have been consecutive candidates before the insertion of t, and look what happens to the ratio R&W, u) when V is updated using d,: for any candidate node i we have: Vi(t):= V&3) + (t - i)d,.

Therefore, V,,,(t) - V,(t) = V&3) - V,(p) - (w - u)d, and the order of the ratios R,(w, u) = RJw, u) - d, does not change. Even if Theorem 2 eliminates a node u between w and u in CN, the ratios remain ordered: it is easily verified that R&w, u) lies between R&W, u) and R&u, u). Hence, Theorem 3 is useful for pruning only when the new ratio involving t is used to eliminate t-inactive nodes from the top of CN. Also the application of the corollary may be restricted to the top nodes of CN. Let again u < u < w be three consecutive nodes of CN, and assume that the corollary eliminates u but now w, i.e.

K f+ 1 + M > V,(t) + (t + 1 - w)R,(w, u)

and K,, 1 + M < V,(t) + (t + 1 - u)R,(u, u)

* l’,(t) - V,(t) + (t + 1 - w)R,(w, u) < (t + 1 - t;)R,(u, u)

a (t + 1 - u)R,(w, u) < (t + 1 - u)R,(u, u),

which is impossible after the application of Theorem 3. Thus, if any of the elimination criteria applied during the second pass of an iteration is not able

to remove node w from CN, it does not have to be tested against an active node u < w.

7. A PERFECT LOT-TREE IMPLEMENTATION

We are now prepared to state a lot-tree procedure that incorporates the results of the previous section.

Iteration of a perfect lot-tree implementation

Given a lot-tree and a node ~(6) that is known to be the parent node of the current last node /I, let t be the next period with positive demand.

read (t, d,) from the input file; determine p(t) from V’&/I) = min(V#I) 1 j in CN}; IF p(t) = /I, i.e. K, = V,#) = K, + M THEN terminate (* /I - 1 is a planning horizon *) ELSE INSERT(t, p(t));

u:= r; u:= s(u); (* u<u *) (* s(j) is the predecessor of node j in CN *)

DOWHILE (u #NIL) IF V.(t) 2 F,(t) THEN (* u is t-inactive *)

PRUNE(u); eliminate u from CN;

ELSE t’:=u ENDIF; u:= s(u);

Page 8: Lot-trees: A unifying view and efficient implementation of forward procedures for the dynamic lot-size problem

262 MICHAEL BASTIAN

ENDDO; (* elimination of r-inactive nodes using Theorem 2 *) w:=t, u:=s(t); LS:= K,,, + M; DOWHILE v # NIL

RS:= V,,,(t) + (t + 1 - w)R,(w, u); IF LS>RS THEN u:= NIL ELSE PRUNE(w);

eliminate w from CN; w:=tJ; v:= s(w);

ENDIF; ENDDO; (* pruning node t based on the corollary is completed *) IF w=t THEN (* t is not eliminated *)

v:= s(t); u:=s(v); DOWHILE u # NIL

IF R,(t, r) > R,(r, a) THEN u:= NIL (* no further pruning *) ELSE (* v is t-inactive *)

PRUNE(u); eliminate v from CN; a:= u; u:= s(u);

ENDIF; ENDDO;

ENDIF; IF NO&,, = 1 AND root < p(t) THEN implement the decision along the stem.

(* a planning horizon has been found *). ENDIF;

ENDIF;

The question arises whether this procedure is perfect or not. Obviously, a forward procedure implemented on a lot-tree is perfect, if no candidate node is dispensable, i.e. for each node j that remains in the list CN of candidates there is a completion of the demand sequence that asks for a set-up in period j.

Theorem 4. The forward procedure given above is perfect.

Proof. It will be shown that (depending on the completion of the demand sequence), each node remaining a candidate may be a set-up period in a long run optimal policy.

Assume that B is the current last node, t = /.? + 1 is the next node with positive demand and p(t) is the parent node of t.

Let CN:={.jl,iz,...,jk}, j,=At), ji<ji+l vi=1,2 )...) k-l,

denote the current set of active nodes. We shall show that all the nodes in CN are indispensable by completing the demand sequence as follows: Fix d,,+2 at a value larger than M, in order to ensure that /3 + 1 is a planning horizon. During the insertion of node c = fi + 1, one computes

VJt):= K, + M = V,co(/3) + M as well as

vj(t):=vj(P)+(t- j)d, VjeCN.

The minimum of these values determines the parent node of /3 + 2. Now V&3) is strictly smaller than all other I’j(P), j E CN, due to Theorem 2. Thus, for d, small enough, fl + 2 is an offspring of p(t). Therefore, p(t) is indispensable.

Assume now k 2 2, and consider a candidate node j,, CE (2, . . . , k}. If d,, 1 is chosen to be larger

Page 9: Lot-trees: A unifying view and efficient implementation of forward procedures for the dynamic lot-size problem

Lot-trees

than RB(jc, jc_i), then

$(ji,ji-i)<da+i Vi = 2,3, . . . , c

* J’&9- v,,_,(B)<(ii-ii-~)d,+, Vi = 2,3, . . . , c

* vj,(B) + @ + 1 -iMa+ 1 <vj,_,(B)+(fl+l-ji_r)db+iVi=2,3 ,..., c

* ‘/ii@+ l)< vj,_,(B+ l) Vi=2,3,. . . ,c.

By an analogous argument one shows that if d,, 1 is smaller than

Rp(je+ i, j, ) then vj,(fi+ l)< Vj,+,(p+ 1) Vi>c.

263

Hence, if for c < k we choose ds+ 1 from the open interval (RB(jc, j,_ r), RB(jc+ r, j,)), then fi + 2 is an offspring of j, and j, is indispensable.

Choosing d,+ 1 < (Z$+ 1 + M - Vjk(fi))/(B + 1 -jr) guarantees that fi + 1 cannot be the parent node of /I + 2, because rearranging terms yields:

K~+1+M>~j~(B)+(B+l_jk)d~+1~~~+l(B+l)>~j,(8+1).

If we choose dB+ 1 from the interval

(Rg(jr, A- 11, WB+ 1 + M - vjk(B))l(B + 1 -hD

then /I + 2 is an offspring of jr, and jr, is indispensable. As the proposed algorithm has pruned the lot-tree after the insertion of node /I using Theorem

2, all ratios RB(je, j,_ 1) are positive, and due to pruning in the second pass all k open intervals are nonempty. This proves that for each candidate node j we find a positive demand dp+l with the property that node /? + 2 will have to be an offspring of j.

8. CONCLUDING REMARKS

We have introduced the data structure of a lot-tree that served as a common view on forward procedures to solve the dynamic lot-size problem. In this context, planning horizon theorems become rules that may be applied to prune lot-trees.

The routine of the previous section comes up with a lot-size decision for the first period after considering the smallest possible number of demand values. If the problem is just to find an optimal decision for the first period, given the demand values of up to period n, there are other variants that may do the job. For example, it may be a good strategy to apply just Theorem 2 (and save the second pass of each pruning iteration) until either the lot-tree has a stem or node n has been inserted. Only in the latter case, the second pass is performed in order to make the best use of the given data.

If it happens that even after this “perfect iteration*’ the tree has no stem, and there are k candidate nodes left, then we have k policies corresponding to paths in the tree, each of which may be part of a long run optimal policy-depending on future demand data.

The proposed algorithm is designed to cope efficiently with sporadic demand. This seems worth mentioning, because these situations cause problems if standard heuristics are applied.

Acknowledgement-The author would like to thank an anonymous referee for his helpful comments on this paper.

REFERENCES

1. H. M. Wagner and T. M. Whitin, Dynamic version of the economic lot size model. Mgmt Sci. 5, 89-96 (1958). 2. E. Zabel, Some generalizations of an inventory planning horizon theorem. Mgrnt Sci. lo.465471 (1964). 3. R. Lundin and T. E. Morton, Planning horizons for the dynamic lot size model: protective procedures and computational

results. Opns Res. 23, 71 l-734 (1975). 4. S. Chand and T. E. Morton, Minimal forecast horizon procedures for dynamic lot size models. Naval Res. Log. Q. 33,

111-122 (1986). 5. J. D. Blackbum and R. A. Millen, Heuristic lot-siring performance in a rolling-schedule environment. Decision Sci. 11,

691-701 (1980). 6. E. Ritchie and A. K. Tsado, Review of lot-sizing techniques for deterministic time-varying demand. Product. Inwnt.

Mgmt 27,65-97 (1986). 7. K. Zoller and A. Robrade, Efficient heuristics for dynamic lot siaing. Int. J. Product. Res. 26.249-265 (1988). 8. E. A. Silver and J. Miltenburg, Two modifications of the Silver-Meal lot sizing heuristic. INFOR 22, 56-69 (1984).