<<

Dipartimento di Ingegneria Via della Vasca Navale, 79 00146 Roma, Italy

An Iterated Greedy for the Blocking Job Shop Scheduling Problem

Marco Pranzo1, Dario Pacciarelli2

RT-DIA-208-2013 Novembre 2013

(1) Universit`adegli Studi Roma Tre, Via della Vasca Navale, 79 00146 Roma, Italy

(2) Universit`adegli Studi di Siena Via Roma 56 53100 Siena, Italy. ABSTRACT

In this paper we consider a job shop scheduling problem with blocking (zero buffer) con- straints. Blocking constraints model the absence of buffers, whereas in the traditional job shop scheduling model buffers have infinite capacity. There are two known variants of this problem, namely the blocking job shop scheduling (BJSS) with swap allowed and the BJSS with no-swap. A swap is needed when there is a cycle of two or more jobs each waiting for the machine occupied by the next job in the cycle. Such a cycle represents a deadlock in no-swap BJSS, while with a swap all the jobs in the cycle move simulta- neously to their subsequent machine. This scheduling problem is receiving an increasing interest in the recent literature, and we propose an Iterated Greedy (IG) to solve both variants of the problem. The IG is a metaheuristic based on the repetition of a destruction phase, which removes part of the solution, and a construction phase, in which a new solution is obtained by applying an underlying starting from the partial solution. Comparison with recent published results shows that the iterated greedy outperforms other state-of-the-art on benchmark instances. Moreover it is conceptually easy to implement and has a broad applicability to other constrained scheduling problems.

Keywords: Job shop scheduling problem, blocking, swap, iterated greedy, alternative graph.

2 1 Introduction

The job shop scheduling problem is one of the most studied problems in combinatorial optimization. In this problem, a set of jobs must be processed on a set of machines and the sequence of machines for each job is prescribed. The processing of a job on a machine is called an operation and cannot be interrupted. Each machine can host only one job at a time, and whenever two jobs require the same machine, a processing order must be defined between the incompatible operations. The problem consists of scheduling all operations on all machines to minimize the completion time of all jobs. The classical version of the problem assumes that jobs can be stored in a buffer of infinite capacity between consecutive operations. However, there are many practical situations in which the buffer capacity has to be taken into account [8, 26, 15, 22, 28, 5]. This is the case, for example, when there is no buffer to store work-in-progress [4] or it is not convenient to store jobs due to economic considerations [27]. The blocking constraint models the complete absence of storage capacity between consecutive machines [11]. In this setting, a machine is released by a job only when the subsequent machine is available for processing it. When the subsequent machine is unavailable the job remains on the current machine, thus blocking it, even after its operation is completed. Two versions of the job shop scheduling problems with blocking can be distinguished: the blocking with swaps (BWS) and the blocking no-swap (BNS) versions. In order to define a swap, let us introduce a deadlock as a cycle of two or more jobs each waiting for the machine occupied by the next job in the cycle. A swap occurs whenever a deadlock is solved by simultaneously moving every operation in the cycle to the subsequent machine. If the swap is not allowed (BSN) a deadlock is infeasible. Mascis and Pacciarelli [18] show that the problem of finding a feasible extension of a partial solution is polynomially solvable for the BWS case and it is NP-complete for the BNS version. Despite the practical relevance of the problem, only in the last years few algorithmic contributions on job shop scheduling problems with blockings have been proposed in the literature. One successful approach is based on the alternative graph formulation [18], which allows to model the BJSS problem in both variants, with and without swaps. In [18] a algorithm is proposed to sove the problem exploiting the generaliza- tion to the blocking case of some properties holding for the traditional JSS problem with infinite buffer capacity. In [29] a family of heuristics (AGH) extending the ones introduced in [18] has been proposed and tested. Based on the AGH heuristics, in [23] a rollout algo- rithm is proposed for solving four variants of the job shop scheduling problem including, among the others, the BWS and the BNS versions. In [16], a constructive algorithm with local search improvement is proposed for solving the blocking job shop scheduling problem with parallel-machines and applied to solve a train scheduling problem. Computational results for the BWS case are also reported. The literature on the blocking job shop scheduling problem includes several recent algorithmic contributions specially tailored for the BWS version of the problem. Gr¨oflin and Klinkert [10] propose a algorithm in which the solution feasibility is recov- ered after every move. In [9], the neighborhood is enlarged to take into account machine flexibility and improved results are presented. A complete local search with memory is proposed by [37] which compares favourably with the greedy heuristic algorithms pre- sented in [18]. Recently, Oddi et al. [25] presented an iterative flattening search for the BWS problem obtaining state-of-the-art results.

3 The literature for the BNS case experienced a smaller number of contributions. Mati et al. [19, 20] study a flexible manufacturing system and model the production scheduling problem as a BNS job shop scheduling problem in which each operation may require more than a resource at a time to be executed. They develop a geometric approach to optimally solve the BNS problem with two jobs. Mati and Xie [21] extend the previous works to include resource flexibility. They propose an insertion heuristic based on the geometric approach for the problem with two jobs and incorporate this algorithm in a tabu search framework to produce deadlock-free schedules for the problem with n jobs. In this paper, we discuss and apply a conceptually very simple technique, known as Iterated Greedy (IG), which aims at improving the performance of a greedy constructive heuristic procedure in short computation times. The paper is organized as follows. In Section 2 we formulate job shop scheduling problems with blocking constraints using the alternative graph formulation. In Section 3 we present our iterated greedy algorithm for solving the problem modeled by means of the alternative graph formulation. Computational results on a set of benchmark instances are presented in Section 4, and finally some conclusions follow.

2 The job shop scheduling problem with blocking constraints

