Inventory Analysis and Management Multi-Period Stochastic Models: Optimality of the Base-Stock Policy for Convex Objective Functions 7.1. Dynamic Inventory Management for Multiple Periods This section considers an N-period version of the Newsvendor problem in which an order can be placed at the beginning of each period. Replenishment is instantaneous upon the placement of an order. With multiple periods, any demand not satisfied in a period is backlogged, to be satisfied when the ordered quantity arrives in the next period. The cost structure in each period is similar to that for a single-period Newsvendor problem: no fixed ordering cost; cost of an item: c per unit; inventory holding cost: h per unit carried over to the next period; inventory backlogging cost: per unit backlogged; a discount fact , 0 < < 1, such that the value of $1 at period t+1 is actually equal to $ at period t; assumptions: > (1)c and h+(1)c 0, which also imply h+ 0; terminal cost vT(x) for inventory level x at the end of period N (i.e., the beginning of period N+1). Let Dt be the demand at period t. For simplicity, assume that demands in period Dt’s are i.i.d., with cumulative distribution , (0) = 0; density function , and mean . It is possible to extend the demands to independent but period-dependent distributions, though we skip this simple generalization for notational simplicity. For each period, the (time) value of money is discounted by the discount factor , 0 < < 1, such that $1 at period t+1 is of the same value as $ at period t. The objective is to minimize the total cost of the N periods. Note that for finite number of periods, the characteristic of the optimal policy remains the same even if = 1. Let xt be the inventory level before ordering at period t. When xt is positive, it is the inventory leftover from the previous period; when xt is negative, it is the number of backlogged items from the previous period. The effect of events in period t1 leading to xt is counted in period t-1 so that the inventory and shortage costs of period t are counted after making ordering decision and having demand realization of period t. The decisions (i.e., actions) are to determine the numbers of units to order if any, in periods t, …, N, given xt, with the objective to minimize the total discount cost. There are at least two ways to express the decisions: the number of items to order in a period, or the desirable inventory level after ordering. We take the latter expression. Let yt be the inventory position after ordering in period t (which for instantaneous replenishment is also the inventory level after ordering in the period). Thus, when yt > xt, the number of items to order at period t is yt-xt. Let ft(x) be the minimum expected total cost of periods t, …, N discounted to the beginning of period t when the period starts with inventory level x. Then 1 Inventory Analysis and Management the ordering cost at period t = c(y-x), the inventory holding cost of period t = h(y-D)+, and the backlogging cost of period t = (D-y)+. ft(x) = min c( y x) hE ( y D) E ( D y ) E[ f t 1 ( y D)] = minGt ( y ) cx, y x y x (1) where Gt(y) = cy + hE(yD)+ + E(Dy)+ + E[ft+1(yD)]. (2) The optimal order quantity for period t is the minimal value y* for G(y) under the constraint y x. In the following, we are going to find sufficient conditions under which the base-stock policy is optimal. 7.2. Intuition of the Sufficient Condition Consider a one-period problem with zero inventory position at the beginning of the period. Suppose that the expected total cost function H(y) (i.e., the total cost after making an order, if any) for action y is a function with unique minimum. Then a base-stock policy is optimal. Note that it is not necessary for H(y) to be convex. H(y) H(y) y y Exercise 7.2.1. Show that the base-stock policy is optimal if the expected total cost function H(y) has a unique minimum. The unique minimum of H(y) is a sufficient but not necessary condition for a basestock policy to be optimal. Consider the following H(y) with multiple minima and a rightmost global minimum. Check that the base-stock policy is optimal. H(y) y In fact a base-stock policy is optimal as long as a global minimum is right most, no matter the minimum is unique or not. 2 Inventory Analysis and Management H(y) y If the global minimum does not take the right most position, the base-stock policy is not optimal. H(y) y As discussed above, one sufficient condition is to ensure that the global minimum of a cost function takes the right most position. Since we are dealing with an N-stage problem, we need to ensure the set of sufficient conditions preserves this property over the optimal equations. This is ensured by the attainment and preservation properties of the optimal solution to be explained below. Suppose we hope that the optimal solutions (and actions) at successive periods possess a certain property (e.g., the optimal policy in the base-stock form), and we specify a set of (usually sufficient) conditions (e.g., the global minimum of the expected cost function is right most) to achieve the goal. The optimal period-N solution attains (the property) if under the given conditions, the optimal solution actually possesses the property. The optimal period-N solution preserves the conditions if under the period-N optimal solution, the period-(N-1) problem satisfies the desirable conditions. For a problem such that the optimal solution at each stage attains and preserves, the optimal solutions across the periods possess the desirable properties. From the above discussion, if fN has its global minimum at the right most position, a base-stock policy is optimal in period N. The only problem is that this property, the minimum being right most, does not preserve: Even if fN has its global minimum at the right most position, there is no guarantee that fN-1 has the same property, and hence there is no guarantee that base-stock policy is optimal in period N-1. We need a stronger condition to ensure that the base-stock policies are optimum across different periods. It turns out that both attainment and preservation are achieved if the cost functions are convex. Exercise 7.2.2. (Properties of Convex Functions) Show that the followings hold: (a). If f is a convex function and c 0, then cf is convex. (b). If f is a concave function and c 0, then cf is convex. 3 Inventory Analysis and Management (c). If f is a linear function, then f can be regarded as either a convex or a concave function. (d). If f is a convex (resp. concave) function and c 0, then both f+c and fc are convex functions. (e). If f1 and f2 are convex (resp. concave) function, then f1+f2 is a convex (resp. concave) function. (f). If f1(x) is convex (resp. concave) in x and f2(y) (resp. concave) is convex in y, then f(x, y) = f1(x) + f2(y) is convex (resp. concave) in (x, y). (g). If f is convex (resp. concave) and D is a random variable, then E[f(x+D)] is convex (resp. concave). (h). If f is convex (resp. concave) and g is an increasing (resp. decreasing) convex function, then g f is a convex (resp. concave) function. (i). If f is convex (resp. concave) for each x, then sup f (resp. inf f) is convex (resp. concave). (j). Let g(x, y) be a convex (resp. concave) function on its domain C, where C = {(x, y)| x ∈ X, y Y(x)} for a convex set X. Further assume that for every x X, Y(x) is an non-empty set and that C is a convex set. Define f(x) = inf g ( x, y ) (resp. yY ( x ) sup g ( x, y ) ). Finally, assume that f(x) > -∞ (resp. f(x) < ∞) for all x. Then f(x) is a yY ( x ) convex (resp. concave) function. 7.3. Attainment and Preservation for the Base-Stock Policy Lemma 7.3.1. If ft+1 is a convex function, then (a). Gt(y) is a convex function; (b). a base-stock policy is optimal in period t; (c). ft is convex. Proof. (a). Suppose ft+1 is convex. By Exercise 7.2.2 (c), cy is convex. From Section 2.1, d E ( y D) = (y) and dyd E ( D y ) = ( y ). The second derivative of hE(y-D)+ + dy E(D-y)+ is (h+)(y) 0 by assumption. Thus, hE(y-D)++E(D-y)+ is convex in y. By Exercise 7.2.2 (d), f(y-d) is convex for any d; by Exercise 7.2.2 (g), E[f(y-D)] is convex; by Exercise 7.2.2 (a), E[f(y-D)] is convex. From (2), Gt(y) is convex because it is the sum of four convex functions. Note that if h, 0, which is usually the case, the convexity of hE(y-D)+ and E(D-y)+ can be established from properties of convex functions without going through differentiation. (b). Since Gt(y) is convex, it is convex in the convex range {y x}. For a convex function, any local minimum is also global. The minimum must be right most. Hence, a base-stock policy is optimal. (c).Let f(x, y) = Gt(y) – cx. By Exercise 7.2.2. (f), f(x, y) is a convex function in (x, y) R2. The set of real numbers R is a convex set. For any x R, {y|y x} is non-empty for every x R. Check that C = {(x, y) R2| y x} is convex. Hence the function f(x, y) is convex in C. From Exercise 7.2.2. (j), 4 Inventory Analysis and Management ft(x) = min f ( x, y ) = minGt ( y ) cx y x y x is a convex function in x. By assumption, vT is convex. A base-stock policy is optimal for period N and fN is convex. By Lemma 7.3.1, fN-1 is convex, and a base-stock policy is optimal for period N-1. Such procedure can be applied from period N back to period 1. Indeed we have established Theorem 7.3.2. A base-stock policy is optimal in each period of a finite-horizon problem. Example 7.3.3. (A setting similar to Example 6.1.1) Consider the a two-period problem such that each period is similar to a Newsvendor problem with c = $1/unit, h = $3/unit, and = $2/unit; the demand of period i, Di ~ i.i.d. uniform[0, 100]. With h is also equal to $3/unit for the second period, there is no salvage value at the end of the problem. Find the optimal order quantity at the beginning of the first period if the initial inventory is equal to zero. Sol. The algebra is complicated. We will illustrate the idea of our solution approach without completely solving the problem. From the result of Example 6.1.1, we know that the optimal policy for the second period is of base-stock policy, i.e., order nothing if s2 20, and order 20-s2, if the inventory position is less than 20. The optimal objective function value with hE ( s2 D) E ( D s2 ) , if s2 20, f 2* ( s2 ) 20c hE (20 D) E ( D 20) cs2 , if s2 20 3E ( s2 D) 2 E ( D s2 ) , if s2 20, 20c 3E (20 D) 2 E ( D 20) cs2 , if s2 20 3s22 (100 s2 )2 , if s 20, 2 100 200 if s 2 20. 90 s2 , For the first period, f1 ( s1 ) min c( y s1 ) hE ( y D) E ( D y ) E[ f 2* ( y D)] y s1 where 0100 f 2* ( y z ) dz 100 y2 min c( y s1 ) h 200 y s1 = 0y 20 (90( y z )) dz 100 + 100 y 20 (100 y ) 2 200 3( y z )2 200 5 0100 f 2* ( y z ) dz 100 (100( y z ))2 100 dz. , Inventory Analysis and Management It can be proven that f1(s1) is a convex function of s1. 6 Inventory Analysis and Management 7.4. Special Case with Explicit Base-Stock Level In general, the base-stock levels change with periods. However, there is a special case such that the base-stock levels are the same for all periods. Consider vT(x) = cx. For a oneperiod problem, c(yx) + hE(yD)+ + E(Dy)+ + E(vT(yD)) c(1)y + hE(yD)+ + E(Dy)+ + c cx, = where = E(D). The one-period optimal order up to level S is given by the first-order condition (with respect to the re-order level y) c(1) + h(y) ( y ) = 0, (S ) i.e., (3) (1 )c . h (4) Now suppose that ft+1 is convex and ft'1 = c at any period, (5) an assumption that we will check later. Define Gt(x) = cx + hE(xD)+ + E(Dx)+ + E(ft+1(xD)), The expected present value at period t is Gt(y) – cx. The first-order condition of Gt(x) is c + h(S) (S ) + dE[ f t 1 ( y D )] dy = 0 c + h(S) (S ) + E df t 1 ( y D ) dy =0 c + h(S) ( S ) c = 0, which is the same as (3). Thus, it is optimal to order up to level S found in (4) for x < S if (5) holds. The key question is whether (5) holds, i.e., ft+1 is convex and ft'1 = c? Check that for vT(x) = cx, G ( S ) cx, if x S , fN(x) = N o.w. GN ( x) cx, fN(x) is convex. However, c, if x S , f N' ( x) ' GN ( x) c c, o.w. f N' (x) is not equal to –c for x > S; in general ft'1 c, and (5) does not hold. 7 Inventory Analysis and Management Fortunately, in order for S to be the optimal order up to level for period t as in (4), we only need ft'1 = c for x S. To see this result, consider θN(x) = GN(S) – cx and N-1(x) = cx + hE(xD)+ + E(Dx)+ + E(θN(xD)). 'N = c for all x, and θN(x) vT(x) for all x. By construction, ( x) if x S , fN(x) N . o.w. N ( x), Now repeating the argument for Gt(y)–cx on N-1(y)–cx shows that the minimum point for N-1(y)–cx is given again by S. For all x S, fN-1(x) = θN-1(x); in particular, fN-1(S) = θN-1(S). Since S is the minimum of θN-1(x), fN-1(x) θN-1(S) for all x S. For x > S, fN-1(x) θN-1(x) θN-1(S). Because fN-1(S) = θN-1(S), S is in fact the minimum of fN-1. Thus, the minimum of GN-1(y) – cy is at S and G ( S ) cx, if x S , fN-1(x) = N 1 o.w. GN 1 ( x) cx, The argument preserves through all periods and in fact we have Theorem 7.4.1. If the terminal value function vT has a slope of –c, then a base-stock policy with base-stock level defined by (4) is optimal for every t. 8