Computers & Operations Research 28 (2001) 127}137

Dynamic programming algorithms for scheduling parallel machines with family setup times Scott Webster *, Meral Azizoglu School of Management, Syracuse University, Suite 400, Crouse-Hinds School of Management Building, Syracuse, NY 13244-2130, USA Department of Industrial Engineering, Middle East Technical University, Ankara 06531, Turkey Received 1 December 1998; received in revised form 1 May 1999

Abstract We address the problem of scheduling jobs with family setup times on identical parallel machines to minimize total weighted #owtime. We present two dynamic programming algorithms * a backward algorithm and a forward algorithm * and we identify characteristics of problems where each algorithm is best suited. We also derive two properties that improve the computational e$ciency of the algorithms. Scope and purpose While most production schedulers must balance con#icting goals of high system e$ciency and timely completion of individual jobs, consideration of this con#ict is underdeveloped in the scheduling literature. This paper examines a model that incorporates a fundamental cause of the e$ciency/timeliness con#ict in practice. We propose solution methodologies and properties of an optimal solution for the purpose of exposing insights that may ultimately be useful in research on more complex models. 2000 Elsevier Science Ltd. All rights reserved. Keywords: Production scheduling; Dynamic programming; Family setup times

1. Introduction Scheduling problems in practice often require balancing system e$ciency and with the timely completion of individual orders. A major reason for this is that there are typically e$ciencies

* Corresponding author. Tel.: #315-443-1040; fax: #315-443-5457. E-mail address: [email protected] (S. Webster) 0305-0548/00/$ - see front matter 2000 Elsevier Science Ltd. All rights reserved. PII: S 0 3 0 5 - 0 5 4 8 ( 9 9 ) 0 0 0 9 4 - 5

128

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

associated with processing similar parts together. This exerts pressure for scheduling long runs of similar jobs at the expense of some delay in other jobs. The purpose of this paper is to describe algorithms for scheduling job families on parallel machines to minimize total weighted #owtime. The `weighta of a job is the cost rate for delaying its completion, and thus is a measure of relative urgency. Job families re#ect e$ciencies associated with processing similar jobs together. A machine must be setup when switching from one family to another. There is no setup time between two jobs from the same family (or equivalently, job setup times are sequence-independent). Thus, the combination of a weighted #owtime criterion and a family setup time structure captures concerns for overall operating e$ciency and the timely completion of individual jobs in an elementary way, and consequently represents an attractive model for developing insights and solution methodologies that may ultimately be enriched to account for greater complexity. Research on family scheduling models is relatively new to the literature, and most of this work has concentrated on single machine models. Ahn and Hyun [1], Bruno and Sethi [2], Mason and Anderson [3], and Monma and Potts [4] propose algorithms for minimizing total weighted #owtime on a single machine with family setup times. Mason and Anderson [3] describe a branch and bound procedure and a depth-"rst search algorithm; the other authors de"ne dynamic programming (DP) algorithms (see [5] for an expanded discussion of work in this area). While the complexity of the single-machine weighted #owtime family scheduling model is open at this point in time, the parallel machine version of the model is known to be NP-hard in the strong sense. This is true even when the problem is simpli"ed by assuming no family setup times [6] or by assuming that the weight of each job is 1 [7]. Bruno and Sethi [2] consider the special case of unitary job weights and propose a DP algorithm with time complexity that is polynomial when the number of machines and the number of families are "xed. Monma and Potts [4], while not explicitly de"ning an algorithm, identify the approach for extending their single-machine DP algorithm to accommodate parallel machines. This paper builds on past work to o!er three contributions. First, we give an explicit extension of the recursion in [4] for the case of parallel machines and incorporate it in a forward DP algorithm. Second, we propose an alternative recursion and an associated backward DP algorithm. The algorithms are polynomial in either the sum of the weights or the sum of processing and setup times if the number of machines and families are "xed. We also identify characteristics of problem instances that cause one DP algorithm to be favored over the other. Third, we introduce properties that improve the computational e$ciency of the algorithms. Our focus is not on developing an algorithm to be directly implemented in practice. We believe that most real-world problems are much more complicated than the model under consideration. Rather, our objective is to add to the understanding of a simple model that captures part of why many real-world scheduling problems are di$cult. In so doing, we hope to take a step towards e!ective and practical solutions methods for more complex and more widely applicable models of scheduling problems in industry.

2. Notation and algorithms The objective is to schedule identical parallel machines to minimize total weighted #owtime. All jobs are available at time zero with known integer processing times, setup times, and weights. Each

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

129

job is associated with a family where a setup time is required between two jobs from di!erent families, and the family setup time is independent of the preceding family. A setup is also required prior to processing the "rst job on a machine. This is typical of environments when scheduling at the beginning of a new shift after machine down time, and it is consistent with the literature on sequence-independent family setup time models (see [2,3,7]). For a given schedule, the weighted #owtime of a particular job is the product of its weight and job completion time, and the total weighted #owtime of a schedule is the sum of weighted #owtime over all jobs. The following subsection presents notation for the model.

2.1. Notation m n f n H s H ( j, k) p HI w HI P S = C G = G

number of identical parallel machines total number of jobs number of families number of jobs from family j, i.e., n" n H H setup time of family j identi"er for the kth job from family j processing time of job ( j, k) weight of job ( j, k) p H I HI ns H H H w H I HI completion time (i.e., total processing time and setup time) on machine i in a schedule total weight of jobs scheduled on machine i

2.2. A backward DP algorithm One useful property of an optimal job sequence on a single machine is that jobs from the same family are in weighted-shortest-processing-time (WSPT) order [4]. This means that jobs are sequenced in order of smallest-to-largest p /w . We take advantage of this property in both of the HI HI DP algorithms presented in this paper. We shall assume that jobs within a family are indexed in weighted-longest-processing-time (WLPT) order (i.e., largest-to-smallest p /w for each family j). The following additional notation HI HI is required to specify the DP: a"(a ,2, a ), a "number of jobs from family j in the schedule, D H b "(b ,2, b ), b "index of the family that is already setup on machine i prior to time zero, e.g., K G b "j means that no setup is required if a job from family j is scheduled "rst on machine i; b "0 G G implies that a setup is required regardless of what family is scheduled "rst on machine i, c"(c ,2, c ), c "sum of the weights of the jobs scheduled on machine i, K G d "1 if i"j; 0 otherwise, GH u "set of feasible weight sums allocated to machine i in at least one optimal schedule, G ) "any set satisfying u L) , G G G