In the job shop scheduling problem a set of jobs J must be processed on a set of machines M, each processing at most one job at a time. The processing of a job on a machine is called an operation and cannot be interrupted. We let {o1, . . . , on} be the set of all operations. The sequence of operations for each job is prescribed, while the sequence of operations for each machine has to be determined in such a way that the time needed to complete all operations, called the makespan, is minimum. More formally, the scheduling problem consists in assigning a starting times ti to operation oi, i = 1, . . . , n, such that: (i) precedence constraints between consecutive operations of the same job are satisfied; (ii) each machine hosts at most one job at a time; and (iii) the makespan is minimized. In the blocking job shop scheduling problem no intermediate storage is allowed between two consecutive machines. Hence, once a job completes processing on machine Mh it either moves to the subsequent machine Mk (if it is available) or it remains on Mh, thus blocking it (if Mk is not available). The blocking job shop scheduling problem can be modeled by using the alternative graph model of Mascis and Pacciarelli [18]. An alternative graph is a triple G = (N,F,A). N = {0, 1, . . . , n + 1} is a set of nodes, and each node i ∈ N is associated to operation oi. Two additional nodes start 0 and finish n + 1 (dummy operations o0 and on+1) model the beginning and the completion of the schedule, i.e., o0 precedes all other operations while on+1 follows all other operations. F is a set of fixed directed arcs and fij is the length of the fixed arc (i, j) ∈ F . A fixed arc (i, j) represents a precedence constraint on the starting time of operation oj, which is constrained to start at least fij time units after oi, i.e., tj ≥ ti +fij. Finally, A is a set of m pairs of alternative directed arcs, and aij is the length of the alternative arc (i, j). If ((i, k), (h, j)) ∈ A, then arcs (i, k) and (h, j) form an alternative pair. Alternative pairs are used to model precedence relations between pairs of operations to be processed on the same machine. Let oi and oj be two operations to be processed on the same machine, and let oh and ok be the operations immediately following oi and oj in their respective jobs (see Figure 1).

4 The blocking constraint states that if oi is processed before oj, operation oj can start the processing only after the starting time of oh (i.e., when oi leaves the machine). Hence, we represent this situation with the alternative arc (h, j). Conversely, arc (k, i) represents operation oi preceding oj. A selection S is a set of arcs obtained from A by choosing at most one arc from each pair, and G(S) indicates the graph (N,F ∪ S). The selection is feasible if there are no positive length cycles in the resulting graph G(S). In fact, a positive length cycle represents an operation preceding itself, which is not feasible. A selected alternative arc (i, j) represents the precedence relation tj ≥ ti + aij. When swaps are allowed (Figure 1 (a)) the length of all the alternative arcs is set to zero. In fact given an alternative pair ((i, k), (h, j)) ∈ A, oj can start immediately after the start of oh, i.e., ahj = 0. Note that, in this case, a cycle of alternative arcs has total length zero, and it is therefore feasible. In the no-swap case a deadlock is infeasible. Since a deadlock corresponds to a cycle of alternative arcs (see Figure 2), this infeasibility is achieved by setting the length of alternative arcs to a small positive value ε (Figure 1 (b)). This positive length corresponds to model the fact that an operation can start processing on a machine strictly after that the previous operations has left it.

i pi h i pi h J1 J1

0 ε

ε 0 J2 J2 pj pj j k j k (a) (b)

Figure 1: (a) The alternative pair of blocking operations with swaps allowed. (b) The alternative pair of blocking operations when swaps are not allowed.

J1 J1 J1 0 ε 0 ε M1 M2 J 0 ε ε 2 0 J2 J2 (a) (b) (c)

Figure 2: (a) A simple swap cycle between two operations (b) The alternative graph model with swaps allowed. (c) The alternative graph model when swaps are not allowed.

Given a feasible selection S, we denote the length of a longest path from i to j in G(S) by lS(i, j) (if there is no path from i to j we assume lS(i, j) = −∞). A solution S is a selection of |A| alternative precedence relations, exactly one from each pair in A.A feasible solution is optimal if the length lS(0, n + 1) of a longest path from 0 to n + 1 is minimum over all feasible solutions.

5 S Finally, given a feasible selection S, we define Lij as the length of a critical (i.e., longest) path passing through the alternative arc (i, j):

S S S Lij = l (0, i) + aij + l (j, n + 1).

S Lij represents a rough lower bound of the longest path between 0 and n + 1 (i.e., of the makespan) in any feasible solution obtained starting from the selection S ∪ {(i, j)}. We also make use of static implications. Two alternative pairs ((k, i), (h, j)) ((d, a), (c, b)) are statically implied if there is no feasible solution in which arcs (k, i) and (c, b) are se- lected or arcs (h, j) and (d, a) are selected. In other words, the selection of arc (d, a) implies the selection of arc (k, i), and the selection of arc (h, j) implies the selection of arc (c, b). Given an alternative arc (h, i), we define the set I(h, j) as the set of alternative arcs statically implied by (h, j). Whenever an alternative arc pair (h, j) is selected/deselected also all arcs in I(h, i) are selected/deselected. The following simple result allows to establish a correspondence between the selection of arcs from different alternative pairs.

Proposition 1 (Implication) Given a selection S and two unselected alternative pairs ((d, a), (c, b)) and ((h, j), (k, i)), if lS(a, h) ≥ 0 and lS(j, d) ≥ 0 then there is no feasible solution in which arcs (d, a) and (h, j) are both selected in S.

Proposition 1 can be applied in particular with the empty selection S = ∅, when the graph G(∅) = (N , F) is composed of a set of chains of fixed arcs. Then, the paths lS(a, h) ≥ 0 and lS(j, d) ≥ 0 can be composed only by fixed arcs, i.e., the paths exist only if nodes a, h refer to a same job J1, and j, d refer to another job J2, sharing some machines with J1. We call this implication static since it holds for any selection S. The conditions of Proposition 1 hold for S = ∅ in the following two cases:

• J1 and J2 pass both through two consecutive machines M1 and M2 in the same order. In this case c ≡ i and d ≡ j (see Figure 3 (a)).

• J1 and J2 pass both through M1 and M2 consecutively, although in the opposite order (see Figure 3 (b)).

a c≡i h J1 J1 a c i h

J J2 2 b d≡j k d b k j (a) (b)

Figure 3: (a) Jobs passing in the same order. (b) Jobs passing in opposite order.

6 Iterated Greedy Input: Initial solution S begin while stopping criterion is not fulfilled do S0 = Destruction( S ) S00 = Construction( S0 ) S = Acceptance Criterion( S, S00) end end

