An Algorithm for Infinite Horizon Lot Sizing with Deterministic Demand

We analyze an infinite horizon discrete time inventory model with deterministic but non-stationary demand for a single product at a single stage. There is a finite cycle of vectors of characteristics of the environment (demand, fixed ordering cost, variable procurement cost, holding cost) which is repeated after a finite number of periods. Future cost is discounted. In general, minimization of the sum of discounted total cost over the cycle does not give the minimum of the sum of discounted total cost over the infinite horizon. We construct an algorithm for computing of an optimal strategy over the infinite horizon. It is based on a forward in time dynamic programming recursion.


Introduction
Standard finite horizon inventory models with deterministic but non-stationary demand (see, for example, [1]).Chapter 4, for their description) equate the planning horizon with the life cycle of the purchased product.Thus, for any optimal procurement strategy, inventories at the end of the last period are zero.Nevertheless, a purchasing firm usually continues its operations after the end of the planning horizon of the model.Therefore, the procurement decision in each period should be optimal with respect to demands in the following periods.Hence, the optimal procurement strategy should result from an infinite horizon model with discounting of cost in future periods.The discount factor can be arbitrarily close to but lower than one.From the point of view of business practice, discounting of future cost is a more natural approach than limit of means evaluation relation or overtaking evaluation relation (see, for example, [2], pp.137-139 for the characterization of the latter two criteria).
If demands and other characteristics of the environment that differ between periods exhibit some finite cycle, we can obtain a numeric solution of an infinite horizon inventory model.In this case, after a finite number of periods, the same finite cycle of characteristics of the environment is repeated (Stationary characteristics of the environment are a special case of this, with cycle length equal to one).In the present paper, we deal with such a case.We allow fixed ordering cost, variable procurement cost, and holding cost that differ between periods.We develop an algorithm for computing of an optimal procurement strategy in this model that minimizes the sum of discounted total costs over the infinite horizon of the model.The optimal procurement strategy determines the optimal procurement cycle, at the end of which the inventory is zero.That is, except for a finite number of periods at the beginning of the model, the optimal procurement strategy is an infinite repetition of the procurement strategy over the optimal procurement cycle.
Throughout the paper,  denotes the set of positive integers and  denotes the set of real numbers.We endow each finite dimensional space with the Euclidean topology and ∞  with the product topology (i.e., the topology of point-wise convergence).

Motivating Example
Consider the inventory system with the length of the planning horizon equal to five periods used in [1], pp.92-94.The fixed ordering cost is $100 K = and holding cost is $1 h = (Variable procurement cost is not specified.It is assumed to be the same in each period.Therefore, the cumulative purchasing cost over the planning horizon is independent of the decision variables and it can be excluded from the objective function).Denoting the projected demand in period Without discounting of future cost, the unique optimal procurement strategy is ( ) 85,0,0,150,110 .Since it is unique, it remains the unique optimal procurement strategy also for discount factors less than but close to one.Now suppose that, since period six, the demand cycle ( ) .Then, for discount factor close enough to one, it is optimal to purchase 120 units in period 5 and in each period 5 5n t + (because holding cost of 10 units for one period is lower than K but holding cost of 60 units for two periods exceeds K ), 75 units in each period 2 5n t + (because holding cost of 15 units for one period is lower than K but holding cost of 150 units for two periods exceeds K ; shifting order from period 1 5n t + to period 2 5n t + decreases the sum of incurred discounted fixed ordering cost and, for discount factor close to one, decreases the sum of discounted holding cost), and 150 units in each period 4 5n t + (because holding cost of 110 units for one period exceeds K ).Thus, the optimal procurement strategy prescribes purchasing 85 units in the first period, nothing in periods 2 and 3, and, since period 4, it is the infinite repetition of procurement cycle ( ) 150,120,0,75,0 .That is, the optimal procurement cycle consists of five periods and its first occurrence starts in period 4 (In order to save space, we do not give the computation of the optimal strategy for this problem as an example of the application of the algorithm described in Section 4).Clearly, (for discount factor close enough to one) the sum of discounted total cost cannot be minimized by the infinite repetition of the optimal procurement strategy from the finite horizon model.

