An effective iterated greedy algorithm for blocking hybrid flow shop problem with due date window

In manufacturing, time interval is more practical as a due date than specific

points in time. In this paper, we investigate the hybrid flow shop scheduling

problem with a blocking constraint. This variant, which is seldom studied, is

not considered when the objective is the minimization of the total weighted

earliness tardiness from the due window. Since the studied problem is NPhard,

we present a new heuristic method based on an iterated greedy algorithm.

We present a computational campaign, including the re-implementation and

comparison of four competing procedures. In order to prove the robustness

of our method, we evaluated it using a new benchmark of more than 1000

instances. In fact, the experimental results revealed the efficiency of the

proposed algorithm in terms of time requirements and solution quality

which is the high level service. Nowadays, industry needs to minimize inventory levels and avoid overstocking. On the other hand, it need to increase the customer's satisfaction by meeting their job due dates, which can increase the market share and avert the customer's loss. This objective can be summarised by the minimization of the sum of weighted earliness and tardiness TWET. Therefore, this paper deals with the BHFS with TWET minimization. According to Hall and Sriskandarajah [10], manufacturing technology itself could be a reason for the incidence of a blocking production system. The blocking restriction means that a waiting job does not quit the system until one free machine is accessible in the next stage. In this paper, we are interested to the release when starting blocking (RSb) between all stages i.e. a machine stays blocked by a job until this job begins in the next stage. Therefore, this job remains blocked on the machine as long as there is no machine free in the next stage. This blocking mode is used in several scheduling problems by some researchers, such as Yuan et al. [35], Zhang et al. [37]. However, a few study in the literature introduced the TWET objective function. Nearly 1% of the scheduling problems reviewed by Ruiz and Vázquez-Rodríguez [30]. In fact, HFS has a high level of practicality, that's why this is why it has increased an importance among scheduling problem. Many definitions are introduced for the HFS problem. Simply, it consists of a multistage flow shop, where at least there is a stage contain more than one machine. We have to recall that every machine can process one job at a time. Following the Graham et al. [9] norm three-field notation, the m -machines BHFS with due date window release dates of jobs where the objective function is the minimization of TWET, which can be denoted as: ((PM(i))mi = 1)||RSb||TWET dw . If the research studies carried out until now have proven that BHFS with more than two machines is strongly NP-hard when the makespan is considered as measure of performance, it can be obviously inferred that the considered problem cannot optimally be solved in O(n log n). The HFS problem is a mixture of parallel machines and flow-shop problems.The goal is to get the best order for a set of jobs j = 1, . . . , n in order to optimize the objective function. This article is structured as follows; in Section 2, we present a literature review then, in Section 3, we introduce the studied scheduling problem, and in Section 4, we describe the proposed algorithm in detail, then, in Section 5, analyze and discuss the obtained results. Finally, conclusions and suggestions for future work are given in Section 6.

