## Abstract

The two-machine permutation flow shop scheduling problem with buffer is studied for the special case that all processing times on one of the two machines are equal to a constant $c$. This case is interesting because it occurs in various applications, for example, when one machine is a packing machine or when materials have to be transported. Different types of buffers and buffer usage are considered. It is shown that all considered buffer flow shop problems remain *NP*-hard for the makespan criterion even with the restriction to equal processing times on one machine. However, the special case where the constant $c$ is larger or smaller than all processing times on the other machine is shown to be polynomially solvable by presenting an algorithm (2BF-OPT) that calculates optimal schedules in $O(nlogn)$ steps. Two heuristics for solving the *NP*-hard flow shop problems are proposed: (i) a modification of the commonly used NEH heuristic (mNEH) and (ii) an Iterated Local Search heuristic (2BF-ILS) that uses the mNEH heuristic for computing its initial solution. It is shown experimentally that the proposed 2BF-ILS heuristic obtains better results than two state-of-the-art algorithms for buffered flow shop problems from the literature and an Ant Colony Optimization algorithm. In addition, it is shown experimentally that 2BF-ILS obtains the same solution quality as the standard NEH heuristic, however, with a smaller number of function evaluations.

## 1 Introduction

A flow shop problem is a scheduling problem where each job (or object) goes through a sequence of $m$ processing steps such that the $i$th processing step is done on machine $Mi$ for $i\u2208{1,\u2026,m}$. The objective is to schedule the processing of jobs such that certain constraints are satisfied and certain criteria relating to efficiency, job throughput or incurred costs are optimized. A typical constraint is that the schedule has to be a permutation schedule where the sequence of jobs is the same on all machines. The most often studied optimization criterion is to minimize the makespan, that is, the total length of the schedule. In this article, we study the case of permutation scheduling for two machines under the makespan criterion.

The flow shop problems studied here have buffer constraints where each job takes up a given amount of buffer space and the jobs are to be scheduled such that the available buffer capacity is not exceeded. Buffer constraints occur in many practical applications where not only the time, but also the size of the processed objects has to be taken into account as, for example, in production facilities with limited storage space. In particular, we consider two types of buffer constraints that have been studied for flow shops in the literature and which differ by the time span in which the buffer is occupied by a job. Flow shops of these types occur, for example, in waste processing or the production of metal parts for the aerospace industry (Martinez et al., 2006), supply chains for mineral resources (Ernst et al., 2019), or in the production of chemicals (Liu and Kozan, 2009).

In this article, we study the special case of buffered two-machine flow shops where for one of the two machines the processing times for all jobs are equal to a constant $c$. This case is relevant because there exist many applications where in one stage of the flow shop the processing steps tend to be relatively similar for all objects. An example is a two-machine flow shop where different objects are produced on the first machine and packed on the second machine. In many applications of this type the production times might vary but packing is often a standardized process which approximately takes the same time for each object. Another example is the case of a robot (which corresponds to the first machine) that transports material for the production of different objects to the second machine where the manufacturing takes place. In many applications of this type the transportation times might be similar, for example, when all materials are stored in the same storage hall or loaded onto the same vehicle, whereas the production times might differ strongly. In other applications of this type the opposite might hold: the transportation times are different, whereas all production times are similar.

Application examples can also be found outside the area of production processes, for example, in the processing of multimedia files as described by Lin et al. (2013) and Kononova and Kochetov (2013), where the downloading of files with different sizes corresponds to different processing times on the first machine, followed by a second operation that takes a fixed amount of time, such as processing the files' metadata or creating file previews of fixed length while the available computer memory has to be taken into account.

The studied problem is also relevant from a theoretical perspective as it explores the computational complexity of buffer flow shops, especially the boundary between *NP*-hard and efficiently solvable problems, similar to the analyses of flow shops with buffers by Kononov et al. (2019) and Ernst et al. (2019). For the studied buffered two-machine flow shop problems it is shown that they remain *NP*-hard for the makespan criterion even under the restriction to equal processing times on one machine. In addition, it is shown that two special cases can be solved optimally in polynomial time, namely, the cases where the value of $c$ describing the constant processing time on one of the machines is smaller (or larger) than all processing times on the other machine. These special cases are relevant for various applications, for example, when the two machines are of different types, such as a production machine and a packaging machine that have different processing times. In this example, it is possible that the constant packaging times are relatively small (or large) in comparison to the production times.

To solve the general case we propose a modification of the well-known NEH heuristic as well as an Iterated Local Search heuristic (2BF-ILS) that uses the modified NEH heuristic for computing its initial solution. 2BF-ILS is studied experimentally and compared with two state-of-the-art heuristics for buffered flow shops from the literature as well as an Ant Colony Optimization algorithm. 2BF-ILS is also experimentally compared to the standard NEH heuristic.

Note that this article is an extension of Le et al. (2019). New is a detailed *NP*-completeness proof for the considered problems and the identification of the aforementioned efficiently solvable subcases by presenting an $O(nlogn)$ algorithm and proving its correctness. The extension also incorporates new experiments using an additional set of instances with characteristics commonly occurring in practical applications and features a more detailed comparison between the optimization behavior of the proposed algorithm 2BF-ILS and the other algorithms. Also, additional literature on more recent developments regarding heuristic, approximate methods and theoretical results for two-machine buffer flow shops and its variants, as well as extended explanations have been integrated.

The remainder of this article is structured as follows. A short overview of recent works on buffer-constrained flow shop problems is given in Section 2. A formal description of the considered flow shop problems with buffers is presented in Section 3. The *NP*-completeness results are shown in Section 4. The two special cases that are polynomial-time solvable are discussed in Section 5. The modified NEH heuristic is described in Section 6 and the Iterated Local Search heuristic is introduced in Section 7. Experimental results are presented in Section 8. Conclusions are given in Section 9.

## 2 Related Work

The buffered flow shop problems that are most often studied in the literature have a buffer between each two adjacent machines $Mi$ and $Mi+1$ and each job occupies the buffer after it finishes on $Mi$ and until its processing starts on $Mi+1$. This type of buffer is called *intermediate buffer*. It is known that the flow shop problem with intermediate buffers is *NP*-complete (Papadimitriou and Kanellakis, 1980) for two or more machines. Several authors have investigated heuristics for this problem, one of the earliest works being Leisten (1990) where a systematic overview for formalizing intermediate buffer flow shops problems is presented and several heuristics originating from infinite-buffer flow shops are tested with the NEH heuristic obtaining the best results.

Another type of buffer constraint that is considered in the literature is where the buffer between machines $Mi$ and $Mi+1$ is used by each job from its starting time on $Mi$ until its finishing time on $Mi+1$. This type of buffer is in the following referred to as *spanning buffer*. The flow shop problem with spanning buffer is also *NP*-complete (Lin et al., 2009). Examples for methods from the literature for this flow shop type are a Variable Neighborhood Search by Kononova and Kochetov (2013), where Integer Linear Programming was also used to solve small instances, a Branch-and-Bound algorithm used to calculate lower bounds and optimally solve small instances with up to 18 jobs (Lin et al., 2009) as well as a heuristic based on Lagrangian relaxation and bin packing (Kononov et al., 2019). This buffer type is also analyzed by Gu et al. (2018) for the total weighted completion time criterion where it is shown to be *NP*-hard, even if one of both permutations is fixed and Min et al. (2019) proved the *NP*-hardness for the case where the processing times on both machines are the same for each job. Another variant where the spanning buffer changes its capacity over time is also *NP*-hard even when all jobs have unit processing times, but smaller instances with up to 40 jobs can be optimally solved using Integer Linear Programming (Berlińska et al., 2019).