Model
We consider an infinite horizon discrete time inventory model.Periods are numbered by positive integers.Each period t ∈  is characterized by quadruple , , , 0, 0, , where t d is the deterministic demand, t K is the fixed ordering cost, t C is the variable procurement cost, and t h is the holding cost in period t .We call this quadruple "environmental vector" (a shortening of the term "vector of characteristics of the environment").We assume that there exist That is, the environmental vectors exhibit the finite cycle of length φ that is repeated since period 1 κ + .
We assume that this is the shortest cycle of environmental vectors, durability of the purchased good is no lower than φ periods and warehouse capacity does not prevent the firm from storing it for at least φ periods.Of course, we assume that there exists It follows from ( 2) and (3) that the sum of procurement and holding cost in each period is not lower than procurement cost in the immediately following period.Inequality (4) implies that there does not exist a period t such that it is optimal to satisfy strictly positive demand in t φ + by an order placed in t .If (4)  ( ) . Then all arguments used in the present paper that rely on (4) continue to hold with φ replaced by η .
All arguments used in this paper remain valid and the algorithm described in Section 4 can be used when (4) does not hold but Conditions 1 and 2 given below the definition of T + following (13) are satisfied.
We denote by t z the quantity ordered in period t ∈  and by t x the inventory at the beginning of period t ∈  .Then the inventory at the end of period t ∈  (for which the firm has to pay holding cost) is x z d x + + − = .In accordance with lot sizing models in the literature, we assume that lead time is zero (i.e., the ordered quantity is delivered without delay) and 1 0 x = .If the latter assumption is not satisfied, we can modify demands in a finite number of periods at the beginning of the time horizon of the model in such a way that the inventory at the beginning of the first period with a positive demand in the modified model equals zero (see, for example, [1], p. 89, for details).We also assume, without loss of generality, that 1 0 d > .If this assumption is not satisfied, we omit each period j ∈  such that 0 from the model and identify period { } min 0 with period 1.The purchasing firm discounts future cost by discount factor ( ) , without discounting the cost in the current period.It wants to minimize the sum of discounted total cost over the infinite horizon of the model subject to satisfying demand in each period.Thus, it solves the following mathematical programming problem: subject to 0, , , , .
We will use the term "optimal procurement strategy" for an optimal solution to the problem (5)-(8) and the term "feasible procurement strategy" for a procurement strategy that satisfies constraints (6)-(8).In the construction of the algorithm in the next section, we will use the following lemma.It is an analogue of a well known result from the analysis of finite horizon lot sizing models without discounting of future cost that was used in [3].
z ∈ be an optimal procurement strategy.Then Proof.Suppose that the claim of the lemma does not hold for some optimal procurement strategy { } t t z ∈ .Let t be the first period in which 0 t z > and 0 Let t τ < be the last period be- fore period t in which an order was placed (Since 1 t > and 1 0 x = implies 1 0 z > , such τ exists).Thus, . We can decrease, without violation of any constraint, the value of objective function ( 5) by reducing z τ by t x and increasing t z by t x .This allows satisfaction of demands in periods 1, , 1 t −  , leaves the quantity of good available in period t (after receiving the quantity ordered in period t ) unchanged, and leaves the fixed ordering costs in each period unchanged.Using ( 2) and (3), . This implies that ( ) ( ) Therefore, the sum of discounted procurement and holding cost is decreased.Lemma 1 has an obvious corollary.
z ∈ be an optimal procurement strategy.If demand in period  is satisfied from the order placed in period 2 j t ≤ − , then the latter order satisfies demand in each period , 1, , j j t +  ; i.e., .

