A Minimum Concave-Cost Dynamic Network Flow ... - Semantic Scholar

Report 4 Downloads 61 Views
A Minimum Concave-Cost Dynamic Network Flow Problem with an Application to Lot-Sizing Stephen C. Graves and James B. Orlin Sloan School of Management, Massachusetts Institute of Technology, Cambridge, Massachusetts 02139

.-...

c

.: :.

.... .. .

...,

We consider a minimum-cost dynamic network-flow problem on a very special network. This network flow problem models an infinite-horizon, lot-sizing problem with deterministic demand and periodic data. We permit two different objectives: minimize long-run average-cost per period and minimize the discounted cost. In both cases we give polynomial algorithms when certain arc costs are fixed charge functions, and others are linear.

1. INTRODUCTION In this article we consider two minimum-cost dynamic network-flow problems based on the network of Figure 1. We define a dynamic flow x = (xi) to be feasible if it satisfies the system of constraints X0o

Xoj+X_,- 1,; -X xf

(1.1)

- X12 + X2i = dl

_-

xj/,/+ + xi+1,i/di

for 1=2,3,4,...

(1.2)

0.

where d = (d1) is a vector of prespecified nonnegative integers. Associated with each arc(i,i) is a cost function ci(') which we assume to be concave, nonnegative, and nondecreasing. Finally, we assume that the data is periodic with period n. In particular,

dj d- ,-.n- . .

::. :.:.:.:-.:::: ::, ..?

.o i .+. . .

for for

,

=

.. I 2 , 3, 3,... 1,2

for 1=1,2,3,... Ci,() =Ci+n,i+n(),

for i=-

1 or/+ 1, i,j

1.

In this paper we will consider two different objectives. In Section 2 we consider the problem of minimizing the long-run average-cost per period of a feasible dynamic network flow. In Section 3 we consider the problem of minimizing the discounted cost. Networks, Vol. 15 (1985) 59-71 © 1985 John Wiley & Sons, Inc.

.ms$C(919P)iBPll171Q"*A

~C----b

111_.-

111111111*r-11

L·----

C- -11__41

1

CCC 0028-3045/85/010059-13$04.00

-·- C-

-

1

·--C · --

-YIY---_IIUJ-LIMkLI1C·-(·ICLC·I

IC-·IC-C-4L*.

-1-

60

GRAVES AND ORLIN

dI ""

'' ''''' ''

' ' '`

d2

d3

dk

dk+I

''

FIG. 1. The dynamic network.

'' ' '"'

In both cases we show that the problem is easy if the "period length" of the optimal solution is a small multiple of n. However, it is unknown whether these problems can be solved in polynomial time in general. For the special case that the cost functions are "linear plus a fixed cost," we provide polynomial algorithms for both problems. An Application to Lot Sizing

· .,

This network flow problem may model an infinite-horizon, lot-sizing problem where demand is deterministic and is given by dj for demand in time period j. The flow x0 i denotes production in period j. The flows xi, + 1 and xi +1,i denote inventory and backorders, respectively; xi 1+ represents inventory carried from time j to time + 1, while x+ 1, represents a backordering of demand from time j to time j + I. Constraints (1.1) and (1.2) are just the inventory balance equations for time period 1 and time period j (j > 2), respectively. Finally the cost function coj() is for the cost of production, while cj i + (') and c + , i() give the cost of holding inventory and the cost of backordering, respectively. Because of the possible application to lot-sizing, we will henceforth refer to the problems in this paper as the average-cost and discounted-cost periodic lot-sizing problems. These problems are extensions of the finite-horizon, lot-sizing problem first studied by Wagner and Whitin [18]. The representation of the infinite-horizon problem as a single-source network-flow problem directly extends that given by Zangwill [20, 21] for the finite-horizon problem. By assuming that the costs and the demand follow a cyclic pattern, we consider a very special version of the infinite-horizon problem. Nevertheless, this problem statement may be a useful representation of settings with a strong seasonal or cyclic demand component. This cyclic property may occur due to a natural product seasonality, or may be induced from the composition of cyclic purchasing patterns of a set of customers, i.e., customer A buys 100 units once every

'' '' i

three period ...

Furthermore, the study of the infinite-horizon problem should

provide insight to and supplement the work on planning horizons for the dynamic lot-size problem (Wagner and Whitin [18], Eppen et al. [4], Zabel [19], Lundin and Morton [14], Chand and Morton [21). Erickson et al. [5] solve the related periodic lot-sizing problem in which the schedule x is required to have the same period length as the data. This problem reduces to a constrained minimum-cost circuit problem, for which they give an O(n 3 ) algorithm.

~"~~~I --~l8[9

-

-

-

--

-

-

-,,I~_

NETWORK FLOW PROBLEM

61

The periodic lot-sizing problems considered here are special cases of the general concave-cost network flow problems for dynamic/periodic graphs. Orlin [16] proved that this latter problem is P-SPACE hard (and thus is also NP-hard). In other words, any problem that is solvable using a polynomially bounded amount of workspace may be transformed in polynomial time into a (general) concave-cost dynamic network flow problem. For further definitions concerning P-SPACE complexity, see Garey and Johnson [6].

,..:. '`"' ' ^' .,.........; ....,

Although the (general) concave-cost dynamic network flow problem is P-SPACE hard, Orlin [17] gave a polynomial time algorithm for the corresponding convex-cost dynamic network flow problem. In Section 2 of this article we consider the undiscounted periodic lot-sizing problem and we reduce it to a minimum cost-to-time ratio circuit problem. We also provide a polynomial time algorithm for the case in which the production costs are linear plus a fixed charge and the backorder and inventory costs are linear. In Section 3, we model the discounted periodic lot-sizing problem as a discrete semi-Markov decision chain. We also provide a polynomial time algorithm for the fixed charge case. 2. REDUCING THE MINIMUM AVERAGE COST PROBLEM TO THE MINIMUM COST-TO-TIME RATIO CIRCUIT PROBLEM A feasible flow x = (xi) Xo = Xo, +p

is said to be periodic with period p if for all j sufficiently large,

and Xi = Xi1+p, +p

for all sufficiently large, and i =j +

or j - 1.

A flow x = (xii) is said to be a spanning tree flow if there is no circuit C of arcs such that xii > O for all (i,)E C. Lemma 1. There is an optimal dynamic flow for the minimum average cost problem that is a periodic spanning tree flow. ' ··· ····· - "

''i

Proof The fact that there is an optimal periodic flow is a corollary of the optimality of stationary solutions for finite state Markov Decision Chains. (See Orlin [16] for a more detailed explanation.) Since all costs are assumed to be concave, within the class of periodic solutions we can restrict attention to spanning tree flows. (The proof is essentially the same as proving the optimality of spanning tree solutions for finite concave-cost network-flow problems and does not rely on any infinitary axioms such as the axiom of choice.) I Because of the application to lot-sizing, we will adopt some of the lot-sizing terminology. In particular, we will refer to a period j in which x 0 i > 0 as a production period. We refer to period j as a regeneration period if i = and di > 0 or if x -1, = xI, - = 0 and d > 0. In a production context a regeneration occurs at period j if

6--···..·61··...··--··1-4--· --

C·-·Lbll --

- t-·lllil*--3ellt-·Y·ll

--PY-^I·lqPI

CT^F----------·--·-

--

Il-C--

r ---I-

I

62

GRAVES AND ORLIN

there is neither backorders nor inventory at the start of the period. The following is an immediate consequence of the optimality of spanning tree solutions. (Zangwill [20] gives the same result for finite horizon lot-sizing problems.) Corollary 1. There is an optimal solution to the minimum average cost periodic lotsizing problem such that between every two successive regeneration periods i and I there is exactly one production period k.

''

~""' '' .·:

Before proceeding, we will need a bound on the number of periods between successive regeneration points. Our bound is not the tightest possible but is within a constant factor of the tightest bound. Let D = d + · + dn; let H(y) be the cost of storing y units of inventory for n consecutive periods; let B(y) be the cost of back-ordering y units of inventory for n consecutive periods. Thus, we have

" '''' "' "`'

H(y) =

12 (y)

=

3(y)

+(Y) + - - +Cn,nl

and B(y) = c 2 (y) Finally let c* = co (d ) +

-'

+ C32 (y)

+ Con(d,)

.-

+ Cn+,n(y).

be the cost of satisfying all demands in the

first n periods by production in each period. Lemma 2. Suppose that (c, d) is an instance of the minimum average cost problem with period n and that limy,, B(y) = lim_*oo H(y) = o. Then there is an optimum

solution x = (xi) that is a periodic spanning tree solution such that (i) there are an infinite number of regeneration points and (ii) the number of periods between two successive regeneration points is at most 2(k' + )n, where k= min [k: k integer, c* < H(kD) and c* < B(kD)] . Proof. Suppose that i and are successive regeneration points and that p is the production period between i and j. Suppose further that / - i> 2(k' + 1)n. Hence, we have/- p >(k' +1)n orp- i>(k'+ 1)n or both. Consider first the case that - p > (k' + I)n. Suppose we modify schedule x by

'''*'

producing in periods j - n,...,j - 1 so as to just meet demand, and decreasing production in period p by D units. This will reduce the inventory in each period between

'''`''"'' '''

p and j. In particular, in the new schedule the inventory level in period k for p < k < j- n is the same as that in period k + n in the original schedule. The inventory level for period k for j - n < k < j is zero in the new schedule. Hence, the inventory savings of the new schedule over the original schedule is just the inventory holding costs in the original schedule for the periods p,p + 1, .

p + n - 1. But these savings are at least

H(k'D). Since the increase in production cost is at most c*, it follows, by assumption, that the new schedule is an improvement. We next consider the case p- i> (k' + l)n. In this case we modify the original

~~_ · ·

I~~·-^--···--~~~-·I1IIIC

Il~~~~·~YI··lllll~~~··II~~~···~·UI~~ I I

~~~--C-P~~111 _-Wi Iop-

-------

NETWORK FLOW PROBLEM schedule by producing in periods i, i + 1,..

63

, i + n - 1 so as just to meet demand, and

reducing the production in period p by D units. This will reduce the backorder costs in each period between i and p. Similar to the previous case, the reduction in backorder costs is at least B(k'D), while the increase in production costs is at most c*. Thus the modified schedule gives a strict improvement. We have thus shown that we can strictly improve the cost of any schedule in which there are successive regeneration points i, for which - i > 2(k' + )n, which completes the proof. "'" :..·. ;..··.·.··..·. -.-·.··..··.·.·.·· ·.···: --·.·.·· ·· ·..·.I

For notational convenience, we define k* = 2(k' + 1), where k' is given above. If we consider only solutions satisfying the properties given in Lemma 2, we can transform the minimum average-cost problem into a minimum cost-to-time ratio circuit problem, which may be viewed as a minimum average-cost infinite-path problem. In order to define this latter problem more precisely, we first define the following parameters:

D(i,f) =

dk

for 'i
j, r = 1,2, ., k*. Any directed circuit C on G defines a periodic spanning tree flow for the average cost problem. The cycle length of the periodic spanning tree flow is the sum of the transit times of the edges of C, while the cost of the periodic spanning tree flow over one cycle is just the sum of costs of the edges of C. Hence, the average cost of the periodic spanning tree flow given by C is just the cost of C divided by the cycle length of C, which is called the cost-to-time ratio of the directed circuit C. Consequently, to solve the minimum average cost problem we need solve the minimum average cost-to-time ratio problem, which determines a directed circuit C on G with the minimum cost-to-time ratio. We note that the above instance of the minimum cost-to-time ratio circuit problem is efficiently solvable in the case that k* is small. For example, Lawler [12], Megiddo [15], and Karp and Orlin [9] all provide efficient algorithms in this case. (The latter paper provides an O [(nk*)3 i algorithm.) While these algorithms are all quite efficient for many instances of the average cost problem, they are exponential in the worst case because k* may grow exponentially large in the size of the data. Indeed, the difficultly with solving the above instances of the minimum cost-to-time ratio circuit problem is that there is no known way of pruning the exponentially large set of edges. Thus there is no known polynomialtime algorithm. Below we provide a polynomial-time algorithm for the special instance of the lotsize problem in which the production costs are "linear plus a fixed charge" and where the inventory and backorder costs are linear functions. We say that a function f(.) is a fixed-charge function is there are integers a and b such that a > 0, b > 0, and

.....·.·.··-"·."..-;...! =

X)

a+ bx

if x>O

0

if x

=

0.

It is easy to see that fixed-charge functions are concave. A large part of the lot-sizing literature deals exclusively with problems in which the production costs are fixed charge. In this context the fixed charge a denotes a setup cost incurred whenever production is initiated, regardless of the production quantity; in addition to this fixed cost, there may be a variable cost that is directly proportional to the production quantity at the rate b. In what follows we assume that the production cost is a fixed-charge function, while both the inventory and backorder costs are linear-cost functions.

ill -·-*-"-LL------··I-kl__-----

gaaOg··C)·IIC^-·-----·I

C1-

l-C--

-

-C-. - IIIIW···IIC·--(-tl··I*·l--*ls*Ci·*J

IICI^·---ll

I--_1-_

65

NETWORK FLOW PROBLEM

A standard technique for determining a minimum cost-to-time ratio circuit is an iterative procedure based on the following observation. Remark. Let G be a directed graph, and for each edge e let Ce and te denote its cost and transit time. Let X be a real number and let e

= Ce

- Hte be the reduced cost of

edge e. Then any circuit C in C has a cost-to-time ratio of at least X if and only if the

reduced cost of C is nonnegative (e.g., Lawler [11 ] ). The technique based on this remark is to use binary search to find the minimum value of X for which there is no circuit with negative reduced cost. At each iteration for each pair (i,/) we select that edge e (i,) with minimum reduced cost Ce and

··· .·i .....

ignore all other edges from i to j. Once these edges are selected, the remaining number of steps in each iteration is 0(n3 ) using a standard algorithm such as Bellman [1] for computing the existence of negative-cost circuits. Moreover, the number of iterations is polynomially bounded because we start with a search interval that is at most [max (ICe I: e E)], and we may stop when our search interval is smaller than (nk*) - 2 . (See Zemel [22] for more details on binary search.) We now claim that for fixed X we can determine in polynomial time those edges of G with minimum reduced cost. We accomplish this for a specified pair i,f-.of vertices as follows. min c e - .te e is an edge of E from i to j} =

in aii

Nt:

tn -

t

t

= 0,

1,2,

..

and t

k

-

1

for i <j,

1,2,..., k*

for i>j}

(2.6)

Now after substituting the definition for aij given by (2.5) into (2.6), we obtain

min {A [i, + (r + s)n, k +rn] -

(r + s): i < k +rn <j + (r + s)n,

r,s,k

1 < k < n and r + s

k*}

If the production cost in period k is

'''''' ' ' "

I+ vkx

' ''"'i:

Cok (X)

"'''i

0

if x >0

(2.7)

if x = 0,

then using (2.4) we can break up the above minimization into two parts as follows: min {fk + min[D(i,k + rn - )vk + B(i, k +rn) + D(k + rn,j + (r + s)n - 1)vk r,s

1 •k i]

(3.6)

where k = inf[fk

+

ok D(k +l,j + sn - 1) + H(k, j + sn) + pzi:

l < jn,

j+sn>k]

(3.7)

By substituting (3.2) into (3.7) and observing that vkD(k + , j + sn - 1) is linear in s for fixed j, the minimization (3.7) may be rewritten as Zk =inf a7 + as

. r.:.·.· · ·....., · ·..··:·

apS

for I

n, s(k

- j)/n].

For each pair of fixed values j,k, the above minimization problem is solvable in 0(1) steps by setting the derivative to 0. If s' is the value for which the derivative is 0, then we can show that the minimum occurs at [s'j or [s'] or [(k - j)/n]. Thus we can compute zk for k = ,..., n in O(n2) steps. By substituting (3.3) and the solution of (3.7) into (3.6) we find that z i = inf[a

+ ap

r

+ a rp : 1 < j

n, r

(j- i)/n].

Let ri be the value of r that minimizes the above for fixed j. By taking the derivative we can easily show that the above function is either unimnodal up or unimodal down, depending upon the sign of a . Consequently, if r' is the value for which the derivative is zero, then the infinum must occur at [r' j or [r'] or [(/ - i)/nl or oo. Thus we find the minimum in 0(1) steps for each J, and thus can perform one iteration of policy improvement in O(n2 ) steps.

~--~-~3-**rrarrrl-rrrr------·-----l

-·IIP-C

Jle*llbC·ls^lljs*lI·IIILWIIY-_sY---i-

C·L·)(ICILIII-----U-·---LIPC-LII

.IIIII-·III

Iii

- ----

70

GRAVES AND ORLIN

Implementation of Linear Programming We may solve the discounted problem in polynomial time via the Khachian ellipsoidal algorithm [10] as described by Groetschel et al. [7]. To see this, we rewrite (3.1) as its equivalent linear program: min zl +

+ Zn

Zi >ai,

+

(3.8)

subject to '' ;··

for i,=

1,2 ... ,n,

tn

k

=

Ptz ]

0, 1,2,...,

and t >(i-i)ln.

(3.9)

Given any vector {zi}, we can discover in 0(n 2 ) steps, as shown above, whether it is feasible (and hence optimal) to (3.8)-(3.9), and if not, we find a violated constraint. Therefore, the ellipsoidal algorithm runs in polynomial time despite the infinite number of constraints implied by the linear program (3.8)-(3.9). References

.. ··,·.·..·· ·..;.·.,;

C

..t·: t ·;

[ 1] R. E. Bellman, On a routing problem. Q. App. Math. 15 (1958) 87-90. [2] S. Chand and T. E. Morton, Perfect Planning Horizon Procedures for the Dynamic Lot Size Inventory Model. Working paper, August 1979. [31 G. B. Dantzig, W. Blattner, and M. R. Rao, Finding a cycle in a graph with minimum cost to times ratio with application to a ship routing problem. In Theory of Graphs (P. Rosenthal, Ed.). Dunod, Paris, Gordon and Breach, New York ( 196 7) 77-84. [4] G. D. Eppen, F. J. Gould, and B. P. Pashigian, Extensions of the planning horizon theorem in the dynamic lot size model. Management Sci. 15 (1969) 268277. [51 R. E. Erickson, C. L. Monma, and A. F. Veinott, Jr., Minimum concave-cost network flows. Math. Operations Res., in press. [6] M. R. Garey, and D. S. Johnson, Computers and Intractibility:'A Guide to the Theory of NP-Completeness. Freeman, San Francisco (1979). [7] M. Groetschel, L Lovasz, and A. Schrijver, The ellipsoid method and its consequences in combinatorial optimization. Combinatorica 1 (1981) 169-197. [8] R. A. Howard, Dynamic Programming and Markov Processes. Wiley, New York (1960). [9] R. M. Karp and J. B. Orlin, Parametric shortest path algorithms with an application to cyclic staffing. Discrete App. Math. 3 (1981) 37-45. [10] L. G. Khachian, A polynomial algorithm for linear programming. Dokl. Akad. Nauk. SSSR 244 (1979) 1093-196. [ 11 ] E. L. Lawler, Combinatorial Optimization:Networks and Matroids. Holt, Rinehart and Winston, New York (1976). [12] E. L. Lawler, Optimal cycles in doubly weighted linear graphs. In Theory of Graphs (P. Rosenthahl, Ed.). Dunod, Paris, Gordon and Breach, New York (1967), pp. 209-214. [ 13] D. G. Luenberger, Introduction to Dynamic Systems: Theory Models and Applications. Wiley, New York (979). [14] R. Lundin and T. Morton, Planning horizons for the dynamic lot size model: Zabel vs. protective procedures and computational results. OperationsRes. 23 (1975) 711-734.

.

NETWORK FLOW PROBLEM

[15] N. Megiddo, Combinatorial optimization with rational objective functions. In Proceedings of the 10th A CM Symposium on the Theory of Computing (1978), pp. 1-12. [16] J. B. Orlin, The complexity of dynamic languages and dynamic optimization problems. In Proceedings of the 13th ACM Symposium on the Theory of Computing (1981), pp. 218-227. [171 J. B. Orlin, Minimum convex cost dynamic network flows. Math. Operations Res. 9 (1984) 190-207. [18] H. M. Wagner and T. Whitin, Dynamic version of the economic lot size model. Management Sci. 5 (1958) 89-96. [19] E: Zabel, Some generalizations of an inventory planning horizon theorem. Management Sci. 10 (1964) 495-471. [20] W. I. Zangwill, A backlogging model and a multi-echelon model of a dynamic economic lot size production system-A network approach. Management Sci. 15 (1969) 506-527. [21] W. 1. Zangwill, Minimum concave cost flows in certain networks. Management Sci. 14 (1968) 429-450. [221 E. Zemel, On search over rationals. OperationsRes. Lett. 1 (1981) 34-38.

... ""'i :···..·.·..·..··.·...·..·· .-.-,·.. -.-. .··.-i ·I ·;·.: ·-!

Received November 4, 1983 Accepted April 17, 1984

'' ' ' ''"'"''' ,..,·..···..·· ..· ·i.:,-.t ·-;· ·· · ·

- ···

~WC^-·C··apP··r*i((lPII ---

71

· ····

_ I IPI/IPIJILIII(·---I

----ll----i·

X11·-·*Sb·b----

_

Lr

- -LSZI

- - -

- PIIIC-______·-LII

-------I--

--^---4L·1·91PY-·--