Introduction

This paper addresses the two-machine permutation flowshop scheduling problem with minimal time lags where the objective is minimizing the total tardiness. This environment is characterized by n jobs (\(i\in \{1,\ldots ,n\})\) being processed non-preemptively on two machines M1 and M2 in this order according to a processing time \(a_{i}\) on M1 and \(b_{i}\) on M2. For each job, an amount of time must be elapsed before the processing of the second operation on the second machine. This time must be greater than or equal to a non-negative minimal time lag value denoted \(\theta _{i}^{\min }\). Each job has a due date \(d_{i}\). According to the standard notation provided by Graham et al. (1979), the considered problem is denoted as \(F2|\theta _{i}^{\min }|\underset{i}{\sum }T_{i}\).

Investigating this problem is motivated by its practical relevance to the production environments. The time lags constraints are used frequently in both service and industrial fields. For example in the chemistry field, the chemical reactions with different processing times may be represented by time lags (Chu and Proth 1996). Also, such constraints appear during the sequence of harvesting operations in the agriculture field (Foulds and Wilson 2005). As well as in a training center for which the sequence of modules taught must require some temporal constraints. Many other real examples are given by Deppner (2004).

Since the publication of Dell’Amico (1996) of his original paper on the two-machine flowshop and jobshop with time lags, this problem has attracted an ever-growing attention in the operations research field. Then, this study was extended to consider various problems with time lags while optimizing different criteria. It is worth noting that the great majority of the researches address the makespan objective (Fondrevelle et al. 2006; Yu et al. 2004; Hamdi and Loukil 2011) in spite that the due date-based criteria are the most met in the real situations.

Interestingly, these criteria and mainly the total tardiness criterion is considered widely with the classical two-machine flowshop problem where most of the researches are characterized by applying the branch and bound algorithm accompanied by proposing and improving lower bounds and dominance properties (Kim 1993; Pan and Fan 1997; Pan et al. 2002; Schaller 2005).

However, only few researches considered the time lags. Yu et al. (2004) show the NP hardness of the problem even if all processing times are equal to one. Later, Hamdi et al. (2015) developed a branch and bound algorithm to reach an optimal solution by using some developed lower bounds and dominance criteria. These latter are developed to establish precedence constraints between jobs in an optimal schedule. Some of them will be used later in this research. Also, they proposed some computationally efficient heuristics. Nearly at the same time, Hamdi and Loukil (2015b) extend the research about the permutation flowshop problem with minimal time lags by considering the case of m-machine and optimizing the total number of tardy jobs criterion. They proposed some heuristic procedures based on known and new rules. Then interestingly, they developed lower bounds based on Moore’s algorithm and logic-based Benders decomposition as a hybrid approach that mix the MILP and the constraint programming.

It is known that the MILP models can be used to obtain optimal schedules for small size problems. They are often classified based on the choice of the decision variables. Over the literature, a wide variety of permutation flowshop scheduling problems were addressed while using the due date-based criteria. Kharbeche and Haouari (2013) proposed compact mixed-integer programming models and valid inequalities for the two-machine scheduling problem. They developed a lower bound that consistently outperforms the best bound from the literature. Then, their computational study reveals that most of the 30-job hard instances are optimally solved using their proposed MILP models. Also, Ronconi and Birgin (2012) proposed mixed-integer linear programming formulations for the m-machine scheduling problem in the flowshop environment with unlimited and zero buffer, for the minimization of total earliness and tardiness.

Even with the existence of other types of the time lags like the maximal time lags (denoted \(\theta _{i,k}^{\max }\)in the case of m-machine to indicate the maximal time lag of the job i between the two machines k and \(k+1\)) and the exact time lags (denoted \(\theta _{i,k}\)), the linear programming method was the scope of numerous papers. Hamdi and Loukil (2015a) proposed a mathematical formulation for the problem \(F_{\pi }|\theta _{i,k}^{\min }, \theta _{i,k}^{\max }|\underset{i}{\sum }T_{i}\) which was useful to distinguish the effect of the time lags on the results. Moreover, it was used to evaluate the performance of some proposed heuristic methods by determining the percentage deviation from the optimal solution provided by running the proposed MILP with the CPLEX solver. In the same context, Dhouib et al. (2013) proposed a mixed-integer mathematical programming formulation for the permutation flowshop problem with minimal and maximal time lags while the objective is to hierarchically minimize two criteria, the primary criterion is the minimization of the number of tardy jobs and the secondary one minimizes the makespan. It is then used to solve optimally problems until the size 20-jobs and 5-machine and for comparison reason with a proposed simulated annealing algorithm. Later, Hamdi and Loukil (2017) proposed three different MILP models to solve the problem \(F_{\pi }|\theta _{i,k}|\underset{i}{\sum }(E_{i} +T_{i})\) which show that there is a little difference between them when referring to the CPU time in spite that the number of decision variables is almost the same for all the formulations. Thereafter, the obtained optimal solution is used to evaluate the performance of some proposed upper and lower bounds until the size 20-job and 5-machine.