If the buffer size is infinite, the resulting flow shop is equivalent to a flow shop problem without buffer constraints which in the case with two machines can be optimally solved in polynomial time for the makespan criterion using Johnson's algorithm (Johnson, 1954) while it is *NP*-hard for more than two machines (Garey et al., 1976). If the buffer has no capacity such that finished jobs on $Mi$ immediately block $Mi$ if $Mi+1$ is busy, one obtains the blocking flow shop which can also be solved in polynomial time for up to two machines (Gilmore and Gomory, 1964), but is otherwise *NP*-hard for the makespan criterion (G. Hall and Sriskandarajah, 1996).

The buffer-constrained flow shop has also been investigated with further additional constraints in the literature. A combination of different target criteria is investigated by Qian et al. (2009) and Liang et al. (2019) using Differential Evolution algorithms, whereas Liu and Kozan (2009) consider the combination of different buffer constraints in the same instance. Other extensions of the flow shop with buffer constraints include the processing of jobs in batches, for which an exact Branch-and-Bound algorithm for up to 40 jobs (Agnetis et al., 1998), an approximation algorithm (Pranzo, 2004), and a Differential Evolution heuristic (Fu et al., 2012) have been proposed. Another extension is the use of machines that can process multiple jobs at the same time. This type is known as the parallel, flexible, or hybrid flow shop problem and for the buffer-constrained variant an Artificial Bee Colony algorithm is presented in Li and Pan (2015). Regarding the flexible flow shop with two machines and spanning buffer, it has been shown that this problem is *NP*-hard (Fung et al., 2016). It is even *NP*-hard to approximate within a factor of $4/3$, even when all processing times are equal, but becomes polynomially solvable if the spanning buffers of each flow shop have the same capacity (Ernst et al., 2019). A more general case consisting of multiple parallel flow shops is considered by Zhang and Xing (2019) where a Differential Evolution heuristic is proposed.

## 3 Formal Description of the Problem

Each two-machine flow shop problem studied in this article has a given set $J={J1,\u2026,Jn}$ of $n$*jobs* and two *machines*$M1$ and $M2$. Each job $Ji$ has two processing times $ai>0$, $bi>0$ where $ai$ is the processing time on $M1$ and $bi$ is the processing time on $M2$. In flow shops of this type each job has to be finished on machine $M1$ before it can be started on machine $M2$. The processing of a job on a machine is nonpreemptive and a machine can process at most one job at a time. A schedule for a flow shop with two machines is denoted by $\sigma $ and specifies the *starting time*$Sij(\sigma )$ and the *completion time*$Cij(\sigma )$ of $Ji$ on $Mj$ for each job $Ji$ and each machine $Mj$ ($i\u2208{1,\u2026,n}$, $j\u2208{1,2}$). Thus, a schedule $\sigma $ specifies *permutations*$\pi 1(\sigma ),\pi 2(\sigma )$ describing the order of jobs on the machines $M1$ and $M2$, respectively. A schedule $\sigma $ is a *permutation schedule* if $\pi 1(\sigma )=\pi 2(\sigma )$.

^{1}Two types of buffers are considered in this article which differ by the time span in which a job occupies the buffer for a given schedule $\sigma $: (i) an

*intermediate buffer*is occupied by job $Ji$ from $Ci1(\sigma )$ until $Si2(\sigma )$ and (ii) a

*spanning buffer*is occupied by $Ji$ from $Si1(\sigma )$ until $Ci2(\sigma )$. A schedule $\sigma $ is

*valid*for flow shops with buffer constraints when at every time step the total amount of buffer that is occupied by the jobs does not exceed $\Omega $. If we impose the condition that all jobs are processed as early as possible, it is sufficient to specify the permutations $\pi 1(\sigma )$ and $\pi 2(\sigma )$ in order to define a schedule $\sigma $. Figure 2 shows an example of a flow shop with an intermediate buffer (left) and a spanning buffer (right) together with a valid permutation schedule.

^{2}

In this article, we study the special case of buffered two-machine flow shops where the processing times on one of the machines are the same for all jobs, that is, $ai=c$ or $bi=c$ for $i\u2208{1,\u2026,n}$ with a constant $c>0$. Regarding the buffer usage of the jobs, two common models are studied in the literature: (i) the buffer is interpreted as a “counter” for the number of stored jobs and thus $si=1$ for $i\u2208{1,\u2026,n}$, similar to Zhang and Gu (2015) and Moslehi and Khorasanian (2014), and (ii) the amount of storage that is used by a job is equal to its processing time on the first machine, i.e., $si=ai$ for $i\u2208{1,\u2026,n}$. In the second model, which is found in Fung and Zinder (2016), Kononova and Kochetov (2013), Lin et al. (2009), and Min et al. (2019), the job size $si$ is interpreted as being proportional to the amount of work during its initial processing step.

The criterion to be optimized is the makespan $Cmax$ (i.e., the time where the last job is completed on the last machine). This is also the criterion used by most of the studies mentioned in Section 2 and based on these works, we also restrict ourselves to permutation schedules (denoted by *prmu*) where the sequence of jobs on both machines is the same. Hence, a schedule $\sigma $ is determined by a single permutation $\pi (\sigma )$ of all jobs.

## 4 *NP*-Completeness Results

It is shown in this section that all four types of flow shops considered in Eq. (1) are *NP*-complete. Due to space limitations, the proof is given only for the case with intermediate buffer and $si=ai$. The *NP*-completeness for the other considered flow shops can be shown with similar arguments.

The decision problem if there exists a valid permutation schedule $\sigma *$ with $Cmax(\sigma *)\u2264L$ for a given integer $L$ is *NP*-complete for the following type of flow shops:

$F2|prmu,bi=c,intermediateBuffer,si=ai|Cmax$,

$F2|prmu,bi=c,spanningBuffer,si=ai|Cmax$,

$F2|prmu,bi=c,intermediateBuffer,si=1|Cmax$,

$F2|prmu,bi=c,spanningBuffer,si=1|Cmax$.

The problem is in *NP* since it can be checked in polynomial time if a schedule $\sigma *$ is valid and satisfies $Cmax(\sigma *)\u2264L$. To show the *NP*-hardness consider an instance of 3Partition: Given are positive integers $x1,x2,\u2026,x3m$ and an integer $B>0$ such that $B/4<xj<B/2$ for all $j$ and $\u2211j=13mxj=mB$. The question is if there exists a partition of ${x1,x2,\u2026,x3m}$ into $m$ subsets $S1,S2,\u2026,Sm$ such that each set $Sk$ satisfies $|Sk|=3$ and $\u2211x\u2208Skx=B$. We denote the given instance from 3Partition as $I3P$. The corresponding flow shop instance $IF2$ of $F2|prmu,bi=c,intermediateBuffer,si=ai|Cmax$ is constructed with a set $J={g0}\u222aG\u222aH$ of $n=4m+1$ jobs where

$g0$ is a job with $ag0=B/4$,

$G$ is a set of $m$ jobs $g1,g2,\u2026,gm$ with $agk=3B$ for $k\u2208{1,2,\u2026,m}$, and