Literature review
The HFS is a broadly studied optimization problem, which represents several industrial applications. In this context, Ruiz and Vázquez-Rodríguez [30] carried out a review on the HFS problem in which they classify the HFS based on the resolution methods and the objective function. In that paper several several variants of HFS are discussed . For their part, Moccellin et al. [17] tackled a different variant of HFS while considering simultaneous blocking constraint and setup time aiming to minimise the makespan. To solve this problem a constructive heuristic algorithm centered on the rules of priority was developed. Zhang et al. [37] also considered a particular version of the HFS-derived vehicle scheduling issue with a specific form of blocking constraints. In order to minimize the makespan, the authors used a new heuristic approach to solve the problem. In Ribas et al. [27], authors introduced an efficient iterated greedy algorithm to tackle the flowshop scheduling problem with blocking constraint aiming to minimize makespan. Therefore, this paper provides evidence of the robustness of the iterated method with scheduling problem. Newton et al. [19] addressed the flow shop scheduling problem simultaneously with setup times and blocking constraint, in that paper, the calculation of the makespan is performed using an improved acceleration method and a constraint-guided local search. For their part, Rashidi et al. [26] investigated the HFS with unrelated machines and processor blocking while considering the C max and T max as an objective function, to develop a hybrid genetic algorithm to tackle this multi-objective problem. Pan et al. [22], proposed four efficient methods based on local search and iterated greedy to tackle the HFS with due date window, comparing with the results of 13 well selected method in the literature of scheduling problem, the proposed method shows a great results. Lebbar et al. [15] studied the flow shop scheduling problem with simultaneously blocking constraint and release dates. To optimally solve this problem, two improved evolutionary algorithms are proposed to minimize the weighted sum of the makespan and the maximum tardiness. Grabowski and Pempera [8] studied the HFS simultaneously with RSb and no-wait constraint. To minimize the makespan, authors applied the tabu-search procedure. In this context, Sawik [32] focused on the classical blocking constraint called release when started blocking (RSb) and proposed a heuristic for multi-stage flow shop problem without storage capacity for the resolution of a mixed integer programming is introduced. Khare and Agrawal [14] studied the HFS with sequence depend setup times, in this work, authors proposed three methods based on metaphors: whale optimization algorithm (OBWOA), hybrid squirrel search algorithm (HSSA) and discrete grey wolf optimization (DGWO) to minimize the TWET. Alfaro-Fernández et al. [1] considered the HFS problem with due window where the objective is the minimization of TWET. An auto-designed algorithm (ADA) based on iterated greedy is used for the resolution. In the work of Jing et al. [12], an effective IG is developed to tackle the distributed flowshop and TWET minimization. Recently, Aqil and Allali [2] proposed two method inspired from nature to investigate the HFS with blocking constraint and setup times to minimize the sum of earliness and tardiness Trabelsi et al. [34] investigated the HFS scheduling problem with mixed blocking constraint, in this problem, each time only one kind of the studied constraint (RSb and RCb) is considered between stages. Genetic algorithm is used to solve the problem.
For their part, Zeng and Yang [36] proposed a new mixed integer linear program (MILP) and two metaheuristics to study the HFS with a limited storage. To solve this problem, two assignment rules are used, which are the first available machine (FAM) and the last free machine (LFM). The result showed that the second rule is more efficient. To the best of our knowledge, no research has studied the HFS with (RSb) constraint and TWET penalties simultaneously.

Problem description
Let g be the number of stages and m the number of parallel identical machines per stage. We have to mention that there are n jobs to be scheduled without interruption. At time zero, all these jobs are available. Every one of them will be processed by one machine in each stage. More precisely, each job visits the first stage, then the next stage and so on . . . until stage g. We have to mention that we have a limited storage between stages. This is denotes that a machine cannot release the current job and remains blocked until the availability of a machine in the next stage. When Jobs are allocated to machines according to the LFM rule, every job is assigned to the last machine that becomes free i.e. the machine with the smallest idle time among all available machines. given that our scheduling problem has no intermediate storage, the jobs the handling operations of which finish earlier will be immediately moved to the next stage.

Assumptions
Briefly we present the following assumptions for the problem: -RSb is considered between all stages. -The value of n, g and m is known. -The processing time of jobs, the due date window, and the corresponding penalty of both tardiness and earliness are known. -The last free machine is considered as an assignment rule in order to minimize the idle time.
-When a job starts, before it progresses to the next level, it must be thoroughly processed.
-Each job must be processed on one machine at each stage.
-Release dates at the first stage are zero for all jobs. -Machine breakdown is not considered.

Illustrative example
Considering an illustrative example of five jobs, two stages and two machines per stage, the processing time, the due date and earliness tardiness weight are presented in Table 1.   Figure 1 shows the Gant chart of the permutation Seq (1, 2, 3, 4, 5). In Figure 1 the blocking time appears in black as it is a non productive time represents the limit buffer constraint. The completion times of jobs are respectively (7,8,11,10,13) so j4 is early while j2 and j3 are tardy jobs. As a result:

Proposed iterated greedy procedures
Iterated greedy (IG) method was first used by Ruiz and Stützle [29] to tackle the flow shop scheduling problem when the makespan was considered as an objective function. In fact, IG has proven great effectiveness with flow shop and scheduling problems in general. Unrelated parallel system scheduling problems were discussed in Fanjul-Peyro and Ruiz [6]. Moreover, a regular flow shop with blocking constraints was approached by Ribas et al. [27] using the same method. Also, the blocking job shop scheduling problem (BJSS) was tackled by Pranzo and Pacciarelli [25] using the IG method. On the other hand, the distributed flow shop scheduling problem has been recently solved by Ruiz et al. [31] by the IG method. Other objective apart from the total completion time like the total tardiness were considered by Ribas et al. [28] for the blocking flowshop problem. In this work also the IG was used for the resolution. In view of all these previous achievements, applying IG to the BHFS-DDW seems promising. Despite its simplicity, IG has given competitive results with many tested scheduling settings. As most metaheuristics, IG has some parameters that must be calibrated to achieve a high performance. Besides, it does not need specific knowledge of the studied problem. We will refer to the proposed IG as HIGT.
As for most iterated metaheuristics, the IG begins with an initial solution. After that, we have to apply four steps. This initial solution is followed by the local search. The obtained solution is considered to start the method process. In fact, the first step is the deconstruction phase from which a prefixed number of jobs (random jobs) are removed. In the second step, which is called the construction step, the removed jobs are reinserted into the solution following the greedy heuristic. The third step is the local search in which the solution can be improved. Finally, in the last step, the method will decide to consider or not the incumbent solution. This 4th operator is the acceptance criterion. For the initial solution, we have selected a quick and logical heuristics while taking into account some characteristics of our problem where the objective function which deals with earliness-tardiness uses two heuristics. In the first one, jobs are sorted in an increasing order according to their due dates. This dispatching rule is well known as the earliest due date (EDD) gives a permutation of jobs according: π = {π 1 , π 2 , . . . , π n } where R + π (j) < R + π (j+1) , j = 1, . . . , n − 1 and π (j) indicate the job occupying the jth location in the sequence.
Then, the second heuristic tries to consider the difference between the the sum of the processing time for each job j and R + . After calculating this amount, jobs are sorted according to the following rule Where π (j) specifies the work which in the permutation occupies the jth position. This rule, which has been recently considered by Pan et al. [22] is defined as the overall slack time (OSL). These two heuristics are very quick, needs just O(n log(n)) steps and able to produce a high solution. After calculating the two given permutations, we keep the best one as an initial solution for our method.

Local search
In this method, the local search is applied in two ways. The first one is just after initialization and the second one is inside the main loop of the IG. The objective here is to improve the solution by the use of two neighbourhoods, which are the insertion and the interchange both of which are explored inside a variable neighbourhood descent (VND), which is a basic variant of the variable neighbourhood search (VNS). As depicted in the VND Algorithm 1, it starts from an initial solution to explore one among the neighbourhood structures. Starting with the insertion, we randomly select a job and reinsert it in another random position. If the solution is improved, the procedures will be repeated, otherwise, the VND procedure moves to the next neighbourhood structure, which is the interchange. The VND with the insertion and interchange as neighborhood structure was used to solve several scheduling problems such as: Pan et al. [22], Zhang et al. [37]. This operator has as parameter the maximum number of iteration. This parameter needs to be calibrated. if Ncounter = 1 then π = Insertion movement(π) 6 if Ncounter = 2 then π = Interchange movement(π) 7 if TWET dw (π ) < TWET dw (π) then