It is worth mentioning that the MILP models are used frequently by the recent researches that concerned by solving scheduling problems with due date-based criteria (i.e., Moreno-Camacho et al. 2018; Huang et al. 2013; Keshavarz et al. 2019).

The contribution of this paper is twofold: First, we propose two mathematical formulations distinguished by the used decision variables which are: the completion time variables and the idle time variables. Second, we present two sets of valid inequalities that can be used to improve the proposed MILP resolution as the CPU time required to solve the problem can be significantly reduced. To this aim, we exploit some dominance rules from the literature for the first set, and we propose a lower bound on the completion time for the second set. Then, these sets are introduced separately and together to the completion time-based formulation to distinguish their effect on the resolution performance. Thus, a total of five MILP formulations are computationally compared by using the CPLEX solver. To the best of our knowledge, this is the first attempt to investigate MILP models for \(F2|\theta _{i}^{\min }|\underset{i}{\sum }T_{i}\).

The remainder of this paper is organized as follows: mathematical formulations of the considered problem are presented in “MILP models2” section. In “Valid inequalities3” section, we present the two types of valid inequalities: valid inequalities based on dominance rules from the literature, and position-based valid inequalities. Then, computational results are reported in “Computational results4” section. Finally, we discuss concluding remarks in “Conclusion5” section.

MILP models

This section lists two MILP formulations: the completion time-based formulation and the idle time-based formulation, respectively. The considered problem is characterized by n jobs being processed on 2 machines always in the same order while a minimal time lag \(\theta _{i}^{\min }\)is defined between each couple of operations of each job i. Each machine carries only one job at a time, we assume that all jobs are independent and available for processing at time 0, and preemptions are not allowed .

A common feature for both formulations is that they are based on the positional decision variables. That is, the resolution of the problem consists in assigning each job to only one position in the schedule that leads to the optimal value of the total tardiness.

Completion time-based formulation

This formulation is based on the following decision variables:

  • \(X_{i,j}:\) binary variable that takes value 1 if job i is scheduled in position j, 0 otherwise \(\forall i, j\in \{1,2,\ldots ,n\}\)

  • \(C_{j,k}\) : completion time of job in position j on machine k, \(\forall j\in \{1,2,\ldots ,n\},\,\forall k\in \{1,\,2\}\)

  • \(T_{j}\): tardiness of the job in position \(j\ \forall j\in \{1,2,\ldots ,n\}\)

The used data are given as follows:

  • \(a_{i}\): processing time of job i on machine 1, \(\forall i\in \{1,2,\ldots ,n\}\)

  • \(b_{i}\): processing time of job i on machine 2, \(\forall i\in \{1,2,\ldots ,n\}\)

  • \(\theta _{i}^{\min }\): minimal time lag between the two machines of each job \(i\ \forall i\in \{1,2,\ldots ,n\}\)

Then the MILP formulation is presented as follows