$H$ is a set of $3m$ jobs $h1,h2,\u2026,h3m$ with $ahk=xk$ for $k\u2208{1,2,\u2026,3m}$.

The additional parameters are $\Omega =3B/4$, $c=B$, $L=4mB+B+B/4$, and $si=ai$ for all jobs. This instance can be constructed in polynomial time. Now it is shown that $I3P$ has a solution if and only if $IF2$ has a permutation schedule $\sigma *$ with $Cmax(\sigma *)\u2264L$.

As for $M2$, the initial idle time interval (while $M1$ processes its first job) cannot be shorter than $B/4$ time units and its length is equal to $B/4$ if and only if $g0$ is the first job on both machines (a job $hk\u2208H$ is not possible as the first job due to $B/4<xk<B/2$ being required for the corresponding 3Partition instance). Thus, the job $g0$ has to be the first job on both machines and no idle time is allowed on $M2$ between $g0$ and the last job on $M2$.

The second property is that it is not possible for the buffer to store any job $g\u2208G$ since $sg=3B>3B/4=\Omega $. Thus, the machine $M2$ must immediately start any job $g\u2208G$ after $g$ is finished on $M1$: $Cg1(\sigma *)=Sg2(\sigma *)$. It is also necessary that $Cg01(\sigma *)=Sg02(\sigma *)$ or else the initial idle time would be exceeded. Since all jobs in $G$ are identical, we can assume without loss of generality that the $G$-jobs are processed in the order $g1,\u2026,gm$.

We now consider the sets $Hk\u2286H$ of jobs processed between $gk$ and $gk+1$ (for $k\u2208{0,1,2,\u2026,m-1}$) and the set $Hm$ of jobs processed after $gm$ on both machines. Note that the condition $B/4<xk<B/2$ for $k\u2208{1,\u2026,3m}$ implies that it is not possible for the buffer to store more than two jobs from $H$ at any time. It is now shown that $|Hk|=3$ and $\u2211j\u2208Hkaj=B$ for $k\u2208{0,1,2,\u2026,m-1}$. Consider first $k=0$. Since no additional idle times are allowed on both machines, the equations $Sg12(\sigma *)=Cg01(\sigma *)+bg0+\u2211h\u2208H0bh=ag0+(1+|H0|)B$ and $Cg11(\sigma *)=ag0+\u2211h\u2208H0ah+ag1$ as well as $Cg11(\sigma *)=Sg12(\sigma *)$ lead to $\u2211h\u2208H0ah=(|H0|-2)B$ which cannot be negative or zero, implying $|H0|\u22653$.

Hence, $|H0|=3$ and $\u2211j\u2208H0aj=B$ holds. This implies that $M1$ finishes the set $H0$ at the same time as $M2$ is finishing $g0$ and that the interval from $Cg02(\sigma *)=Sg11(\sigma *)$ to $Sg12(\sigma *)=Cg11(\sigma *)$ has a length of $3B$ time units. Thus, $M2$ processes the jobs in $H0$ during this interval or else it would be idle.

It can also be concluded that the buffer contains no jobs by the time $M1$ finishes the job $g1$. This allows us to apply the same arguments used in the case $k=0$ for $k\u2208{1,2,\u2026,m-1}$ to show that $|Hk|=3$ as well as $\u2211j\u2208Hkaj=B$. By doing so, one obtains $m$ sets $H0,H1,H2,\u2026,Hm-1$ that each contain three jobs from $H$. Due to $|H|=3m$, it follows that $|Hm|=0$. Since $\u2211j\u2208Hkaj=B$ for $k\u2208{0,1,2,\u2026,m-1}$ and since the jobs in $H$ correspond to the numbers of the 3Partition problem $I3P$, it is possible to construct a solution for $I3P$.

“$\u21d2$”: Given the subsets $S1,S2,\u2026,Sm$ satisfying $|Sk|=3$ and $\u2211x\u2208Skx=B$ for $k\u2208{1,2,\u2026,m}$, it is possible to construct a schedule $\sigma *$ as shown in Figure 4 where the $H$-jobs are corresponding to the subsets that are scheduled between the $G$-jobs. This leads to a schedule $\sigma *$ with $Cmax(\sigma *)=L$ and a solution for $IF2$.

## 5 Polynomial-Time Solvable Subcases

As shown in Section 4, the buffered flow shops with $bi=c$ are *NP*-complete for all buffer models and buffer usage values considered here. However, there exist special cases that are solvable in polynomial time, such as $F2|spanningBuffer,si=ai|Cmax$ with the additional condition that both $maxai$ and $maxbi$ do not exceed $\Omega /5$ (Kononov et al., 2019) and $F2|spanningBuffer,si=ai|Cmax$ with the additional constraint $maxai\u2264minbi$ (Min et al., 2019).

In this work, the subcases where the constant $c$ is either larger or smaller than all run times on $M1$ are shown to be polynomially solvable. Note that in comparison to Min et al. (2019), we additionally consider both buffer types as well as the case $minai\u2265maxbi$ when all $bi$ are equal to $c$. In order to show this property for $F2|prmu,bi=c,spanningBuffer,si=ai,c\u2265ai|Cmax$ the following lemmata are needed.

For each schedule $\sigma $ for an instance of $F2|prmu,bi=c,spanningBuffer,si=ai,c\u2265ai|Cmax$, there exists a schedule $\sigma '$ with $\pi (\sigma )=\pi (\sigma ')$ and $Cmax(\sigma ')\u2264Cmax(\sigma )$ satisfying $Ck1(\sigma ')=Sk2(\sigma ')$ for all $k\u2208{1,2,\u2026,n}$.

For a given schedule $\sigma $, assume that there exists a job $Jk$ for which $Ck1(\sigma )<Sk2(\sigma )$. W.l.o.g. let $Jk$ be the rightmost such job. Then, since $c\u2265ai$ for all $i\u2208{1,2,\u2026,n}$, it follows that each job which comes after $Jk$ in $\sigma $ starts later than $Sk2(\sigma )$. Hence, $Jk$ can be rescheduled on $M1$ to a new schedule $\sigma '$ such that $Ck1(\sigma ')=Sk2(\sigma )=Sk2(\sigma ')$ holds without increasing the makespan. By iteration the lemma follows.

For the schedule $\sigma '$ of Lemma ^{2} it holds that for each job $Jk$ ($k\u2208{1,2,\u2026,n}$) the predecessor job finishes at time $t\u2264Sk2(\sigma ')$ and the successor job of $Jk$ starts at time $t\u2265Ck1(\sigma ')=Sk2(\sigma ')$. Hence, the schedule $\sigma '$ has the property that at most two jobs are in the buffer at any given time. A permutation schedule is minimal if it has the smallest makespan out of all permutation schedules with the same order of jobs. The following lemma holds for minimal permutation schedules.

For any permutation $\pi =(J\pi 1,J\pi 2,\u2026,J\pi n)$ of the jobs $J$ in an instance of $F2|prmu,bi=c,spanningBuffer,si=ai,c\u2265ai|Cmax$ there exists a minimal permutation schedule $\sigma $ where for each job $J\pi k$ and its successor $J\pi k+1$ ($k\u2208{1,2,\u2026,n-1}$) the permutation schedule $\sigma $ satisfies either

$C\pi k2(\sigma )=S\pi k+12(\sigma )$ and $s\pi k+s\pi k+1\u2264\Omega $ or