130

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

A(a; c)"+(i, j) " i3[1, m], j3[1, f ], a '0, c !w H 3) ,"set of machine and family index pairs H G H? G that speci"es feasible assignments of job ( j, a ) to the "rst position in the sequence of jobs scheduled H on machine i, H(a , b, c)"cost of optimal schedule for jobs ( j, 1),2, ( j, a ) for all j given that machine i is initially for family b for all i and the sum of the job weightsH scheduled on machine i is c for all i. setup G G The Recursion H(a, b, c)" min +[(1!d G )s #p H ]c #H(a, b, c),, H? G @H H GHZ? _A where

(1)

a "a !d for t3[1, f ], (2) R R RH b "+b if tOi; j if t"i, for t3[1, m], (3) R R (4) c "c !d w H for t3[1, m]. R R RG H? We organize the computation by beginning with H(0, b, 0)"0 for b3+(b ,2, b ) " b 3[0, f ], K G of zeros. Then, M applying i3[1, m], where 0 is the appropriately dimensioned vector the recursion, we systematically increase the arguments of a (i.e., (1, 0,2, 0), (0, 1,2, 0),2, (1, 1, 0,2, 0), etc.) until we reach a"(n ,2, n ). For each a vector, we compute H(a, b, c) over all possible D K D ?H c3 (c ,2, c ) c " w and c 3) for i3[1, m] . G K HI G G G H I Set ) is de"ned as ) "+0, 1,2, =, for all i. In Section 3 we present a property that can be used G G to reduce the size of ) to improve computational e$ciency. Note that the values b in the recursion G M are determined from the initial set of H(0, b, 0) values and expression (3). M Moreover, when a"(n ,2, n ), the value of b is set to 0 (i.e., the "rst job on each machine D optimum M requires a setup). The is

K D LH min H(a, 0, c) a "n for j3[1, f ], c " w , and c 3) for i3[1, m] . H H G HI G G G H I The time complexity of the algorithm can be deduced from the following observations: E For any a and c, there are O( f K) values of b. compute E In order to H(a, b, c) for given a, M b, c, there are "A(a, c)" computations. Recall that assignments from "rst position on a machine. A(a, c) is the set of possible of a job a family to the Thus, "A(a, c)")O(m f ). of possible a vectors is O(P n )"O((n/f )D). E The number H H E For each value of a, the number of possible c values is less than ") "K(=K"O(=K). This can G be improved to O(=K\) by noting that the weight sum on machine m is determined by the weight sums speci"ed on machines 1 through m!1 (follows from K c " D LH w ). G G H I HI Thus, the time complexity is not more than O(m f K>\DnD=K\). The time complexity concisely illustrates the boundary between `easya and `harda problems. As noted earlier, the general problem is NP-hard in the strong sense. However, if f and m are "xed, then it is clear that the algorithm is pseudopolynomial at worst. This observation, combined with the fact that the

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

131

problem with f"1 and "xed m is NP-hard [8], implies that the problem with "xed f and m is NP-hard in the ordinary sense. Furthermore, if weights are unitary and f and m are "xed, then ="n and we can observe that the algorithm runs in polynomial time and that this version of the problem is in the set P. The algorithm is related to two other algorithms that have appeared in the literature. If f"1, the complexity matches the backward recursion of Lee and Uzsoy [9]. If w "1 for all j and k, HI then the DP algorithm reduces to the algorithm presented by Bruno and Sethi [2].

2.3. A forward DP algorithm In this subsection, we shall assume that jobs within a family are indexed in WSPT order. The DP recursion will make use of the following notation. Note that the de"nitions of b, c, u , and A(a; c) G di!er from those in Section 2.2 (though the meanings are similar in spirit). M a"(a ,2, a ), a "number of jobs from family j in the schedule, D H b "(b ,2, b ), b "index of the family that is scheduled last on machine i; b "0 implies that no K G G M jobs are scheduled on machine i, c"(c ,2, c ), c "completion time of the last job scheduled on machine i, K G d "1 if i"j; 0 otherwise, GH u "set of feasible workloads (including setup time) allocated to machine i in at least one optimal G schedule, ) "any set satisfying u L) , G G G A(a; c)"+(i, j) " i3[1, m], j3[1, f ], a '0, c !s !p H 3) ,"set of machine and family index G H G H H? that speci"es feasible assignments pairs of job ( j, a ) to the last position in the sequence of jobs H scheduled on machine i, B(i, j, a; c)"+k " a '0, c !s !p H !s !p I 3) for k3[1, f ]! j and a '1, c !s !p H I G H H? I I? G I G H H? for k"j; alternatively if no values of k satisfy the preceding conditions, then !p H 3) G H? \ k"0,"set of family indices of jobs that can precede job ( j, a ) on machine i, H G(a, b, c)"cost of optimal schedule for jobs ( j, 1),2, ( j, a ) for all j given that the last job on H i is from family b for all i and the total workload on machine i is c for all i. machine G G The Recursion

c w H # min +G(a, b ,2, b , k, b ,2, b , c), , G(a, b, c)" min G H? G\ G> K M IZ GH? A GHZ? _A where

(5)