Figure 4: The pseudocode of an iterated greedy algorithm.

Whenever one of the two above situations occurs, the selection of arc (d, a) implies the selection of arc (k, i), and the selection of arc (h, j) implies the selection of arc (c, b). Therefore I(d, a) = {(k, i)}, I(k, i) = {(d, a)}, I(h, j) = {(c, b)} and I(c, b) = {(h, j)}. Static implications can be computed off-line very efficiently and have been successfully applied to train scheduling problems [4].

3 Iterated Greedy

The Iterated Greedy is a conceptually very simple approach that can be used to improve the performance of a greedy heuristic, which is used as a black box within the algorithm. The basic idea is to iterate a Destruction-Construction cycle. A sketch of the algorithm is given in Figure 4. A Destruction-Construction cycle consists of three different phases, namely destruction (some components of the incumbent solution are removed), construc- tion (starting from the partial solution a new complete solution is built by the greedy heuristic) and acceptance criterion (the new solution is evaluated and possibly accepted as a new incumbent). Finally a stopping criterion is adopted to terminate the search. Given its simple structure, IG algorithm has been independently developed by different research communities under different names, such as Ruin and Recreate [35], Adaptive Large Neighborhood Search [36] or Iterated Flattening Search [3]. IG algorithms have been successfully applied to the Set Partitioning Problem [17], to some variants of the Vehicle Problem [32, 31], to the Quadratic Assignement Problem [24], and to the permutation flowshop scheduling in both versions without and with blocking [33, 34, 30]. One of the main advantage of the iterated greedy algorithm is that it does not rely on specific properties of the problem addressed, but all the problem specific knowledge is embedded in the underlying heuristic solution procedure. This is particularly useful when dealing with very general problems that suffer from a lack of specific properties to be used in the design of efficient solution algorithms. Moreover, the framework is easy to implement once a construction heuristic procedure is available. In the remaining part of this section we describe the three phases of our iterated greedy algorithm for the blocking job shop problem with or without swaps.

7 3.1 Initial Solution The first incumbent solution is obtained by simply ordering the jobs from 1 to |J| and then, for each alternative pair involving jobs Ji and job Jj with i < j, selecting the arc in which Ji precedes Jj. Is it easy to show that the initial solution constructed in this way is always feasible, since a cycle in G(∫) would require at least one arc from Jj to Ji, with i < j. The solution found by this initial heuristic has typically very poor quality but is guaranteed to be always feasible, both in the BWS and BNS cases. This is relevant since, starting from a partial selection, the problem of deciding whether a feasible solution exists is a NP -complete problem for the BNS case.

3.2 Destruction In the Destruction phase a portion of the current selection S (representing the incumbent solution) is deselected, and a new partial selection S0 is obtained. More precisely, each alternative pair is randomly deselected with probability p. The probability p is a param- eter of the Destruction procedure called perturbation strength and in our test we set it to 0.8, i.e., in the destruction phase 80% of all alternative arcs are deselected. Recall that, since we use static implications, every time the algorithm deselects the alternative arc (i, j) ∈ ((i, j), (h, k)) all the implied alternative arcs in I(i, j) are also deselected. Thus the actual fraction of removed arcs is at least p. Notice that, in our model, k operations that must be processed on the same machine lead to k(k − 1)/2 alternative pairs. Clearly, only (k − 1) of them are necessary, while all the others are redundant. Removing a redundant arc would not lead to a different solution, since a redundant arc is implied by the others and construction algorithm would select it immediately. Hence, in order to reach a new solution, the destruction phase must remove a large number of arcs, most of which are redundant.

3.3 Construction Given a partial selection S, a constructive greedy procedure is applied to extend S at each step with a new alternative arc (i, j), i.e., S = S ∪ {(i, j)} ∪ I(i, j), until a new feasible solution S0 is obtained or an infeasibility is detected. The latter case arises when there is an alternative pair ((i, j), (h, k)) such that both G(S ∪ {(i, j)} ∪ I(i, j)) and G(S ∪ {(h, k)} ∪ I(h, k)) contain a positive cycle, and we say that S is infeasible even if G(S0) does not contain any cycle. As constructive heuristic we use the AMCC (Avoid Maximum Current Completion time) heuristic introduced in Mascis and Pacciarelli [18], a quite effective heuristic for different versions of the job shop scheduling problem [12, 7, 4]. The AMCC heuristic S S chooses at each step the alternative pair ((i, j), (h, k)) ∈ A such that max{Lij,Lhk} is S S maximum over all unselected alternative pairs, and then selects (i, j) ∪ I(i, j) if Lij < Lhk or (h, k) ∪ I(h, k) otherwise. If the selection of arc (i, j) would cause a positive length cycle in the graph, then the arc (h, k) is selected. If also the selection of (h, k) would lead to a positive length cycle the algorithm terminates and returns the (acyclic but infeasible) partial selection. Observe that, as stand-alone heuristic, AMCC often fails in finding a feasible solution for large instances of both the BWS and BNS case. Hence, the use of a metaheuristic

8 AMCC Heuristic Input: Alternative graph G = (N,F,A) Initial Selection S begin while A 6= ∅ do Let G = (N,F ∪ S) S S S S Choose pair ((i, j), (h, k)) ∈ A such that max{Lij,Lhk} is maximum and Lij ≤ Lhk. Let S1 = S ∪ {(i, j)} ∪ I(i, j). if G(S1) is infeasible then let S2 = S ∪ {(h, k)} ∪ I(h, k). if G(S2) is infeasible then STOP, failed in finding a feasible solution. else Update S = S2 and remove from A all pairs (h, k) and I(h, k) belong to. else Update S = S1 and remove from A all pairs (i, j) and I(i, j) belong to. end end.

Figure 5: Sketch of the AMCC algorithm

scheme is particularly useful to achieve the feasibility of the solutions, besides improving their quality.

3.4 Acceptance Criterion Once a candidate solution is built, the algorithm decides whether to accept it as the new incumbent or to discard it and retain the previous incumbent. Among the acceptance criteria defined in the literature, in our experiments we assessed the following two:

• Random Walk (RW). When RW is adopted every feasible candidate solution gen- erated by the constructive phase is always accepted. If the construction phase does not terminate with a feasible solution then the IG maintains the previous incumbent solution.

like (SA). In the Simulated Annealing criterion [33, 32] a new feasible solution is always accepted if it improves the current best UB, i.e., 0 0 if Cmax(S ) ≤ UB. If Cmax(S ) > UB, then the candidate solution is accepted with 0 probability e[UB−Cmax(S )]/T where T is a parameter called the temperature. In our experiments we set T = 0.5.

3.5 Stopping Criterion Different stopping criteria can be devised, such as a time limit, a maximum number of iterations and so on. In our tests we set a maximum time limit of computation of 60 seconds for each run. To avoid stagnation and to improve the performance of the algorithm we run the IG for 10 independent runs and retain the best solution found.

9 4 Computational Results

We tested the performance of our algorithm on the 58 benchmark instances for the job shop scheduling problem by [6, 14, 2, 1], adapted to the BWS and BNS cases (for a total of 116 instances). The optimum for these instances is known only for the 18 BWS and 18 BNS instances with 10 jobs and 10 machines [18]. In a preliminary test phase, we tested 12 different parameters setting configurations, retaining the best solution found. The results obtained in this phase often improve the best known solution, as illustrated in Sections 4.1 and 4.2. From this preliminary test phase we selected the two configurations exhibiting the best performance:

• Destruction: In the destruction phase we set perturbation strength equals to 0.8.

• Construction: The chosen constructive greedy heuristic is the AMCC algorithm.

• Acceptance Criterion: The two best configurations differ for the acceptance cri- terion, which is Random Walk (RW) in one configuration and Simulated Annealing (SA) in the other.

• Stopping Criterion: As stopping criterion we use a time limit of computation equal to 10 minutes. After every 60 seconds the current run is interrupted and a new independent run is started.

We refer to these algorithms as IG.RW and IG.SA, respectively. The algorithm is imple- mented in C++, uses a single thread and runs on an 3.0 GHz Core Duo Intel processor equipped with 2 Gb of RAM.

4.1 Performance analysis on Blocking with Swap In this section, we compare our results with the best known solutions available in the literature. As a benchmark for the BWS case, we consider two tabu search algorithms [10, 9], a rollout algorithm [23], a complete local search with memory [37], simple heuristic techniques reported in [29, 16] and the recent algorithms presented in Oddi et al. [25]. The best performing algorithms described in these papers are the GPB tabu search algorithm [9], the IFS algorithm [25] and the CP-OPT constraint programming solver of IBM Ilog [25] which implements the approach described in [13]. In Table 1 we compare the results found by our IG against the best known solutions from the literature. The first two columns report the instance name and size (number of jobs × number of machines). The reference to the paper and the best known solution for each instance are shown in Column 3 and 4, respectively. Finally, in Column 5 we show the best result found by all the tested configurations of IG, highlighted in bold when some configuration of the IG improves over the best known solution. The overall CPU time required for each instance by the 12 configurations of IG to obtain the results in Table 1 is 7200 seconds on a 3.0 GHz processor. The CPU times required by the other best performing algorithms are as follows. GK’09 performs 5 in- dependent runs of 1800 seconds each on a 2.8GHz processor, for a total of 9000 seconds. IFS’12 requires two runs of 1800 seconds each. Since 16 configurations of IFS’12 are pre- sented in [25] and Table 1 shows the best result, the total computation time required by IFS’12 for one instance is 16 hours of computation. CP-OPT’12 performs a single run

10 of 1800 seconds. Both the IFS’12 and CP-OPT’12 run on a AMD Phenom II X4 Quad 3.5GHz. The 12 configurations of IG presented in this paper are able to attain or to improve the best solution known in the literature in 44 over 58 benchmark instances. Over the 40 instances for which a proven optimum is not known, IG finds a new best known in 19 cases. Among the other 18 instances for which the optimum is given in [18], IG achieves the optimum in 17 cases.

11 Instance |J| × |M| Reference Best known Best IG Instance |J| × |M| Reference Best known Best IG abz5 (10 × 10) BB - [18] 1468 1468 abz9 (20x15) GK - [10] 1166 1111 abz6 (10 × 10) BB - [18] 1145 1145 ft06 (6x6) GK - [10] 63 63 abz7 (20x15) GK - [10] 1224 1106 ft10 (10 × 10) BB - [18] 1068 1068 abz8 (20x15) GK - [10] 1226 1099 ft20 (20 × 5) GK - [10] 2047 1434 la01 (10 × 5) CP-OPT - IFS - [25] 793 793 la21 (15 × 10) IFS - [25] 1521 1490 la02 (10 × 5) IFS - [25] 793 793 la22 (15 × 10) CP-OPT - [25] 1379 1339 la03 (10 × 5) IFS - [25] 715 715 la23 (15 × 10) CP-OPT - [25] 1497 1445 la04 (10 × 5) IFS - [25] 743 743 la24 (15 × 10) IFS - [25] 1498 1434 la05 (10 × 5) CP-OPT - IFS - [25] 664 664 la25 (15 × 10) IFS - [25] 1424 1392 la06 (15 × 5) IFS - [25] 1064 1102 la26 (20 × 10) CP-OPT - [25] 2035 1989 la07 (15 × 5) IFS - [25] 1038 1020 la27 (20 × 10) IFS - [25] 2104 2017 la08 (15 × 5) IFS - [25] 1062 1071 la28 (20 × 10) IFS - [25] 2027 2039 la09 (15 × 5) IFS - [25] 1185 1162 la29 (20 × 10) CP-OPT - [25] 1898 1846 la10 (15 × 5) IFS - [25] 1110 1134 la30 (20 × 10) IFS - [25] 2095 2049