$C\pi k2(\sigma )=S\pi k+11(\sigma )$ and $s\pi k+s\pi k+1>\Omega $.

The lemma is a direct consequence of Lemma ^{2} and the facts that it can be assumed that $\sigma $ is a minimal permutation schedule and $a\pi k+1\u2264c$.

Let $J$ be the set of jobs of an instance of $F2|prmu,bi=c,spanningBuffer,si=ai,c\u2265ai|Cmax$. If $Ck2(\sigma )=S\u21132(\sigma )$ holds for two jobs $Jk,J\u2113\u2208J$ in a permutation schedule $\sigma $ we say that the processing time $a\u2113$ of $J\u2113$ on $M1$ is *hidden*. Two jobs $Jk,J\u2113$ are *compatible* if $sk+s\u2113\u2264\Omega $. For a permutation schedule $\sigma $ and its corresponding job permutation $\pi (\sigma )$ let $I(\sigma )\u2286{1,2,\u2026,n}$ be the set of indices $i$ of jobs $Ji$ which are not compatible with their predecessor, i.e., $s\pi i-1(\sigma )+s\pi i(\sigma )>\Omega $. The following corollary is a direct consequence of Lemma ^{3}.

Let $\sigma $ be a minimal permutation schedule for an instance of $F2|prmu,bi=c,spanningBuffer,si=ai,c\u2265ai|Cmax$ and $\pi (\sigma )=(J\pi 1(\sigma ),J\pi 2(\sigma ),\u2026,J\pi n(\sigma ))$ its corresponding permutation of jobs in $J$. Then, it holds that $Cmax(\sigma )=a\pi 1(\sigma )+\u2211i\u2208I(\sigma )ai+n\xb7c$.

In the following we present Algorithm 1 which computes an optimal schedule for an instance of $F2|prmu,bi=c,spanningBuffer,si=ai,c\u2265ai|Cmax$. It first requires that the jobs are sorted in order of decreasing $ai$ which can be done in $O(nlogn)$ steps. In the case where the jobs are already sorted, the resulting algorithm runs in linear time.

In order to solve $F2|prmu,bi=c,spanningBuffer,si=ai,c\u2265ai|Cmax$, Algorithm 1 considers two special cases first: (i) all jobs in $J$ are pairwise not compatible (lines 1 and 2) and (ii) all jobs in $J$ are pairwise compatible (lines 3 and 4). In case of (i) it is clear that none of the processing times on $M1$ can be hidden. Hence, any minimal schedule $\sigma $ has the makespan $Cmax(\sigma )=\u2211i=1nai+n\xb7c$ and is thus optimal. In case $(ii)$, it follows that $I(\sigma )=\u2300$. Therefore, Corollary ^{4} implies that any minimal schedule $\sigma $ which has $Jn$ as its first job has the makespan $Cmax(\sigma )=an+n\xb7c$ and is optimal since $an\u2264ai$ for $i\u2208{1,2,\u2026,n-1}$.

If none of the cases (i) and (ii) hold, there exists a minimal $k\u2208{2,3,\u2026,n-1}$ such that $Jk+1$ and $Jk$ are compatible. Since $ak+1\u2265ai$ for $i>k+1$, all jobs in ${Jk+1,Jk+2\u2026,Jn}$ are compatible with $Jk$ (line 6). When the processing time $a\u2113$ of a job $J\u2113\u2208{J1,\u2026,Jk}$ can only be hidden, then a job from $R:={Jk+1,\u2026,Jn}$ (line 7) is its predecessor. Clearly, in an optimal schedule the total processing time of jobs ${J1,\u2026,Jk-1}$ on $M1$ that can be hidden has to be maximal. To determine this maximum total processing time the following greedy approach is taken in lines 8–14. The jobs $J1,\u2026,Jk-1$ are considered in this order and we introduce a function $f$ that assigns jobs from $R$ to these jobs as predecessors as follows.

For the next job $Ji$ the smallest job in $R$ that has so far not been assigned as predecessor to one of the jobs $J1,\u2026,Ji-1$ and that is compatible with $Ji$ is always assigned as the predecessor of $Ji$ (if it exists). If all jobs in $R$ have been assigned (line 15), the assignment $f$ defines the only possible assignment of jobs in $R$ to jobs in ${J1,\u2026,Jk}$ such that for the maximum number of jobs in ${J1,\u2026,Jh}$ the processing time on $M1$ can be hidden and also the total hidden processing time on $M1$ of these jobs is maximized. That the greedy algorithm gives the optimal solution follows from the fact that the set of all subsets of $J1,\u2026,Jk-1$ which can be hidden by assigning jobs from $R$ as predecessors (where each job in $R$ is assigned to at most one job in $J1,\u2026,Jk-1$) is an independence system over $J1,\u2026,Jk-1$ and forms a matroid together with the used weighting function $w(J\u2113)=a\u2113$ (see standard textbooks on greedy algorithms for details). It follows that any minimal schedule $\sigma $ for the order $(Jk,$$f(Jk-1),$$Jk-1,\u2026,f(J1),J1)$ has the makespan $Cmax(\sigma )=ak+\u2211i\u2208I(\sigma )ai+n\xb7c$ and is optimal (line 16). An analogous result holds for jobs in ${J1,\u2026,Jk}$ if there exists an $i\u2208{1,2,\u2026,k-1}$ with $f(Ji)=\u2205$ (line 18) and $h$ is the maximum such $i$ (line 19). In this case there exists an optimal schedule $\sigma $ where $(J(h),f(Jh-1),$$Jh-1,\u2026,f(J1),J1)$ is a suffix of the permutation $\pi (\sigma )$.