a "a !d for t3[1, f ], (6) R R RH c "+c if tOi; c ![(1!d )s #p H ] if t"i, for t3[1, m]. (7) R R R HI H H? We organize the computation by beginning with G(0, 0, 0)"0 where 0 is the appropriately we systematically dimensioned vector of zeros. Then, applying the recursion, increase the arguments of a (i.e., (1, 0,2, 0), (0, 1,2, 0),2, (1, 1, 0,2, 0), etc.) until we reach a"(n ,2, n ). For D each a vector, we compute G(a, b, c) over all possible c3+(c ,2, c ) " c 3) for i3[1, m],. K G G

132

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

Set ) is de"ned as ) "+0, 1,2, P#S, for all i. In Section 3 we present a property that can be G G used to reduce the size of ) to improve computational e$ciency. Note that the values b in the G recursion are determined from B(i, j, a, c). The optimum is min+G(a, b, c) " a "n for j3[1, f ] and c 3) for i3[1, m],. H H G G The time complexity of the algorithm can be deduced from the following observations. E For any a and c, there are no more than O( f K) values of b. compute M E In order to G(a, b, c) for given a, b, c, there are ("A(a , c)")("B(i, j, a, c)") computations. from a family to the last on Recall that A(a, c) is the set of possible assignments of a job "A(a, c)" )O(mf ). B(i, j, a, c) is the set of family indices that can precede job a machine. Thus, "B(i, j, a, c)")O( f ) and ("A(a, c)")("B(i, j, a, c)"))O(mf ). ( j, a ) on machine i. Thus, H E The number of possible a vectors is O(% n )"O((n/f )D). H H E For each value of a, the number of possible c values is not more than ") "K((P#S)K" G O((P#S)K). Thus, the time complexity is not more than O(mf K>\DnD(P#S)K), and the algorithm is pseudopolynomial if f and m are "xed. The algorithm is an extension of forward recursions appearing in Rothkopf [10] and Lawler and Moore [11] that are based on a model without setup times.

3. Properties of an optimal schedule In this section, we derive upper bounds on the sum of the weights of the jobs processed on each machine and on the machine completion times in an optimal schedule. Properties 1 and 2, below, state these bounds formally. We use Wx X to denote the largest integer less than or equal to x. Property 1. There is an optimal schedule where = )max G HI

(s #p )=#(m!1)p w H HI HI HI mp #s HI H

for all i.

Proof. Let (u, v) be the "rst job processed on machine i in some optimal schedule. Suppose (u, v) is removed from machine i and replaced ahead of all jobs on machine j. The weighted #owtime of (u, v) is una!ected by this change. With respect to the remaining jobs on machines i and j, the minimum reduction in total weighted #owtime on machine i is p (= !w ) and the maximum increase in ST G ST total weighted #owtime on machine j is = (p #s ). Clearly, in an optimal schedule the reduction H ST S in total #owtime on machine i is not more than the increase in total weighted #owtime on machine j, i.e., p (= !w ))= (p #s ). ST G ST H ST S

(8)

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

133

If we sum (8) over j3[1, m]!+i,, we get

(m!1)p (= !w )) = != (p #s ), ST G ST H G ST S H which can be rewritten as = [(m!1)p #(p #s )])=(p #s )#(m!1)p w . G ST ST S ST S ST ST From (9) and the fact that = is an integer, it follows that G = )W [(p #s )=#(m!1)p w ]/[mp #s X ] for all i, G ST S ST ST ST S which implies = )max G HI

(s #p )=#(m!1)p w H HI HI HI mp #s HI H

for all i.

(9)

䊐

Property 2. There is an optimal schedule where

1 P#S#(m!1)max +s #p , C) H HI G m HI

for all i.

Proof. Let (u, v) be the last job performed on machine i in some optimal schedule. For any other machine j, C )C #s #p , (10) G H S ST for otherwise cost could be reduced by processing (u, v) on machine j. If we sum (10) over j3[1, m]!+i,, we get

(m!1)C ) C !C #(m!1)(s #p ), H G S ST G H which can be rewritten as

C ) C #(m!1)(s #p ) m. H S ST G H From (11), C )P#S, and the fact that C is an integer, it follows that H H G 1 P#S#(m!1)max +s #p , for all i. 䊐 C) H HI G m HI

(11)

Properties 1 and 2 provide bounds that can be used to reduce the size of ) in the DP algorithms. G For example, letting ;B and ;B denote the upper bounds de"ned in Properties 1 and 2, 5 ! respectively, we can set ) "+0, 1,2, ;B , for the backward DP and ) "+0, 1,2, ;B , for G 5 G ! the forward DP. For the purposes of interpreting the time complexity of the two DP algorithms, particularly with respect to the values of S, P, and =, it is important to emphasize that units of measure must be

134

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

detailed enough to ensure that setup times, processing times, and weights are integers. However, an overly detailed unit of measure will needlessly result in larger parameter values and longer CPU times. In some cases, it may be su$cient to specify setup and processing times to the nearest minute, or nearest hour, where in other cases it may be appropriate to specify these times in seconds. In the case of job weights, a key consideration is generally the maximum ratio of cost rates for delaying completion. For example, if the ratio of the highest-to-lowest delay cost rate is 10, then it may be suitable to specify weights as integer values between 1 and 10. 4. Example We present a small numerical example to illustrate the backward DP algorithm. The steps of the forward DP algorithm are similar and are therefore omitted. The instance parameter values are m"2, n"3, f"2, n "2, n "1, s "1, s "0, p "3, p "1, p "1, w "1, w "2, w "1. Therefore, P"5, S"2, ="4, ;B "max+W 19/7X , W 10/3 X, W 5/2X ,"3, and 5 ;B "W(1/2)[7#max+4, 2, 1,]X "5. Since m"2, we can take advantage of the fact that . = );B "3 implies = *=!;B "1, or in other words, ) "+1, 2, 3, (compared to 5 5 G ) "+0, 1, 2, 3, 4, without the use of Property 1). The following steps use & H' as a wild card symbol G and &' as a `nota indicator (e.g., b3+(1, H),"+(0, 0), (0, 1), (0, 2), (2, 0), (2, 1), (2, 2),). Initialization: H(0, b, 0)"0 for allM b M Stage 1: H[(1, 0), (1, H), (w , 0)]"p w #H(0, b, 0) "3#0"3 "H[(1, 0), ( H, 1), (0, w )], H[(1, 0), (1, H), (w , 0)]"[(s #p )w #H(0, b, 0) "(1#3)(1)#0"4 "H[(1, 0), ( H, 1), (0, w )], H[(0, 1), ( H, H), (w , 0)]"p w #H(0, b, 0) "1#0"1 "H[(0, 1), ( H, H), (0, w )]. Stage 2: H[(2, 0), (1, H), (w #w , 0)]"[(s #p )(w #w )#H[(1, 0), (1, H), (w , 0)] "(1#1)(1#2)#3"9 "H[(2, 0), ( H, 1), (0, w #w )], H[(2, 0), (1, 1), (w , w )]"(s #p )w #H[(1, 0), (1, 1)(w , 0)] "(1#1)(2)#4"8 "H[(2, 0), (1, 1), (w , w )],

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

