Algorithm for the Economic Lot-sizing Problem With Constant Capacities

  • Upload
    fmunoz7

  • View
    216

  • Download
    0

Embed Size (px)

Citation preview

  • 8/6/2019 Algorithm for the Economic Lot-sizing Problem With Constant Capacities

    1/10

    An O(T3) Algorithm for the Economic Lot-Sizing Problem with Constant Capacities

    Author(s): C. P. M. van Hoesel and A. P. M. WagelmansSource: Management Science, Vol. 42, No. 1 (Jan., 1996), pp. 142-150Published by: INFORMSStable URL: http://www.jstor.org/stable/2633023 .

    Accessed: 12/05/2011 14:54

    Your use of the JSTOR archive indicates your acceptance of JSTOR's Terms and Conditions of Use, available at .http://www.jstor.org/page/info/about/policies/terms.jsp. JSTOR's Terms and Conditions of Use provides, in part, that unless

    you have obtained prior permission, you may not download an entire issue of a journal or multiple copies of articles, and you

    may use content in the JSTOR archive only for your personal, non-commercial use.

    Please contact the publisher regarding any further use of this work. Publisher contact information may be obtained at .http://www.jstor.org/action/showPublisher?publisherCode=informs. .

    Each copy of any part of a JSTOR transmission must contain the same copyright notice that appears on the screen or printed

    page of such transmission.

    JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range of

    content in a trusted digital archive. We use information technology and tools to increase productivity and facilitate new forms

    of scholarship. For more information about JSTOR, please contact [email protected].

    INFORMS is collaborating with JSTOR to digitize, preserve and extend access toManagement Science.

    http://www.jstor.org/action/showPublisher?publisherCode=informshttp://www.jstor.org/stable/2633023?origin=JSTOR-pdfhttp://www.jstor.org/page/info/about/policies/terms.jsphttp://www.jstor.org/action/showPublisher?publisherCode=informshttp://www.jstor.org/action/showPublisher?publisherCode=informshttp://www.jstor.org/page/info/about/policies/terms.jsphttp://www.jstor.org/stable/2633023?origin=JSTOR-pdfhttp://www.jstor.org/action/showPublisher?publisherCode=informs
  • 8/6/2019 Algorithm for the Economic Lot-sizing Problem With Constant Capacities

    2/10

    A n 0 ( T 3 ) Algorithm f o r t h e Economic L o t -s i z i n g Problem w i t h Constant Capacities

    C. P. M. van Hoesel * A. P. M. WagelmansLimburgUniversity, Maastricht,TheNetherlandsErasmusUniversity, Rotterdam,TheNetherlands

    W e develop an algorithm that solves the constant capacities economic lot-sizing problemwith concave production costs and linear holding costs in o(T3) time. The algorithm is

    based on the standard dynamic programming approach which requires the computation of theminimal costs for all possible subplans of the production plan. Instead of computing these costsin a straightforward manner, we use structural properties of optimal subplans to arrive at amore efficient implementation. Our algorithm improves upon the o(T4) running time of anearlier algorithm.(EconomicLot-sizing;Complexity)

    1. IntroductionIn the single-item capacitated economic lot-sizing prob-lem there is demand for a single item in T consecutiveperiods. The demand in a certain period may be satis-fied by production in that period or from inventory thathas been produced in earlier periods. It is assumed thatthere is no inventory at the beginning of period 1 andthat no inventory should be left at the end of period T.Furthermore, capacity constraints on the productionlevels have to be taken into account. The total costs as-sociated with a production plan depend on the produc-tion and inventory levels. A fixed set-up cost is incurredin a certain period whenever production takes place. Inaddition, there are production costs, which are a func-tion of the production level. Finally, there are holdingcosts, which are a function of the inventory level at theend of the period. The objective is to find a feasible pro-duction plan that minimizes total costs.

    In most models that have been studied in the litera-ture, the cost functions are assumed to be concave orlinear. Under these assumptions, many uncapacitatedmodels are polynomially solvable. For instance, if allcost functions are linear, then the uncapacitated versionof the above problem is solvable in O(T log T) time (cf.Aggarwal and Park 1993, Federgruen and Tzur 1991,

    and Wagelmans et al. 1992). Polynomial algorithms alsoexist for many other uncapacitated lot-sizing problemswith linear costs (cf. Aggarwal and Park 1993 and VanHoesel et al. 1994). The uncapacitated problem withconcave production and holding costs is solvable inO(T2) time (cf. Veinott 1963).

    For capacitated problems the situation is quite differ-ent. Florian et al. (1980) and Bitran and Yanasse (1982)have shown that the single item capacitated economiclot-sizing problem is NP-hard, even in many specialcases. Bitran and Yanasse also designed a classificationscheme for capacitated lot-sizing problems with linearproduction and holding costs. They use the four fieldnotation a /,6 / y / 6, where a, ,Q,y, and 6 represent theset-up cost, unit holding cost, unit production cost, andcapacity type, respectively. Each of the parameters a, ,Q,and y can take on one of the values G, C, ND, NI, or Z.G means that the parameter follows an arbitrary patternover time, whereas C, ND, NI, and Z indicate constant,nondecreasing, nonincreasing, and zero parameter val-ues, respectively. 6 can take on the values G, C, ND, orNI; in case there are no capacity restrictions, the fourthfield is omitted.

    A very successful DP approach to solve the most gen-eral problem, G/G/GIG, has recently been proposed

    0025-1909/96/4201 /0142$01.25Copyright ? 1996, Institute for Operations Research142 MANAGEMENT SCIENCE/Vol. 42, No. 1, January 1996 andthe Managementciences

  • 8/6/2019 Algorithm for the Economic Lot-sizing Problem With Constant Capacities

    3/10

    VAN HOESEL AND WAGELMANSTheEconomicLot-sizingProblem

    by Chen et al. (1994). We also refer to that paper for adiscussion of other work on NP-hard versions of thecapacitated economic lot-sizing problem.With respect to polynomially solvable special cases ofthe capacitated economic lot-sizing problem, the follow-ing results are known. Bitran and Yanasse showed thatND/Z/ND/NI and CIZICIG can be solved in O(T),respectively, O(T log T) time. Chung and Lin gave anO(T2) algorithm for NI/G/NI/ND and an o(T4) algo-rithm for C/ G/ / C was presented by Florian andKlein (1971). The latter algorithm also solves the moregeneral constant capacity problem in which the costfunctions are concave instead of linear. Pochet and Wol-sey (1993) consider the related problem in which mul-tiple batches of equal capacity are available, each re-quiring a set-up cost. They solve this problem in o(T3)time.In this paper we will show that when the productioncosts are concave and the holding costs are linear, it ispossible to solve the economic lot-sizing problem withconstant capacities in O(T3) time. Hence, for this casewe improve upon the Florian-Klein algorithm.This paper is organized as follows. In ?2 we introducesome notation. Section 3 contains a description of agreedy algorithm for solving a basic subproblem. In ?4the actual algorithm is described. Section 5 contains con-clusions and some remarks.2. PreliminariesWe will use the following notation:T: the length of the planning horizon;

    C: the production capacity in each period.Furthermore, for each period t E {1, . . ., TI:d,: the demand in t;x,: the production level in t;It:the inventory level at the end of t (Io = 0);f,: the set-up cost in t;ht:the unit holding cost in t; andpt(xt): the production costs in t, a concave functionof xt.The cumulative demand of a set of consecutive peri-ods Is, ..., tI (1 c s < t c T) willbedenotedbyds,t

    =>2T=5 dT -Without loss of generality we may assume:(a) For each period t: dt c C. If this is not the case,we can move the excess demand in t to the preceding

    period t - 1 without changing the set of feasible solu-tions.

    (b) The unit holding costs are all equal to zero. If thisis not the case, then an equivalent problem is obtainedby omitting the holding costs and redefining the pro-duction costs as pt(xt)= pt(xt)+ 1T=,hix, (cf. Wagelmanset al. 1992). Note that we can achieve this only whenthe original holding costs are linear.

    For notational convenience, we let cf(t) denote thecost of producing at full capacity in period t, i.e., cf(t)

    =ft + pt(C) (t E {1, . . . , TI).We call production in a period t fractional f it is be-tween 0 and C, i.e., 0 < xt < C. Florian and Klein (1971)have shown that there exists an optimal schedule suchthat between any pair of fractional production periodsthere is at least one period with zero inventory. Thisproperty is often referred to as the fractionalproductionproperty.It also holds in case of general capacities. Forany feasible solution, we define a subplan (t1, t2) (1 c tlc t2 c T) as a set of consecutive periods, starting witht1and ending with t2, such that at most one period hasfractional production and It1,- = It2= 0. (Note that ourdefinition of subplan is more general than the usual def-inition in which inventories of intermediate periods ti,... , t2 - 1 are required to be strictly positive.) It followsfrom the fractional production property that we need toconsider only feasible solutions that can be subdividedinto subplans. This suggests an approach in which wefirst determine optimal solutions for all subplans andthen choose the best combination of subplans whichconstitute a complete solution. In the next section wepresent an algorithm for finding an optimal solution fora given subplan.

    3. Greedy AlgorithmConsider a fixed subplan (tl, t2) for which we want tofind a minimum cost solution. In case dt,J2 = KC forsome integer K, any feasible solution has only full pro-duction-periods, namely exactly K. Hence, finding aminimum cost solution for the subplan boils down todetermining in which K periods full production shouldtake place. In case cumulative demand is not a multipleof C, i.e., if dt1,J2= f + KC for some integer K and f suchthat 0 < f < C, then any feasible solution has K fullproduction periods and a fractional period in which the

    MANAGEMENT CIENCE/Vol. 42, No. 1, January 1996 143

  • 8/6/2019 Algorithm for the Economic Lot-sizing Problem With Constant Capacities

    4/10

    VAN HOESEL AND WAGELMANSThe EconomicLot-sizingProblem

    Table 1 Data of Exampler 1 2 3 4 5 6 7

    d, 0 4 2 1 4 5 2fr 4 7 5 8 7 7 5PI 3 1 0 1 2 1 1cf(T) 19 12 5 13 17 12 10

    production level equals f. Suppose that we fix the frac-tional production period, then the problem is again todetermine an optimal set of full production periods. Inthe remainder of this paper we will focus on the case inwhich the subplan contains a fractional period, becausethis problem is clearly at least as hard as the problemwithout a fractional period.We can restrict the fractional production f to periodst with d,12 2 f, since fractional production in later peri-ods will lead to positive ending inventory in period t2,contradicting the definition of a subplan. Therefore, wedefine tmaxto be the latest period t such that d,2 2 f.Similarly, there is an earliest possible fractional period.If dtlt> (t - 1)C + f, then the periods t1through t mustbe full capacity production periods. Therefore, we de-fine tmin as the first period t for which d, c (t - 1C+ f.

    Suppose the fractional period is fixed to t e {tmin, ...,tmaxl and let P(t) denote the corresponding problem ofdetermining optimal full production periods. We intro-duce a function A(T) (T E It1, . . ., t2D)which denotesthe minimum number of full production periods inIt1, . . . , TI in any feasible solution of P(t):

    [dt1l, for T < t,1rcA(T)= 1dtl,T - ] forT ?t

    A solution of P(t) is feasible if and only if for any Tt1, .. ., t2l the number of full production periods inIt1,. .., T is at least A(T). The function A is integraland monotonically nondecreasing for the periodsIt1, ..., t - 11 and It, ..., t2I. Moreover, A(t - 1)c A(t) + 1. Note that A can take on the values O, .. , K}.Define for all k E {1, . . . , KIthe period Wkas the earliest

    period T for which A(T) = k holds. The following isobvious.FEASIBILITYONDITION.A production schedule is

    feasible, i.e., IT 0 for all T E Itl, . . ., t2l, if and only iffor every period Wk 1 c k c K), there are at least kproduction periods in Itl, .., Wkl.This period Wks called a choiceperiodbecause it forcesus to choose a kth full production period in the set{1, ..., Wkl . We choose this production period as spec-ified below.

    GREEDYALGORITHM. Startwith the production planin which only the fractional production takes place inperiod t. This period is not available for full production.The K full production periods are chosen as follows.Consider the choiceperiodsWk, k E 11, ..., KI, in in-creasing order. The cheapest available period T in theset It,,. . ., Wkl is chosen as production period, i.e., cf(T)is minimal among the available periods T E tl, ... , Wkl.If necessary, break ties by choosing the earliest period.

    EXAMPLE. We consider subplan (1, 7). The capacityC is five units. The cumulative demand is 18, and there-fore K = 3 and f = 3. The other data are given in Table1, where PTdenotes the unit production costs in periodT, i.e., production costs are linear.

    Let period 4 be the fractional period, i.e., X4= 3. Thenthe calculations of the greedy algorithm are shown inTable 2.The choice periods are 2, 3, and 6. In this example,the full production periods coincide with the choice pe-riods. However, this is not the case in general, as can beseen by swapping the cost structure of periods 1 and 2.This would leave the choice periods unchanged, but pe-riod 1 would be chosen as a full production period in-stead of period 2. Finally, we note that the total cost ofthis plan is 12 + 5 + (8 + 3 *1) + 12 = 40.

    Table2 Results of GreedyAlgorithmr 1 2 3 4 5 6 7

    dl, 0 4 6dl,, - f 4 8 13 15A(T) 0 1 2 1 2 3 3choice n y y n n y nfullprod. n y y n n y n

    144 MANAGEMENTSCIENCE/Vol. 42, No. 1, January 1996

  • 8/6/2019 Algorithm for the Economic Lot-sizing Problem With Constant Capacities

    5/10

    VAN HOESEL AND WAGELMANSThe EconomicLot-sizingProblem

    The definition of choice period Wk nsures that the kthfull production period is chosen from a set of availableperiods which is as large as possible. The greedy aspectof the algorithm is that among all these available peri-ods the cheapest one is chosen. Clearly, the greedy so-lution is feasible. Its optimality is proved next.Let us first define an ordering on the feasible solutionsof P(t). Consider two feasible production plans S andS' and the first full production period in which theydiffer. If that period is earlier in S than it is in S', thensolution S is called lexicographicallyarlier han solutionS'. Note that the number of full production periods isequal to K in both solutions.

    LEMMA 1. Thegreedy algorithm constructs the lexico-graphicallyearliestoptimalproductionplan for P(t).

    PROOF. Let S be the lexicographically earliest opti-mal solution. Suppose it is not equal to the solution SGcreated by the greedy algorithm.Let w1, . . ., WK be the choice periods for the greedyalgorithm, and let T1, ..., TK be the respective full pro-duction periods chosen by the greedy algorithm. Let kbe the smallest index such that Tk is not in S. There is aperiod T' in {t1, .., Wkl that is a production period inS but not in SG,because otherwise S would have lessthan k production periods in It1, .., Wk),violating thefeasibility condition.

    Consider the following cases.(1) If cf(T') < cf(Tk), then this contradicts the fact thatthe greedy algorithm chooses the cheapest availableproduction period for Wk.

    (2) If cf(T') = Cf(Tk) and T' < Tk, then this contradictsthe fact that the greedy algorithm chooses the earliestperiod among the cheapest available ones.The feasibility condition is also satisfied by the solu-tion created from S by replacing T' by Tk as a productionperiod. Therefore, we can conclude the following.(3) If cf(T') > Cf(Tk), then the solution S can be im-proved.(4) If cf(T') = Cf(Tk) and T' > Tk, then the solutionS is not the lexicographically earliest optimal solu-tion.

    Hence, the assumption that T' * Tk alwaysleads to a contradiction. We conclude that SG s equalto S, the lexicographically earliest optimal solu-tion. O

    When referring to the optimal solution in the remain-der of this paper, we will mean the lexicographicallyearliest optimal solution.By solving P(t) for all t G Itmin, ... , tmax we candetermine the optimal solution for subplan (tl, t2). In-stead of solving each of these problems separately, wepropose an iterative algorithm in ?4. This algorithmcomputes not only the optimal solutions of the prob-lems P(t) (t E Itmin, . . . , tmaxI), but also the optimal so-lutions of the problems defined as follows. Let t EI tmin,... . tmaxl, then P(t)' is the problem of finding an opti-mal schedule when f units become available in period tcompletely for free, i.e., withoutcosting any moneyor ca-pacity. Clearly, a feasible solution for this problem cor-responds to a choice of K full production periods. Theonly difference with problem P(t) is that period t is nowalso available for full production (at cost cf(t)). It is eas-ily seen that an optimal solution of P(t)' can be foundby applying the greedy algorithm. Note that the choiceperiods for P(t) and P(t)' are identical. Again, whenreferring to the optimal solution of P(t)', we will meanthe solution constructed by the greedy algorithm. Thefollowing properties play a key role in the algorithm.

    LEMMA2. Let t E I mins,. . . , tmax. Theoptimal olutionsof P(t + 1)' and P(t)' differwith respect o the full produc-tion periodsin at most one period. Moreover, if there is adifference,hen theoptimalsolutionofP(t)' is obtainedromthe optimalsolutionof P(t + 1)' by moving production roma period n It,, . . . , tI to a period n It + 1, . . , t21.

    PROOF. We will prove that the solutions producedby the greedy algorithm in both problems differ in atmost one production period, as described in the lemma.The problems P(t)' and P(t + 1)' differ with respectto function A only in period t:

    A(t) =[ t] in P(t + 1)' and

    A(t) = dt1t- f] in P(t)'.Thus, A(t) may be one unit less in P(t)' than inP(t + 1)'. This gives a possible difference in the set ofchoice periods, which can only occur if t is a choice pe-riod in P(t + 1)', say the kth. In that case, the kth choice

    MANAGEMENT SCIENCE/Vol. 42, No. 1, January 1996 145

  • 8/6/2019 Algorithm for the Economic Lot-sizing Problem With Constant Capacities

    6/10

    VAN HOESEL AND WAGELMANSThe EconomicLot-sizingProblem

    period in P(t)' may be a period u with t < u < Wk+1.All other choice periods are identical in both problems.Clearly, because the first k - 1 choice periods are

    identical, the first k - 1 production periods chosen bythe greedy algorithm will be the same for both prob-lems. If all choice periods are identical in both problems,or if the greedy algorithm chooses the same productionperiods at t and u, then the optimal solutions do notdiffer. Hence, we only have to examine the case wherethe choices in t and u differ, say T' is chosen at t inproblem P(t + 1)', and T" is chosen at u in prob-lem P(t)'.

    By definition, T' is the cheapest available period inIt1, ..., tl, and T" is the cheapest available period inIt1, ..., ul. Thus, T" * T' implies T" > t and cf(T")< cf(T').We show that in the remainder of the greedy algo-rithm the number of different production periods forboth problems remains at most one, and that the differ-ence is always as specified in the lemma.

    As argued before, the choice periods after u are equalfor both problems. Let those periods be Wk+l, . . .* WK,and consider the production period chosen at Wk+1.

    (a) Suppose that T' is the period chosen at Wk+1 inproblem P(t)'. Because T' is the cheapest available pe-riod up to Wk+1 in P(t)', it follows that T" is the cheapestavailable period up to Wk+1 in P(t + 1)'. Clearly, fromwk+1on the partial solutions are equal again.

    (b) SupposeT * T' is the period chosen at Wk+1 inproblem P(t)'. T is the cheapest available period up toWk+1, and therefore T > t (since T' is the cheapest avail-able period up to t). Moreover, in P(t + 1)' it is also thecheapest available period, unless T" is cheaper. How-ever, which of these periods is chosen does not matter.In both cases the difference with respect to the partialsolution of P(t)' remains one period, either T or T",andboth are later than t.

    If (a) occurs, then it follows immediately that the fullproduction periods of the optimal solutions of P(t)' andP(t + 1)' are equal. If (b) occurs, the above argumentcan be repeated for the later choice periods Wk+2,WK, and the lemma is proved. LIIIf t is not chosen as a full production period in theoptimal solution of P(t)', then it is clearly optimalto take the same full production periods as in thesolution of P(t). In case the optimal solutions are not

    equal, we have the following result, which can beproved using arguments similar to those in the proofof Lemma 2.

    LEMMA3. Let t E {tmil, ..., tmax} nd supposethat t isa full productionperiod n the optimal olution of P(t)'. Thentheoptimalsolutionof P(t) differs rom the optimalsolutionof P(t)' only in thefact that the full production n t is real-located.

    4. Global AlgorithmThe global algorithm for solving the lot-sizing problemconsists of two phases. In the first phase we find theoptimal solutions for the subplans. In the second phasethese solutions are used to determine an optimal solu-tion of the overall problem.Phase 1: Find the minimum cost for all subplans(tl, t2), 1 c'_ tl -'- t2 cT.Phase 2: Find, in the directed graph with verticesI{O, . ., Tj and arcs (tl. - 1, t2), 1 c-- tl c-- t2 c--T, theshortest path from vertex 0 to vertex T, where the lengthof arc (t, - 1, t2) is equal to the minimum cost of sub-plan (tl, t2).Except for vertex 0, the vertices on the shortest pathfound in Phase 2 correspond to the last periods of thesubplans which constitute an optimal production plan.Given the cost of each subplan, the second phase can beimplemented in O(T2) time, since the graph is acyclicand the number of arcs is O(T2). Thus, Phase 2 is notthe bottleneck of the algorithm. We will therefore focuson Phase 1. By considering all possible fractional pro-duction periods and using the greedy algorithm, a min-imum cost solution for a given subplan can be found inO(T2) time. Because there are O(T2) possible subplans,this implies an 0(T4) algorithm for Phase 1. We willgive improvements that lead to an o(T3) implementa-tion.4.1. Iterative Algorithm for Phase 1We show that the minimum cost of each subplan (tl, t2)(1 c tl c t2 c T) can be calculated in O(T) amortizedtime. The algorithm consists of the following steps foreach subplan.Let tmin, tmax and the optimization problems P(t)' andP(t) (t E {tmin, ... tmax)) be as defined in the previoussection.

    146 MANAGEMENTSCIENCE/Vol. 42, No. 1, January 1996

  • 8/6/2019 Algorithm for the Economic Lot-sizing Problem With Constant Capacities

    7/10

    VAN HOESEL AND WAGELMANSTheEconomicLot-sizingProblem

    INITIALIZATION. Compute the optimal solution ofP(tmax)'. This solution is also optimal for P(tmax).

    ITERATIONS. For t fromtmax 1 down to tmin doStep 1. Determine the optimal solution of P(t)' from

    the optimal solution of P(t + 1)'.Step 2. Determine the optimal solution of P(t) fromthe optimal solution of P(t)'.EXAMPLE continued). Consider again the subplan(1, 7) with C = 5, f = 3, K = 3 and the data in Table 1.

    Note that tmin= 1 and tmax= 6. Table 3 shows in thesecond column the choice periods for varying fractionalperiods t. The optimal full production periods for P(t)'and P(t) are shown in the third and fourth column, re-spectively. The last column gives the optimal value ofP(t). Hence, in the example, it is optimal to have thefractional production in period 4 and full production inthe periods 2, 3, and 6.The row for t = 6 corresponds to the initialization ofthe iterative algorithm. The other rows correspond tothe iterations. For each of these rows, first the solutionin the third column is computed from the solution im-mediately above it. Then this solution is used to com-pute the solution in the fourth column. Note thatLemma 2 is reflected by the fact that the difference be-tween two consecutive rows in the third column is atmost one period. Furthermore, the third and fourth col-umns differ on the same row in at most one period. Thisreflects Lemma 3. On the other hand, as can be seen inthis example, in the fourth column the difference be-tween two consecutive rows may be two periods. Thisis exactly why we introduced the problems P(t)'. In-stead of trying to derive an optimal solution of P(t) di-rectly from an optimal solution of P(t + 1), which maybe complicated, we perform two relatively simple stepsinvolving P(t + 1)' and P(t)'.We now show how the initialization and the itera-tions can be implemented in linear amortized time.4.2. Implementation of InitializationThe initialization can be carried out simultaneously forall subplans (tl, t2)with t1fixed and t2 E It,, ..., TI byusing the following lemma.

    LEMMA 4. Let1 c tl c t2 c T - 1. Consider heoptimalsolutionsfor subplans (tl, t2) and (tl, t2 + 1), where thefractionalperiodsare the last productionperiods.Then theset of full productionperiods in the solution for subplan

    Table 3 Optimal olutionsfor VaryingFractionalPeriodst Choice P (t) Cost6 2 3 5 2 3 5 2 3 5 445 2 3 6 2 3 6 2 3 6 424 2 3 6 2 3 6 2 3 6 403 2 4 6 2 3 6 2 4 6 422 2 4 6 2 3 6 1 3 6 461 2 4 6 2 3 6 2 3 6 42

    (tl, t2) is a subset of the set of full productionperiods n thesolutionfor subplan(tl, t2 + 1).PROOF. This follows from the fact that the choice pe-

    riods for the smaller subplan are a subset of the set ofchoice periods of the larger subplan. If dt1,J2 < kCc dt1,t2+1 for some k, then one extra production periodis chosen in the larger subplan. OD

    From Lemma 4, it follows that performing the initial-ization for all subplans with first period t, has a totalrunning time that is of the same order as the runningtime of the initialization for subplan (tl, T) only. Thelatter can easily be implemented in O(T2) time. Hence,the overall algorithm takes O(T3) in the initializationstep.4.3. Implementation of IterationsThe iterations are implemented for each subplan (tl, t2)separately. Suppose that the optimal solutions of prob-lems P(t + 1)', . .. , P(tmax)' and the related optimal so-lutions of P(t + 1), . . . P(tmax)have been computed.

    Step1. To compute the optimal solution of P(t)' fromthe optimal solution of P(t + 1)', we first move the funits from t + 1 to t, while keeping all full productionperiods the same. The effect is that It ncreases by f units.Recall that the capacity in period t remains C in P(t)'.From Lemma 2, it follows that there is at most one pe-riod in I l, . . ., tI from which we have to move produc-tion to a period in It + 1, . . ., t2).Let the following data be available:

    Period u, the earliest period in I , ..., t2)such that I,,< C; note that It2= 0For all v E I ,, ..., u}: 6,, the earliest cheapest avail-able period in Itl, . . ., v}.Period s, the latest period in I l, . . ., t} such that IS-1< C; by definition It,_ = 0.

    MANAGEMENT SCIENCE/Vol. 42, No. 1, January 1996 147

  • 8/6/2019 Algorithm for the Economic Lot-sizing Problem With Constant Capacities

    8/10

    VAN HOESEL AND WAGELMANSThe EconomicLot-sizingProblem

    Table4 Situation or t = 5T 1 2 3 4 5 6 7

    Cf(T) 19 12 5 13 17 12 10prod. n y y n y n, nIT 0 1 4 3 7 2 06, 1 1 1 4 4 67YT 5

    For all r E Is, ..., t}: yr, the most expensive produc-tion period in Is, ..., r}.Note that moving production from a certain periodto a later period reduces the inventory of the originalproduction period and that of each intermediate periodby C. Hence, feasibility conditions restrictus to movingproduction from a period in Is, ..., t} to a period inIt + 1, ..., u}. We will perform this move only if theresulting plan really is cheaper, i.e., if cf(yt) > cf(6,,).Note that if this holds then 6,, > t; otherwise thismove would already have been profitable in problemP(t + 1)'.

    Suppose we actually move production from yt to 6,,.Then we update u by setting it equal to t. To see thatthis is correct, note that, if production is moved, then It< C + f, because otherwise the move would have beenfeasible (and profitable) in P(t + 1)'. Moreover, if cf(yt)< cf(6), or if cf (yt) = cf(6t) and yt < 6t, then we set 6T= -yt forT E Iye,t *, t}. We do not need the values of sand yr (r E Is, ..., t}) in Step 2. Therefore, these valuesare not updated between Steps 1 and 2 of the same pe-riod t.

    EXAMPLE continued). Consider the iteration for t= 5. The full production periods in the optimal solutionof P(6)' are 2, 3, and 5. Table 4 shows the situation justafter moving the f units to period 5. We see that u = 6,because, starting at period 5, it is the earliest period withan inventory level below C = 5. Similarly, the latest pe-riod before period 5 with an inventory level less than Cis period 4. Therefore, s = 5.Because cf(5) > cf(6), we move production from pe-riod 5 to period 6. The updated situation is shown inTable 5. We now have u = t = 5. Because cf(5) > cf(4),the value of 685does not change.

    Step2. If t is not a full production period in the op-timal solution of P(t)', then the optimal solution of P(t)

    Table 5 OptimalSolutionof P(5)'T 1 2 3 4 5 6 7

    Cf(T) 19 12 5 13 17 12 10prod. n y y n n y nIT 0 1 4 3 2 2 06, 1 1 1 4 4

    follows immediately. Otherwise, we use Lemma 3 tocompute the optimal solution of P(t) from the optimalsolution of P(t)', i.e., we only move the production ofC units from period t to another period. Due to feasi-bility restrictions the latter period must be chosen inI , ... , u}. Clearly, it is optimal to take the cheapest oneavailable, i.e., 6,,.EXAMPLE (continued). Table 6 shows the situation atthe beginning of Step 2 in the iteration for t = 3, i.e., theoptimal solution of P(3)'. Note that u = 5. Because pe-riod 3 is a production period, we replace it by period 65= 4 to obtain the optimal solution of P(3).

    UPDATING THE DATA IN SUCCESSIVE ITERATIONS.Consider the iteration for period t - 1. Starting with theoptimal solution of P(t)', we first move the f units fromt to t - 1. This increases the inventory of period t - 1by f units. We update u correctly by setting it equal tot -1 if It-, < C.

    It can easily be verified that, unless t - 1 < s, thereis no need to update s if production has not been movedin Step 1 of the preceding iteration. Furthermore, wehave the following result.

    LEMMA 5. Suppose that in Step 1 of the iteration forperiod t, production is moved from a period in Is, . . ., t} toa period in It + 1, . . ., u }. Then it is not necessary to check

    Table6 Situation or t = 3T 1 2 3 4 5 6 7

    Cf(T) 19 12 5 13 17 12 10prod. n y y n n y nIT 0 1 7 6 2 2 06T 1 1 1 4 4

    148 MANAGEMENT CIENCE/Vol. 42, No. 1, January 1996

  • 8/6/2019 Algorithm for the Economic Lot-sizing Problem With Constant Capacities

    9/10

    VAN HOESEL AND WAGELMANSThe EconomicLot-sizingProblem

    whetherproduction houldbe moved in Step 1 of the itera-tionsfor periodsIs, . . ., t - 1}.

    PROOF. Suppose that a full production period ismoved in Step 1 of the iteration for t from a period inIs, . . . , t} to a period after t. Note that this move reducesthe inventory of t to a level below C. Suppose that thelemma is false and there are periods in Is, . . ., t - 1)for which it is profitable to move a full production pe-riod in Step 1. Consider the first iteration for which thishappens and let r be the corresponding period. A prof-itable move with respect to r consists of moving fullproduction from a period in Is, . . ., rI to a period afterI, but not later than t. This move would also have beena feasible and profitable one with respect to the solutiongiven at the start of the iteration for t. As this was theoptimal solution of P(t + 1)', we have derived a con-tradiction. Hence, the lemma holds. O

    This lemma justifies that, after a move has been per-formed in Step 1, we do not perform this step until wereach the iteration for s - 1. Therefore, updating s isdone correctly as follows. At the beginning of the iter-ation for t - 1 we check whether t - 1 < s. If this is thecase, then we determine the new value of s and we com-pute the periods Yrfor all r E Is, . . ., t - 1}.Figure 1 summarizes how the data are initialized andupdated.

    Let us now turn to the complexity of the iterations.We show that to compute and update the data duringthe iterations, each period is considered not more thana constant number of times. This implies the desiredresult that the iterations for a given subplan require intotal O(T) time.

    Initially, for t = tmax, we have u = tmax, and the initialvalues of 6, are computed for all v Ezt, ..t., ul simul-taneously by considering v in increasing order. The ini-tial value of s is determined by considering the periodsin decreasing order, from tmaxonward, until the firstperiod with inventory level less than C is found. Thevalues of Yrfor r E Is, . . . I tmaxIare computed by con-sidering the elements in Is, .. , tmaxIn increasing order.Updating u is done by checking I, < C for each t dur-ing the algorithm. Updating 8v s done only if a move isperformed in Step 1. In that case, we update the valuefor the periods {Iy, . . ., t}, where ye ? s. Step 1 will beperformed again only for t < s, and thus the mentionedvalues will not be updated for a second time.

    Figure1 Overview f AlgorithmInitializationsolve P(t+ 1)'u := tma,;compute6 (v E {t1,..., u})determine ; computey, (r {s, . tmaxJ)moved:='no'Iterationsfor t:= tma 1 downto tmindotake solutionof P(t+ 1)';move f units fromt + 1 to t

    if/,t< C,then u:= tif t < s thendetermine , computeYr r E {s,..., t})moved:='no'if moved='no'hen Step :)moveproductionf profitable solutionof P(t)'if productions moved hen

    moved:= yes'u:= tupdate6, (T E {yt, . t})performtep2

    Each time s is determined we move in decreasing or-der from t to the first period for which the starting in-ventory is less than C. This step will not be repeated forany t 2 s, so the check takes place for each period atmost once. Finally, we compute y, for r E s, ..., t justafter s has been determined, by considering the ele-ments in Is, . . ., t} in increasing order. Again, each pe-riod will only be considered once.

    5. Concluding RemarksWe have presented an O(T3) dynamic programming al-gorithm for solving the economic lot-sizing problemwith constant capacities, concave production costs andlinear holding costs. Our algorithm is an improvementover the algorithm of Florian and Klein by a factor T.However, the latter algorithm also solves the more gen-eral problem in which the holding costs are concave.For our approach the linearity of the holding costsseems essential. It allows us to formulate an equivalentproblem without holding costs, for which it is easy tocompute the change in costs when a full production pe-riod is moved.

    The improvement in running time of our algorithmis based on the idea that for a given subplan many

    MANAGEMENTSCIENCE/Vol. 42, No. 1, January 1996 149

  • 8/6/2019 Algorithm for the Economic Lot-sizing Problem With Constant Capacities

    10/10

    VAN HOESEL AND WAGELMANSTheEconomicLot-sizingProblem

    similar subproblems have to be solved. The algorithmexploits the fact that the optimal solutions to these prob-lems are partially equal. The only possible way in whicha further improvement could be achieved seems to bethe exploitation of relations concerning the positioningof optimal fractional periods in closely related subplans.Until now, we have not been able to identify such re-lations.'1The authors would like to thank two anonymous referees and anassociate editor of ManagementScience or their comments on an earlierdraft of this paper.ReferencesAggarwal, A. and J.K.Park, "Improved Algorithms for Economic Lot-

    Size Problems," Oper. Res., 41, 3 (1993), 549-571.Bitran, G. B. and H. H. Yanasse, "Computational Complexity of theCapacitated Lot Size Problem," ManagementSci., 28, 10 (1982),

    1174-1185.Chen, H.-D., D. W. Hearn, and C.-Y. Lee, "A New Dynamic Program-

    ming Algorithm for the Single Item Capacitated Dynamic Lot SizeModel," J. of GlobalOptimization,4 (1994), 285-300.

    Chung, C.-S. and C.-H. M. Lin, "An O(T2) Algorithm for the NI/CGNI/ND Capacitated Lot Size Problem," Management Sci., 34(1988), 420-426.

    Federgruen, A. and M. Tzur, "A Simple Forward Algorithm to SolveGeneral Dynamic Lot Sizing Models with n Periods in 0(n log n)or 0(n) Time," ManagementSci., 37 (1991), 909-925.Florian, M. and M. Klein, "Deterministic Production Planning withConcave Costs and Capacity Constraints," ManagementSci., 18(1971), 12-20., J.K. Lenstra, and A. H. G. Rinnooy Kan, "Deterministic Produc-tion Planning: Algorithms and Complexity," ManagementSci., 26(1980), 669-679.

    Van Hoesel, S., A. Wagelmans, and B. Moerman, "Using GeometricTechniques to Improve Dynamic Programming Algorithms forthe Economic Lot-Sizing Problem and Extensions," EuropeanJ.Oper. Res., 75 (1994), 312-331.

    Pochet, Y. and L. A. Wolsey, "Lot-Sizing with Constant Batches: For-mulation and Valid Inequalities," Mathematicsof Oper. Res., 18(1993), 767-785.Veinott, A. F., Jr., Unpublished class notes, Program in OperationsResearch, Stanford University, Stanford, California, 1963.

    Wagelmans, A., S. Van Hoesel, and A. Kolen, "Economic Lot-Sizing:An 0(n log n) Algorithm that Runs in Linear Time in the Wagner-Whitin Case, Oper. Res., 40 (1992), S145-156.

    Acceptedby Luk Van Wassenhove;eceived uly 1993. Thispaperhas beenwith the authors5 months or 1 revision.

    150 MANAGEMENTSCIENCE/Vol. 42, No. 1, January 1996