In line 23 of Algorithm 1 it holds for the remaining jobs $J'={Jk,\u2026,Jh+1}$ that the run time on $M1$ can be hidden with jobs from $R':=R\u2216{f(Ji)\u2223i\u2264h}$. However, in order to find an assignment for which the resulting makespan $a\u2113+(|R'|+k-h)\xb7c$ where $J\u2113$ is the first job is minimal the assignment $f$ might have to be redefined for the subset $J'$. For this we need the following lemma.

If there exists an assignment of some jobs in $R'$ to the jobs ${Jk,Jk-1,$$\u2026,$$Jh+1}$ where each job in ${Jk,Jk-1,\u2026,Jh+1}$ gets assigned exactly one job $f(Ji)\u2208R'$ such that $f(Ji)$ is compatible with $Ji$ then there also exists such an assignment $f$ where $f(Jk)$ is the smallest possible job. This assignment $f$ satisfies the following property: a minimal permutation schedule for the order $f(Jk),R,Jk,f(Jk-1),Jk-1,\u2026,f(Jh+1),Jh+1$ where $R$ is any order of the jobs $R'\u2216{f(Ji)\u2223i\u2208{h+1,h+2,\u2026,k}$ is an optimal permutation schedule for the jobs in ${Jk,\u2026,Jh+1}\u222aR'$.

We now show that we can construct a new permutation schedule with the same makespan where the $t+1$ rightmost elements coincide with this sequence, thereby contradicting that a maximal $t$ exists: Since $h+t<k$, the order of the jobs in $J'$ is only identical for $Jh+t,Jh+t-1,\u2026,Jh+1$ whereas the job $Jh+t+1$ is at a different position $ij$ in the permutation (2): $Jh+t+1=Jij$. In addition, the first job $Jik-h-t$ at which the two permutations differ corresponds to a job $Js\u2208J'$ with $s\u2265h+t+2$, that is, $ik-h-t\u2265h+t+2$. Since the schedule is optimal it must hold that $f(Jij)$ and $f(Jij+1)$ are compatible with $Jij$. Since $Jij$ is the largest job in $Ji1,Ji2,$$\u2026,Jik-h-t$ it holds that $f(Jij)$ and $f(Jij+1)$ are compatible with each job in $Ji1,Ji2,$$\u2026,Jik-h-t$. Therefore, the minimal schedule for the order $f(Ji1),R,$$Ji1,$$\u2026,$$f(Jij),$$Jij+1,\u2026,$$f(Jik-h-t),Jik-h-t,$$f(Jij+1)$$Jh+t+1$, $f(Jh+t),Jh+t,$$\u2026,f(Jh+2),Jh+2,f(Jh+1),$$Jh+1$ has the same makespan $a\u2113+(|R'|+k-h)\xb7c$ as $\sigma $ and coincides with $t+1$ jobs from the sequence $Jk,Jk-1,\u2026,Jh+2,Jh+1$ contradicting the maximality of $t$.

Thus, there exists a permutation schedule with an assignment $f$ such that the sequence $f(Jk),R,Jk,f(Jk-1),Jk-1,\u2026,f(Jh+1),Jh+1$ is optimal.

Lemma ^{5} shows that an optimal permutation schedule can be found with a compatible predecessor assignment for the jobs in ${Jk,$$\u2026,$$Jh+1}$ such that $f(Jk)$ is minimal. This is done in lines 23–26 of Algorithm 1 where always the largest possible job from $R'$ is assigned to the next job in ${Jk+1,$$\u2026,$$Jh+1}$ and the smallest remaining job is afterwards assigned to $Jk$. In addition, it can be seen that Algorithm 1 always constructs schedules $\sigma $ with the maximum number of neighbored pairs of compatible jobs. Thus, it is also optimal for the case where $c\u2264ai$ for all $i\u2208{1,2,\u2026,n}$ in which case the length of the schedule is $\u2211i=1nai+|I(\sigma )|\xb7c$.

Given an instance of the type $F2|prmu,bi=c,bufType,bufUsage|Cmax$ with $bufType\u2208{spanningBuffer,intermediateBuffer}$ and $bufUsage\u2208{si=1,si=ai}$, an optimal schedule can be constructed in time $O(nlogn)$ if $c\u2265maxiai$ or $c\u2264miniai$.

We consider all possible values for $bufType$ and $bufUsage$. It was already shown that Algorithm 1 computes an optimal schedule in $O(nlogn)$ steps for the case of a spanning buffer and $sj=aj$.

It remains to consider the case of a spanning buffer and $si=1$. Consider first that $\Omega =1$. Then no two jobs are processed at the same time on both machines so that every schedule $\sigma $ (where every job starts as early as possible) is optimal with a makespan of $Cmax(\sigma )=\u2211iai+nc$. If $\Omega \u22652$, then it is possible to construct the same schedules as in Figures 5 and 6 (depending on whether $c\u2265maxiai$ or $c\u2264miniai$) since a maximum of two jobs occupy the buffer at any time.

## 6 A Modification of the NEH Heuristic

The NEH algorithm (Nawaz et al., 1983) is a very successful and the most famous heuristic for makespan minimization in permutation flow shop problems. The algorithm starts with an empty permutation building it up by iteratively inserting jobs (in decreasing order of the sums of their processing times) into the positions which lead to the smallest increases in makespan. It can be shown that this heuristic also calculates an optimal solution for all special cases considered in Theorem ^{6} since it also performs greedy insertions maximizing the number of hidden jobs as well as the sum of their processing times.

Several variants of the NEH heuristic have been studied in the literature. Most of them deal with ties (Fernandez-Viagas and Framinan, 2015) or use different orders of job insertions, for example, based on the moments of processing times (Liu et al., 2017) or using genetic programming (Vázquez-Rodríguez and Ochoa, 2011). A disadvantage of the NEH heuristic is its relatively large run time since it checks $\Theta (n2)$ insertion points. In particular, when the solution of the NEH heuristic is further used by improvement heuristics, for example, as the starting solution for an Iterated Local Search heuristic, it is desirable to have a faster heuristic for the computation of a starting solution.

Here, we introduce a modification of the NEH heuristic (mNEH) that is faster and particularly suitable for the considered two-machine flow shops with buffers where all processing times on the second machine $M2$ are equal. In this case, the jobs differ only by their processing time on $M1$. Therefore, it is likely to occur that many jobs are similar or even identical. This property is used in the mNEH heuristic to reduce the number of positions that are checked for the insertions of the jobs and thus the total number of evaluated schedules. The main idea is to split the $n$ jobs into $G(n)$ groups of similar jobs and to maintain for each group a list of $L(n)$ “good” candidate positions for the insertion. This is based on the assumption that insertions of similar jobs at the same positions lead to similar changes in the resulting makespan.

A pseudocode of the modified heuristic is given in Algorithm 2. The number of evaluations to be performed can then be adjusted by appropriate choice of $L(n)$ and $G(n)$. In this article, we memorize $L(n)=2n$ positions, that is, potentially $n$ before and $n$ after the newly inserted job for each of the $G(n)=n$ groups of equal size (an exception is the last group as described later) and it follows that the resulting algorithm performs $O(nn)$ evaluations. It should be noted that in this case the incomplete permutation $\pi $ contains less than $L(n)$ jobs during the scheduling of the first two groups $S1$ and $S2$. For the jobs in these two groups, the mNEH heuristic tests all possible insertion positions in the same way as in the standard NEH heuristic. For the last group $SG(n)$, all possible positions are checked since this group contains the shortest jobs allowing for a finer optimization of the partial permutation $\pi $. Regarding the time complexity (including the time to evaluate a permutation as well as the time to build and update the list) it can be shown that the mNEH heuristic with the used parameter values is faster than the standard NEH heuristic by a factor of $O(n)$.

## 7 Iterated Local Search

In this section, we propose an Iterated Local Search heuristic for the two-machine flow shop problems with buffers. The heuristic is denoted by 2BF-ILS. The local search operations that are considered for 2BF-ILS are the following:

inserting a job on position $i$ into another position $j$ (

*insert*)inserting a pair of adjacent jobs at the positions $(i,i+1)$ into the positions $(j,j+1)$ (

*pairInsert*)swapping two jobs at the positions $i$ and $j$ (

*swap*)

The main steps of our proposed method are shown in Algorithm 3: It starts with the solution obtained from the mNEH heuristic proposed in Section 6 (with $G(n)=n$ and $L(n)=2n$). Then 2BF-ILS iterates through a sequence of operations $(op1,op2,\u2026,op\u2113)$ and repeatedly performs local search steps with changing neighborhoods. The choice of which parameter $i$ to fix in $Niop(\pi )$ is based on a random permutation $\pi rand$ calculated beforehand. The search steps with the current operation $op$ are repeated until the permutation $\pi cur$ obtained so far cannot be improved further. Afterwards, the local search procedure is restarted with the next given operation.

If the best-known solution obtained so far did not improve after all operations, the next iteration of the algorithm uses a perturbed variant of the best-known solution. The perturbation we use is based on a geometric distribution: We repeatedly draw (uniformly) random numbers $r$ from [0,1] and then randomly apply one of the given operations with random parameters on the permutation until $r$ is greater than $ps$. This distribution favors a small number of perturbations. The strength of perturbation $ps$ increases additively (here set as $\u025b=0.05$ with $ps$ maxed out at 0.99) if successive iterations do not yield any improvement of the best-known solution, otherwise it is reset to the initial value $psinit$.

## 8 Computational Evaluation

In this section, we describe the experiments and their results.

### 8.1 Algorithms for Comparison

Based on the literature overview given in Section 2 and Figure 1, we selected the *Hybrid Variable Neighborhood Search* (HVNS) and the *Discrete Artificial Bee Colony* (DABC) for a comparison with our proposed method since these algorithms are described in fairly recent works (Zhang and Gu, 2015; Moslehi and Khorasanian, 2014) and have not been outperformed by any other algorithm to the best of our knowledge. For the implementation, we asked the authors of both algorithms for the source code but did not receive a reply. Thus, we reimplemented both algorithms.

In addition to HVNS and DABC, we also used an *Ant Colony Optimization* algorithm (ACO) for comparison. The reason is that ACO generally achieves good results for many scheduling problems. It is thus a promising algorithm which so far has not been applied to flow shops with buffers. The ACO in this work is a standard ACO without heuristic components where each pheromone value $\tau ij$ encodes the desirability that job $Jj$ is the succesor of job $Ji$. At each iteration the pheromone values are updated by the solution that is obtained by 2BF-ILS applied to the permutation generated by the best ant in the current iteration (i.e., the iteration best solution becomes $\pi cur$ in line 4 in Algorithm 3). Each application of 2BF-ILS was limited to 1000 search steps.

### 8.2 Generation of Problem Instances

The commonly used benchmark instances for flow shop problems (from Taillard, 1993, Reeves, 1995 and the recent VRF benchmark by Vallada et al., 2015) work with at least five machines and contain no buffer constraints so that they cannot be directly applied to the flow shops with buffers considered here. Authors who studied flow shop problems with buffers and two machines (e.g., Kononova and Kochetov, 2013 and Lin et al., 2009) generated instances with random processing times uniformly drawn over the set ${1,2,\u2026,100}$. Based on the studies performed by the these authors, we generated instances for our experimental study as follows.

We chose $n\u2208{50,100,150}$ as the number of jobs for small, medium and large instances and created three “incomplete instances” for each size that contain only the $M1$ processing times $aj$ drawn randomly from a uniform distribution over the set ${1,2,\u2026,100}$. Each of these incomplete instances was then used to build three subordinate instances by choosing the constant processing times $c$ on $M2$ as the 25%, 50% or the 75% percentile $q0.25,q0.50,q0.75$ of the values $ai$. Each value of $c$ was then used to create (complete) instances for the intermediate buffer (spanning buffer) by setting $si=1$ and $\Omega =1$ ($\Omega =3$) or $si=ai$ and $\Omega =q0.25$ ($\Omega =maxai+q0.25$). Note that the buffer capacity $\Omega $ cannot be smaller than $maxsi$ for the spanning buffer model or else there exists no valid schedule. The resulting set of instances contained 108 flow shop problems.

In addition, we generated a set of instances based on studies conducted by Amar and Gupta (1986) and Watson et al. (2002) where it was argued that problem data generated from uniform distributions do not contain characteristics of problem instances commonly occurring in practical applications, namely gradients or correlations with respect to job processing times. In instances with the former property, the processing times $ai$ on $M1$ are shorter (or longer) than the processing time $bi$ on the second machine for all jobs $Ji$. Regarding flow shops satisfying $bi=c$ for all jobs $Ji$, job gradients lead to the cases analyzed in Section 5 which are efficiently solvable. Thus, we considered the latter characteristic by drawing the processing times $ai$ for $M1$ from normal distributions $N(\mu ,\sigma 2)$ with mean value $\mu =c$. Higher values for $c$ then lead to tendentially longer processing times on $M1$ and vice versa. In particular, we calculated $n$ integer values for processing times $ai$ ($n\u2208{50,100,150}$) by drawing $n$ random numbers $r1,r2,\u2026,rn$ from normal distributions $N(\mu ,\sigma 2)$ with $\mu =c$, $\sigma =10$ and $c\u2208{25,50,75}$ and setting $ai=max{\u2308ri\u2309,1}$ for all $i\u2208{1,2,\u2026,n}$. The values for the buffer usage $si$ are calculated in the same way as for the first set of instances leading to 108 additional flow shop problems.

### 8.3 Parameter Values

For the algorithms 2BF-ILS and ACO the parameter values were determined with the algorithm configurator irace (López-Ibáñez et al., 2016). The configuration was performed on a separate set of instances with 100 jobs (generated using the method described in Subsection 8.2 for uniformly distributed processing times) with the standard irace parameter values and a budget of 250 runs for each algorithm. The limits used by irace for the parameter values were chosen as $psinit\u2208(0.01,0.99)$, $\rho \u2208(0.01,0.05)$, $Nants\u2208{1,2,\u2026,20}$. As possible sequences for operations we considered all sequences of length 1, 2, or 3 that can be formed by the operations *insert*, *pairInsert*, or *swap* (without repetition leading to 15 possible sequences in total). The algorithms HVNS and DABC were applied with the parameters given by the respective authors as well as tuned parameters calculated by irace on the same instances. In the following, the tuned versions of these algorithms are referred to as HVNS-T and DABC-T.

The resulting parameter values are given in Table 1. Due to page limitations, we refer the reader to https://github.com/L-HT/TwoMachineFlowShopBuffers where the resulting parameter values for HVNS-T and DABC-T as well as the source code for each algorithm and the following evaluations (written in R and C++) are available. After the configuration, each algorithm was executed on all 216 instances and the resulting values were averaged over 10 replications. All test runs were performed on a computer with eight 3.4-GHz-cores (each run being executed on one core) and 32 GB RAM with time limits of 5, 10, and 15 minutes for the small, medium, and large problems, respectively.

Algorithm . | Parameter . | Result . | Description . |
---|---|---|---|

ACO | $psinit$ | 0.914 | initial perturbation strength |

$op$ | $(swap,insert,pairInsert)$ | sequence of operations | |

$Nants$ | 19 | number of ants | |

$\rho $ | 0.018 | pheromone evaporation | |

2BF-ILS | $psinit$ | 0.240 | initial perturbation strength |

$op$ | $(pairInsert,insert,swap)$ | sequence of operations |

Algorithm . | Parameter . | Result . | Description . |
---|---|---|---|

ACO | $psinit$ | 0.914 | initial perturbation strength |

$op$ | $(swap,insert,pairInsert)$ | sequence of operations | |

$Nants$ | 19 | number of ants | |

$\rho $ | 0.018 | pheromone evaporation | |

2BF-ILS | $psinit$ | 0.240 | initial perturbation strength |

$op$ | $(pairInsert,insert,swap)$ | sequence of operations |

### 8.4 Comparison of 2BF-ILS with Other Metaheuristics

The performance of each algorithm was evaluated based on (i) the number of performed *function evaluations*$FE$ to calculate the makespan and (ii) the elapsed absolute runtime. The latter was used to calculate the *normalized runtime*$NT$ as a time measure where the reference runtime for a given instance was chosen as the mean runtime of 10 runs of the standard NEH heuristic.

For each instance and each time measure, we generated (similar to the study performed by Weise et al., 2014) the *progress curve* (PC, the quality of the best-known solution over time), the *estimated running time* (ERT, indicating the time necessary to reach a given solution quality), and the *empirical cumulative distribution function* (ECDF, describing the percentage of runs reaching a given solution quality over time) with respect to the relative percentage difference $RPD=(F(\pi )-F^)/F^$ between the solution quality $F(\pi )$ of the permutation $\pi $ and the best solution quality $F^$ found in all runs on this instance. The target value of the ECDF was chosen as a 1%-deviation of $F^$ such that these diagrams show how consistent an algorithm reaches the performance $RPD\u22640.01$.

Since an individual evaluation of over 1300 diagrams is not feasible, we calculated the *area under curve* (AUC) as an aggregate quality measure for the PC, ERT, and ECDF diagrams (with respect to both time measures) since algorithms with low AUC values (for PC and ERT diagrams) and high AUC values (for ECDF diagrams) tend to find better solutions faster (Weise et al., 2014). As such, these values quantify the performance of an algorithm for a given instance over time. The relative AUC values, averaged over all instances used in this study, are shown in Table 2 for both sets of instances.

. | . | HVNS . | HVNS-T . | DABC . | DABC-T . | ACO . | 2BF-ILS . |
---|---|---|---|---|---|---|---|

uniform | $PCFE$ | 2.22 | 2.13 | 1.81 | 1.66 | 2.01 | 1.03 |

$PCNT$ | 2.41 | 2.40 | 1.54 | 1.71 | 2.06 | 1.04 | |

$ERTFE$ | 2.62 | 2.59 | 3.07 | 3.02 | 2.58 | 1.11 | |

$ERTNT$ | 2.49 | 2.48 | 1.91 | 2.36 | 2.60 | 1.25 | |

$ECDFFE$ | 1.28 | 1.27 | 1.23 | 1.23 | 1.44 | 1.00 | |

$ECDFNT$ | 1.35 | 1.35 | 1.21 | 1.22 | 1.50 | 1.00 | |

normal | $PCFE$ | 1.90 | 1.93 | 1.95 | 1.98 | 1.89 | 1.04 |

$PCNT$ | 2.00 | 2.03 | 1.61 | 1.89 | 1.94 | 1.03 | |

$ERTFE$ | 2.47 | 2.58 | 3.16 | 3.29 | 2.16 | 1.11 | |

$ERTNT$ | 2.40 | 2.54 | 1.89 | 2.36 | 2.13 | 1.26 | |

$ECDFFE$ | 1.05 | 1.07 | 1.08 | 1.12 | 1.24 | 1.00 | |

$ECDFNT$ | 1.08 | 1.09 | 1.05 | 1.11 | 1.25 | 1.00 |

. | . | HVNS . | HVNS-T . | DABC . | DABC-T . | ACO . | 2BF-ILS . |
---|---|---|---|---|---|---|---|

uniform | $PCFE$ | 2.22 | 2.13 | 1.81 | 1.66 | 2.01 | 1.03 |

$PCNT$ | 2.41 | 2.40 | 1.54 | 1.71 | 2.06 | 1.04 | |

$ERTFE$ | 2.62 | 2.59 | 3.07 | 3.02 | 2.58 | 1.11 | |

$ERTNT$ | 2.49 | 2.48 | 1.91 | 2.36 | 2.60 | 1.25 | |

$ECDFFE$ | 1.28 | 1.27 | 1.23 | 1.23 | 1.44 | 1.00 | |

$ECDFNT$ | 1.35 | 1.35 | 1.21 | 1.22 | 1.50 | 1.00 | |

normal | $PCFE$ | 1.90 | 1.93 | 1.95 | 1.98 | 1.89 | 1.04 |

$PCNT$ | 2.00 | 2.03 | 1.61 | 1.89 | 1.94 | 1.03 | |

$ERTFE$ | 2.47 | 2.58 | 3.16 | 3.29 | 2.16 | 1.11 | |

$ERTNT$ | 2.40 | 2.54 | 1.89 | 2.36 | 2.13 | 1.26 | |

$ECDFFE$ | 1.05 | 1.07 | 1.08 | 1.12 | 1.24 | 1.00 | |

$ECDFNT$ | 1.08 | 1.09 | 1.05 | 1.11 | 1.25 | 1.00 |

For each instance, the area under the curve was calculated for each diagram and the best obtained value was chosen as the “reference” to calculate the relative values for the other algorithms. The obtained values were averaged over all 108 instances. A low number indicates that the curves for the respective algorithm show a high similarity (on average) to the best performing algorithm on each instance. The lowest values are shown in bold for each criterion.

It can be seen that 2BF-ILS outperformed the other algorithms in all evaluation measures on both sets of flow shop problems. ACO showed a competitive performance when compared to HVNS and DABC with respect to the values for the PC diagrams which indicates that it quickly improves at the beginning when the first solutions are created. The irace-tuned parameters for HVNS obtained better results than the untuned parameters for uniformly random processing times on $M1$ with respect to nearly all evaluation measures whereas the results for DABC-T in comparison to DABC are mixed. It can also be seen for HVNS, HVNS-T, and ACO that the values in Table 2 for the instances with normally distributed processing times are smaller than for uniformly random instances for almost all evaluation criteria which indicates that these methods can obtain “good” solutions for instances with processing times $ai$ similar to $c$ more easily than for uniformly randomized instances.

*NP*-complete).

To compare the performance of the algorithms at specific points in time the sign test for paired samples was applied. This non-parametric test neither requires the given data to be normally distributed nor the difference distributions between the methods to be symmetric. Using this test, we compared the performance of the algorithms during the run (at 100 000 evaluations) and the performance that was reached at the end of the time limit. The results are shown in Table 3 for both sets of instances. Note that the tables are symmetric since the 15 possible pairwise comparisons for each of the two points in time were performed with two-sided tests. Similar to Table 2, it can be seen that 2BF-ILS obtained a significantly better performance than the other algorithms at both points indicating a high and consistent performance over time. The only difference is that in the case for normally distributed processing times the tests showed fewer statistically significant differences (i.e., values $p<0.05/15$) between the competitor algorithms than for instances with uniformly random processing times.

. | . | HVNS . | HVNS-T . | DABC . | DABC-T . | ACO . | 2BF-ILS . |
---|---|---|---|---|---|---|---|

uniform | HVNS | - / - | $\u25b4$/$\u25b4$ | $\u25b4$/$\u25b4$ | - / - | $\u25b4$/$\u25b4$ | |

HVNS-T | - / - | - /$\u25b4$ | $\u25b4$/$\u25b4$ | - / - | $\u25b4$/$\u25b4$ | ||

DABC | $\u25c2$/$\u25c2$ | - /$\u25c2$ | - / - | - /$\u25c2$ | $\u25b4$/$\u25b4$ | ||

DABC-T | $\u25c2$/$\u25c2$ | $\u25c2$/$\u25c2$ | - / - | $\u25c2$/$\u25c2$ | $\u25b4$/$\u25b4$ | ||

ACO | - / - | - / - | - /$\u25b4$ | $\u25b4$/$\u25b4$ | $\u25b4$/$\u25b4$ | ||

2BF-ILS | $\u25c2$/$\u25c2$ | $\u25c2$/$\u25c2$ | $\u25c2$/$\u25c2$ | $\u25c2$/$\u25c2$ | $\u25c2$/$\u25c2$ | ||

normal | HVNS | - / - | - / - | - / - | - / - | $\u25b4$/$\u25b4$ | |

HVNS-T | - / - | - / - | - / - | - / - | $\u25b4$/$\u25b4$ | ||

DABC | - / - | - / - | - /$\u25c2$ | - / - | $\u25b4$/$\u25b4$ | ||

DABC-T | - / - | - / - | - /$\u25b4$ | - / - | $\u25b4$/$\u25b4$ | ||

ACO | - / - | - / - | - / - | - / - | $\u25b4$/$\u25b4$ | ||

2BF-ILS | $\u25c2$/$\u25c2$ | $\u25c2$/$\u25c2$ | $\u25c2$/$\u25c2$ | $\u25c2$/$\u25c2$ | $\u25c2$/$\u25c2$ |

. | . | HVNS . | HVNS-T . | DABC . | DABC-T . | ACO . | 2BF-ILS . |
---|---|---|---|---|---|---|---|

uniform | HVNS | - / - | $\u25b4$/$\u25b4$ | $\u25b4$/$\u25b4$ | - / - | $\u25b4$/$\u25b4$ | |

HVNS-T | - / - | - /$\u25b4$ | $\u25b4$/$\u25b4$ | - / - | $\u25b4$/$\u25b4$ | ||

DABC | $\u25c2$/$\u25c2$ | - /$\u25c2$ | - / - | - /$\u25c2$ | $\u25b4$/$\u25b4$ | ||

DABC-T | $\u25c2$/$\u25c2$ | $\u25c2$/$\u25c2$ | - / - | $\u25c2$/$\u25c2$ | $\u25b4$/$\u25b4$ | ||

ACO | - / - | - / - | - /$\u25b4$ | $\u25b4$/$\u25b4$ | $\u25b4$/$\u25b4$ | ||

2BF-ILS | $\u25c2$/$\u25c2$ | $\u25c2$/$\u25c2$ | $\u25c2$/$\u25c2$ | $\u25c2$/$\u25c2$ | $\u25c2$/$\u25c2$ | ||

normal | HVNS | - / - | - / - | - / - | - / - | $\u25b4$/$\u25b4$ | |

HVNS-T | - / - | - / - | - / - | - / - | $\u25b4$/$\u25b4$ | ||

DABC | - / - | - / - | - /$\u25c2$ | - / - | $\u25b4$/$\u25b4$ | ||

DABC-T | - / - | - / - | - /$\u25b4$ | - / - | $\u25b4$/$\u25b4$ | ||

ACO | - / - | - / - | - / - | - / - | $\u25b4$/$\u25b4$ | ||

2BF-ILS | $\u25c2$/$\u25c2$ | $\u25c2$/$\u25c2$ | $\u25c2$/$\u25c2$ | $\u25c2$/$\u25c2$ | $\u25c2$/$\u25c2$ |

The first value in each cell shows the test result with respect to the performance at 100 000 evaluations and the second value refers to the performance reached at the end of the time limit. A triangle indicates that the measured difference is statistically significant ($p<0.05/15$ due to Bonferroni correction) and that the algorithm at which the triangle is pointed at is significantly better according to the test statistic.

### 8.5 Comparison of 2BF-ILS with NEH

Visualizing the number of evaluations for both algorithms (see Figure 9 right) shows that there is a small number of outliers (at most 4 out of 36 instances per problem size and processing time distribution) where mNEH takes a noticeably high number of evaluations before reaching $CNEH$. However, the median values for 2BF-ILS were still smaller than the number of evaluations performed by the standard NEH heuristic for all problem sizes and both sets of instances. In addition, the sign test for flow shops with uniformly distributed processing times $(n=108)$ showed that 2BF-ILS needed significantly fewer evaluations to reach $CNEH$ than NEH ($p<0.001$). The differences were also significant for the instances with normally distributed processing times on $M1$ ($p=0.013$, $n=108$).

## 9 Conclusion

Algorithms and complexity results for two-machine permutation flow shops with buffers were presented in this article for the specific case where all processing times on one of the machines are equal to a constant $c$. For such problems, two types of buffers (intermediate buffers and spanning buffers) and two types of buffer usage (all jobs occupy the same amount of buffer and the amount of buffer usage for each job equals its processing time on the machine with non-constant times) were considered. It was shown that all four resulting cases of buffered two-machine permutation flow shops are *NP*-hard under the makespan criterion. A modified version of the NEH heuristic (mNEH) was proposed that utilizes characteristics of the considered flow shop problems. Also, an Iterated Local Search heuristic (2BF-ILS) was proposed that uses mNEH for computing its starting solution. It was experimentally shown that 2BF-ILS obtains better schedules over time outperforming a standard Ant Colony Optimization algorithm as well as two state-of-the-art algorithms for flow shop problems with buffers from the literature. The results show that the compared algorithms perform better if the flow shop instances contain correlations between processing times, a structural feature that commonly occurs in practical applications. In addition, the experimental results show that 2BF-ILS obtains the same solution quality as the standard NEH heuristic but uses a smaller number of function evaluations.

For all four types of buffered two-machine permutation flow shops two polynomial-time solvable subcases were identified, namely, the cases where the constant $c$ is either larger or smaller than all processing times on the other machine. The most interesting of these subcases is the spanning buffer when $c$ is larger than all processing times on the other machine and for each job the amount of buffer usage equals its run time on the non-constant time machine. For this case we presented an algorithm 2BF-OPT which calculates optimal schedules in $O(nlogn)$ steps.

## Acknowledgments

This work was funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation), project number 392050753.