135

H[(1, 1), (1, H), (w #w , 0)]"min+[p (w #w )#H[(0, 1), (1, H), (w , 0)], p (w #w )#H[(1, 0), (2, H), (w , 0)], "min+3(1#1)#1, 1(1#1)#4,"6 "H[(1, 1), ( H, 1), (0, w #w )], H[(1, 1), (1, H), (w #w , 0)]"min+[(s #p )(w #w )#H[(0, 1), (1, H), (w , 0)], p (w #w )#H[(1, 0), (2, H), (w , 0)], "min+(1#3)(1#1)#1, 1(1#1)#4,"6 "H[(1, 1),( H, 1), (0, w #w )], H[(1, 1), (1, H), (w , w )]"min+p w #H[(0, 1), (1, H), (0, w )], p w #H[(1, 0), (1, 2), (w , 0)], "min+3#1, 1#3,"4 "H[(1, 1), (H, 1), (w , w )], H[(1, 1), (1, H), (w , w )]"min+(s #p )w #H[(0, 1), (1, H), (0, w )], p w #H[(1, 0), (1, 2), (w , 0)], "min+(1#3)#1, 1#4,"5 "H[(1, 1), (H, 1), (w , w )]. Stage 3: H[(2, 1), (1, H), (w #w , w )]"min+(s #p )(w #w ) #H[(1, 1), (1, H), (w , w )], ;p w #H[(2, 0), (1, 2), ;(w #w , 0)], "min+(1#1)(1#2)#4, 1#9,"10 "H[(2, 1), (H, 1), (w , w #w )], H[(2, 1), (1, 1), (w #w , w )]"min+(s #p )w #H[(1, 1), (1, 1), (w #w , 0)], ;p (w #w )#H[(2, 0), ;(2, 1), (w , w )], "min+(1#1)(2)#6, (1#1)#8,"10 "H[(2, 1), (1, 1), (w , w #w )],

136

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

H[(2, 1), (1, 1), (w #w , w )]"min+(s #p )(w #w )#H[(1, 1), (1, 1), ;(w , w )], p (w #w )#H[(2, 0), (2, 1), ;(w , w )], "min+(1#1)(2#1)#5, (2#1)#8,"11 "H[(2, 1), (1, 1), (w , w #w )]. From stage 3 we see that the optimum is 10 and that there are two distinct optimal schedules (e.g., jobs (1, 2) and (1, 1) on one machine and job (2, 1) on the other machine, or alternatively, jobs (2, 1) and (1, 1) on one machine and job (1, 2) on the other machine). We did not need to evaluate the possibility of all jobs scheduled on a single machine in stage 3 because 3";B (w #w #w "4. 5 5. Conclusion We have presented backward and forward DP algorithms for minimizing total weighted #owtime on identical parallel machines for a model with family setup times. When the number of machines and families are "xed, the backward DP algorithm is polynomial in the sum of the weights and the forward DP algorithm is polynomial in the sum of processing and setup times. Therefore, as a general rule of thumb, the backward recursion is more attractive when the sum of processing and setup times is greater than the sum of the weights; otherwise the forward recursion is favored. The proposed algorithms will become computationally burdensome as the sum of the weights and the sum of processing and setup times increase. Thus, as is the case with many NP-hard problems, research on e$cient heuristics capable of high quality solutions is warranted. A second research area, which is of particular importance, is research on properties and solution methods for a generalized model that includes job due dates and penalties for completing both early and late.

References [1] Ahn BH, Hyun JH. Single facility multi-class job scheduling. Computers and Operations Research 1990;17:265}72. [2] Bruno J, Sethi R. Task sequencing in a batch environment with setup times. Foundations of Control Engineering 1978;3:105}17. [3] Mason AJ, Anderson EJ. Minimizing #ow time on a single machine with job classes and setup times. Naval Research Logistics 1991;38:333}50. [4] Monma CL, Potts CN. On the complexity of scheduling with batch setup times. Operations Research 1989;37:798}804. [5] Webster ST, Baker KR. Scheduling groups of jobs on a single machine. Operations Research 1995;43:692}703. [6] Garey MR, Johnson DS. Computers and intractability: a guide to the theory of NP-completeness. San Francisco, CA: Freeman, 1979. [7] Webster ST. The complexity of scheduling job families about a common due date. Operations Research Letters 1997;20:65}74.

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

137

[8] Bruno J, Co!man Jr EG, Sethi R. Scheduling independent tasks to reduce mean "nishing time. Communications of ACM 1974;17:382}7. [9] Lee CY, Uzsoy R. A new dynamic programming algorithm for the parallel machines total weighted completion time problem. Operations Research Letters 1992;11:73}5. [10] Rothkopf MH. Scheduling independent tasks on parallel processors. Management Science 1966;12:437}47. [11] Lawler EL, Moore JM. A functional equation and its application to resource allocation and scheduling problems. Management Science 1969;16:77}84.

Scott Webster is Associate Professor at Syracuse University School of Management, where he teaches and does research in the areas of scheduling and logistics. He received a Ph.D. in Operations Management and Decision Sciences from Indiana University and a B.S. in Mathematics and Statistics from Miami University. Prior to pursuing his doctorate, he worked in the departments of Management Science and Finance at Whirlpool Corporation. Meral Azizoglu is Assistant Professor of Industrial Engineering at Middle East Technical University. She holds B.S., M.S. and Ph.D. degrees in Industrial Engineering all from Middle East Technical University. Her research areas are in production planning and scheduling.

Dynamic programming algorithms for scheduling parallel machines with family setup times Scott Webster *, Meral Azizoglu School of Management, Syracuse University, Suite 400, Crouse-Hinds School of Management Building, Syracuse, NY 13244-2130, USA Department of Industrial Engineering, Middle East Technical University, Ankara 06531, Turkey Received 1 December 1998; received in revised form 1 May 1999

Abstract We address the problem of scheduling jobs with family setup times on identical parallel machines to minimize total weighted #owtime. We present two dynamic programming algorithms * a backward algorithm and a forward algorithm * and we identify characteristics of problems where each algorithm is best suited. We also derive two properties that improve the computational e$ciency of the algorithms. Scope and purpose While most production schedulers must balance con#icting goals of high system e$ciency and timely completion of individual jobs, consideration of this con#ict is underdeveloped in the scheduling literature. This paper examines a model that incorporates a fundamental cause of the e$ciency/timeliness con#ict in practice. We propose solution methodologies and properties of an optimal solution for the purpose of exposing insights that may ultimately be useful in research on more complex models. 2000 Elsevier Science Ltd. All rights reserved. Keywords: Production scheduling; Dynamic programming; Family setup times

1. Introduction Scheduling problems in practice often require balancing system e$ciency and with the timely completion of individual orders. A major reason for this is that there are typically e$ciencies

* Corresponding author. Tel.: #315-443-1040; fax: #315-443-5457. E-mail address: [email protected] (S. Webster) 0305-0548/00/$ - see front matter 2000 Elsevier Science Ltd. All rights reserved. PII: S 0 3 0 5 - 0 5 4 8 ( 9 9 ) 0 0 0 9 4 - 5

128

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

associated with processing similar parts together. This exerts pressure for scheduling long runs of similar jobs at the expense of some delay in other jobs. The purpose of this paper is to describe algorithms for scheduling job families on parallel machines to minimize total weighted #owtime. The `weighta of a job is the cost rate for delaying its completion, and thus is a measure of relative urgency. Job families re#ect e$ciencies associated with processing similar jobs together. A machine must be setup when switching from one family to another. There is no setup time between two jobs from the same family (or equivalently, job setup times are sequence-independent). Thus, the combination of a weighted #owtime criterion and a family setup time structure captures concerns for overall operating e$ciency and the timely completion of individual jobs in an elementary way, and consequently represents an attractive model for developing insights and solution methodologies that may ultimately be enriched to account for greater complexity. Research on family scheduling models is relatively new to the literature, and most of this work has concentrated on single machine models. Ahn and Hyun [1], Bruno and Sethi [2], Mason and Anderson [3], and Monma and Potts [4] propose algorithms for minimizing total weighted #owtime on a single machine with family setup times. Mason and Anderson [3] describe a branch and bound procedure and a depth-"rst search algorithm; the other authors de"ne dynamic programming (DP) algorithms (see [5] for an expanded discussion of work in this area). While the complexity of the single-machine weighted #owtime family scheduling model is open at this point in time, the parallel machine version of the model is known to be NP-hard in the strong sense. This is true even when the problem is simpli"ed by assuming no family setup times [6] or by assuming that the weight of each job is 1 [7]. Bruno and Sethi [2] consider the special case of unitary job weights and propose a DP algorithm with time complexity that is polynomial when the number of machines and the number of families are "xed. Monma and Potts [4], while not explicitly de"ning an algorithm, identify the approach for extending their single-machine DP algorithm to accommodate parallel machines. This paper builds on past work to o!er three contributions. First, we give an explicit extension of the recursion in [4] for the case of parallel machines and incorporate it in a forward DP algorithm. Second, we propose an alternative recursion and an associated backward DP algorithm. The algorithms are polynomial in either the sum of the weights or the sum of processing and setup times if the number of machines and families are "xed. We also identify characteristics of problem instances that cause one DP algorithm to be favored over the other. Third, we introduce properties that improve the computational e$ciency of the algorithms. Our focus is not on developing an algorithm to be directly implemented in practice. We believe that most real-world problems are much more complicated than the model under consideration. Rather, our objective is to add to the understanding of a simple model that captures part of why many real-world scheduling problems are di$cult. In so doing, we hope to take a step towards e!ective and practical solutions methods for more complex and more widely applicable models of scheduling problems in industry.

2. Notation and algorithms The objective is to schedule identical parallel machines to minimize total weighted #owtime. All jobs are available at time zero with known integer processing times, setup times, and weights. Each

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

129

job is associated with a family where a setup time is required between two jobs from di!erent families, and the family setup time is independent of the preceding family. A setup is also required prior to processing the "rst job on a machine. This is typical of environments when scheduling at the beginning of a new shift after machine down time, and it is consistent with the literature on sequence-independent family setup time models (see [2,3,7]). For a given schedule, the weighted #owtime of a particular job is the product of its weight and job completion time, and the total weighted #owtime of a schedule is the sum of weighted #owtime over all jobs. The following subsection presents notation for the model.

2.1. Notation m n f n H s H ( j, k) p HI w HI P S = C G = G

number of identical parallel machines total number of jobs number of families number of jobs from family j, i.e., n" n H H setup time of family j identi"er for the kth job from family j processing time of job ( j, k) weight of job ( j, k) p H I HI ns H H H w H I HI completion time (i.e., total processing time and setup time) on machine i in a schedule total weight of jobs scheduled on machine i

2.2. A backward DP algorithm One useful property of an optimal job sequence on a single machine is that jobs from the same family are in weighted-shortest-processing-time (WSPT) order [4]. This means that jobs are sequenced in order of smallest-to-largest p /w . We take advantage of this property in both of the HI HI DP algorithms presented in this paper. We shall assume that jobs within a family are indexed in weighted-longest-processing-time (WLPT) order (i.e., largest-to-smallest p /w for each family j). The following additional notation HI HI is required to specify the DP: a"(a ,2, a ), a "number of jobs from family j in the schedule, D H b "(b ,2, b ), b "index of the family that is already setup on machine i prior to time zero, e.g., K G b "j means that no setup is required if a job from family j is scheduled "rst on machine i; b "0 G G implies that a setup is required regardless of what family is scheduled "rst on machine i, c"(c ,2, c ), c "sum of the weights of the jobs scheduled on machine i, K G d "1 if i"j; 0 otherwise, GH u "set of feasible weight sums allocated to machine i in at least one optimal schedule, G ) "any set satisfying u L) , G G G

130

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

A(a; c)"+(i, j) " i3[1, m], j3[1, f ], a '0, c !w H 3) ,"set of machine and family index pairs H G H? G that speci"es feasible assignments of job ( j, a ) to the "rst position in the sequence of jobs scheduled H on machine i, H(a , b, c)"cost of optimal schedule for jobs ( j, 1),2, ( j, a ) for all j given that machine i is initially for family b for all i and the sum of the job weightsH scheduled on machine i is c for all i. setup G G The Recursion H(a, b, c)" min +[(1!d G )s #p H ]c #H(a, b, c),, H? G @H H GHZ? _A where

(1)

a "a !d for t3[1, f ], (2) R R RH b "+b if tOi; j if t"i, for t3[1, m], (3) R R (4) c "c !d w H for t3[1, m]. R R RG H? We organize the computation by beginning with H(0, b, 0)"0 for b3+(b ,2, b ) " b 3[0, f ], K G of zeros. Then, M applying i3[1, m], where 0 is the appropriately dimensioned vector the recursion, we systematically increase the arguments of a (i.e., (1, 0,2, 0), (0, 1,2, 0),2, (1, 1, 0,2, 0), etc.) until we reach a"(n ,2, n ). For each a vector, we compute H(a, b, c) over all possible D K D ?H c3 (c ,2, c ) c " w and c 3) for i3[1, m] . G K HI G G G H I Set ) is de"ned as ) "+0, 1,2, =, for all i. In Section 3 we present a property that can be used G G to reduce the size of ) to improve computational e$ciency. Note that the values b in the recursion G M are determined from the initial set of H(0, b, 0) values and expression (3). M Moreover, when a"(n ,2, n ), the value of b is set to 0 (i.e., the "rst job on each machine D optimum M requires a setup). The is