Destruction reconstruction
In the IG algorithm, there are two fundamental procedures, which are the destruction and the construction. The first phase is based on the original work of Ruiz and Stützle [29], which starts by randomly extracting d jobs from the partial solution of Seq1 and putting them in a new sub-sequence Seq2 of d jobs, knowing that parameter d has to be calibrated later. Once the d jobs are removed, the next step consists in the reconstruction phase in the original way of this operator used in Ruiz and Stützle [29]. All removed jobs are reinserted one by one in all possible positions of the partial solution Seq1 to form a new complete sequence. At each insertion, there is an evaluation of the sequence in order to select the best position for every job. Let's us consider that we have a sequence of 50 jobs and we have to remove 4 jobs as a parameter d. Here, we have n − d + 1 possible insertion and therefore an evaluation for each job, means that the number is equal to 47 * 4 = 188. However, this looks a very complicated and expensive step especially when we deal with large instances. In general, this can be the most disadvantage of the iterated greedy method. Therefore, we have proposed in this work a new reconstruction process that works as follows: once the d jobs are removed from the partial sequence, the reconstruction phase starts according to a new insertion rule that's deals 8 will all removed jobs. Then, we insert a job into the first possible insertion position P i where i = 0 and test the temporary solution (TempFit). If there is an improvement, we move to the next possible insertion position i + K (here, the increment factor K = 1), however, if there is a deterioration of the temporary fitness, we try to change the research space and move to insert our job into another locality of the sequence. Indeed, this skipping is simply the increase of the increment factor K++. Therefore, once we have an improvement of the Temp Fit, we return to the normal loop of insertion position by putting K = 1 again. This operation is repeated until the assignment of all Seq2 job list. In this way, there is no need to insert the selected jobs in all possible positions in order to avoid a very high amount of calculations, especially with large instances. Algorithm 2 presents the pseudo-code of this second phase. In this operator, we have two parameters that have to be calibrated, such as the destruction size d and the threshold of no-improvement S.

Example of the destruction reconstruction
The initial job sequence: (1) We start by the job 0.
We insert the job 0 in the first position pos then we have Seq1:  We consider that we have not an improvement then: no-imp = 1. We insert the job in the next position pos + K: We consider that we haven't an improvement so no-imp = 2; Here we have no-imp equal to the threshold 2 then, we increase the increment factor K (K++) We move to insert our job (job 0) in the position pos + K: Now, we consider that we have an improvement then We update bestFit. K = 1 no-imp = 0 and we move to insert the job in the next possible position pos + K: 1 2 4 5 6 0 7 9 Seq1 We will always respect that we have n − d + 1 possible position, then continue in the same way for all jobs of Seq2.

Acceptance criterion
At each loop, three phases, destruction, reconstruction and VND, are carried out, which could give a new solution different from the incumbent one. In fact, the new schedule might be worse or better than the initial solution. Accepting only better solution in any algorithm leads to local optimum, which might be an obstacle for convergence. In the initial work of Ruiz and Stützle [29], a simple simulated annealing acceptance criterion with invariable temperature T is applied; where T is a parameter that needs to be calibrated. Most IG in scheduling problems have considered this acceptance criterion such as Ruiz and Stützle [29], Ruiz et al. [31] and Tasgetiren et al. [33]. The common point in all these works is that T is not statically significant in calibration tests. In this work, the tournament selection is proposed as an acceptance criterion, which is a simple acceptance criterion used with genetic algorithm methods to solve different scheduling problems, such as Lei [16] and Pezzella et al. [23]. This approach is a based list method, therefore at each iteration, the resolution method gave a new solution, in this case, two possibilities are probable, the first one is where the new solution improves the results, here we talk about a new best sequence. We take it as a new incumbent solution and we move to the next iteration. Therefore, this is not always the case and, in some iteration, the worst solution is obtained. In this case, the acceptance criterion has to decide which sequence should be considered as the incumbent solution. The basic principle of tournament selection is simple. In a dynamic list R, we insert all sequence that doesn't improve the results known that the maximum size of this list the number of iterations. At each time, a T s random individuals are selected from the list to participate in a tournament and the winner will be considered as a new incumbent solution. In the literature, the tournament selection needs a calibration step in order to choose the best tournament size T s. The pseudo-code of tournament selection operator is given in Algorithm 3.

Computational evaluation and statistical experimentation
This section demonstrates in detail the used benchmark and the competing methods that have been adapted and re-implemented as well as all their calibrated parameters. Moreover, the proposed iterated greedy tournament (IGT) is calibrated in order to choose the most suitable parameter.