12 la11 (20 × 5) IFS - [25] 1466 1498 la31 (30 × 10) CP-OPT - [25] 2921 3018 la12 (20 × 5) IFS - [25] 1272 1271 la32 (30 × 10) CP-OPT - [25] 3237 3338 la13 (20 × 5) IFS - [25] 1465 1482 la33 (30 × 10) CP-OPT - [25] 2844 2909 la14 (20 × 5) CP-OPT - [25] 1506 1513 la34 (30 × 10) CP-OPT - [25] 2848 3016 la15 (20 × 5) IFS - [25] 1517 1517 la35 (30 × 10) CP-OPT - [25] 2923 3133 la16 (10 × 10) BB - [18] 1060 1060 la36 (15 × 15) IFS - [25] 1793 1755 la17 (10 × 10) BB - [18] 929 929 la37 (15 × 15) CP-OPT - [25] 1952 1870 la18 (10 × 10) BB - [18] 1025 1025 la38 (15 × 15) IFS - [25] 1708 1728 la19 (10 × 10) BB - [18] 1043 1043 la39 (15 × 15) IFS - [25] 1783 1731 la20 (10 × 10) BB - [18] 1060 1060 la40 (15 × 15) IFS - [25] 1777 1743 orb01 (10 × 10) BB - [18] 1175 1175 orb06 (10 × 10) BB - [18] 1199 1199 orb02 (10 × 10) BB - [18] 1041 1041 orb07 (10 × 10) BB - [18] 483 492 orb03 (10 × 10) BB - [18] 1160 1160 orb08 (10 × 10) BB - [18] 995 995 orb04 (10 × 10) BB - [18] 1146 1146 orb09 (10 × 10) BB - [18] 1039 1039 orb05 (10 × 10) BB - [18] 995 995 orb10 (10 × 10) BB - [18] 1146 1146 Table 1: Comparisons with the best known solutions for BWS Table 2 compares the results of the two best configurations of IG with the three best performing algorithms from the literature: GPB’11, IFS’12 and CP-OPT’12. We restrict the comparison to the 40 BWS instances of the Lawrence benchmark, the only instances for which a published result is available for all the three benchmark algorithms. Under IFS’12 we report the results of the best performing configuration among the 16 IFS variants presented in [25], namely the one using the slack-based procedure and with γ = 0.5. In Table 2, columns from 1 to 4 show the instance name, size, the value of the best known solution from Table 1 and the paper in which the solution has been pre- sented, respectively. Columns 5, 6 and 7 report the results obtained by GBP’11, IFS’12 and CP-OPT’12, respectively. Finally, Columns 8 and 9 report the results achieved by two Iterated Greedy configurations IG.RW and IG:SA. For each algorithm we present, in the last row of Table 2, the relative percentage error over the best known solutions (error = 100 ∗ (found − best)/best) from the literature. The computation times of the algorithms are as follows: GPB’11 uses 5 independent runs of 1800 seconds each on a 3.0GHz processor. IFS’12 requires two runs of 1800 seconds each on a 3.5GHz processor. CP-OPT’12 performs a single run of 1800 seconds on a 3.5GHz processor. Finally, the computation time of the IG.RW and IG.SA is 600 seconds for both algorithms, obtained with 10 independent runs of 60 seconds each on a 3.0 GHz processor. From Table 2, it turns out that both IG.RW and IG.SA outperform the other algo- rithms in terms of solution quality and computation time. In fact, both the computation time of IG.RW and its average distance from the best known is one third of the best per- forming algorithm from the literature (CP-OPT’12), i.e., 600 against 1800 seconds and 1.25% against 3.84%, respectively. Moreover, the two IGs are able to improve the best known solution in 11 out of 40 benchmark instances (the values are shown in bold in the table).

4.2 Performace analysis on Blocking No Swap In this section we focus on the BNS case. As in the previous section, we first compare the overall performance of the 12 configurations of IG with the current state-of-the-art. We next compare the two best performing configurations against the best algorithm for JSP with blocking and no swaps. To the best of our knowledge, besides the exact approach in [18] referred to as BB, the only available heuristic results on JSP in the BNS case are a tabu search algorithm by Mati and Xie [21] referred to as MX’11, a rollout algorithm [23] and simple heuristic techniques [29]. Among these approaches the tabu search of Mati and Xie (MX’11) is the best performing algorithm. Thus we omit the other approaches in the comparison.

13 Instance |J| × |M| Best Known Reference GPB CP-OPT IFS IG.RW IG.SA la01 (10 × 5) 793 CP-OPT - IFS [25] 820 793 793 793 793 la02 (10 × 5) 793 IFS - [25] 817 815 793 793 793 la03 (10 × 5) 715 IFS - [25] 740 790 740 715 715 la04 (10 × 5) 743 IFS - [25] 764 784 776 743 743 la05 (10 × 5) 664 CP-OPT - IFS - [25] 666 664 664 664 664 la06 (15 × 5) 1064 IFS - [25] 1180 1131 1112 1102 1120 la07 (15 × 5) 1038 IFS - [25] 1084 1106 1081 1062 1040 la08 (15 × 5) 1062 IFS - [25] 1125 1129 1135 1089 1093 la09 (15 × 5) 1185 IFS - [25] 1223 1267 1257 1192 1192 la10 (15 × 5) 1110 IFS - [25] 1203 1168 1158 1140 1151 la11 (20 × 5) 1466 IFS - [25] 1584 1520 1501 1550 1529 la12 (20 × 5) 1272 IFS - [25] 1391 1308 1321 1342 1332 la13 (20 × 5) 1465 IFS - [25] 1541 1528 1471 1531 1523 la14 (20 × 5) 1506 CP-OPT - [25] 1620 1506 1567 1538 1545 la15 (20 × 5) 1517 IFS - [25] 1630 1571 1547 1593 1575 la16 (10 × 10) 1060 BB - [18] 1142 1150 1086 1060 1060 la17 (10 × 10) 929 BB - [18] 977 996 1000 930 930 la18 (10 × 10) 1025 BB - [18] 1078 1135 1120 1040 1061 la19 (10 × 10) 1043 BB - [18] 1093 1108 1077 1043 1068 la20 (10 × 10) 1060 BB - [18] 1154 1119 1166 1080 1080 la21 (15 × 10) 1521 IFS - [25] 1545 1579 1521 1514 1490 la22 (15 × 10) 1379 CP-OPT - [25] 1458 1379 1490 1368 1390 la23 (15 × 10) 1497 CP-OPT - [25] 1570 1497 1538 1445 1473 la24 (15 × 10) 1498 IFS - [25] 1546 1523 1498 1434 1498 la25 (15 × 10) 1424 IFS - [25] 1499 1561 1424 1422 1473 la26 (20 × 10) 2035 CP-OPT - [25] 2125 2035 2179 2013 2012 la27 (20 × 10) 2104 IFS - [25] 2175 2155 2172 2044 2017 la28 (20 × 10) 2027 IFS - [25] 2071 2062 2132 2039 2155 la29 (20 × 10) 1898 CP-OPT - [25] 1990 1898 1963 1928 1860 la30 (20 × 10) 2095 IFS - [25] 2097 2147 2125 2137 2085 la31 (30 × 10) 2921 CP-OPT - [25] 3137 2921 3771 3095 3115 la32 (30 × 10) 3237 CP-OPT - [25] 3316 3237 3852 3415 3420 la33 (30 × 10) 2844 CP-OPT - [25] 3061 2844 3741 2970 2958 la34 (30 × 10) 2848 CP-OPT - [25] 3146 2848 3796 3016 3057 la35 (30 × 10) 2923 CP-OPT - [25] 3171 2923 3818 3193 3169 la36 (15 × 15) 1793 IFS - [25] 1919 1952 1891 1755 1764 la37 (15 × 15) 1952 CP-OPT - [25] 2029 1952 1983 1870 1884 la38 (15 × 15) 1708 IFS - [25] 1828 1880 1708 1728 1720 la39 (15 × 15) 1783 IFS - [25] 1882 1813 1848 1731 1752 la40 (15 × 15) 1777 IFS - [25] 1925 1928 1831 1743 1771 error (%) 0.00 5.48 3.84 6.69 1.25 1.62 Table 2: Comparisons with the best performing algorithms for BWS on Lawrence in- stances.