K D LH min H(a, 0, c) a "n for j3[1, f ], c " w , and c 3) for i3[1, m] . H H G HI G G G H I The time complexity of the algorithm can be deduced from the following observations: E For any a and c, there are O( f K) values of b. compute E In order to H(a, b, c) for given a, M b, c, there are "A(a, c)" computations. Recall that assignments from "rst position on a machine. A(a, c) is the set of possible of a job a family to the Thus, "A(a, c)")O(m f ). of possible a vectors is O(P n )"O((n/f )D). E The number H H E For each value of a, the number of possible c values is less than ") "K(=K"O(=K). This can G be improved to O(=K\) by noting that the weight sum on machine m is determined by the weight sums speci"ed on machines 1 through m!1 (follows from K c " D LH w ). G G H I HI Thus, the time complexity is not more than O(m f K>\DnD=K\). The time complexity concisely illustrates the boundary between `easya and `harda problems. As noted earlier, the general problem is NP-hard in the strong sense. However, if f and m are "xed, then it is clear that the algorithm is pseudopolynomial at worst. This observation, combined with the fact that the

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

131

problem with f"1 and "xed m is NP-hard [8], implies that the problem with "xed f and m is NP-hard in the ordinary sense. Furthermore, if weights are unitary and f and m are "xed, then ="n and we can observe that the algorithm runs in polynomial time and that this version of the problem is in the set P. The algorithm is related to two other algorithms that have appeared in the literature. If f"1, the complexity matches the backward recursion of Lee and Uzsoy [9]. If w "1 for all j and k, HI then the DP algorithm reduces to the algorithm presented by Bruno and Sethi [2].

2.3. A forward DP algorithm In this subsection, we shall assume that jobs within a family are indexed in WSPT order. The DP recursion will make use of the following notation. Note that the de"nitions of b, c, u , and A(a; c) G di!er from those in Section 2.2 (though the meanings are similar in spirit). M a"(a ,2, a ), a "number of jobs from family j in the schedule, D H b "(b ,2, b ), b "index of the family that is scheduled last on machine i; b "0 implies that no K G G M jobs are scheduled on machine i, c"(c ,2, c ), c "completion time of the last job scheduled on machine i, K G d "1 if i"j; 0 otherwise, GH u "set of feasible workloads (including setup time) allocated to machine i in at least one optimal G schedule, ) "any set satisfying u L) , G G G A(a; c)"+(i, j) " i3[1, m], j3[1, f ], a '0, c !s !p H 3) ,"set of machine and family index G H G H H? that speci"es feasible assignments pairs of job ( j, a ) to the last position in the sequence of jobs H scheduled on machine i, B(i, j, a; c)"+k " a '0, c !s !p H !s !p I 3) for k3[1, f ]! j and a '1, c !s !p H I G H H? I I? G I G H H? for k"j; alternatively if no values of k satisfy the preceding conditions, then !p H 3) G H? \ k"0,"set of family indices of jobs that can precede job ( j, a ) on machine i, H G(a, b, c)"cost of optimal schedule for jobs ( j, 1),2, ( j, a ) for all j given that the last job on H i is from family b for all i and the total workload on machine i is c for all i. machine G G The Recursion

