European Journal of Operational Research 143 (2002) 498–517 www.elsevier.com/locate/dsw
Discrete Optimization
Job-shop scheduling with blocking and no-wait constraints Alessandro Mascis a, Dario Pacciarelli a
b,*
ADtranz – DaimlerChrysler Rail Systems (Italy), Signalling Division, via del Campo Romano, 59 – 00173 Roma, Italy Dipartimento di Informatica e Automazione, Universita ‘‘Roma Tre’’, via della Vasca Navale 79, I-00146 Roma, Italy
b
Received 24 January 2001; accepted 25 September 2001
Abstract In this paper, we study the job-shop scheduling problem with blocking and/or no-wait constraints. A blocking constraint models the absence of storage capacity between machines, while a no-wait constraint occurs when two consecutive operations in a job must be processed without any interruption. We formulate the problem by means of a generalization of the disjunctive graph of Roy and Sussman, that we call an alternative graph, and investigate the applicability to the blocking and no-wait cases of some of the most effective ideas from the literature on the job shop with unlimited buffers. We show that several key properties, used to design heuristic procedures, do not hold in the blocking and no-wait cases, while some of the most effective ideas used to develop branch and bound algorithms can be easily extended. We presents several complexity results and solution procedures. Computational results for fast heuristics and exact algorithms are also reported. Ó 2002 Elsevier Science B.V. All rights reserved. Keywords: Scheduling; Job shop; Blocking; No-wait
1. Introduction The job-shop scheduling problem is the problem of allocating machines to competing jobs over time, subject to the constraint that each machine can handle at most one job at a time. The processing of a job on a machine is called an operation, and requires a fixed, non-preemptive, processing time. Each job consists of a sequence of operations that have to be processed in a specified order, and the goal is to minimize the completion time of the
*
Corresponding author. Tel.: +39-0655-17-32-38; fax: +390655-73-030. E-mail address:
[email protected] (D. Pacciarelli).
last operation. The traditional job-shop model disregards the behaviour of the jobs between two consecutive operations, i.e. it assumes that intermediate buffers have infinite capacity and that a job can be stored for an unlimited amount of time. In practice, there are many examples of industrial settings in which the buffer capacity has to be taken into account, at least at some stages of the production process, and there may be limits on the amount of time that a job can spend in a buffer between two consecutive operations. This important class of scheduling problems is characterized by the presence of no-wait or blocking constraints between consecutive operations of the jobs. With a blocking constraint a job, having completed processing on a machine, remains on it until the next
0377-2217/02/$ - see front matter Ó 2002 Elsevier Science B.V. All rights reserved. PII: S 0 3 7 7 - 2 2 1 7 ( 0 1 ) 0 0 3 3 8 - 1
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517
machine becomes available for processing. A no-wait constraint occurs when two consecutive operations must be performed without any interruption. In this paper we address the problem of scheduling a set of jobs in a job-shop environment with blocking and/or no-wait constraints. In order to model such constraints we use the alternative graph formulation of [24], which is based on a generalization of the disjunctive graph of [35]. In particular, we distinguish two cases of blocking: blocking with swap allowed and blocking no swap. A swap is needed whenever there is a cycle of two or more jobs, each one waiting for a machine which is blocked by another job in the cycle. In such a situation all jobs in the cycle must move simultaneously to the next machine, and we call it a swap. Depending on the particular job-shop environment, a swap may be allowed or not. In general, the swap is allowed whenever the jobs can move independently of each other. On the contrary, the swap is not allowed if the jobs can move strictly after the subsequent resource has become available. Among the published results in the latter category we cite the scheduling of trains [2,9,36], the production of steel [16,22] and the flow control of packet switching communication networks [4]. The paper is organized as follows. In Section 2 a review of related works is given, in Section 3 we introduce the notation and the alternative graph. In Section 4 we show the alternative graph representation of the blocking and no-wait job-shop scheduling problems. In Section 5 we address the complexity issues. We deal in particular with the feasibility problem, i.e. the problem of finding a feasible solution, if it exists, given a partial schedule. We try to identify a boundary between polynomially solvable and NP-complete cases of the job-shop problems with blocking and no-wait. Section 6 deals with fast heuristics and Section 7 illustrates a branch and bound procedure and the computational experience. Conclusions follow in Section 8.
2. Literature review In this section we briefly review the applications and the literature related to our work. As pointed
499
out in the review of machine scheduling problems with blocking and no-wait in process by Hall and Sriskandarajah [19], the minimization of makespan in a no-wait or blocking job shop received surprisingly little attention from either a theoretical or computational perspective. They mention the inherent difficulties of these problems and the lack of algorithms able to solve large instances to optimality. All these deficiencies motivate the present work. In view of their extensive review, we provide only a brief summary here. A typical industrial context with blocking constraints arises when there are no intermediate buffers between the machines. Mc Cormick et al. [25] study a flow shop scheduling problem in an assembly line having finite capacity buffers between machines. They model the positions of the intermediate buffers as machines with zero processing time. The problem with limited buffers can be therefore studied as a blocking problem where all machines have no intermediate buffers. They also show that, once a sequence for the jobs has been found, the starting time of the jobs on all machines can be easily computed on a Precedence Constraints Graph. They distinguish two categories of arcs: processing arcs, having length equal to the processing time of the associated operations, and dummy arcs, of zero length, representing the blocking constraints. In Section 4 we will show the relations between the Precedence Constraints Graph and the Alternative Graph. Nowicki [28] develops a tabu search algorithm for the permutation flow shop problem with intermediate buffers, based on a different graph model in which the number of nodes does not increase with the dimension of the intermediate buffers. Relevant theoretical results on the blocking jobshop problem have been obtained in the context of the flow control of packet switching communication networks [4]. A packet switching k-network (also called store-and-forward k-network, briefly SF k-network) can be represented as an undirected graph H ¼ ðV ; EÞ, where the vertices stand for processors and the edges for communication links. With each vertex is associated a buffer of capacity k. A packet is a message available on a (source) processor which must be sent to another (destination) processor. An acyclic route for a packet p
500
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517
is a directed path on the network associated with p, i.e. going from the source to the destination vertex of p. A packet is subject to three kind of moves: 1. Generation. At any time a vertex v in the network may create a packet p, which is placed in one of its empty buffers, then v is said to be the source of p. 2. Consumption. A vertex v can remove a packet p present in its buffer, provided that v is the destination of p. 3. Passing. A vertex v can transfer a packet p from one of its buffers to an empty buffer of vertex w, where ðv; wÞ is an edge of E, on the path specifying the route of p. After p has been moved, p is removed from the buffer of v holding it. If no buffer of w is empty, then p cannot be transferred and remains on v, in this case p is blocked. By viewing the vertices of a SF 1-network as blocking machines, the problem of finding a sequence of moves such that all packets can reach their respective destinations is therefore a job-shop problem with blocking and no swap, being fixed the initial position for a subset of jobs. Arbib et al. [4] proved that, given a SF 1-network, a set of packets, and being fixed the initial position and the route for each packet, deciding whether there is a sequence of moves such that all packets can reach their respective destinations is an NP-complete problem. They also provide a polynomial algorithm in the particular case in which the SF 1-network is a tree. Relevant scheduling problems with no-wait constraints arise in the management of perishable items. A commodity is said to be perishable if some of its characteristics are subject to deterioration with respect to customer/producer requirements. This field of applications has been mainly studied in the framework of inventory theory (see, e.g. [27]). In practice, as shown by Arbib et al. [5], product decay often occurs also at some particular stages of the production process, this decay depending both on the product and on the production step. In these cases, finding adequate scheduling policies is critical for maximizing the throughput while reducing losses and costs due to perishing. The perishability issue is approached in
various ways in the literature on scheduling, but an approximation often introduced, when scheduling perishable goods with high decay rate, is the introduction of tight no-wait constraints. This is the case, for example, of the production of steel (see, e.g. [16,22,32]), concrete wares [18], or chemical products (see, e.g. [19,34]). An important issue to be taken into account when studying different versions of the job-shop problem is the computational complexity of the resulting problem. It is well known, in fact, that the job-shop problem with unlimited buffers is one of the most computationally intractable NP-hard problems in combinatorial optimization. For example, a specific instance with 10 jobs and 10 machines, proposed in 1963 in a book of Muth and Thompson, remained unsolved for over 20 years, until it was settled in 1986, see [11], and there are instances with 10 machines and 20 jobs that still remain computationally intractable, as shown in [23]. On the other hand, a considerable number of algorithmic improvements have been made in the past 30 years. Among the others we cite the works of Adams et al. [1], Applegate and Cook [3], Dell’Amico and Trubian [15], Brucker et al. [8], Carlier and Pinson [13], Della Croce et al. [14], Martin and Shmoys [23], Pinson [33]. Most of these works are based on the disjunctive graph formulation of [35]. We are not aware of any previous attempt to solve even modest sized instances of no-wait or blocking job-shop scheduling problems to optimality. In this paper we analyze possible reasons for this fact, suggesting that the job-shop problem with blocking is computationally more difficult to handle than the job-shop problem with unlimited buffers. In particular, the disjunctive graph cannot be used to model the blocking and no-wait constraints, and for this reason we resorted to the alternative graph formulation.
3. Notation and problem definition In this section we introduce the notation and a more precise specification of the problem under consideration. In the usual definition of the
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517
job-shop problem the processing of a job on a machine is called an operation. A job is therefore associated to a prescribed sequence of operations. In this paper we focus on the sequencing of operations rather than jobs. We have therefore a set of operations N ¼ fo0 ; o1 ; . . . ; on g which have to be performed on m machines fm1 ; m2 ; . . . ; mm g. Each operation oi requires a specified amount of processing pi on a specified machine MðiÞ, and cannot be interrupted from its starting time ti to its completion time ci ¼ ti þ pi . o0 and on are dummy operations, with zero processing time, that we call ‘‘start’’ and ‘‘finish’’, respectively. Each machine can process only one operation at a time. There is a set of precedence relations among operations. A precedence relation ði; jÞ is a constraint on the starting time of operations oj , with respect to ti . More precisely, the starting times of the successor oj must be greater or equal to the starting time of the predecessor oi plus a given delay fij , which in our model can be either positive, null or negative. A positive delay may represent, for example, the fact that operation oj may starts processing only after the completion of oi , plus a possible set-up time. A delay smaller or equal to zero represents a synchronization between the starting times of the two operations. Finally, we assume that o0 precedes o1 ; . . . ; on , t0 ¼ 0 and on follows o0 ; . . . ; on1 . Precedence relations are divided into two sets: fixed and alternative. Alternative precedence relations are partitioned into pairs. In the job-shop problem they represent the constraints that each machine can process only one operation at a time. In what follows, we indicate with F the set of all fixed precedence relations, and with A the set of all pairs of alternative precedence relations. A schedule is an assignment of starting times t1 ; . . . ; tn to operations o1 ; . . . ; on , respectively, such that all fixed precedence relations, and exactly one for each pair of the alternative precedence relations, are satisfied. The goal is to minimize the starting time of operation on . This problem can be formulated as a particular disjunctive program, i.e. a linear program with logical conditions involving operations ‘‘and’’ (^, conjunction) and ‘‘or’’ (_, disjunction), as in [7].
501
Problem 3.1. min s:t:
tn t0 tj ti P fij ;
ði; jÞ 2 F ;
ðtj ti P aij Þ _ ðtk th P ahk Þ; ðði; jÞ; ðh; kÞÞ 2 A: Associating a node with each operation, Problem 3.1 can be usefully represented by the triple G ¼ ðN ; F ; AÞ that we call an alternative graph. The alternative graph is as follows. There is a set of nodes N, a set of directed arcs F and a set of pairs of directed arcs A. Arcs in the set F are fixed and fij is the length of arc ði; jÞ 2 F . Arcs in the set A are alternative. If ðði; jÞ; ðh; kÞÞ 2 A, we say that ði; jÞ and ðh; kÞ are paired and that ði; jÞ is the alternative of ðh; kÞ. Let aij be the length of the alternative arc ði; jÞ. In our model the arc length can be either positive, null or negative. The alternative graph is a generalization of the disjunctive graph of [35]. In fact, in the disjunctive graph the fixed arcs form a set of distinct directed paths going from the start node 0 to the finish node n, the arc weights are all positive, and the pairs of alternative arcs (called disjunctive arcs) are all in the form ði; jÞ; ðj; iÞ, where i and j are two operations to be processed on the same machine. A selection S is a set of arcs obtained from A by choosing at most one arc from each pair. The selection is complete if exactly one arc from each pair is chosen. Given a pair of alternative arcs ðði; jÞ; ðh; kÞÞ 2 A, we say that ði; jÞ is selected in S if ði; jÞ 2 S, whereas we say that ði; jÞ is forbidden in S if ðh; kÞ 2 S. Finally, the pair is unselected if neither ði; jÞ nor ðh; kÞ is selected in S. Given a selection S let GðSÞ indicate the graph ðN ; F [ SÞ. A selection S is consistent if the graph GðSÞ has no positive length cycles. Given a consistent selection S, we call an extension of S a complete consistent selection S 0 such that S S 0 , if it exists. As we will show in Section 5, an important difference between the disjunctive graph and the alternative graph is that, given a consistent selection S, in the former graph there always exists an extension of S, whereas in the latter graph there may exist no extension of S. What is more important, the problem of finding such an extension, or proving that it does not exist, is an NP-complete
502
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517
problem. With this notation each schedule is associated with a complete consistent selection on the corresponding alternative graph. By definition, the makespan of a consistent selection S is the length of a longest path from node 0 to node n in GðSÞ. The makespan of a schedule is therefore the makespan of the associated complete consistent selection. In the rest of this paper, we will distinguish two types of operations, namely ideal and blocking. We say that a job executes an ideal operation oj if it remains on machine MðjÞ from tj to cj ¼ tj þ pj and then leaves MðjÞ, which becomes immediately available for processing other operations. A job executes a blocking operation oi if it may remain on machine MðiÞ after ci , thus blocking it. More precisely, in our model: 1. Each blocking operation oi is associated with the subsequent operation of its job, hereafter called orðiÞ . 2. oi , having completed processing on machine MðiÞ, remains on it until the machine MðrðiÞÞ becomes available for processing orðiÞ . Machine MðiÞ remains therefore blocked, and cannot process any other operation, until oi leaves MðiÞ at trðiÞ . We say that a job-shop problem is an ideal job shop if all the operations are ideal. This is the case in which there are infinite capacity buffers. As for the blocking job-shop problem, we observe that the last operation of each job is always an ideal operation, since the jobs leave the system immediately after the completion of their last operations. Hence, we say that a job-shop problem is a blocking job shop if all the operations are blocking, except the last operations of each job, that are ideal. We observe, nonetheless, that by adding at the end of each job a zero-length dummy operation, to be processed on an always available machine, it is possible to model a blocking job shop as a problem in which all operations are blocking. We will use this formulation whenever it will simplify the exposition of the arguments. Throughout the paper we will make use of the following definitions. Given an arc ði; jÞ, we say that node i is the tail of arc ði; jÞ, and node j is the
head of arc ði; jÞ. Moreover, given a selection S, we will denote the value of a longest path from i to j in GðSÞ by lði; jÞ. Finally, for each node i 2 N we say that the quantity ri ¼ lð0; iÞ is the head of node i, and the quantity qi ¼ lði; nÞ is the tail of node i.
4. Blocking and no-wait constraints In this section we use the alternative graph formulation to model the blocking and no-wait constraints. Let us first address the no-wait constraints, and consider a pair of consecutive operations in a job, say oi and orðiÞ , and assume that orðiÞ must start processing within k time units after the completion of oi ðk P 0Þ. We call it a perishability constraint, since it represents, for example, the fact that a job deteriorates when stored for more than k time units between the two consecutive operations. We can represent this constraint with a pair of fixed arcs ði; rðiÞÞ and ðrðiÞ; iÞ having length pi and pi k, respectively. If k ¼ 0 we have a tight nowait constraint (see Fig. 1). In Fig. 2 we show the alternative graph for a no-wait job shop with three jobs and five machines. The fixed and alternative arcs are depicted with solid and dashed lines, respectively. The weights on the alternative arcs (not represented in Fig. 2) equal the processing times of their respective tails. Let us now turn to the blocking constraint, and consider two operations oi and oj , where oi is blocking and MðiÞ ¼ MðjÞ. Since oi and oj cannot be executed at the same time, we associate with them a pair of alternative arcs. Each arc represents the fact that one operation must be completed before starting processing the other. If oi is processed before oj , and since oi is blocking, MðiÞ can start processing oj only after pi
σ(i)
i -pi -k
Fig. 1. Perishability constraint.
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517
503
Fig. 2. The alternative graph for a no-wait job shop.
the starting time of orðiÞ , when oi leaves MðiÞ. Hence, we represent this situation with the alternative arc ðrðiÞ; jÞ having length arðiÞj ¼ 0. The other alternative arc depends on the fact that oj can be either blocking or not. If oj is blocking, then we add the alternative arc ðrðjÞ; iÞ of length arðjÞi ¼ 0. If oj is ideal, then we add the arc ðj; iÞ, whose length is aji ¼ pj . In Fig. 3(a) and (b) the case of oj blocking and oj ideal, respectively, is shown. The fixed (alternative) arcs are depicted with solid (dashed) lines. It is interesting to notice that, in the particular case of flow shop problems with limited buffers, given any feasible schedule, the graph resulting from the corresponding complete consistent selection, on the associated alternative graph, is equivalent to the Precedence Constraints Graph of
i
pi
σ(i)
pi
i
σ(i)
0 pj
0 j
pj (a)
σ(j)
0
j (b)
Fig. 3. The alternative arcs for a pair of operations oi and oj .
[25], associated with the same schedule. In Fig. 4 the graph representation of a feasible schedule for a blocking flow shop with three jobs and four machines is shown, while in Fig. 5 the alternative graph formulation of the same problem is depicted. Note that a job, having completed processing on the last machine, leaves the system. Hence, the last machine is not blocking. We distinguish two different cases of blocking, namely blocking with swap allowed and blocking no swap. In the alternative graph formulation a selection is consistent if there are no positive length cycles, and therefore a zero length cycle is feasible. On the other hand, in blocking no swap problems a cycle of two or more blocking operations, each one waiting for a machine which is blocked by another operation in the cycle, represents a deadlock situation. On the alternative graph a cycle of blocking operations results in a cycle of alternative arcs. Hence, when dealing with no swap blocking operations, we put a small positive weight on the alternative arcs corresponding to no swap blocking operations, in order to make infeasible a selection containing cycles of alternative arcs. Fig. 6(a) shows the alternative graph for a cycle of three jobs and six operations to be processed on the three machines of Fig. 6(b). Note that in a same instance there may be at the
Fig. 4. A feasible schedule for a blocking flow shop with three jobs and four machines.
504
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517
0
1
2
3
4
5
6
7
8
9
10
11
12
13
Fig. 5. The alternative graph for a blocking flow shop with three jobs and four machines.
(a)
(b)
Fig. 6. The alternative graph for a cycle of three blocking operations.
same time blocking operations with swap allowed and blocking no swap operations. With our notation a cycle of blocking operations is feasible only if it contains no blocking no swap operation. The alternative graph allows to formulate situations by far more general that the two above mentioned. We refer the reader to Mascis and Pacciarelli [24] for some more general examples. 5. Finding a feasible solution In this section we deal with the complexity of several particular cases of job-shop problems with blocking and no-wait. There are several results from the literature, suggesting that job-shop problems with blocking and/or no-wait constraints are computationally more difficult to handle than the job-shop problem with unlimited buffers. For example, the two-machine job-shop problem in which all operations have unit processing time is strongly NP-hard if all operations are no-wait [39], whereas it is polynomially solvable if all operations are ideal [20]. Similarly, the three machine flow shop problem in which all operations to be per-
formed on the second machine have zero processing time, is strongly NP-hard in the blocking case [31] and polynomially solvable in the ideal case [17]. We refer the reader to Hall and Sriskandarajah [19] for an extensive survey on this subject. In the remaining part of this section we rather focus on the feasibility problem, i.e. the problem of finding an extension, if it exists, of a partial schedule. We try to identify a boundary between polynomially solvable and NP-complete cases of the job-shop problems with blocking and no-wait. Moreover, we show that several results, which have been proved to be very effective in the development of solution algorithms for the ideal job-shop problem, are no longer valid in the blocking and/or no-wait case, thus again suggesting that the latter cases are computationally more difficult than the former one. The feasibility problem can be stated as follows: Problem 5.1. Given the alternative graph formulation of a job-shop problem, G ¼ ðN ; F ; AÞ, and a consistent selection S, is there an extension of S? Proposition 5.2. Problem 5.1 is strongly NP-complete in the no-wait case, for three machines and all operations having unit processing time. Proof. In order to prove the proposition we will reduce the equivalent decision version of the twomachine job-shop problem in which all operations have unit processing time to Problem 5.1. Consider a no-wait job-shop problem with two machines m1 and m2 , n jobs, processing time 1 for all operations. Given a time bound B, the decision version of the no-wait job-shop problem consists of finding a feasible schedule of the problem with makespan smaller or equal to B. Timkowsky [39] proved that this problem is strongly NP-complete, and there-
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517
fore it is NP-complete even if restricted to only those instances such that the maximum value of B is smaller or equal to a polynomial function of the size of B, i.e. of the number of bits needed to code B. We now formulate this problem in the format of Problem 5.1. We add to the original problem a dummy machine m3 and three no-wait dummy jobs Jnþ1 , Jnþ2 , Jnþ3 . Jnþ1 is composed of one operation to be performed on machine m1 , while Jnþ2 is composed of one operation to be performed on machine m2 . Jnþ3 is composed of B þ 4 operations. This reduction is polynomial if the value of B is a polynomial function of its size. The first and the ðB þ 3Þrd operation of job Jnþ3 must be processed on machine m1 , the second and the ðB þ 4Þth operation must be processed on machine m2 . The other B operations of job Jnþ3 must be processed on the dummy machine m3 . Finally, we consider the following partial selection: the first operation of job Jnþ3 precedes the only operation of job Jnþ1 , which precedes all other operations to be performed on machine m1 . The second operation of job Jnþ3 precedes all other operations to be performed on machine m2 . The ðB þ 3Þrd operation of job Jnþ3 follows all other operations to be performed on machine m1 . The ðB þ 4Þth operation of job Jnþ3 follows the only operation of job Jnþ2 , which follows all other operations to be performed on machine m2 . An extension of this partial selection exists if and only if there is a schedule of length smaller or equal to B in the original problem, thus proving the thesis. For what concerns the complexity of Problem 5.1 in the blocking no-swap case, we recall from Section 2 the problem of controlling the packet flow on a SF 1-network. Problem 5.3. Given a SF 1-network, a set of packets, and a fixed initial position and route for each packet, is there a sequence of moves such that all packets can reach their respective destinations? The following theorem is proved in [4]. Theorem 5.4. Problem 5.3 is NP-complete on SF 1network.
505
By viewing the SF 1-network vertices as blocking machines, this is the problem of predicting whether a feasible schedule in a blocking no swap problem exists or not, being fixed the initial position for a subset of the jobs. To fix the initial position of a job corresponds to the fact that the first operation of the job must precede all the other operations to be processed on the same machine, i.e. it corresponds to a particular selection S. For an initial assignment to be feasible, no two jobs can be assigned to the same machine as initial position. Hence, the selection is consistent if and only if the initial position of the jobs is feasible. In the rest of this paper we will refer to such a selection as a positional selection. More precisely, given an alternative graph G ¼ ðN ; F ; AÞ, consider a partition of the set of all nodes into two sets P and Q such that the start node 0 2 P , and the finish node n 2 Q, and there are not two nodes i 2 Q, j 2 P such that ði; jÞ 2 F . We define the border of P as the set of nodes BP ¼ fi 2 P j 9j 2 Q; ði; jÞ 2 F g and the border of Q as the set of nodes BQ ¼ fj 2 Q j 9i 2 P ; ði; jÞ 2 F g. Definition 5.5. Given the alternative graph corresponding to a job-shop problem, we say that a selection is a positional selection if N can be partitioned into two sets P and Q such that: 1. all the alternative arcs ðh; kÞ such that h 2 P are either forbidden or selected, 2. all the alternative arcs ðh; kÞ such that h 2 Q, k 2 P are forbidden, 3. all the alternative arcs ðh; kÞ such that h 2 ðQ BQ Þ, k 2 Q are unselected. Problem 5.3 on SF 1-network can be therefore formulated by means of an alternative graph and a consistent positional selection S. The problem consists of deciding whether an acyclic extension of S exists or not. Since in the packet switching networks problem the processing times of the jobs are not specified, we can fix them arbitrarily. The only requirements for the arc weights (either fixed or alternative), in the associated alternative graph formulation, is that they must be all positive. In fact, a cycle of blocking jobs is not feasible in this case, and the positive length arcs guarantee that a
506
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517
consistent selection is also acyclic. Notice that an acyclic extension of S corresponds to a feasible schedule, independently on the processing times of the jobs. Hence, the following propositions are proved. Proposition 5.6. Problem 5.3 on 1-network is equivalent to the problem of predicting whether a feasible schedule exists or not in a no-swap blocking job-shop problem, given a consistent positional selection. Proposition 5.7. Problem 5.1 is strongly NP-complete in the no-swap blocking case, even if the selection S is positional and all the operations have unit processing times. The rest of this section is devoted to polynomially solvable cases of Problem 5.1. We first recall a well-known result for the ideal job-shop case. Proposition 5.8. In the ideal job-shop problem, any consistent selection always has an extension. Proof. In order to prove Proposition 5.8, it is sufficient to observe that, given an ideal job-shop formulation, a consistent selection S, and an unselected pair of alternative arcs ðði; jÞ; ðj; iÞÞ 2 A, it is possible to obtain a larger consistent selection by adding to S one of the two alternative arcs. Consider the two selections: S 0 ¼ S [ fði; jÞg and S 00 ¼ S [ fðj; iÞg. If S 0 is not consistent, then the graph GðS 0 Þ contains a cycle including arc ði; jÞ, and therefore GðSÞ contains a directed path from j to i. If S 00 is not consistent, then the graph GðS 00 Þ contains a cycle including arc ðj; iÞ, and therefore GðSÞ contains a directed path from i to j. These two paths form a cycle in GðSÞ, which contradicts the hypothesis that S is consistent. By repeatedly applying this argument it is possible to obtain an extension of S. Let us now consider the blocking job-shop problem with swap allowed. We first observe that Proposition 5.8 does not hold in the blocking case for a general consistent selection. A simple counterexample arises in a flow shop with two jobs and three blocking machines (see Fig. 7). Here,
0
1
p1
2
0
3
0
0
0
p2
p6
0 4
p4
5
p5
p3
6
7 p6
Fig. 7. A consistent selection admitting no extensions.
operations o1 and o4 have to be processed on the same machine, i.e. Mð1Þ ¼ Mð4Þ. Moreover, Mð2Þ ¼ Mð5Þ, Mð3Þ ¼ Mð6Þ, while the start and finish operations, o0 and o7 , are dummy operations. The selection S ¼ fð2; 4Þ; ð6; 3Þg is consistent but no extension exists in this case since it is not possible to select one arc from the pair ð3; 5Þ; ð6; 2Þ without creating a positive length cycle in the graph. We next show that, for a restricted class of selections, a property similar to the one in Proposition 5.8 holds also in the blocking case. Theorem 5.9. In the blocking job-shop problem with swap allowed, any consistent positional selection, always has an extension. Theorem 5.9 shows an important difference between the blocking problems with swap allowed and with no swap. In order to prove it, we need some preliminary results. First recall, from Section 3, that it is possible to formulate a blocking jobshop problem with swap allowed in such a way that the following properties hold: (i) all the alternative arcs have length zero, (ii) the fixed arcs form a set of distinct directed paths going from the start node 0 to the finish node n, (iii) for each fixed arc ði; jÞ 2 F , all alternative arcs having tail in j are paired with alternative arcs having head in i (see Fig. 3(a)). Lemma 5.10. In the blocking problems with swap allowed, given any consistent positional selection S and the corresponding partition ðP ; QÞ of the node set, there are no unselected alternative arcs having tail in a node of BQ . Proof. First, observe that no alternative arc has tail in a node corresponding to the first operation of a job. For all the other nodes the proof imme-
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517
diately follows from the third property, since all the alternative arcs having tail in a node of BQ are paired with arcs having the head in a node of P, thus, by Definition 5.5, being either forbidden or selected. Lemma 5.11. In the blocking problems with swap allowed, let S be a consistent positional selection, and let ðP ; QÞ be the corresponding partition of the node set. Then, all nodes in BP correspond to operations to be processed on different machines. Proof. For the purpose of contradiction, consider two operations i 2 BP and h 2 BP such that MðiÞ ¼ MðhÞ, and let j 2 BQ and k 2 BQ be the two operations following i and h in their respective jobs, i.e. ði; jÞ 2 F , ðh; kÞ 2 F . Since i and h have to be processed on the same machine, there is a pair of alternative arcs ððj; hÞ; ðk; iÞÞ 2 A, and either ðj; hÞ or ðk; iÞ is selected. Then there is a selected arc from a node of Q to a node of P, thus contradicting Definition 5.5. We next show that, given a consistent positional selection S, it is possible to obtain a larger consistent positional selection by adding to S several alternative arcs. The algorithm consists of repeatedly applying the iterative step described in Fig. 8. We define a strongly connected component in BQ to be any set of nodes N 0 2 BQ such that, for any pair of nodes i 2 N 0 , j 2 N 0 , there exists a path in GðSÞ from i to j passing only through nodes of N 0 . N 0 is maximal if it is not contained in a larger strongly connected component. Lemma 5.12. In the blocking job-shop problem with swap allowed, given any consistent positional selection S, after an application of the iterative step a new consistent positional selection S 0 is obtained.
507
Proof. We first observe that, for BQ 6¼ ;, it is always possible to find a strongly connected component R, such that there are no selected alternative arcs having the head in a node of R and the tail in a node of BQ R. In fact, given any directed graph, by replacing all strongly connected components with single nodes, one obtains an acyclic graph. Hence, there must be at least one strongly connected component with no ingoing arcs. This is also true for the subgraph induced by BQ . We consider first the case in which the set R is composed by a unique node k. From Lemma 5.10 it follows that, after an application of the iterative step, the resulting selection is a positional selection and we only have to prove that it is also consistent. Recall from Section 3 that rðkÞ is the node following k in its job (i.e., arc ðk; rðkÞÞ 2 F ), and let S 0 be the new selection obtained by adding to S the unselected alternative arcs having tail in rðkÞ (that are paired with the alternative arcs having head in k). Let P 0 ¼ P [ fkg, Q0 ¼ Q fkg and BQ0 be the border of Q0 . For the aim of contradiction, assume that there is a positive length cycle in the graph GðS 0 Þ. Clearly, since S is consistent, the cycle must contain at least one of the new selected arcs having tail in rðkÞ. Since all the alternative arcs have length zero, the cycle must also contain at least one fixed arc. On the other hand, since S is a positional selection, given any node j 2 Q0 BQ0 , there are no selected arcs having tail in j, and therefore there is no path in GðSÞ from j to rðkÞ. Moreover, all the arcs added to S by the iterative step have the tail in rðkÞ, and cannot create a path from j to rðkÞ. Hence the nodes in Q0 BQ0 cannot belong to the positive length cycle. Consider now a node i 2 P 0 . Since S 0 is positional and rðkÞ 2 BQ0 , there is not a path in GðS 0 Þ from rðkÞ to i, and therefore also the
Fig. 8. The step for enlarging a consistent positional selection.
508
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517
nodes in P 0 cannot belong to the positive length cycle. In conclusion a positive length cycle in GðS 0 Þ can only contain nodes in BQ0 , and therefore it contains no fixed arcs, a contradiction. Consider now the case in which the set R contains more than one node. In this case we must first prove that the iterative step yields a new positional selection S 0 . To this aim, let T ¼ fi 2 N j rðiÞ 2 Rg. Clearly, since R 2 BQ , T 2 BP . From Lemma 5.11 it follows that there are no two nodes in T to be processed on the same machine. Therefore, there are no two selected arcs induced by R (i.e. having both tail and head in R) having the same head. Hence, if R contains more than one node, it induces exactly a simple cycle in GðSÞ. Now, consider a node i 2 T , the node rðiÞ 2 R, and the (unique) node j 2 R such that ðrðiÞ; jÞ is an arc of GðSÞ, i.e. is a selected alternative arc. Then, recalling the meaning of an alternative arc for a blocking job-shop formulation, operations oi and oj are processed on the same machine. This fact implies that there are no two nodes in R to be processed on the same machine, and therefore that there is no pair of alternative arcs in A having both the heads in two nodes of R. Hence, after an application of the iterative step, no alternative arc in S 0 is selected and forbidden at the same time (i.e. S 0 is a selection), and S 0 is a positional selection. Since S 0 is positional, the same argument used in the case of R composed of a single node proves that S 0 is consistent, and this concludes the proof. We are now in the position of proving Theorem 5.9. Just observe that, by repeatedly applying the iterative step described in Fig. 8, Lemma 5.12 ensures that a sequence of consistent positional selections is obtained, eventually yielding an extension of S. In the remaining part of this section we show that several results, which have been proved to be very effective in the development of solution algorithms for the ideal job-shop problem, are no longer valid in the blocking and/or no-wait case. In the study of the ideal job-shop problem, significant results have been reported by several researchers in local search solution procedures. Among the others we cite simulated annealing [40],
tabu search [15,29,38] and genetic algorithms [14,37]. In general, local search techniques yield quite good solutions for the ideal job-shop problem, but unfortunately all these procedures are based on several properties that do not hold in the blocking and/or no-wait case. For example, a common neighbourhood in local search procedures for the ideal job-shop problem is obtained by reversing a disjunctive arc on a longest path of GðSÞ. This choice is motivated by the following proposition, ensuring that only feasible solutions are explored by the algorithm. Proposition 5.13. In the ideal job-shop problem, consider a complete consistent selection S, and let ði; jÞ 2 S belong to a longest path in GðSÞ. Then the complete selection ðS fði; jÞgÞ [ fðj; iÞg is consistent. Proof. See [6,40].
Unfortunately, this property does not hold in the blocking and/or no-wait case. An easy counter example in the blocking case is shown in Fig. 4, in which reversing any precedence relation among two operations would cause a positive length cycle in the graph. This means that a local search algorithm for the blocking and/or no-wait case should check the feasibility of all the explored solutions, thus requiring an amount of computing time much larger than in the ideal case. A different approach which has been proved to be very effective in the ideal job-shop problem consists of repeatedly enlarging a consistent selection. This is the idea, for example, of the shifting bottleneck algorithm of Adams et al. [1], in which at each step all the arcs in a clique are selected or forbidden. Also in this case the key property, which is shown in Proposition 5.8, does not hold in the blocking and/or in the no-wait case. In fact, from our experience, the shifting bottleneck procedure applied to blocking and/or no-wait job-shop problems results very easily in infeasible selections. All the above described negative results suggest that solution algorithms like local search and shifting bottleneck cannot be easily extended to the blocking and to the no-wait cases, and further
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517
research is needed on the theoretical issues before developing effective heuristic procedures for the job shop with blocking and no-wait constraints. On the other hand, in Section 7 we show that the key properties that are used in most branch and bound procedures for the ideal job-shop problem can be easily extended to the blocking and the nowait cases. For these reasons the following two sections are devoted to the development of fast greedy procedures and branch and bound algorithms.
6. Heuristics In this section we deal with heuristic procedures for finding good complete consistent selections, given a general alternative graph. We report our computational results for four sub-cases of Problem 3.1, namely the ideal job-shop problem (IJSP), the blocking no-swap problem (BNSP), the blocking problem with swap allowed (BWSP) and the no-wait job-shop problem (NWP). A considerable effort has been devoted in the past 40 years to design heuristic procedures for solving IJSP. Many of these procedures are greedy algorithms, based on list schedules associated with dispatching rules. As reported by several authors (see, for example, [33]), the behaviour of such an approach is quite erratic. It is therefore common to consider the best dispatching solution over a set of different rules, as, for example, in [30]. For what concerns the different versions of the job-shop problem analyzed in this paper, we observe that a dispatching rule may fail in finding a feasible solution, due to the complexity results shown in Section 5. In this case running several dispatching rules is an effective way for finding at least one feasible schedule in most cases. We next present four fast greedy algorithms, referred to in the following as Avoid Maximum Current Cmax (AMCC), Select Most Critical Pair (SMCP), Select Most Balanced Pair (SMBP), and Select Max Sum Pair (SMSP), respectively. All the heuristics are based on the simple idea of repeatedly enlarging a consistent selection, given a general alternative graph in the form of Problem 3.1, and concluding either with a feasible solution or
509
with a non-consistent selection. In particular the heuristic selects one arc at a time, in order to preserve the consistency of the current selection as long as possible. Every time an alternative arc is implied by the current selection, the heuristics select it. If both arcs in an unselected pair cause a positive length cycle in GðSÞ, the procedure fails in finding a feasible solution. The step is repeated until a complete selection is built or an inconsistency is detected. The general sketch of the four heuristics is described in Fig. 9. Recall from Section 3 the definition of lði; jÞ, as the length of the longest path in GðSÞ from node i to node j. We use the convention that if there is no path from i to j, then lði; jÞ ¼ 1. In particular, the selection of the unselected pair ððh; kÞ; ði; jÞÞ 2 A is performed differently in the four heuristics. AMCC selects the pair such that lð0; hÞ þ ahk þ lðk; nÞ ¼ max flð0; uÞ þ auv þ lðu; nÞg: ðu;vÞ2A
ð1Þ
In other words, ðh; kÞ is an arc that, if selected, would increase most the length of the longest path in GðSÞ. Hence, AMCC selects its alternative ði; jÞ. SMCP selects the pair such that the quantity minflð0; hÞ þ ahk þ lðk; nÞ; lð0; iÞ þ aij þ lðj; nÞg is maximized. Then, the selected arc ði; jÞ is such that lð0; hÞ þ ahk þ lðk; nÞ P lð0; iÞ þ aij þ lðj; nÞ. The third heuristic, SMBP, is quite similar to the previous one. SMBP selects the pair such that the quantity jlð0; hÞ þ ahk þ lðk; nÞ lð0; iÞ aij lðj; nÞj is minimized. Then, the selected arc ði; jÞ is such that lð0; hÞ þ ahk þ lðk; nÞ P lð0; iÞ þ aij þ lðj; nÞ. Finally, SMSP selects the pair such that the quantity jlð0; hÞ þ ahk þ lðk; nÞ þ lð0; iÞ þ aij þ lðj; nÞj is maximized. Then, the selected arc ði; jÞ is such that lð0; hÞ þ ahk þ lðk; nÞ P lð0; iÞ þ aij þ lðj; nÞ. Note that, when applying the rule described in Eq. (1), a tie may occur among different arc pairs. Hence, we developed two versions of AMCC. AMCC1 chooses, among the pairs fulfilling (1),
510
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517
Fig. 9. The general sketch of the four heuristics.
the one such that lð0; iÞ þ aij þ lðj; nÞ is minimum. AMCC2 chooses, among the pairs fulfilling (1), the one such that lð0; iÞ þ aij þ lðj; nÞ is maximum. In what follows, we call AMCC the best solution found by AMCC1 and AMCC2. We tested the performance of the heuristics on a sample of instances from the literature. Problems Abz5-9 were generated by Adams et al. [1], problems Orb1-10 were generated by Applegate and Cook [3], problems LA1-40 are the 40 problems generated by Lawrence [21], and, finally, problems Ft6, Ft10 and Ft20 are the three examples proposed by Fisher and Thompson in the book edited by Muth and Thompson [26]. Since there are no test instances for blocking or no-wait job-shop problems, we derived them from the above instances. From each instance of IJSP we derived four instances, each obtained by considering all machines as ideal, blocking with swap allowed, blocking no swap, and no-wait, respectively. In Table 1 we report our results for different heuristics. Since the performance of SMCP and SMBP are quite similar, in Table 1 we report the best result over the two heuristics only. In column 1 we report the name of the instance, and in column 2 we report the pair (number of jobs, number
of machines) for each instance. In the subsequent 12 columns we report, for each instance, the solutions found by the three heuristics for each one of the four version of the problem. Here id states for the instance of IJSP, bl states for the instance of BWSP, bns states for the instance of BNSP, and nw states for the instance of NWP. From our computational experience AMCC turns out to be the most effective heuristic, especially for IJSP, even if it fails in finding a feasible solution in most cases. In particular, over the 232 test instances, AMCC finds a solution in 78 cases. The solution found by AMCC is the best solution in 75 cases over 78. An opposite result is obtained by the pair of heuristic SMCP–SMBP. It fails in finding a feasible solution in 17 cases only over 232. On the other hand, it performs quite poorly. An intermediate performance is provided by SMSP. We note that the values reported in the table for AMCC and SMCP–SMBP are the best out of two runs for each instance, while the values for SMSP refer to one run only. Quite surprisingly, the computational results for the blocking problems with swap allowed are worse than the results for the blocking no swap problems. If we consider the best result over the 5 runs of the greedy heuristics, we find no solution in 8 cases for BWSP
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517
511
Table 1 Performance of the dispatching rules Instance
Size
id
bl
bns
nw
id
bl
bns
nw
id
bl
bns
nw
Abz5 Abz6 Abz7 Abz8 Abz9
ð10; 10Þ ð10; 10Þ ð15; 20Þ ð15; 20Þ ð15; 20Þ
1318 985 753 783 777
– – – – –
– – – – –
– – – – –
1551 1337 1105 976 1054
2479 2960 – – 1860
2608 1945 2675 – 1976
2781 2743 2538 3145 2350
1565 1259 816 1014 1007
– – – – –
– – – – –
– – – – –
Ft06 Ft10 Ft20
ð6; 6Þ ð10; 10Þ ð20; 5Þ
55 985 1338
64 – –
74 – 1796
73 – 1820
64 1434 1691
81 1753 2047
81 1833 2149
101 2271 2274
59 1271 1610
– –
86 1524 2052
– –
Orb01 Orb02 Orb03 Orb04 Orb05 Orb06 Orb07 Orb08 Orb09 Orb10
ð10; 10Þ ð10; 10Þ ð10; 10Þ ð10; 10Þ ð10; 10Þ ð10; 10Þ ð10; 10Þ ð10; 10Þ ð10; 10Þ ð10; 10Þ
1213 924 1113 1108 924 1107 440 950 1015 1030
– – – – – – – – – –
– – 1407 – – – – 1254 – –
1675 – 1647 – – – – 1559 1542 –
1479 1161 1497 1430 1202 1384 522 1246 1094 1227
2011 2457 1617 1757 1688 2775 968 1496 1694 2017
1790 1810 1864 1846 1581 2041 849 1679 1915 1896
2357 2324 2089 2220 2261 2350 922 1898 2388 2467
1323 1042 1261 1289 1082 1210 495 1175 1058 1227
1810 – – 1534 1274 – – – 1375 –
1756 1719 – 1538 – 1704 – 1487 – 1612
2063 – 1801 1952 – 1788 – 1823 1688 2565
La01 La02 La03 La04 La05
ð10; 5Þ ð10; 5Þ ð10; 5Þ ð10; 5Þ ð10; 5Þ
666 694 735 679 593
– – – – –
– 1135 884 881 –
1124 – 955 – –
793 907 772 687 676
1137 1055 1088 1378 1116
1328 1151 940 1119 1191
1403 1296 1392 1502 1094
744 773 760 705 678
1197 1087 – 971 –
1066 1077 928 1109 995
1106 – 1020 1039 –
La06 La07 La08 La09 La10
ð15; 5Þ ð15; 5Þ ð15; 5Þ ð15; 5Þ ð15; 5Þ
926 984 873 986 1009
– – – – –
– – 1386 – –
– – – – 1506
1129 1125 1185 1196 1035
1493 1737 1569 1943 1833
1676 1596 1864 1844 1905
1758 1837 1839 2430 2427
962 1005 1047 1056 1051
– – – – 1533
1568 1553 1561 1579 1629
– 1609 1580 – 1541
La11 La12 La13 La14 La15
ð20; 5Þ ð20; 5Þ ð20; 5Þ ð20; 5Þ ð20; 5Þ
1239 1039 1161 1305 1369
– – – – –
2017 – – – –
– – 1867 – –
1417 1131 1301 1404 1573
2189 2122 2296 2423 2371
2399 1921 2477 2422 2338
2226 2202 2197 2381 2720
1374 1215 1517 1301 1456
– – – – –
2082 1800 2024 2228 2226
– 1935 2221 – 2134
La16 La17 La18 La19 La20
ð10; 10Þ ð10; 10Þ ð10; 10Þ ð10; 10Þ ð10; 10Þ
979 800 916 846 930
– – – – –
– – – – –
– – – – –
1221 1015 1126 1183 1265
1593 1719 – 1786 1624
1693 1531 1826 2215 1860
2337 1898 2197 2245 2288
1244 999 1105 1067 1039
1592 – – – –
– 1322 – – 1554
– – – – 1971
La21 La22 La23 La24 La25
ð15; 10Þ ð15; 10Þ ð15; 10Þ ð15; 10Þ ð15; 10Þ
1241 1032 1131 999 1071
– – – – –
– – – – –
– – – – –
1636 1286 1538 1409 1568
2701 2566 3044 3350 2211
2475 2430 – 2489 2301
3033 2668 3296 2473 2750
1454 1311 1457 1332 1227
– – – – –
– – – – 2001
– – – – –
La26 La27 La28 La29
ð20; 10Þ ð20; 10Þ ð20; 10Þ ð20; 10Þ
1378 1353 1322 1392
– – – –
– – – –
– – – –
2106 1741 1884 1916
4024 – 3070 3792
3147 3505 4419 3298
3687 3488 4806 4152
3041 1888 1607 1521
4024 – – – – – – – – – – 3086 (continued on next page)
AMCC
SMCP and SMBP
SMSP
72
84
512
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517
Table 1 (continued) Instance
Size
AMCC
SMCP and SMBP
SMSP
id
bl
bns
nw
id
bl
bns
nw
id
bl
bns
nw
La30
ð20; 10Þ
1476
–
–
–
2169
3173
3208
3492
1822
–
–
3392
La31 La32 La33 La34 La35
ð30; 10Þ ð30; 10Þ ð30; 10Þ ð30; 10Þ ð30; 10Þ
1871 1942 1897 1934 2017
– – – – –
– – – – –
– – – – –
2785 2725 2276 2326 2999
– – – 4561 –
– 5710 – – 5955
4838 5469 – 5016 5360
2095 2538 2342 2206 2846
– – – – –
– – – – –
– – – – –
La36 La37 La38 La39 La40
ð15; 15Þ ð15; 15Þ ð15; 15Þ ð15; 15Þ ð15; 15Þ
1347 1547 1342 1361 1340
– – – – –
– – – – –
– – – – –
1856 2068 2197 1869 1990
3369 3009 3187 3787 3345
3209 3811 – 2765 –
3651 4326 3872 – 4422
1992 1951 1712 1974 1730
– – – – –
– – – – –
– – – – –
and in 7 cases for BNSP. Moreover, in the 46 cases in which a solution was found for both problems, the sum of the solutions found over the 46 instances is 95,302 for BWSP and 88,207 for BNSP. This is quite surprising since the BNSP is more constrained than the BWSP. It would be interesting to develop a specific algorithm for solving BWSP. In fact, in this case Theorem 5.9 gives a property for finding a feasible solution for all instances of BWSP by means of a greedy algorithm. The main purpose of this section is rather to address the problem of finding general solution procedures for any special case of job shop. Our computational experience suggests some important considerations. In IJSP the property of Proposition 5.8 ensure that a heuristic algorithm always finds a feasible solution, and therefore the main purpose of the heuristics is to find good quality solutions. In this case algorithm AMCC provides the best solution in 57 cases over 58. This is not the case for BNSP, BNSP and NWP. In these cases the solution procedures must deal with two conflicting issues, namely the feasibility issue and the quality of the solutions. In our experience AMCC focuses on the quality issue only, whereas SMCP–SMBP focuses on the feasibility issue. The result is that AMCC fails in finding a feasible solution most of the time, while SMCP–SMBP is too conservative to find good quality solutions. Also a heuristic like SMSP, which has an intermediate behaviour with respect to the two above issues, does not produce acceptable results as a general solution method. In fact, in our opinion, the idea
of repeatedly enlarging a consistent selection is unlikely to produce good quality solutions, at least for BNSP and NWP, due to the conflicting issues feasibility/quality to deal with. This consideration can be applied also to shifting bottleneck like procedures. Among the effective solution methods from the literature on IJSP which can be used for solving the blocking and the no-wait cases, in the next section we study the effectiveness of enumeration procedures.
7. Exact algorithms In this section we deal with exact procedures for finding optimal complete consistent selections in an alternative graph, or proving that no complete consistent selection exists. Also in this case we report our computational results for the four subcases of Problem 3.1, namely IJSP, BWSP, BNSP, and NWP. In particular we extend to the context of the alternative graph the ideas of Carlier and Pinson [13]. To this aim we need some preliminary notation. Let UB be a given integer. We define a solution as a schedule with a makespan smaller than or equal to UB. A clique of operations is a set K of operations such that, given any two operations of the clique, say oi and oj , then in all solutions either ðtj ti P p^i Þ or ðti tj P p^j Þ, for some p^i P pi , p^j P pj . Cliques are obtained, for example, by
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517
considering a group of operations to be processed on a specific machine. The concept of clique has been proved to be very effective for finding good lower bounds for IJSP. In our generalization, the values p^i , when related to blocking operations, may vary dynamically during the execution of the optimization procedure. Given a clique K, e 2 K (respectively, s 2 K) is called the input (respectively, output) of the clique K if, in all solutions, e is sequenced before (respectively, s is sequenced after) all the other operations of K. Given a consistent selection S, we can associate a release time r^i , a flow time p^i , and a delivery time q^i with each operation oi . The release time of operation oi is a lower bound for the earliest possible starting time of oi in a minimum makespan extension of S. A possible value for ^ ri is clearly the head ri ¼ lð0; iÞ, defined in Section 3. The flow time p^i of operation oi is a lower bound for the time period between the starting time of operation oi on machine mðiÞ and the time at which machine mðiÞ becomes available for processing the next operation, in a minimum makespan extension of S. Clearly p^i P pi , and the equality holds if oi is an ideal operation. We define the delivery time q^i as: q^i ¼ qi p^i . In other words, q^i is a lower bound for the time period between the time at which operation oi leaves machine mðiÞ and the makespan of an extension of S. A lower bound for the minimum makespan of an extension of a consistent selection S can be obtained by solving a one-machine scheduling problem with release times, flow times and delivery times, for any clique of operations (see, for example [10,11,13]). If oi 2 K is an ideal operation, it is well known that possible values for its release time, flow time and delivery time are r^i ¼ ri , p^i ¼ pi , q^i ¼ qi pi , respectively. If oi 2 K is a blocking operation, we can dynamically strengthen these values by setting p^i ¼ lði; rðiÞÞ, r^i ¼ maxfri ; rrðiÞ p^i g, q^i ¼ qi p^i . We next prove that, with these values, we still obtain a lower bound on the makespan of any solution. Let si be the starting time of oi on machine MðiÞ. MðiÞ will become available for processing
513
the next operation only after the starting time of operation orðiÞ , i.e. at least at time si þ lði; rðiÞÞ. During this time MðiÞ cannot process any other operation, and therefore we can set p^i ¼ lði; rðiÞÞ. Let us now consider the case in which ri < rrðiÞ p^i , and let assume that an extension of S exists in which ri si < rrðiÞ p^i . In this case the machine MðiÞ will remain blocked at least between time si þ p^i and time rrðiÞ . By delaying the starting time of oi , we can obtain a new solution, having the same makespan, in which si ¼ rrðiÞ p^i . Hence, in the computation of the lower bound we can set ^ri ¼ rrðiÞ p^i . For each clique K, a lower bound for the minimum makespan of the one machine problem with release and delivery times can be computed in OðjKj log jKjÞ steps by building the Jackson’s preemptive schedule either in the primal or in the dual versions (see, e.g. [13]). Their makespans are equal to maxJ K hðJ Þ, where X hðJ Þ ¼ min rj þ pj þ min qj : ð2Þ j2J
j2J
j2J
7.1. Immediate selections Let us now consider a selection S and an unselected pair ði; jÞ; ðh; kÞ of alternative arcs. If we can prove that no solution exists in which arc ðh; kÞ is selected, we can add arc ði; jÞ to S. In this case we say that arc ðh; kÞ is forbidden, and arc ði; jÞ is implied by S. Immediate selections are very important in order to efficiently solve the job-shop problem by means of a branch and bound algorithm, since they allow one to limit the number of branches that are needed to prove the optimality of a solution. A first rule for detecting arcs that are implied by S is the following. Proposition 7.1. Given a selection S, if ðði; jÞ; ðh; kÞÞ is an unselected pair of alternative arcs, and lðk; hÞ þ ahk > 0, then arc ðh; kÞ is forbidden, and arc ði; jÞ is implied by S. The following straightforward result corresponds to an analogous result of [11].
514
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517
Proposition 7.2. Given a selection S, if ðði; jÞ; ðh; kÞÞ is an unselected pair of alternative arcs, and ^rh þ ahk þ q^k > UB, then arc ðh; kÞ is forbidden, and arc ði; jÞ is implied by S. Given a selection S and an unselected pair ði; jÞ; ðh; kÞ of alternative arcs, we say that ði; jÞ is redundant if lði; jÞ P aij . Clearly, a redundant arc can always be added to S since it cannot affect the makespan of a solution. Also in this case we say that arc ðh; kÞ is forbidden, and arc ði; jÞ is implied by S. In the rest of this section, we roughly describe some of the ideas of [12,13] and show that these ideas can be usefully employed also in our context. A subset J of operations is called an ascendant set of c if c 62 J and X min rj þ pj þ min qj > UB: ð3Þ
j2J [fcg
j2J [fcg
j2J
If J is an ascendant set of c, c is output of the clique K ¼ J [ fcg. By letting lðp; qÞ ¼ 1 if there is no path from p to q in GðSÞ, we can forbid all unselected alternative arcs ðh; kÞ such that lðc; hÞ þ ahk þ max flðk; jÞg > 0: j2J
ð4Þ
In particular, if c is an ideal operation then all arcs ðc; jÞ, 8j 2 J, are forbidden, if c is a blocking operation then all arcs ðrðcÞ; jÞ, 8j 2 J , are forbidden. Symmetrically, it is possible to define a descendant set J of c if c 62 J and X min rj þ pj þ min qj > UB: j2J
j2J [fcg
j2J [fcg
In this case c is input of K ¼ J [ fcg and we can forbid all unselected alternative arcs ðh; kÞ such that max flðj; hÞg þ ahk þ lðk; cÞ > 0: j2J
In [13] a OðjKj log jKjÞ algorithm is provided for finding a maximal set of arcs that can be either selected or forbidden by using these arguments. The algorithm applies as well to our context. Whenever some arcs are selected with this procedure we obtain a new selection S 0 . As a consequence, new values for heads and tails of all operations should be computed on the graph GðS 0 Þ
and this might result in a new set of arcs implied by S 0 . In order to speed up this procedure several authors [8,11–13] propose efficient algorithms for adjusting heads and tails without re-computing them on GðS 0 Þ. 7.2. Branch and bound Our branch and bound procedure makes use of the above described lower bounds and immediate selection techniques. The search strategy is a depth-first, and the branching scheme is based on the idea of the AMCC heuristic. Among unselected alternative pairs, we choose the pair ððh; kÞ; ðl; jÞÞ 2 A such that the quantity lð0; hÞ þ ahk þ lðk; nÞ is maximum, and then we select arc ðl; jÞ. In other words we aim to avoid the arc ðh; kÞ that would increase most the current makespan of the solution. 7.3. Computational experience We have implemented the branch and bound procedure in C language on a PC with a Pentium II 350 MHz, running the operating system Windows 98. We tested the performance of the branch and bound procedure on the 72 ð10 10Þ instances from the sample of problems described in Section 6. In Table 2 we report our results in terms of computing time and value of the optimal solution for the 72 instances. Here, the first column reports the name of the instance, IS is the value of the initial solution, obtained as the best solution reported in Table 1, OS is the proven optimum found with our branch and bound procedure, and Time is the computing time in seconds. We next report some comments on the computational experience. It is interesting to observe the effects of the blocking and no-wait constraints on the value of the optimal solutions. The optimal solution of BWSP is 16.53% larger, on average, than the optimal solution of IJSP. The optimal solution of BNSP is 27.91% larger, on average, than the optimal solution of IJSP. The optimal solution of NWP is 64.85% larger, on average, than the optimal solution of IJSP. Note that the no-swap constraint has a strong effect on the op-
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517
515
Table 2 Performance of the branch and bound procedure Instance name Abz5 Abz6 Ft10 Orb1 Orb2 Orb3 Orb4 Orb5 Orb6 Orb7 Orb8 Orb9 Orb10 La16 La17 La18 La19 La20
IJSP
BWSP
BNSP
NWP
IS
OS
Time
IS
OS
Time
IS
OS
Time
IS
OS
Time
1318 985 985 1213 924 1113 1108 924 1107 440 950 1015 1030 979 800 916 846 930
1234 943 930 1059 888 1005 1005 887 1010 397 899 934 944 945 784 848 842 902
3079.12 89.53 3312.72 38072.38 453.08 16376.09 1570.26 2287.76 10259.26 1034.69 1264.27 1787.55 408.97 726.33 34.76 108.92 212.84 41.74
2479 2960 1753 1810 2457 1617 1534 1274 2775 968 1496 1375 2017 1592 1719 þ1 1786 1624
1468 1145 1068 1175 1041 1160 1146 995 1199 483 995 1039 1146 1060 929 1025 1043 1060
42440.55 15196.46 25228.11 43668.95 13686.72 15629.71 11107.08 9009.48 115147.50 35226.47 8592.87 7512.60 10889.64 11626.51 10415.85 13837.82 23390.03 5659.80
2608 1945 1524 1756 1719 1407 1538 1581 1704 849 1254 1915 1612 1693 1322 1826 2215 1554
1641 1249 1158 1256 1144 1311 1246 1203 1266 527 1139 1130 1367 1148 968 1077 1102 1118
4669.82 3071.10 6215.53 8311.11 498.11 569.85 3254.72 796.31 12183.68 13255.27 1033.75 879.42 353.17 5531.21 2087.34 3748.17 2366.90 1471.40
2781 2743 2271 1675 2324 1647 1952 2261 1788 922 1559 1542 2467 2337 1898 2197 2245 1971
2150 1718 1607 1615 1485 1599 1653 1365 1555 689 1319 1445 1557 1575 1371 1417 1482 1526
769.51 92.82 194.65 61.35 169.34 156.59 238.87 1025.68 30.43 434.51 197.51 62.62 843.33 124.46 139.01 196.42 371.18 177.52
timal makespan. In fact, the average difference between the optimal makespan of BNSP and that of BWSP is around 10%. As for the computing time of the different cases, we first observe that, for the ideal job shop instances, the computing time reported in Table 2 is larger than the values obtained by other authors. One reason is the fact that our code deals with a general alternative graph, and therefore it cannot take advantage of the particular structure of the ideal job shop. The no-wait instances are the most easy to solve even if the gap at root is much larger than in the other cases. This is mainly due to the fact that the average number of immediate selections for these instances is larger than in the other cases. The most difficult case, from the point of view of the computing time, is obtained for the job-shop blocking with swap allowed. However, also the blocking no-swap case appears more difficult to solve than the ideal job shop. Finally, we describe the performance of the greedy heuristics with respect to the optimal solutions over the 72 ð10 10Þ instances. The relative error over the 18 instances for the ideal job-shop problem is approximately 6:78%, the relative error for the JSBWS over 17 of the 18
instances is 72:53%, the error for the JSBNS over the 18 instances is 42:63%, and, finally, the relative error for the no wait case over the 18 instances is 35:10%. These results clearly show the need for future research in developing effective heuristic procedures for BWSP, BNSP, and NWP.
8. Conclusions In this paper we used the alternative graph formulation to study the job-shop scheduling problem with blocking and no-wait constraints. Both the complexity results and the computational experience suggest that the job-shop problems with blocking and no-wait constraints are computationally more difficult to handle than the jobshop problem with unlimited buffers. In particular we showed that the simple method of repeatedly enlarging a feasible selection, which is the basic step of many solution procedures, including the shifting bottleneck algorithm, are unlikely to produce feasible and good quality solutions for the blocking and no-wait job-shop problems. Moreover, a key property that is used in most tabu search algorithms for the ideal job-shop problem is
516
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517
no longer valid in the blocking and in the no-wait cases. Further research is therefore needed on the theoretical issues before developing effective local search solution procedures for the job-shop problem with blocking and no-wait constraints. On the other hand, it is possible to easily extend some of the most significant algorithmic improvements, obtained in the development of branch and bound codes for the ideal job-shop problem in the past 30 years. Future research should address theoretical issues as well as algorithmic improvements of heuristic and exact solution procedures. Future research should also be concerned with specialized algorithms for the job-shop problem with swap allowed, based on the concept of positional selection, due to the poor performance of both the greedy algorithms and the branch and bound code for this important special case.
References [1] J. Adams, E. Balas, D. Zawack, The shifting bottleneck procedure for job shop scheduling, Management Science 34 (3) (1988) 391–401. [2] B. Adenso-Dıaz, M. Oliva Gonzalez, P. Gonzalez-Torre, On-line timetable re-scheduling in regional train services, Transportation Research Part B 33 (1999) 387–398. [3] D. Applegate, W. Cook, A computational study of the job shop scheduling problem, ORSA Journal on Computing 3 (2) (1991) 149–156. [4] C. Arbib, G.F. Italiano, A. Panconesi, Predicting deadlock in store-and-forward networks, Networks 20 (1990) 861– 881. [5] C. Arbib, D. Pacciarelli, S. Smriglio, A three-dimensional matching model for perishable production scheduling, Discrete Applied Mathematics 92 (1999) 1–15. [6] E. Balas, Machine sequencing via disjunctive graphs: An implicit enumeration approach, Operations Research 17 (1969) 941–957. [7] E. Balas, Disjunctive programming, Annals of Discrete Mathematics 5 (1979) 3–51. [8] P. Brucker, B. Jurish, B. Sievers, A branch and bound algorithm for the job-shop scheduling problem, Discrete Applied Mathematics 49 (1994) 107–127. [9] X. Cai, C.J. Goh, A.I. Mees, Greedy heuristics for rapid scheduling of trains on a single track, IIE Transactions 30 (1998) 481–493. [10] J. Carlier, The one-machine sequencing problem, European Journal of Operational Research 11 (1982) 42– 47.
[11] J. Carlier, E. Pinson, An algorithm for solving the job-shop problem, Management Science 35 (2) (1989) 164–176. [12] J. Carlier, E. Pinson, A practical use of Jackson’s preemptive schedule for solving the job-shop problem, Annals of Operations Research 26 (1990) 269–287. [13] J. Carlier, E. Pinson, Adjustment of heads and tails for the job-shop problem, European Journal of Operational Research 78 (1994) 146–161. [14] F. Della Croce, R. Tadei, G. Volta, A genetic algorithm for the job-shop problem, Computers and Operations Research 22 (1) (1995) 15–30. [15] M. Dell’Amico, M. Trubian, Applying taboo search to the job-shop scheduling problem, Annals of Operations Research 41 (1993) 231–252. [16] J. Dorn, R. Shams, Scheduling high-grade steelmaking, IEEE Expert 11 (1) (1996) 28–35. [17] S. French, Sequencing and Scheduling: An Introduction to the Mathematics of the Job Shop, Ellis Horwood, Chichester, UK, 1982. [18] J. Grabowski, J. Pempera, C. Smutnicki, Scheduling in production of concrete wares, in: Operations Research Proceedings 1996 (Braunschweig), Springer, Berlin, 1997, pp. 192–196. [19] N.J. Hall, C. Sriskandarajah, A survey on machine scheduling problems with blocking and no-wait in process, Operations Research 44 (3) (1996) 510–525. [20] W. Kubiak, S. Sethi, C. Sriskandarajah, An efficient algorithm for a job shop problem, Mathematical Industrial Systems 1 (1996) 203–216. [21] S. Lawrence, Supplement to Resource Constrained Project Scheduling: An Experimental Investigation of Heuristic Scheduling Techniques, GSIA, Carnegie Mellon University, Pittsburgh, PA, 1984. [22] T. Lixin, J. Liu, A. Rong, Z. Yang, A mathematical programming model for scheduling steelmaking-continuous casting production, European Journal of Operational Research 120 (2000) 423–435. [23] P. Martin, D.B. Shmoys, A new approach to compute optimal schedules for the job shop scheduling problem, in: Integer and Combinatorial Optimization, Vancouver, B.C., 1996, pp. 389–403, Lecture Notes in Computer Science, vol. 1084, Springer, Berlin, 1996, pp. 389–403. [24] A. Mascis, D. Pacciarelli, Machine scheduling via alternative graphs, Report DIA-46-2000, Dipartimento di Informatica e Automazione, Universita Roma Tre, Roma, Italy, 2000. [25] S.T. Mc Cormick, M.L. Pinedo, S. Shenker, B. Wolf, Sequencing in an assembly line with blocking to minimize cycle time, Operations Research 37 (6) (1989) 925– 935. [26] J.F. Muth, G.L. Thompson (Eds.), Industrial Scheduling, Kluwer Academic Publishers, Dordrecht, 1963. [27] S. Nahmias, Perishable inventory theory: A review, Operations Research 30 (4) (1982) 680–708. [28] E. Nowicki, The permutation flow shop with buffers: A tabu search approach, European Journal of Operational Research 116 (1) (1999) 205–219.
A. Mascis, D. Pacciarelli / European Journal of Operational Research 143 (2002) 498–517 [29] E. Nowicki, C. Smutnicki, A fast taboo search algorithm for the job shop scheduling problem, Management Science 42 (6) (1996) 797–813. [30] I.M. Ovacik, R. Uzsoy, Decomposition Methods for Complex Factory Scheduling Problems, Prentice-Hall, Englewood Cliffs, NJ, 1997. [31] C. Papadimitriou, P. Kanellakis, Flowshop scheduling with limited temporary storage, Journal of Associated Computer Machinery 27 (1980) 533–549. [32] M. Pinedo, Scheduling – Theory, Algorithms and Systems, Prentice-Hall (International Series in Industrial and System Engineering), Englewood Cliffs, NJ, 1995. [33] E. Pinson, The job shop scheduling problem: A concise survey and some recent developments, in: P. Chretienne, E.G. Coffman, J.K. Lenstra, Z. Liu (Eds.), Scheduling Theory and Its Applications, Wiley, New York, 1997, pp. 277–294. [34] G.V. Reklaitis, Review of scheduling of process operations, AIChE Symposium Series 78 (1982) 119–133.
517
[35] B. Roy, B. Sussman, Les problem d’ordonnancement avec contraintes disjonctives. Note DS No. 9 bis, SEMA, Paris, 1964. [36] I_ . S ß ahin, Railway traffic control and train scheduling based on inter-train conflict management, Transportation Research Part B 33 (1999) 511–534. [37] R.H. Storer, S.D. Wu, R. Vaccari, Problem and heuristic space search strategies for job shop scheduling, ORSA Journal on Computing 7 (4) (1995) 453– 467. [38] E. Taillard, Parallel tabu search technique for the job shop scheduling problem, ORSA Journal on Computing 6 (1994) 108–117. [39] V.G. Timkovsky, On the complexity of scheduling an arbitrary system, Soviet Journal of Computer and System Sciences 5 (1985) 46–52. [40] P.J.M. van Laarhoven, E.H.L. Aarts, J.K. Lenstra, Job shop scheduling by simulated annealing, Operations Research 40 (1992) 113–125.