14 Instance |J| × |M| Reference Best known Best IG Instance |J| × |M| Reference Best known Best IG abz5 (10 × 10) BB - [18] 1641 1641 abz6 (10 × 10) BB - [18] 1249 1249 ft10 (10 × 10) BB - [18] 1158 1158 la01 (10 × 5) MX - [21] 881 881 la21 (15 × 10) MX - [21] 1700 1627 la02 (10 × 5) MX - [21] 900 900 la22 (15 × 10) MX - [21] 1519 1426 la03 (10 × 5) MX - [21] 808 808 la23 (15 × 10) MX - [21] 1731 1574 la04 (10 × 5) MX - [21] 862 859 la24 (15 × 10) MX - [21] 1633 1502 la05 (10 × 5) MX - [21] 742 732 la25 (15 × 10) MX - [21] 1655 1533 la06 (15 × 5) MX - [21] 1243 1225 la26 (20 × 10) MX - [21] 2310 2146 la07 (15 × 5) MX - [21] 1194 1133 la27 (20 × 10) MX - [21] 2362 2191 la08 (15 × 5) MX - [21] 1216 1219 la28 (20 × 10) MX - [21] 2291 2245 la09 (15 × 5) MX - [21] 1349 1311 la29 (20 × 10) MX - [21] 2184 2030 la10 (15 × 5) MX - [21] 1270 1237 la30 (20 × 10) MX - [21] 2312 2242 la11 (20 × 5) MX - [21] 1725 1641 la31 (30 × 10) MX - [21] 3403 3219

15 la12 (20 × 5) MX - [21] 1479 1465 la32 (30 × 10) MX - [21] 3701 3567 la13 (20 × 5) MX - [21] 1683 1627 la33 (30 × 10) MX - [21] 3363 3201 la14 (20 × 5) MX - [21] 1745 1686 la34 (30 × 10) MX - [21] 3380 3202 la15 (20 × 5) MX - [21] 1749 1680 la35 (30 × 10) MX - [21] 3373 3494 la16 (10 × 10) BB - [18] 1148 1148 la36 (15 × 15) MX - [21] 2026 1835 la17 (10 × 10) BB - [18] 968 968 la37 (15 × 15) MX - [21] 2177 1931 la18 (10 × 10) BB - [18] 1077 1077 la38 (15 × 15) MX - [21] 1968 1813 la19 (10 × 10) BB - [18] 1102 1102 la39 (15 × 15) MX - [21] 1992 1811 la20 (10 × 10) BB - [18] 1118 1118 la40 (15 × 15) MX - [21] 1958 1815 orb01 (10 × 10) BB - [18] 1256 1256 orb06 (10 × 10) BB - [18] 1266 1275 orb02 (10 × 10) BB - [18] 1144 1149 orb07 (10 × 10) BB - [18] 527 527 orb03 (10 × 10) BB - [18] 1311 1311 orb08 (10 × 10) BB - [18] 1139 1139 orb04 (10 × 10) BB - [18] 1246 1246 orb09 (10 × 10) BB - [18] 1130 1130 orb05 (10 × 10) BB - [18] 1203 1203 orb10 (10 × 10) BB - [18] 1367 1367 Table 3: Comparisons with the best known solutions for BNS In Table 3 we show the current state-of-the-art performance on BNS instances of JSP. The instance name and its size are reported in the first two columns. The best known solution from the literature is shown in Column 3, while Column 4 shows the paper reporting first the best solution. Finally, in Column 5 (Best IG) we report the best solution found by the 12 IG configurations. In bold are highlighted the new best values. The proposed IG configurations are able to attain or to improve the best known solution in all but 3 instances. For the 40 instances for which a proven optimum is not known, IG finds a new best known solution in 29 cases. Moreover, for the 18 known optima, IG attains the optimum in 16 cases. Regarding the CPU times, the algorithm MX’11 described in [21] requires a shorter CPU time since the results are obtained after 2000 seconds on a 2.8GHz processor, while the 12 IG configurations require in total 2 hours on a 3GHz processor. In Table 4 we compare the performance obtained by the two best configurations of IG, namely IG.RW and IG.SA, against that of MX’11 over the 40 BNS instances of the Lawrence benchmark. Columns 1 and 2 show the instance name and size, respectively. The best known solutions are shown in Column 3. Except for the 5 instances with 10 jobs and 10 machines for which a proven optimum is known [18], the best known is given by MX’11. In columns 4, 5 and 6 we report the results for MX’11, IG.RW and IG.SA. For each algorithm, the last row of Table 4 report the relative percentage error (error = 100 ∗ (found − best)/best) over the best known solution from the literature. A negative value corresponds to a performance improving on average the best known solutions. The computation times of the algorithms are as follows: MX’11 performs 10 independent runs of 200 seconds on a 2.8GHz processor, for a total of 2000 seconds, while the IG is the best over 10 independent runs of 60 seconds on a 3.0 GHz processor, for a total of 600 seconds. The results show that IG clearly outperforms MX’11 both in terms of computation time and quality of the solutions. In particular, the two IG algorithms improve the best known solutions 28 times out of the 35 instances for which the proven optimum is not known. The best average results are attained by the IG.SA (-2.25% on average).