c w H # min +G(a, b ,2, b , k, b ,2, b , c), , G(a, b, c)" min G H? G\ G> K M IZ GH? A GHZ? _A where

(5)

a "a !d for t3[1, f ], (6) R R RH c "+c if tOi; c ![(1!d )s #p H ] if t"i, for t3[1, m]. (7) R R R HI H H? We organize the computation by beginning with G(0, 0, 0)"0 where 0 is the appropriately we systematically dimensioned vector of zeros. Then, applying the recursion, increase the arguments of a (i.e., (1, 0,2, 0), (0, 1,2, 0),2, (1, 1, 0,2, 0), etc.) until we reach a"(n ,2, n ). For D each a vector, we compute G(a, b, c) over all possible c3+(c ,2, c ) " c 3) for i3[1, m],. K G G

132

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

Set ) is de"ned as ) "+0, 1,2, P#S, for all i. In Section 3 we present a property that can be G G used to reduce the size of ) to improve computational e$ciency. Note that the values b in the G recursion are determined from B(i, j, a, c). The optimum is min+G(a, b, c) " a "n for j3[1, f ] and c 3) for i3[1, m],. H H G G The time complexity of the algorithm can be deduced from the following observations. E For any a and c, there are no more than O( f K) values of b. compute M E In order to G(a, b, c) for given a, b, c, there are ("A(a , c)")("B(i, j, a, c)") computations. from a family to the last on Recall that A(a, c) is the set of possible assignments of a job "A(a, c)" )O(mf ). B(i, j, a, c) is the set of family indices that can precede job a machine. Thus, "B(i, j, a, c)")O( f ) and ("A(a, c)")("B(i, j, a, c)"))O(mf ). ( j, a ) on machine i. Thus, H E The number of possible a vectors is O(% n )"O((n/f )D). H H E For each value of a, the number of possible c values is not more than ") "K((P#S)K" G O((P#S)K). Thus, the time complexity is not more than O(mf K>\DnD(P#S)K), and the algorithm is pseudopolynomial if f and m are "xed. The algorithm is an extension of forward recursions appearing in Rothkopf [10] and Lawler and Moore [11] that are based on a model without setup times.