## Notes

^{1}

The case $\Omega =0$ leads to the blocking flow shop which is optimally solvable in polynomial time for the makespan criterion with two machines (Gilmore and Gomory, 1964) and thus not considered here.

## References

*Naval Research Logistics*

*IIE Transactions*

*Optimization of complex systems: Theory, models, algorithms and applications*

*Operations Research Spektrum*

*Discrete Applied Mathematics*

*Computers & Operations Research*

*International Journal of Production Research*

*Operation Research Letters*

*IFAC-PapersOnLine*

*Operations Research*

*Mathematics of Operations Research*

*Operations Research*

*Annals of Discrete Mathematics*

*Journal of Discrete Algorithms*

*Applied Mathematics and Computation*

*Naval Research Logistics Quarterly*

*Mathematical optimization theory and operations research*

*Journal of Applied and Industrial Mathematics*

*Evolutionary computation in combinatorial optimization*

*International Journal of Production Research*

*Information Sciences*

*Journal of Intelligent Manufacturing*

*Memetic Computing*

*Information Systems*

*Computers & Operations Research*

*Computers & Operations Research*

*International Journal of Production Economics*

*International Journal of Production Economics*,

*Operations Research Perspectives*

*European Journal of Operational Research*

*Journal of Scheduling*

*Computers & Operations Research*

*Omega*

*Applied Soft Computing*

*Information Science*

*Journal of the Association for Computing Machinery*

*European Journal of Operational Research*

*Computers & Operations Research*

*Computers & Operations Research*

*25th Chinese Control and Decision Conference (CCDC)*

*European Journal of Operational Research*

*European Journal of Operational Research*

*Journal of the Operational Research Society*

*Computers & Operations Research*

*INFORMS Journal on Computing*

*IEEE Computational Intelligence Magazine*

*Computers and Operations Research*

*Journal of Central South University*