Computerx Opx Rex. Vol. 24, No. II, pp. 1025-103L 1997
Pergamon
PII: S0305--0548(97)00018-X
© 1997 Elsevier Science Ltd A!I fights reserved. Printed in Great Britain 0305-0548/97 S 17.00+0.00
TWO-STAGE NO-WAIT SCHEDULING MODELS WITH SETUP AND REMOVAL TIMES SEPARATED
J. N. D. Gupta, t* V. A. Strusevich,2"t'§ and C. M. Zwaneveld~l Ball State University. Muncie, IN, U.S.A. 2 University of Greenwich, London, U.K. ~ Erasmus University, Rotterdam, The Netherlands
(Received December 1995: in revisedform March 1997) Scope and P u ~ I n many practical multi-stage industrial situations, there is no intermediate storage space available to keep a work-in-process inventory. Therefore, the workflow has to he continuous, implying that the no-wait condition must be observed, i.e. once the production phase starts, each stage must start processing a job immediately upon its completion by the previous stage. These conditions are quite common in many chemical and processing industry applications. The complexity of such scheduling problems increases with the presence of setups and removal times of jobs. This paper studies the computational complexity of two scheduling models with a no-wait in process restriction combined with an additional assumption that each operation requires some pre- and post-operational work, and the corresponding times are viewed as being separate from the actual processing times. The obtained results allow us to provide a complete complexity classification of the relevant scheduling models. Abstract--This paper studies two models of two-stage processing with no-wait in process. The first model is the two-machine flow shop, and the other is the assembly model. For both models we consider the problem of minimizing the makespan, provided that the setup and removal times are separated from the processing times. Each of these scheduling problems is reduced to the Traveling Salesman Problem (TSP). We show that, in general, the assembly problem is NP-hard in the strong sense. On the other hand, the two-machine flow shop problem reduces to the Gilmore-Gomory TSP, and is solvable in polynomial time. The same holds for the assembly problem under some reasonable assumptions. Using these and existing results, we provide a complete complexity classification of the relevant two-stage no-walt scheduling models. © 1997 Elsevier Science Lid 1. I N T R O D U C T I O N
Consider the problem associated with the scheduling of a set of jobs N= { 1,2,..,n } that requires processing in two stages. Assuming that there is exactly one machine in each stage, the two-stage system is called a flow shop if each job j ~ N is a chain of operations (OAj,Oa.) to be performed on the first-stage machine A and then on the second-stage machine B. If the processing order of jobs is arbitrary, the two-stage system is called an open shop. Further, if the processing orders of jobs are fixed but are different for various jobs, the two-stage system is termed a job shop. The two-stage assembly model is a generalization of the two-machine flow shop. Here, in the first stage, each of the machines Mi, 1<-i<-m, m>-2, produces a component of a job; these machines work independently of each other. In the second stage, the assembly machine B combines the m prepared components of each job. Formally, each job j E N is a chain of sets of operations ({ Ou,O2j ..... O,,.j},Oa.), m~2. Operation O,.j is to be performed on machine M~, i= 1,2..... m, and Oaj is to be performed on machine B. For any i and k, k= 1,2..... m, i= 1,2..... m, i#k, operations O~j and O,.i are allowed to be t To whom all correspondence should he addressed (emall:
[email protected]). :[: Jatinder N. D. Gupta is currently Professor of Management, Professor of Information and Communication Sciences, and Professor of Industry and Technology at the Ball State University, Muocie, IN. He holds a Ph.D. in Industrial Engineering (with specialization in Production Management and Management Science) from Texas Tech. University. Co-author of a textbook in Operations Research. Dr. Gnpta had served as the Vice-President for Education for the Central Indiana Chapter of APICS, President of the Indianapolis Chapter of liE, and President of Midwest DSI. He serves on the editorial boards of this and several other national and international journals. Recipient of an Outstanding Researcher award from Ball State University, he has published numerous research and technical papers in this journal and others, such as Operations Research, liE Transactions, Naval Research Logistics, European Journal of Operational Research, etc. Dr. Gupta's current research interests include ~heduling, planning and control, information systems, and organizational effectiveness. § Vitaly A. Strusevich received his Candidate of Science qualification from the Institute of Mathematics of the Byelorussian Academy of Sciences, Minsk, Republic of Belarus, and his Ph.D. from Erasmus University of Rotterdam, The Netherlands. Currently he is Reader in Operational Research at the University of Greenwich, London. His main research area is deterministic scheduling. He is co-author of two books on the subject in Russian, one of which has been translated into English. His recent papers have appeared in Operations Research, Discrete Applied Mathematics, Computers and Operations Research, European
Journal of Operational Research. <1Carin M. Zwaneveld was a Ph.D, student at Erasmus University of Rotterdam, The Netherlands. Her main research interest is deterministic scheduling. She has co-authored papers published in Operations Research and Zeitschrfit ~ r Operations
Rexearch. 1025
1026
J.N.D. Gupta et al.
performed simultaneously. For both models under consideration, we assume that an operation consists of three phases: setup, processing, and removal. The setup phase immediately precedes the processing phase, and the removal phase immediately follows the processing phase. The setup phase of an operation on any machine can only start after the removal phase of its predecessor on that machine has been completed. However, a job can be moved to its next operation without waiting for its removal operation to be completed at the current stage. The processing phases of a job in the two stages are not allowed to overlap. The other phases may overlap; for example, the setup phase of a job in the second stage can be performed simultaneously with any phase of that job in the first stage. In other words, we assume that the setup work is anticipatory and can be performed even before a job actually arrives on the machine [1]. For the twomachine flow shop, the setup, processing, and removal times of an operation O~.j (or OB4) take s~j, p~.j, and rAj time units (or sR.pPsj, and ra.i) time units, respectively. For the two-stage assembly problem, the setup, processing, and removal times of an operation O~j (or Oaj) take s~j, p~j, and r~j-time units (or ssj, p~j, and rBj) time units, respectively. Furthermore, for both models, we impose the no-wait in process restriction. This implies that the processing phase of any job in the second stage must start exactly at the time the processing phase of that job in the first stage is completed. For all scheduling problems considered in this paper, the objective is to find a schedule that minimizes the latest time at which machines become free after processing the last operation of any jobs and its removal. Following Gupta and Tunc [2], this objective function is called the machine based makespan. For a schedule S, the value of this makespan is denoted Cm~,(S) and is called the length of schedule S. A schedule with the shortest length is called an optimal schedule. The remainder of this paper is organized as follows. Section 2 discusses the relevant scheduling models. Section 3 provides the Traveling Salesman formulations to the two-stage flow shop and the assembly no-wait scheduling problems with setup and removal times separated. In Section 4 we prove that the assembly problem under consideration is NP-hard in the strong sense. On the other hand, the twomachine flow shop problem is shown to be polynomially solvable. We also describe polynomially solvable special cases of the assembly problem. Concluding remarks are given in Section 5. 2. TWO-STAGESCHEDULING MODELS In this section we briefly discuss scheduling models relevant to those under consideration. To provide a quick reference to the problems considered in this paper, we extend standard scheduling notation [3]. Thus, we denote the two-machine flow shop no-wait scheduling problem with setup and removal times separated to minimize the makespan by F21no-wait,slj,rajICm~. Similarly, the two-stage assembly no-wait scheduling problem with setup and removal times separated to minimize the makespan is denoted Amlno-wait,sij,r~jICm~,, where m is the number of machines in the first stage. Observe that the A llno-wait,s~jJCm=~ and F21no-wait,s~j,rJCm~ problems are equivalent. First, recall some results on the relevant two-stage scheduling models. The two-stage flow shop scheduling problem F211fm=~ with setup and removal times included is solvable in O(n log n) time due to Johnson [4]. If only setup times are separated, then the resulting flow shop problem remains solvable in O(n log n) time, see Ref. [5]. For both these problems, there always exists an optimal solution that is a permutation schedule, i.e. a schedule in which both machines process the jobs in the same sequence. This need not be the case when both setup and removal times are separated, as proved by Strusevich and Zwaneveld [6], and the problem becomes NP-hard in the strong sense. Observe that for the latter problem the best permutation schedule can be found in O(n log n) time [7,8], by an extension of Johnson's algorithm. The flow shop problems with sequence-dependent setup times are considered in [9,10] and are shown to be NP-hard in the strong sense even in the two-stage case.
In order to solve the two-stage job shop problem with setup and removal times included, denoted J211Cm,,, Johnson's algorithm can be modified as described in [11]. In a similar manner, the algorithm from [5] can easily be extended to solve the two-stage job shop problem with only setup times separated. The running time of these algorithms is still O(n log n). The two-stage open shop problem with setup and removal times included, i.e. the O211Cm,~ problem, is known to be solvable in O(n) time [121. If the setup and removal times are separated, the problem is still solvable in linear time [13]. The assembly scheduling problem (without the no-wait restriction and with setup and removal times
Two-stage no-wait scheduling models
1027
included) was independently considered by Lee et al. [14] and Potts et aL [15]. The problem is proved to be NP-hard in the strong sense, even if there are two machines in the first stage. Most results on the flow shop no-wait scheduling problem (with setup and removal times included) explore the fact that the problem can be reduced to the Traveling Salesman Problem (TSP). Recall that the TSP is the problem of finding the shortest tour that visits each of the given cities exactly once. In the case of two machines, the original problem reduces to the so-called Gilmore--Gomory TSP and is polynomially solvable [ 16,17]. If the number of machines is three or more, the problem becomes NP-hard in the strong sense [18]. Both two-stage open shop and job shop scheduling problems with no-wait in process are NP-hard in the strong sense, even if the setup and removal times are included [19]. 3. THE TSP FORMULATION
A schedule with an identical ordering of jobs on all machines is called a permutation schedule. It is easy to see that for the Amlno-wait,s~,j,rijlCm,, problem, only permutation schedules are feasible. We derive an analytical expression for the makespan of a schedule S associated with a given permutation 7 r = ( ~ 1 ) , ~ 2 ) ..... ¢r(n)) of jobs.
First, we introduce some notation. For a schedule S, let C°j(S) denote the completion time of the processing stage of an operation Oi.~. Note that, because of the no-wait restriction, the processing of each component of a job at the first stage must be completed exactly when the second-stage processing of the job starts. Therefore, by definition, C°j(S)=C°j(S) .... -C,,j(S). _ o We refer to this common value as
c~l.~(s). We introduce a dummy job 0 with
s~.o=P~.o=ri.o=O, i= 1,2..... m; sa.o=pa.o=rs.o=O. Furthermore, for each jobj we define Gi.j=s~j+p~j+rij, i= 1,2 ..... m; Ga,i=SBj=Saj+paj+raj.
It is convenient to assume that schedule S is associated ~ = ( T r ( 0 ) = 0 , ~ i ) , n ( 2 ) ..... "rr(n)) rather than with the original permutation ¢r. It follows from the definition of the no-wait restriction that
with
permutation
C°.,~u(S)=max {max Isi.,~,+p~.,~,li= 1,2..... m},ss.~u} =max {max {r~.,~m+s~.mj~+p~.,,~li=1,2..... m}, pB.,,o)+ra.,,m+sa.,~}. Furthermore, for an arbitrary k, 1<.k<--n, we have 0 -0 CA.m~(S)-CA.m~-u(S)+max
[max {ri.r~,_ i~+si.~,~+pi.,~,)li= 1,2 ..... m},pa.,~,_ ~+ra.,~ ,_ ~)+sa.mt.~}, (1)
where C~.,~0,(S)=0. Summing (1) we obtain
C°.,~,~(S)= ~ max {max { r/.,~._ ,+s~.,,~+pi.,~,fi= 1,2..... rn},pa.,~,_ ~+ra.,~_ ~+s~.,~}.
(2)
Figure ! shows a typical structure of a no-wait schedule for the case of three jobs and three machines MI I
Sl.I
' ....
I
I-
PI.I I
I
,14,
I
~2.1
P2.1
r2.1
I
s 2..•
I
P2.2 I
I I I I
3"8 I
I II P2,3
I I I
M
II
S2. 3
J. . . . .
I
I I
Ma
I
'¢3,
I I I I
I I I I
I I I
I I I
CO
CA.3 O
P8. I I I I
Co
A.I
A,2
Fig. I. No-wait schedule for three jobs.
r2,3
]1
1028
J.N.D. Gupta et al.
.
in the first stage. The jobs are processed in the sequence (1,2,3). For each job, the setup stage is shown as a dashed box, the processing stage as a single boundary box, and the removal stage as a double boundary box. For i= 1,2 ..... m a n d j = O , l , . . , n define
a~j= saj + p~j - ssj,b~j =psj+ rsj - r~j.
(3)
Using (3), relation (2) can be rewritten as
C°~,~(S)= k=l ~, max {max {a~.,~-bi.,~,li=l,2 ..... m},0}+ k=l ~ Gs.~-((ps.,~,+rs.,~,).
(4)
Since
C~,(S)= C°.,~,~(S) + max {max {ri.,~,li = 1,2 ..... m },ps.,~,~+ rs.,~,~}, we deduce from (4) that
C,~,(S) = ~ Gs~ + ~ max {max {ai.,~k, - bi ,~k- i~li= 1,2 ..... m },0 } kffil
k=l
+ max {max I a~.~o~- bi.~,~li= 1,2 ..... m },0 }.
(5)
Thus, the problem of minimizing the makespan Cm~,(S) is equivalent to that of minimizing the function f(zr) = ~ max {max {ai.,~k~- bi ,~k- t~li= 1,2 ..... m },0 } + max { max {ai.,~o~- bi ,~,,li= 1,2 ..... m },0 }. (6) kffil
"
We show that the latter problem reduces to the TSE Introduce the TSP with n+ 1 cities numbered by integers 0,1 ..... n. We assume that c i t y j corresponds to job j, j = 0 , l ..... n, of the original assembly problem. Suppose that the distance between cities p and q, p = 0, l,..,n; q = 0, l,..,n; p # q , is equal to Dpq, and r = (I(0),'r( 1),.., r(n)) is a tour. Then the length D(¢) of that tour can be expressed by
D('r)= kffil :~ D.k-,).,~,+D~).,~or
(7)
If we define Dp.q=max {max {ai~ - b J i = 1,2 ..... m},0}, p=0,1 .... n; q=0,1 .... n; p # q ,
(8)
then (7) and (6) will coincide. This implies the following. L e m m a 1. A permutation .n'*=(n'*(l),cr*(2) ..... ¢t*(n)) specifies an optimal schedule for the Aminowait,sij,%lCm~x problem if and only if the permutation 7"*= (0,'rr*(l),'#*(2) ..... ¢r*(n)) is an optimal tour for the TSP with matrix of the form (8). Observe that the arguments used for deriving Lemma 1 hold for any m->l. Applying these for m = 1, we obtain the following results on the F21no-wait,s~j,rijICm~ problem. First, for the F21no-wait,s~j, rJCma~ problem, the length of a schedule S associated with a permutation ¢r0= (0,.n(l),,rr(2) ..... ~ n ) ) is given by Cm~(S)= ~ Gs.k+ ~ max {a,~k~- b,~k-,,0} +max {a,~0~-- b,~,~,0}.
(9)
at = sAj =PAj - sBjbj =Paj + rsj - rAj, J= 1,2 ..... n.
(1o)
k=l
k=l
where
Second, the following statement holds.
Lenuna 2. A permutation ¢r*=(~n'*(l),'n-*(2) ..... "n-*(n)) specifies an optimal schedule for the F21nowait,sij, ri.:Cm~ problem if and only if the permutation "r*= (0,"It*( 1),'n'*(2) ..... ¢r*(n)) is an optimal tour for the TSP with matrix of the form
Dr~=max{flq
-
b,,0}, p=0,1 ..... n; q=O.l ..... n; pv~q.
Two-stage no-wait scheduling models
1029
In the next section, we use Lemmas 1 and 2 to derive results on the complexity of the Amino-
wait, s~jJCm,, and F21no-wait,si.i,rJC,,~ problems. 4. THECOMPLEXITY RESULTS First, we prove the following.
Theorem 1. The Amlno-wait,s~jJCma, problem with m>-2 is NP-hard in the strong sense. Proof. It is shown in [18], when studying the complexity of the three-machine flow shop no-wait scheduling problem to minimize the makespan, that the TSP with n+ 1 cities 0,1,2 ..... n and a distance matrix of the form Dp.q=max { aq - gp, Yp - flq,O}, p=O,1 ..... n; q=O,l ..... n; p~q,
(11)
is NP-hard in the strong sense. Here %,/~e, and yp, p=0,1,..,n, are positive integers. On the other hand, it follows from Lemma 1 (with m=2) that finding an optimal schedule for the A21no-wait,s~j,r~jICm=x problem is equivalent to solving the TSP with distance matrix D p . q = m a x {al. q -
bt~,,a2.q- b:~,,0], p=0,1 ..... n; q=0,1 ..... n; p~q.
(12)
Matrix (11) is a special case of matrix (12), which implies that the TSP with matrix of the latter form is NP-hard in the strong sense. • Hereafter, we show that the Amlno-wait,sij, rJCm~ problem, under some restrictions on setup, processing, and removal times, can be reduced to the Gilmore-Gomory TSP, and thus is polynomially solvable in these cases. The Gilmore-Gomory TSP was introduced in [16], and its distance matrix has the following structure: oq
D..q=
g, ~['g(x)
(13)
%
p=O,l ..... n; q=O,l ..... n; peq, w h e r e f a n d g are integrable functions such thatf(x)+g(x)>O. This problem can be solved in O(n log n) time [17]. We specify two cases of the general Amlno-wait,so,r~lC~,~ problem that can be reduced to the Gilmore-Gomory TSP.
Theorem 2. If the Amlno-wait,s~.pr~jIC,,~, problem satisfies either the condition r~j=rj, i= 1,2 ..... m,
(14)
s~j+pij=s~+pj, i= 1,2..... m,
(15)
or the condition
then the problem is solvable in O(mn+n log n) time. Proof. First assume that (14) holds, i.e. that the removal times in the first stage are machineindependent. It follows from (3) that b~j do not depend on i, i.e. that b~j=b~=Psa+rnj-r~ for all i= !,2 ..... m. Thus, in this case (8) becomes Dp~=max {max {a~.qli=1,2 ..... m} - bp,0}, p=0,1 .... n; q=0,1 ..... n; p#q.
(16)
If we define otu=max {aJi= 1,2 ..... m}, q=0,1 ..... n; ~r=be, p=0,1 ..... n, andf(x)m !, g(x)-'0, then (16) and (13) will coincide. Suppose now that (15) holds, i.e. that the sums of the setup and the processing times in the first stage
are machine-independent.
J.N.D. Gupta et al.
1030
Table I. Complexity of two-stage schedulingproblems with setup and removal times Type of shop Flow shop, F2 Flow shop. F2
Restrictions Setupand removal times included
Onlysetup times separated
Setupand removal times segctrated
O~nlog n) [ 17]
Ofn log n) [51 O(n log n),
O(n log n) [11] NP [ 19] O(n) [121 NP [19] NP [15]
O(n log n) [11.5] NP [ 19] O(n) [131 NP [19] NP [15]
O(mn+nlog n),
O(mn+nlog n).
Corollary I
Corollary I
NP [61 O(n log n), Theorem 3 NP[6] NP [ 19] O(n) [131 NP [191 NP [151 NP, m=2, Theorem I
O(n log n) [41
no-wait
Theorem 3
Job shop. J2 Job shop../2 Open shop, 02 Openshop. 02 Assembly.A2 Assembly,Am
m~-wait no-wait no-wait
Then a~j=ai=sj+p~- snj for all i= 1,2..... m, and (8) becomes Dr.,=max l aq - min { b J i = 1,2..... n },0}, p=0,1 ..... n; q=0,1 ..... n; p~q.
(i 7)
It is easy to verify that a matrix of the form (17) satisfies the Gilmore--Gomory conditions (13). Solving the Amlno-wait,s~j,r~jICm~,problem in either of two described cases takes O(mn +n log n) time. Notice that Theorem 2 implies the following statement. Corollary 1. The Amlno-wait,s~JCm~x and Amlno-waittCmax problems are solvable in O(mn+n log n) time. Another important observation is that the F21no-wait,si~,r~JCm~, problem, viewed as the assembly problem with m= 1, satisfies each of the conditions (14) or (15) and can be solved as shown below.
Theorem 3. The F21no-wait,s~.~,rJCm.~xproblem reduces to the TSP with distance matrix of the form Dp.q=max {aq - bp,0}, p=0,1 .... n; q=O,l ..... n; p # q
and is solvable in O(n log n) time by the Gilmore-Gomory algorithm. 5. C O N C L U S I O N
This paper has considered the two-stage no-wait scheduling problems with sequence independent setup and removal times separated from processing times. Table 1 summarizes the complexity results on four basic two-stage scheduling models with setup and removal times separated. In Table 1, we write 'NP' if the corresponding problem is NP-hard in the strong sense; otherwise we present the running time of an algorithm that solves the problem. We provide references either to published papers or to the statements proved in this paper. Acknowledgements--The authors are grateful to C. N. Potts and E. A. Tunc who suggested the assembly model studied in this paper. The comments of the anonymous referees have helped to improve the presentation of this paper. The research of the second author was partly supported by a grant from INTAS Project 93-257. REFERENCES I. Baker, K. R., Scheduling groups of jobs in the two-machine flow shop. Mathematical and Computer Modelling. 1990, 13, 29-36. 2. Gupta, L N. D. and Tunc, E. A., Sche,duling a two-stage hybrid flowshop with separable setup and removal times. European Journal of Operational Research, 1994, "F/, 415-426. 3. Lawler, E. L., L~nstra, J. K., Rinnooy Kan, A. H. (3. and Shmoys, D. B.. Sequencing and scheduling: algorithms and complexity. In Handbooks in Operations Research and Management Science, Vol. 4, Logistics of Production and InventoR., eds S. C. Graves, A. H. G. Rinnooy Kan and P. H. Zipkin. North-Holland, Amsterdam, 1993, pp. 455-522. 4. Johnson, S. M., Optimal two- and three-stage production schedules with setup times included. Naval Research Logistics Quarterly, 1954, 1, 61-68. 5. Yoshida. T. and Hitomi. K., Optimal two-stage production scheduling with setup times separated. AIIE Transactions. 1979, it. 261-263. 6. Strusevich, V. A. and Zwaneveld, C. M., On non-permutation solutions to some two-machine flow shop scheduling models. Zeitschrifl fitr Operations Research, 1994, 39, 305-319. 7. Sule, D. R., Sequencing n jobs on two machines with setup, processing and removal times separated. Naval Research Logistics Quarterly, 1982, 29, 517-519. 8. Sule, D. R. and Huang, K. Y., Sequencing on two and three machines with setup, processing and removal times separated. International Journal of Production Research, 1983, 21,723--732. 9. Gupta, J. N. D.. Flowshop schedules with sequence dependent setup times. Journal of Operations Research Socie~. of Japan. 1986, 29, 206-219.
Two-stage no-wait scheduling models
1031
10. Gupta, J. N. D. and Darrow, W. P., The two-machine sequence-dependent flowshop scheduling problem. European Journal of Operational Research, 1986, 24, 439--446. II. Jackson, J. R., An extension of Johnson's results on job lot scheduling. Naval Research Logistics Quarterl.~; 1956, 3, 201-203. 12. Gonzalez, T, and Sahni, S., Open shop schedules to minimize finish time. Journal of the Associationfor Computing Machine~,, 1976, 23, 665-679. 13. Strusevich. V. A., Two-machine open shop scheduling problem with setup, processing and removal times separated. Computers and Operations Research, 1993, 20, 597-611. 14. Lee, C.-Y., Cheng, T. C. E. and Lin, B. M. T., Minimizing the makespan in the 3-machine assembly-type flowshop ,scheduling problem. Management Science. 1993, 39, 616--625. 15. Ports, C. N.. Sevast'janov, S. V., Strusevich. V. A.. Van Wassenhove, L. N. and Zwaneveld, C. M., The two-stage assembly scheduling problem: Complexity and approximation. Operations Research. 1995, 43, 346-355. 16. Gilmore. P. C. and Gomory, R. E., Sequencing a one-state variable machine: a solvable case of the traveling salesman problem. Operations Research, 1964, 12, 665-679. 17. Gilmore, P. C., Lawler, E. L. and Shmoys, D. B., Well solved special cases. In The Traveling Salesman Problem. A Guided Tour of Combinatorial Optimization, eds E. L. Lawler, J. K. Lenstra, A. H. G. Rinnooy Kan and D. B. Shmoys. John Wiley. New York, 1986, pp. 87-143. 18. R6ck, H., The three-machine no-wait flow-shop problem is NP-complete. Journal of the Associationfor Computing Machineo,, 1984, 31, 336-345. 19. Sahni, S. and Cho, Y., Complexity of scheduling shop with no wait in process. Mathematics of Operations Research, 1979, 4, 448--457.