Algorithm
We begin this section with formulation of criteria that we will use in the description of the algorithm for solving the problem (5)-( 8).The sufficient condition for not placing an order in period , irrespective of whether an order was placed in period If ( 9) holds then it is cheaper to satisfy demand in period t or the sum of demands in period t and following periods by an order placed in period 1 t − than by an order placed in period t (With respect to (4), we need not consider more than 1 φ − periods following period t ).Thus, in an optimal procurement strategy an order will not be placed in period t .The inequality ( 9) is equivalent to Taking account (3) and the fact that 0 t C > and ( ) If an order was placed in period .
Let T − be the set of periods in which (according to the knowledge that we have before solving the problem (5)-( 8)) an order will not be placed.That is, T − + ∈ .)Note that, with respect to (4), ( ) ( ) Throughout the paper, we assume that, whenever the firm is indifferent between placing an order in two periods, it places it in the later one.Then the sufficient condition for placing an order in period t has the form Denote by T + the set of periods in which an order should be placed (according to the knowledge that we have before solving the problem (5)-( 8)).That is, 1

and only if it satisfies (13).
All arguments used in this paper remain valid and the algorithm described in Section 4 can be used when (4) does not hold but the following conditions are satisfied.We illustrate their use in the example at the end of this section.
Condition 1 There exists t It follows from the assumption that there exists and (4) that T −   and T * are infinite sets.We define function For each t T * ∈ , we denote by t ψ the optimally determined period in which the order covering the demands in periods ( ) The following lemma reveals restrictions on the choice of t ψ that a succession of optimal procurement strategies for problems with a finite number of periods should satisfy.Analogous intermediate result was used in the derivation of Wagner-whitin algorithm [4].Nevertheless, since we work with discounting of future costs, Lemma 2 is not a consequence of their intermediate result.Moreover, Lemma 2 is stronger than their intermediate result.It says that each optimal procurement strategy for the first ( ) T − + periods has the described property, not only that there exists an optimal procurement strategy for the first ( ) Then, for each optimal procurement strategy for the first ( ) x ψ is the inventory at the beginning of period m ψ generated by (Lemma 1 is formulated for an optimal strategy in the infinite horizon model.Nevertheless, the argument in its proof concerns only changes in orders in the first t periods, subject to the constraint that the quantity of the good available in period t , t t x z + , remains unchanged.The same argument applies to changes in orders in the first m ψ periods, subject to the constraint that the quantity of the good available in period m ψ remains unchanged.Thus, Lemma 1 and Corollary 1 to it are valid also for the case considered here).Clearly, .The difference in the sum of total cost discounted to the end of period m ψ between satisfying demands in periods ( ) from the order placed in period m ψ and satisfying them from the order placed in period t ψ is The optimality of implies that satisfying the demands in periods ( ) from the order placed in period t ψ leads to lower or the same sum of discounted total cost than satisfying them from the order placed in period m ψ (keeping the way of satisfying demands in periods 1, , 1 Since (using (3)) Consider period t T * ∈ .Suppose that we have already solved the problem for the first ( )  ( ) ( ) Inequality ( 16) is equivalent to and ( 17) is equivalent to From inequalities ( 18) and ( 19) we can compute the critical value of i D of i D′ for which . This critical value plays an important role in the algorithm.If ( ) and we can eliminate period i from consideration for determination of t ψ .Right hand sides of ( 18) and ( 19) are independent of i D′ .It follows from (3) that Hence, if we eliminate period i from consideration for determination of t ψ , we should eliminate it also from consideration for determination of τ ψ .This reduces the number of periods that we have to consider in the following iterations of the algorithm.
Suppose that set In the following iteration, in which we want to determine τ ψ for t τ > , we need to consider only periods in be the optimal procurement strategy for the first ( ) periods.We will use the following proposition in the construction of the algorithm.Proposition 1 Assume that there exist r T * ∈ and n ∈  such that and each m ∈  , is an optimal procurement strategy.
Proof.Using Lemma 1, the optimal procurement strategy for the first ( ) = and ( ) 0 q i z > .(If the choice of q ψ does not cancel the placement of order in period r , then ( ) ( ) . Since 1 r κ > + and φ is the length of the cycle of environmental vectors, Using Lemma 1, the optimal procurement strategy for the first ( ) In order to solve the problem with the first ( ) periods, it is enough to compute optimal orders in periods ( ) (If the problem with the first ( ) periods has more than one optimal solution, we choose the one specified in the preceding sentence).Repeating this argument for period r mnφ + (computing optimal orders in periods ( ) is the optimal procurement strategy for the first 1 i mnφ + − periods.
Suppose that there exists feasible procurement strategy ( ) Taking into account (4), we can assume without loss of generality that condition is not satisfied, we can replace ( ) i z ∈ ′ by another feasible procurement strategy that satisfies it and gives lower value of objective function π ).Thus, taking into account (2), there exists m ∈  such that for i mnφ


(where { } i x ∈ is the sequence of inventories at the beginning of periods generated by ( ) the sequence of inventories at the beginning of periods generated by ( ) is the optimal procurement strategy for the first 1 −  periods.
The algorithm is based on solving a succession of problems with a finite number of periods.Proposition 1 implies that we can stop when we find r T * ∈ for which exists.The following lemma shows that such r exists.
. Using (4) and the assumption that there exists Taking into account ( 4), ( 2 ∈ .Then ( ) 0 t z τ > and ( ) 0 t i z > for each t T * ∈ with t i ≥ .Clearly, there exists 1 r i ≥ + such that r T * ∈ and r i ψ > .In the algorithm, we use the equality sign for the assignment of a new value to the variable whenever such expression is correct from the mathematical point of view.Otherwise, we use the symbol ← .

Algorithm 1
Step 1: Set , and go to step 9. Otherwise, go to step 3.
Step 7: Let   We could use the stopping rule specified in the algorithm and solve finite horizon problems by the Wagner-Whitin algorithm, modified for the case of discounting of future cost.Nevertheless, our algorithm has several advantages in comparison with their algorithm.Firstly, it saves calculations by identifying periods in which an order should be placed.Secondly, it saves calculations by identifying periods in which an order will not be placed.Thirdly, when a period is removed from the set of candidates for placing an order in some iteration, it is no longer considered in the following iterations.Moreover, it is enough to compare only successive elements of the set of candidate periods.From the point of view of elimination of candidate periods, our algorithm is similar to Wagner-Whitin algorithm [4].Fourthly, comparison of elements of the set of candidate periods is based on the critical sum of demands in the relevant following periods.Unless some period is eliminated from the set of candidate periods and at least one of its predecessors is kept, these critical sums of demands can be easily updated in the future iterations.Even when some period is eliminated from the set of candidate periods and at least one of its predecessors is kept, calculation of new critical sums of demands requires only calculations used in the recursive relations in Wagner-Whitin algorithm.

Conclusion
We have constructed an algorithm for computing an optimal procurement strategy in an infinite horizon inventory model with non-stationary deterministic demand, a finite cycle of environmental vectors, and discounting of future cost.It is based on solving a succession of finite horizon inventory optimization problems.The formulation of the stopping rule is made possible by the fact that the cycle of environmental vectors is finite.
It is worth noting that our algorithm can also be used to solve a finite horizon problem.This also holds when future cost is not discounted (i.e., 1) δ = provided that inequality (3) is strict.
, using Lemma 1 and Corollary 1 to it, implies that the expression (14) is strictly positive.Therefore, the assumption that

1 .
Note that, for each m ∈  , ), Lemma 1, and Corollary 1, there is a finite set to which element of Y belongs.Therefore, there exist i M in the algorithm can be simplified if there exists i T

,
and go to step 8.Step 8: If there exists n ∈  such that 1 m ∈  .Stop.The algorithm does not give the optimal value of the objective function (5).Using values computed by the algorithm and setting i t= if t T + ∈ and v i ψ = if t T + ∉, the optimal value of the objective function (5) equals denotes the sum of discounted total cost of satisfying demands in the first tΨ denotes the set of periods from which we can choose ( ) E [1]t has the described property (Compare also Lemma 2 and Theorem 4.2 in[1], p. 96).