3. Properties of an optimal schedule In this section, we derive upper bounds on the sum of the weights of the jobs processed on each machine and on the machine completion times in an optimal schedule. Properties 1 and 2, below, state these bounds formally. We use Wx X to denote the largest integer less than or equal to x. Property 1. There is an optimal schedule where = )max G HI

(s #p )=#(m!1)p w H HI HI HI mp #s HI H

for all i.

Proof. Let (u, v) be the "rst job processed on machine i in some optimal schedule. Suppose (u, v) is removed from machine i and replaced ahead of all jobs on machine j. The weighted #owtime of (u, v) is una!ected by this change. With respect to the remaining jobs on machines i and j, the minimum reduction in total weighted #owtime on machine i is p (= !w ) and the maximum increase in ST G ST total weighted #owtime on machine j is = (p #s ). Clearly, in an optimal schedule the reduction H ST S in total #owtime on machine i is not more than the increase in total weighted #owtime on machine j, i.e., p (= !w ))= (p #s ). ST G ST H ST S

(8)

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

133

If we sum (8) over j3[1, m]!+i,, we get

(m!1)p (= !w )) = != (p #s ), ST G ST H G ST S H which can be rewritten as = [(m!1)p #(p #s )])=(p #s )#(m!1)p w . G ST ST S ST S ST ST From (9) and the fact that = is an integer, it follows that G = )W [(p #s )=#(m!1)p w ]/[mp #s X ] for all i, G ST S ST ST ST S which implies = )max G HI

(s #p )=#(m!1)p w H HI HI HI mp #s HI H

for all i.

(9)

䊐

Property 2. There is an optimal schedule where

1 P#S#(m!1)max +s #p , C) H HI G m HI

for all i.

Proof. Let (u, v) be the last job performed on machine i in some optimal schedule. For any other machine j, C )C #s #p , (10) G H S ST for otherwise cost could be reduced by processing (u, v) on machine j. If we sum (10) over j3[1, m]!+i,, we get

(m!1)C ) C !C #(m!1)(s #p ), H G S ST G H which can be rewritten as

C ) C #(m!1)(s #p ) m. H S ST G H From (11), C )P#S, and the fact that C is an integer, it follows that H H G 1 P#S#(m!1)max +s #p , for all i. 䊐 C) H HI G m HI

(11)

Properties 1 and 2 provide bounds that can be used to reduce the size of ) in the DP algorithms. G For example, letting ;B and ;B denote the upper bounds de"ned in Properties 1 and 2, 5 ! respectively, we can set ) "+0, 1,2, ;B , for the backward DP and ) "+0, 1,2, ;B , for G 5 G ! the forward DP. For the purposes of interpreting the time complexity of the two DP algorithms, particularly with respect to the values of S, P, and =, it is important to emphasize that units of measure must be

134

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

detailed enough to ensure that setup times, processing times, and weights are integers. However, an overly detailed unit of measure will needlessly result in larger parameter values and longer CPU times. In some cases, it may be su$cient to specify setup and processing times to the nearest minute, or nearest hour, where in other cases it may be appropriate to specify these times in seconds. In the case of job weights, a key consideration is generally the maximum ratio of cost rates for delaying completion. For example, if the ratio of the highest-to-lowest delay cost rate is 10, then it may be suitable to specify weights as integer values between 1 and 10. 4. Example We present a small numerical example to illustrate the backward DP algorithm. The steps of the forward DP algorithm are similar and are therefore omitted. The instance parameter values are m"2, n"3, f"2, n "2, n "1, s "1, s "0, p "3, p "1, p "1, w "1, w "2, w "1. Therefore, P"5, S"2, ="4, ;B "max+W 19/7X , W 10/3 X, W 5/2X ,"3, and 5 ;B "W(1/2)[7#max+4, 2, 1,]X "5. Since m"2, we can take advantage of the fact that . = );B "3 implies = *=!;B "1, or in other words, ) "+1, 2, 3, (compared to 5 5 G ) "+0, 1, 2, 3, 4, without the use of Property 1). The following steps use & H' as a wild card symbol G and &' as a `nota indicator (e.g., b3+(1, H),"+(0, 0), (0, 1), (0, 2), (2, 0), (2, 1), (2, 2),). Initialization: H(0, b, 0)"0 for allM b M Stage 1: H[(1, 0), (1, H), (w , 0)]"p w #H(0, b, 0) "3#0"3 "H[(1, 0), ( H, 1), (0, w )], H[(1, 0), (1, H), (w , 0)]"[(s #p )w #H(0, b, 0) "(1#3)(1)#0"4 "H[(1, 0), ( H, 1), (0, w )], H[(0, 1), ( H, H), (w , 0)]"p w #H(0, b, 0) "1#0"1 "H[(0, 1), ( H, H), (0, w )]. Stage 2: H[(2, 0), (1, H), (w #w , 0)]"[(s #p )(w #w )#H[(1, 0), (1, H), (w , 0)] "(1#1)(1#2)#3"9 "H[(2, 0), ( H, 1), (0, w #w )], H[(2, 0), (1, 1), (w , w )]"(s #p )w #H[(1, 0), (1, 1)(w , 0)] "(1#1)(2)#4"8 "H[(2, 0), (1, 1), (w , w )],

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