$$\begin{aligned}&Minimize\;\underset{j}{\sum }T_{j} \end{aligned}$$
(1)
$$\begin{aligned}&\underset{i=1}{\overset{n}{\sum }}X_{i,j}=1\;\;\forall j=1,\ldots ,n \end{aligned}$$
(2)
$$\begin{aligned}&\overset{n}{\underset{j=1}{\sum }}X_{i,j}=1\;\;\forall i=1,\ldots ,n \end{aligned}$$
(3)
$$\begin{aligned}&C_{1,1}=\underset{i=1}{\overset{n}{\sum }}X_{i,1}a_{i} \end{aligned}$$
(4)
$$\begin{aligned}&C_{j,1}+\overset{n}{\underset{i=1}{\sum }}(X_{i,j+1}a_{i}) \le C_{j+1,1}\,\;\forall j=1,\ldots ,n-1 \end{aligned}$$
(5)
$$\begin{aligned}&C_{j,2}\ge C_{j,1}+\overset{n}{\underset{i=1}{\sum }}X_{i,j}\,(b_{i} +\theta _{i}^{\min })\;\;\forall j=1,\ldots ,n \end{aligned}$$
(6)
$$\begin{aligned}&C_{j,2}+\overset{n}{\underset{i=1}{\sum }}(X_{i,j+1}b_{i}) \le C_{j+1,2}\,\;\forall j=1,\ldots ,n-1 \end{aligned}$$
(7)
$$\begin{aligned}&T_{j}-C_{j,2}+\overset{n}{\underset{i=1}{\sum }} (d_{i}X_{i,j})\ge 0\;\;\forall j=1,\ldots ,n \end{aligned}$$
(8)
$$\begin{aligned}&C_{j,k},\,T_{j}\ge 0\,\;\forall j=1,\ldots ,n\,,\,\;\forall k=1,2 \end{aligned}$$
(9)
$$\begin{aligned}&X_{i,j}\in \{0,\,1\}\,\quad \forall i, j=1,\ldots .,n \end{aligned}$$
(10)

The objective (1) is to minimize the total tardiness. Constraints (2) ensure that each position can be occupied by only one job; however constraints (3) ensure that each job can only be assigned to a sequence position. Constraints (4) determine the competition time of the job in the first position on the first machine. Constraints (5) find the completion time of the other jobs on the first machine. Constraints (6) find the completion time of each job with respect to the minimal time lags between operations and the precedence constraints. Constraints (7) define the precedence constraint of each two successive positions in the second machine. Constraints (8) find the tardiness value of each job. Constraints (9) impose the tardiness and the completion time to be positive values. Then, constraints (10) define \(X_{i,j}\) as a binary variable which is equal to 1 if the job i is assigned to position j and 0 else. In this formulation, the number of binary variables is \(n^{2}\), the number of integer variables is 3n, and the number of constraints is \(9n-1\).

Idle time-based formulation

This formulation is based on the same data and variables defined in the previous formulation, just we use the variable \(I_{j}\) instead of \(C_{j,k}\); it represents the idle time on machine 2 between the completion time of the job in position j and the starting time of the job in position \(j+1\). Then, the formulation is presented as follows.

$$\begin{aligned}&Minimize\;\underset{j}{\sum }T_{j} \end{aligned}$$
(11)
$$\begin{aligned}&\underset{i=1}{\overset{n}{\sum }}X_{i,j}=1\;\;\forall j=1,\ldots ,n \end{aligned}$$
(12)
$$\begin{aligned}&\overset{n}{\underset{j=1}{\sum }}X_{i,j}=1\;\;\forall i=1,\ldots ,n \end{aligned}$$
(13)
$$\begin{aligned}&\overset{j-1}{\underset{k=1}{\sum }}\underset{i=1}{\overset{n}{\sum }}(b_{i} +\theta _{i}^{\min })X_{i,k}-\overset{j}{\underset{k=2}{\sum }} \underset{i=1}{\overset{n}{\sum }}(a_{i}+\theta _{i}^{\min })X_{i,k}\nonumber \\&\quad +\overset{j}{\underset{k=2}{\sum }}I_{k}\ge 0\;\;\forall j=2,\ldots ,n \end{aligned}$$
(14)
$$\begin{aligned}&\overset{n}{\underset{i=1}{\sum }}(a_{i}+b_{i}+\theta _{i}^{\min })X_{i,1} -\overset{n}{\underset{i=1}{\sum }}d_{i}X_{i,1}\le T_{1} \end{aligned}$$
(15)
$$\begin{aligned}&\overset{n}{\underset{i=1}{\sum }}(a_{i}+\theta _{i}^{\min })X_{i,1} +\underset{k=1}{\overset{j}{\sum }}\overset{n}{\underset{i=1}{\sum }} b_{i}X_{i,k}+\overset{j}{\underset{k=2}{\sum }}I_{k}\nonumber \\&\quad -\overset{n}{\underset{i=1}{\sum }}d_{i}X_{i,j} \le T_{j}\;\;\;\;\forall j=2,\ldots ,n \end{aligned}$$
(16)
$$\begin{aligned}&\underset{j=1}{\overset{n}{\sum }}\overset{n}{\underset{i=1}{\sum }} a_{i}X_{i,j}+\theta _{n}^{\min }\le \overset{n}{\underset{i=1}{\sum }} (a_{i}+\theta _{i}^{\min })X_{i,1}\nonumber \\&\quad +\underset{j=1}{\overset{n}{\sum }} \overset{n}{\underset{i=1}{\sum }}b_{i}X_{i,j} +\overset{n-1}{\underset{j=1}{\sum }}I_{j} \end{aligned}$$
(17)
$$\begin{aligned}&I_{j}\ge 0\,\;\forall j=1,\ldots ,n-1 \end{aligned}$$
(18)
$$\begin{aligned}&T_{j}\ge 0\,\;\forall j=1,\ldots ,n \end{aligned}$$
(19)
$$\begin{aligned}&X_{i,j}\in \{0,\,1\}\;\forall i, j=1,\ldots ,n \end{aligned}$$
(20)