Benchmark, competing methods and experimental setting
The studied problem (BHFS-DDW) has never been considered in the literature. Therefore, we tried to generate a new Benchmark of small and large instances. In this way, many parameters need to be controlled. Firstly, as in all HFS problems, we need a number of jobs n a number of stages g, and a number of machines per stage mi. As in all scheduling problems with due date or due window, we need to generate a due date for each job but to achieve this, two factors are required; a tardiness factor (F ) and a due date range (R). Finally, the last factor is the width of the due window (W ). As in scheduling literature, the processing times are generated in the range of U [1,99] and earliness and tardiness weights in the range U [1,9]. Following Pan et al. [22] and Potts and Van Wassenhove [24], the due dates are uniformly distributed as: P is the makespan lower bound for the classical permutation hybrid flowshop scheduling problem. To define the lower bound we have used the existing state-of-the-art bounds for the HFS, which were suggested by Hidri and Haouari [11]. In their paper, the authors presented 9 lower bounds, the maximum of which is selected as a P value. In fact, using the due date, we could generate the due window as:  (10,20), where for every seed of parameters, 5 replicates are generated, which makes the total be 3 · 3 · 2 · 2 · 2 · 2 · 5 = 720 small instances. However, for large instances, we kept the same combinations of T , R and W . Only the value of n, g and mi are changed to be: n = (50, 100), g = (5, 10), mi = (5, 10) then, with 5 replicates, we have 2 · 2 · 2 · 2 · 2 · 2 · 5 = 320 large instances. In the same way, we generated 72 small instances and 32 large instances for the calibration step. In the literature of HFS, several methods are used with many variants among which we selected 4 from the best methods: the genetic algorithm (GA) of Kahraman et al. [13], the artificial bee colony (ABC) of Pan et al. [20], the improved simulated annealing (HSA) of Naderi et al. [18], the artificial immune system (AIS) of Engin and Döyen [5]. the two methods based on iterated local search ILS VNS and iterated greedy IG VNS of Pan et al. [21] and finally the auto-designed algorithm (ADA) of Alfaro-Fernández et al. [1]. All these seven methods are carefully adapted and re-implemented for the studied problem. Moreover, all the compared methods have been coded in C++ language using the software visual studio (2019). On the other hand, the calibration of all methods uses windows 7 virtual machines with 8 GB of RAM. As for the final experiments, they are performed on a windows 7 virtual machine with 16 GB of RAM.

Calibration of methods
In fact, all competing methods as well as the proposed IGT are carefully calibrated. Starting with the proposed method, we notice that the first factor is the maximum number of iterations in the VND local search called loop size, this parameter is tested at five levels, (50, 100, 200, 300, 400). And the second parameter is the destruction size d, which is tested at three levels (2,3,4). Then, the third one is the threshold S tested at 4 levels, (1,2,3,4) and finally, the last parameter is the tournament size T s, which is also tested at four levels, 2, 3, 4, 5. Therefore, the improved IGT has 240 combinations each of which is run 5 times with every instance. On the other hand, the number of experiments is 240 · 5 · 72 = 86 400 for the small instances and 240 · 5 · 32 = 38 400 for large instances. One from the best methodology used for calibration, is the design of experiments (DOE). This method is employed in our work where the relative deviation index (RDI) is the considered response variable. while the RDI = (Meth.sol − Best.sol)/(Best.sol − Worst.sol) * 100. Best.sol and Worst.sol are respectively the best and the worst solutions given by all replications of one setting. Moreover, since the value of RDI is between 0 and 100, it is therefore possible that with some instances, the best solution might be equal to the worst one. In this case, the RDI is replaced by 0. Besides, the analysis of the variance (ANOVA) is employed to examine all the obtained results, however this powerful technique has been widely used in the last few years to study and calibrate methods in the scheduling literature. Many other techniques of method calibration are explained in  Bartz-Beielstein et al. [3]. In fact, all the methods and the combination of the parameters considered in this paper have a stopping criterion represented by fixed CPU time. Regarding calibration, this CPU time is equal to 30 ms with an adjustment by the size of instances while large instances need more time than small instances.
For instance, Figure 2 shows the calibration of all the parameters for the proposed IG method with a large Benchmark. In fact, all methods are calibrated using the same tool. Taking the constraint of insufficient space, only the detailed calibration of the proposed method with the large instances is illustrated here. After finished all experiments, we started the process by calculate the RDI value of each set of parameters and then the test ANOVA is applied. Table 2 presents all possibles value for each parameter of the proposed IG.