135

H[(1, 1), (1, H), (w #w , 0)]"min+[p (w #w )#H[(0, 1), (1, H), (w , 0)], p (w #w )#H[(1, 0), (2, H), (w , 0)], "min+3(1#1)#1, 1(1#1)#4,"6 "H[(1, 1), ( H, 1), (0, w #w )], H[(1, 1), (1, H), (w #w , 0)]"min+[(s #p )(w #w )#H[(0, 1), (1, H), (w , 0)], p (w #w )#H[(1, 0), (2, H), (w , 0)], "min+(1#3)(1#1)#1, 1(1#1)#4,"6 "H[(1, 1),( H, 1), (0, w #w )], H[(1, 1), (1, H), (w , w )]"min+p w #H[(0, 1), (1, H), (0, w )], p w #H[(1, 0), (1, 2), (w , 0)], "min+3#1, 1#3,"4 "H[(1, 1), (H, 1), (w , w )], H[(1, 1), (1, H), (w , w )]"min+(s #p )w #H[(0, 1), (1, H), (0, w )], p w #H[(1, 0), (1, 2), (w , 0)], "min+(1#3)#1, 1#4,"5 "H[(1, 1), (H, 1), (w , w )]. Stage 3: H[(2, 1), (1, H), (w #w , w )]"min+(s #p )(w #w ) #H[(1, 1), (1, H), (w , w )], ;p w #H[(2, 0), (1, 2), ;(w #w , 0)], "min+(1#1)(1#2)#4, 1#9,"10 "H[(2, 1), (H, 1), (w , w #w )], H[(2, 1), (1, 1), (w #w , w )]"min+(s #p )w #H[(1, 1), (1, 1), (w #w , 0)], ;p (w #w )#H[(2, 0), ;(2, 1), (w , w )], "min+(1#1)(2)#6, (1#1)#8,"10 "H[(2, 1), (1, 1), (w , w #w )],

136

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

H[(2, 1), (1, 1), (w #w , w )]"min+(s #p )(w #w )#H[(1, 1), (1, 1), ;(w , w )], p (w #w )#H[(2, 0), (2, 1), ;(w , w )], "min+(1#1)(2#1)#5, (2#1)#8,"11 "H[(2, 1), (1, 1), (w , w #w )]. From stage 3 we see that the optimum is 10 and that there are two distinct optimal schedules (e.g., jobs (1, 2) and (1, 1) on one machine and job (2, 1) on the other machine, or alternatively, jobs (2, 1) and (1, 1) on one machine and job (1, 2) on the other machine). We did not need to evaluate the possibility of all jobs scheduled on a single machine in stage 3 because 3";B (w #w #w "4. 5 5. Conclusion We have presented backward and forward DP algorithms for minimizing total weighted #owtime on identical parallel machines for a model with family setup times. When the number of machines and families are "xed, the backward DP algorithm is polynomial in the sum of the weights and the forward DP algorithm is polynomial in the sum of processing and setup times. Therefore, as a general rule of thumb, the backward recursion is more attractive when the sum of processing and setup times is greater than the sum of the weights; otherwise the forward recursion is favored. The proposed algorithms will become computationally burdensome as the sum of the weights and the sum of processing and setup times increase. Thus, as is the case with many NP-hard problems, research on e$cient heuristics capable of high quality solutions is warranted. A second research area, which is of particular importance, is research on properties and solution methods for a generalized model that includes job due dates and penalties for completing both early and late.

References [1] Ahn BH, Hyun JH. Single facility multi-class job scheduling. Computers and Operations Research 1990;17:265}72. [2] Bruno J, Sethi R. Task sequencing in a batch environment with setup times. Foundations of Control Engineering 1978;3:105}17. [3] Mason AJ, Anderson EJ. Minimizing #ow time on a single machine with job classes and setup times. Naval Research Logistics 1991;38:333}50. [4] Monma CL, Potts CN. On the complexity of scheduling with batch setup times. Operations Research 1989;37:798}804. [5] Webster ST, Baker KR. Scheduling groups of jobs on a single machine. Operations Research 1995;43:692}703. [6] Garey MR, Johnson DS. Computers and intractability: a guide to the theory of NP-completeness. San Francisco, CA: Freeman, 1979. [7] Webster ST. The complexity of scheduling job families about a common due date. Operations Research Letters 1997;20:65}74.

S. Webster, M. Azizoglu / Computers & Operations Research 28 (2001) 127}137

137

[8] Bruno J, Co!man Jr EG, Sethi R. Scheduling independent tasks to reduce mean "nishing time. Communications of ACM 1974;17:382}7. [9] Lee CY, Uzsoy R. A new dynamic programming algorithm for the parallel machines total weighted completion time problem. Operations Research Letters 1992;11:73}5. [10] Rothkopf MH. Scheduling independent tasks on parallel processors. Management Science 1966;12:437}47. [11] Lawler EL, Moore JM. A functional equation and its application to resource allocation and scheduling problems. Management Science 1969;16:77}84.

Scott Webster is Associate Professor at Syracuse University School of Management, where he teaches and does research in the areas of scheduling and logistics. He received a Ph.D. in Operations Management and Decision Sciences from Indiana University and a B.S. in Mathematics and Statistics from Miami University. Prior to pursuing his doctorate, he worked in the departments of Management Science and Finance at Whirlpool Corporation. Meral Azizoglu is Assistant Professor of Industrial Engineering at Middle East Technical University. She holds B.S., M.S. and Ph.D. degrees in Industrial Engineering all from Middle East Technical University. Her research areas are in production planning and scheduling.