5 Conclusions

In this paper we developed an Iterated Greedy metaheuristic to solve the job shop schedul- ing problem with blocking constraints, in the two variants with and without swaps. The main advantages of the iterated greedy algorithm are the ease of implementation and the independence of the framework from specific properties of the problem addressed. Even if the proposed approach is conceptually very simple and easy to implement, the performance obtained clearly outperforms all the previously published algorithms from the literature. A new best known solution has been found for 20 BWS instances and for 29 BNS instances. It is also important to notice that the Iterated Greedy has a broad applicability since it can be easily applied to any complex scheduling problem modeled by means of the alternative graph formulation. Future research directions should address the study of local search based approaches for the blocking job shop scheduling problem and the adaptation of the IG algorithms to real world applications with more complex constraints.

16 Instance |J| × |M| Best Known Reference MX IG.RW IG.SA la01 (10 × 5) 881 MX - [21] 881 919 881 la02 (10 × 5) 900 MX - [21] 900 906 900 la03 (10 × 5) 808 MX - [21] 808 808 808 la04 (10 × 5) 862 MX - [21] 862 859 859 la05 (10 × 5) 742 MX - [21] 742 732 732 la06 (15 × 5) 1243 MX - [21] 1243 1247 1257 la07 (15 × 5) 1194 MX - [21] 1194 1173 1143 la08 (15 × 5) 1216 MX - [21] 1216 1224 1213 la09 (15 × 5) 1349 MX - [21] 1349 1311 1341 la10 (15 × 5) 1270 MX - [21] 1270 1237 1277 la11 (20 × 5) 1725 MX - [21] 1725 1683 1684 la12 (20 × 5) 1479 MX - [21] 1479 1525 1524 la13 (20 × 5) 1683 MX - [21] 1683 1695 1642 la14 (20 × 5) 1745 MX - [21] 1745 1701 1686 la15 (20 × 5) 1749 MX - [21] 1749 1728 1682 la16 (10 × 10) 1148 BB - [18] 1205 1148 1186 la17 (10 × 10) 968 BB - [18] 1020 968 979 la18 (10 × 10) 1077 BB - [18] 1156 1077 1099 la19 (10 × 10) 1102 BB - [18] 1191 1124 1124 la20 (10 × 10) 1118 BB - [18] 1204 1164 1164 la21 (15 × 10) 1700 MX - [21] 1700 1653 1627 la22 (15 × 10) 1519 MX - [21] 1519 1435 1435 la23 (15 × 10) 1731 MX - [21] 1731 1574 1628 la24 (15 × 10) 1633 MX - [21] 1633 1584 1530 la25 (15 × 10) 1655 MX - [21] 1655 1558 1569 la26 (20 × 10) 2310 MX - [21] 2310 2159 2164 la27 (20 × 10) 2362 MX - [21] 2362 2211 2191 la28 (20 × 10) 2291 MX - [21] 2291 2280 2319 la29 (20 × 10) 2184 MX - [21] 2184 2074 2054 la30 (20 × 10) 2312 MX - [21] 2312 2263 2342 la31 (30 × 10) 3403 MX - [21] 3403 3482 3405 la32 (30 × 10) 3701 MX - [21] 3701 3649 3576 la33 (30 × 10) 3363 MX - [21] 3363 3326 3255 la34 (30 × 10) 3380 MX - [21] 3380 3306 3352 la35 (30 × 10) 3373 MX - [21] 3373 3582 3522 la36 (15 × 15) 2026 MX - [21] 2026 1835 1894 la37 (15 × 15) 2177 MX - [21] 2177 1974 1931 la38 (15 × 15) 1968 MX - [21] 1968 1813 1831 la39 (15 × 15) 1992 MX - [21] 1992 1820 1811 la40 (15 × 15) 1958 MX - [21] 1958 1818 1815 error (%) 0.00 0.84 -2.11 -2.25 Table 4: Comparisons with the best performing algorithms for BNS on Lawrence in- stances.

17 References

[1] J. Adams, E. Balas, and D. Zawack. The shifting bottleneck procedure for job shop scheduling. Management Science, 34(3):391-401, 1988.

[2] D. Applegate, W. Cook. A computational study of the job shop scheduling problem. ORSA Journal on Computing, 3(2):149-156, 1991.

[3] A. Cesta, A. Oddi, and S.F. Smith. Iterative flattening: A scalable method for solving multi-capacity scheduling problems. In Proceedings of the National Conference on Artificial Intelligence, 742–747, 2000.

[4] A. D’Ariano, D. Pacciarelli, and M. Pranzo. A branch and bound algorithm for scheduling trains in a railway network. European Journal of Operational Research, 183(2):643–657, 2007.

[5] A. D’Ariano, P. D’Urgolo, D. Pacciarelli, and M. Pranzo. Optimal sequencing of aircrafts take-off and landing at a busy airport. In Proceedings of the 13th IEEE Conference on Intelligent Transportation Systems, 1569–1574, 2010.

[6] H. Fisher, and G.L. Thompson. Probabilistic Learning Combinations of Local Job- Shop Scheduling Rules. In J.F. Muth and G.L. Thompson (eds.) Industrial Schedul- ing, New Jersey: Prentice-Hall, Englewood Cliffs, 1963.