Results evaluation and statistical analyses
In this final evaluation, the benchmark testing, which includes 720 small and 320 large instances, is used to prove the effectiveness of the proposed HIGT method. In fact, all the calibrated methods are run 5 times with every instance. To have a more extensive image of execution, we utilize three distinctive stopping times as: p · n · g seconds knowing that p = 30, 60, 90, this is will give 0.12 s for a small instance of 10 jobs and 2 stages if we consider p = 60 while 60 s for an instance of 100 jobs and 10 stages. All methods are coded with C++ using Microsoft visual studio 2019 which shares the same objective function evaluation. Therefore, the correlation is reasonable and the outcome is totally comparable. Moreover, each method is run 5 times with 720 small and 320 large instances while considering 3 different CPU times. We have 5 · (720 + 320) · 5 · 3 = 78 000 experimental results, which will help to extract a very strong conclusion. The, the average RDI grouped by p, n and g is given in Table 3 for small instances and in Table 4 for large instances. We noticed that GA and AIS have not provided good results with both large and small instances despite the calibration. Similarly, the relatively recent ABC has not given a good result especially with large instances whereas IG VNS , ILS VNS and ADA showed a relatively good performance. According to Table 3, ADA has an RDI close to the best results for the small benchmark with all CPU times. We also observed that, on average, the proposed HIGT gave better results for small instances with the three stopping times where the average RDI value is 0.73 for the proposed method while the nearest value is given by ADA of Alfaro-Fernández et al. [1] with an average RDI = 1.32. However, our approach shows a reduction of 44.69% against the closest RDI value. Knowing that the ADA method has recently proven its effectiveness with HFS scheduling problems. As with the small instances, our proposed approach has the best average RDI = 5.70 for the large benchmark. Always ADA is the closest competitor with an average RDI = 7.09 i.e. HIGT shows a reduction of 19.60%. Also, the recent  Figure 3. Interaction between the proposed methods and stopping criterion. All means with Tukey's honest significant difference (HSD) 95% confidence intervals. Large instances.
method IG VNS showed a relative performance with an RDI = 8.65. While ILS VNS hasn't proved its effectiveness with the large benchmark. Despite the calibration GA, ABC and AIS haven't shown good results. The results of all algorithms improve from CPU = 30 to 90, for example, HIGT improves 36.27% its average RDI when going from CPU = 30 to CPU = 90. In addition, the best competitor ADA improves 34.58% its average RDI moving from CPU = 30 to CPU = 90. If we summarize, our approach is able to beats a set of very recent methods developed for the same kind of problems. We have to note that the best competing method with the two studied benchmarks is the ADA. This latter is based on iterated greedy approach and here we mention the effect of the proposed destruction reconstruction operator which is the key of HIGT method. Figure 3 shows the interaction between our proposed HIGT and the seven competing methods with three CPU. As a matter of fact, what attracts attention in this plot is that the average RDI of HIGT with CPU = 60 is statically equivalent to the average RDI of the best competitor ADA with CPU = 90 which proves the effectiveness of our proposal.

Conclusions
This paper is devoted to studying the hybrid flow shop scheduling problem with basic blocking constraint. The considered objective function is the minimization of the total weighted earliness tardiness. This NP-hard problem is not present in literature to our best knowledge. Therefore, to resolve it, we have proposed an iterated greedy procedure. On the other hand, in order to check the effectiveness of our procedure, we have implemented seven competing methods well selected from the literature on the hybrid flow shop scheduling. After the calibration of all methods, a generated benchmark testing instances was used to analyze the results of the proposed method and compare them to those of competing methods. The results obtained show that the proposed HIGT is effective, since it produced the best results against competing methods despite the novelty of most of them. Moreover, many future research studies can be introduced to make the problem more realistic, by setting up the time or machine breakdowns, setup times and adaptation of assignment rule, which can be changed to be more adapted to the objective function. Furthermore, other modes of blocking could be considered to study new production systems.