The objective (11) and the first two constraints (12) and (13) are defined as same in the previous MILP model. Constraints (14) state that the idle time of the job in position j is greater than or equal to the completion time of the job in position j on the first machine minus the completion time of the job in position (\(j-1\)) on the second machine. Constraints (15) and (16) determine the tardiness value of job in position 1 and the other jobs from position 2 until position n, respectively. Constraints (17) are used to express the relationship among several times such as the processing times, the idle times and the time lags among jobs and the two machines. In this formulation, the number of binary variables is \(n^{2}\), the number of integer variables is \(2n-1\), and the number of constraints is \(6n-1\).

Valid inequalities

The two proposed MILP models include almost the same number of decision variables, which can’t solve large sized problems. Then by adding cuts, their performance can be enhanced by reducing the number of decision variables and then the search space. Two types of valid inequalities are presented in this section.

Valid inequalities based on dominance rules

For this first type of the valid inequalities, a preprocessing step is needed to define a set of precedence constraints by using some dominance rules. Let this set denote \(\xi =\{(i,\;s)\in J^{2}:\) there exists an optimal schedule such that a job s is processed after a job i , then the valid inequalities to be added to the proposed MILP model is:

$$\begin{aligned} \sum _{j=1}^{n}jX_{i,j}+1 \le \sum _{j=1}^{n}jX_{i,s},\;\;(i,\;s)\in \xi \end{aligned}$$
(21)

where \(\sum _{j=1}^{n}jX_{i,j}\) indicates the position index of the job i as the binary variable \(X_{i,j}\) takes value 1 if and only if job i is assigned to position j. Then, these inequalities are derived by using some specified rules. These rules are proposed by Hamdi et al. (2015) for the same studied problem which aim to sequence a job i in an optimal sequence if some properties holds. They are provided as follows:

Rule 1: For any two adjacent jobs (i, \(s)\in J^{2}\), if

  • (a) \(min\{a_{s}+\theta _{s}^{\min },\,b_{i} +\theta _{i}^{\min }\}\ge a_{i}+\theta _{i}^{\min }\)

  • (b) \(b_{i}+\theta _{i}^{\min }\le b_{s}+\theta _{s}^{\min }\)

  • (c) \(d_{i} \le d_{s}\)

Then there exists an optimal schedule such that i is processed before s.

Rule 2: For job i, if there is a job s satisfying

  • (a) \(a_{i}+\theta _{i}^{\min }+b_{i} \ge a_{s}+\theta _{s}^{\min }+b_{s}\)

  • (b) \(\theta _{i}^{\min }\le \theta _{s}^{\min }\)

  • (c) \(b_{i}-d_{i}\le b_{s}-d_{s}\)

Then, there exists an optimal schedule such that i is not the first job of the sequence. So that, the variable \(X_{i,1}\) will be eliminated from the formulation.

Position-based valid inequalities

These inequalities are based on the fact that the completion time of a job in position j is greater than a lower bound (\(\lambda _{j})\). Then, we have:

$$\begin{aligned} C_{j,2}\ge \sum _{i=1}^{n}\lambda _{j}X_{i,j}\;\;\forall j=1,\ldots ,n \end{aligned}$$
(22)

The lower bound value (\(\lambda _{j}\)) can be calculated easily by using the following proposed formula:

$$\begin{aligned} \lambda _{j}=\underset{i}{\min }\{a_{i}\}+\underset{i}{\min }\{\theta _{i}^{\min }\} +j\times \{\frac{\underset{i}{\sum }b_{i}}{n}\}\;\;\forall j=1,\ldots ,n \end{aligned}$$

Here, \(\frac{\underset{i}{\sum }b_{i}}{n}\) is the mean value of the processing times on the second machine; then by relaxing the minimal time lags constraints (as we consider only the minimal value) and adding the minimal value of processing time on the first machine (\(a_{i})\), we obtain a lower bound on the completion time of the job in position 1. Therefore, to determine the lower bound on the completion time of each job in position \(j\ (\lambda _{j})\), we should multiply \(\frac{\underset{i}{\sum }b_{i}}{n}\) by \(j\ \forall j=1,\ldots ,n\) to satisfy the condition \(\lambda _{1}<\lambda _{2}<\cdots <\lambda _{n}\) in accordance with \(C_{1,2}<C_{2,2}<\cdots <C_{n,2}\).

Computational results

Computational experiments are done to assess the effectiveness of the proposed models, mainly the enhancement provided by adding the cuts and the effect of varying the minimal time lags intervals. These models are tested by running the CPLEX 11 solver on a DELL PC/2.20 GHz with 4.00 Go RAM. The tests are conducted on a set of generated instances following the scheme described in Hamdi and Loukil (2015b). The processing times and the minimal time lags are generated from a uniform distribution between 20 and 50 and [0, \(\theta ^{\min }\)], respectively where \(\theta ^{\min }\in \{0, 7, 14\}\). The due dates are generated as \(d_{i}=P\times D_{range}\), where P is a lower bound of the makespan which is given as follows: \(P=\underset{i}{\min }\{a_{i} +\theta _{i}^{\min }\}+\sum _{i=1}^{n}b_{i}\) and \(D_{range}= [0.8 , 1.2]\). The number of jobs n is taken to be equal to 10, 15, 20, 25, 40, and 60 jobs. For each combination of n and \(\theta ^{\min }\), five instances are generated and the average value of the total tardiness is determined. The upper limit of the CPU time for solving a problem is set to 3600 s.

We test the following different formulations:

  • \(F_{1}\): Completion time-based formulation

  • \(F_{2}\): Idle time-based formulation

  • \(F_{3}\): \(F_{1}\)+ valid inequality based on dominance rules

  • \(F_{4}\): \(F_{1}\)+ position-based valid inequality

  • \(F_{5}\): \(F_{1}\)+ the two sets of inequalities

The results are displayed in Table 1. For each tested problem, we provide the CPU time and the number of nodes required to solve it. The number between parenthesis indicates the number of unsolved instances.

Table 1 Impact of the valid inequalities and the minimal time lags on the results

From the above table, we observe the following points:

  • In spite that both MILP models include \(O(n^{2})\) binary variables and O(n) integer variables, the idle-based formulation requires a bit more number of nodes for almost all the sizes, thus, it consumes more CPU time to solve problems.

  • It is obvious that the five models are able to solve optimally problems with up to \(n=\)40 in less than one hour, and even some instances with up to 60 jobs.

  • Increasing the minimal time lags intervals has a distinguishable impact on increasing the number of nodes and the CPU time.

  • We could prove the effet of adding constraints on tightening the search space as the number of nodes and the CPU for the three last models tend to be decreased while adding the valid inequalities. The model \(F_{5}\), characterized by adding the two sets of the inequalities, is the most efficient as it is less time-consuming than the models \(F_{3}\) and \(F_{4}\) .

To confirm this last point and to assess the improvement induced by the included type of inequalities to the basic MILP model, we determine for each of the last three formulations (\(F_{3}\), \(F_{4}\), and \(F_{5}\)), the ratio of the CPU time required by each problem to the CPU time required by this problem in the original formulation \((F_{1})\). Then, the results are shown in Table 2.

Table 2 Ratio values of CPU time

The last column in Table 2 indicates the average value of the calculated ratio values for each formulation \((F_{3}, F_{4},\) and \(F_{5})\) by considering all n and \(\theta ^{\min }\). Then, adding the two valid inequalities can induce a great improvement for the original formulation by reducing significantly the CPU time until 5.5 times.

Conclusion

In this paper, we proposed two mathematical formulations for the two-machine permutation flowshop problem with minimal time lags scheduling problem. Two sets of valid inequalities are proposed, where the first one is based on some dominance rules from the literature and the second one is based on a lower bound of the job completion time. Different ways are used to integrate these inequalities to the completion time-based model which leads to compare five mathematical models. As of our knowledge, it is the first paper that proposes and compares the computational performance of some mathematical formulations while considering the minimal time lags constraints. There was noticeable improvement in terms of reducing the search space and the time-consuming required to solve the problem mainly the model \(F_{5}\) characterized by adding the two types of the valid inequalities.