[7] T. Gabel and M. Riedmiller. On a Successful Application of Multi-Agent Rein- forcement Learning to Operations Research Benchmarks. In Proceedings of the 2007 IEEE Symposium on Approximate and Reinforcement Learn- ing (ADPRL 2007), 68–75, 2007.

[8] J. Grabowski and J. Pempera. Sequencing of jobs in some production system. Eu- ropean Journal of Operational Research, 125:535–550, 2000.

[9] H. Gr¨oflin,Pham D.N., and R. B¨urgy. The flexible blocking job shop with transfer and set-up times. Journal of Combinatorial Optimization, 22(2):121–144, 2011.

[10] H. Gr¨oflinand A. Klinkert. A new neighborhood and tabu search for the blocking job shop. Discrete Applied Mathematics, 157(17):3643–3655, 2009.

[11] N.G. Hall and C. Sriskandarajah. A survey of machine scheduling problems with blocking and no-wait in process. Operations Research, 44:510–525, 1996.

[12] P. Laborie. Algorithms for propagating resource constraints in AI planning and scheduling: Existing approaches and new results. Artificial Intelligence, 143:151– 188, 2003.

[13] P. Laborie and D. Godard. Self-adapting large neighborhood search: Application to single-mode scheduling problems. In Proceedings MISTA-07, 276–284, 2007.

[14] S. Lawrence. Supplement to resource constrained project scheduling: an experimental investigation of heuristic scheduling techniques. GSIA, Carnagie Mellon University, Pittsburg, PA, 1984.

18 [15] E. Levner, V.B. Kats, and V.E. Levit. An improved algorithm for a cyclic robotic scheduling problem. European Journal of Operational Research, 97:500–508, 1997.

[16] S.Q. Liu and E. Kozan. Scheduling trains with priorities: a no-wait blocking parallel- machine job-shop scheduling model. Transportation Science, 45(2):175–198, 2011.

[17] E. Marchiori and A. Steenbeek. An for large set covering problems with applications to airline crew scheduling. In Real-World Applications of Evolutionary Computing, EvoWorkshops 2000, volume 1803 of Lecture Notes in Computer Science, 367–381, 2000.

[18] A. Mascis and D. Pacciarelli. Job-shop scheduling with blocking and no-wait con- straints. European Journal of Operational Research, 143(3):498–517, 2002.

[19] Y. Mati, N. Rezg, and X.L. Xie. Geometric approach and taboo search for scheduling flexible manufacturing systems. IEEE Transactions On Robotics and Automation, 17(6):805–818, 2001.

[20] Y. Mati, N. Rezg, and X.L. Xie. A taboo search approach for deadlock-free scheduling of automated manufacturing systems. Journal of Intelligent Manufacturing, 12(5- 6):535–552, 2001.

[21] Y. Mati and X. Xie. Multiresource shop scheduling with resource flexibility and blocking. IEEE Transactions On Automation Science and Engineering, 8(1):175– 189, 2011.

[22] P.J.M. Meersmans. Optimization of container handling systems. Ph.D. Thesis, Eras- mus University Rotterdam, 2002.

[23] C. Meloni, D. Pacciarelli, and M. Pranzo. A rollout metaheuristic for job shop scheduling problems. Annals of Operations Research, 131(1-4):215–235, 2004.

[24] A. Misevicius. Genetic algorithm hybridized with ruin and recreate procedure: appli- cation to the quadratic assignment problem. Knowledge-Based Systems, 16(5-6):261– 268, 2003.

[25] A. Oddi, R. Rasconi, A. Cesta, and S.F. Smith. Iterative improvement algorithms for the blocking job shop. In Twenty-Second International Conference on Automated Planning and Scheduling, 2012.

[26] D. Pacciarelli. Alternative graph formulation for solving complex factory-scheduling problems. International Journal of Production Research, 40(15):3641-3653, 2004.

[27] D. Pacciarelli and M. Pranzo. Production scheduling in a steelmaking-continuous casting plant. Computers & Chemical Engineering, 28(12):2823–2835, 2004.

[28] D.-N. Pham, and A. Klinkert. Surgical case scheduling as a generalized job shop scheduling problem. European Journal of Operational Research, 185(3):1011–1025, 2008.

19 [29] M. Pranzo, C. Meloni, and D. Pacciarelli. A new class of greedy heuristics for job shop scheduling problems. Experimental and Efficienct Algorithms, Proceedings, 2647:223–236, 2003.

[30] I. Ribas, R. Companys, and X. Tort-Martorell. An iterated greedy algorithm for the flowshop scheduling problem with blocking. Omega-International Journal of Management Science, 39(3):293–301, 2011.

[31] S. Ropke and D. Pisinger. An adaptive large neighborhood search heuristic for the pickup and delivery problem with time windows. Transportation Science, 40(4):455– 472, 2006.

[32] S. Ropke and D. Pisinger. A unified heuristic for a large class of vehicle routing problems with backhauls. European Journal of Operational Research, 171(3):750– 775, 2006.

[33] R. Ruiz and T. St¨utzle.A simple and effective iterated greedy algorithm for the per- mutation flowshop scheduling problem. European Journal of Operational Research, 177(3):2033–2049, 2007.

[34] R. Ruiz and T. St¨utzle.An iterated greedy heuristic for the sequence dependent setup times flowshop problem with makespan and weighted tardiness objectives. European Journal of Operational Research, 187(3):1143–1159, 2008.

[35] G. Schrimpf, J. Schneider, H. Stamm-Wilbrandt, and G. Dueck. Record breaking optimization results using the ruin and recreate principle. Journal of Computational Physics, 159(2):139–171, 2000.

[36] P. Shaw. A new local search algorithm providing high quality solutions to vehicle routing problems. Departement of Computer Sciences, University of Strathclyde, Glasgow, Scotland, Tech. Rep, APES group, 1997.

[37] J. Zhu and X.P. Li. An efficient metaheuristic for the blocking job shop problem with the makespan minimization. In 2011 International IEEE Conference on Machine Learning and Cybernetics, (ICMLC) 3:1352–1357, 2011.

20