# Batch Scheduling on Two-Machine Flowshop with Machine-Dependent Setup Times

Authors: Lika Ben-Dati; Gur Mosheiov; Daniel Oron
Journal: Advances in Operations Research
 (2009)

---

## Abstract

We study a batch scheduling problem on a 2-machine flowshop. We assume unit processing time jobs, batch availability, and machine-dependent setup times. The objective is to find a job allocation to batches of integer size and a batch schedule that minimize makespan. We introduce a very efficient closed form solution for the problem.


---

## Body

## 1. Introduction

The recent survey paper “A Survey on Scheduling Problems with Setup Times and Costs” [1],  classifies batch scheduling problems into those with batching and nonbatching considerations, with sequence-independent and sequence-dependent setup times, and according to the machine environment and the objective function. The survey contains approximately 300 references, a clear indication of the importance and relevance of this topic.In this paper we study batch scheduling problems on a 2-machine flowshop. The objective function is minimum makespan. The underlying assumptions in the model studied are as follows.(i)
Batch  availability: all the jobs are completed when the last job of the batch is completed (and then the entire batch is available for processing on the second machine, or for delivery to customers).(ii)
Nonanticipatory  setups: setups on the second machine may be performed only after processing of the batch on the first machine has been completed.(iii)
Batch  consistency: batch formation is identical on both machines.(iv)
Machine-dependent  setup  times: machine 1 and machine 2 have different setup times (which are identical for all batches).The 2-machine flow-shop under the above assumptions was shown to be strongly NP-hard by Cheng et al. [2], and Glass et al. [3]. We focus, however, on an important special case, which is shown to have an elegant closed form solution. Specifically, we assume unit processing time jobs. This setting is known to have various applications, and in the manufacturing context, for example, it reflects the common systems in which sequences of identical items are produced. Scheduling with unit jobs has been studied extensively in many scheduling contexts.  Batch scheduling on flowshops with unit processing time jobs have been studied by Mosheiov and Oron [4, 5], Ng and Kovalyov [6], and Mosheiov, et al. [7].In all the above papers, the authors consider identical (i.e., machine-independent) setup times. Our study, as mentioned, focuses onmachine-dependent setups. Scheduling problems containing machine-dependent setups exist in numerous real-life applications, and have been extensively studied in various contexts. It appears, however, that a model assuming both unit jobs and machine-dependent setups is considered in this paper for the first time. Possible applications for such a setting, when similar or identical operations, are performed on the jobs on the different machines, but an additional operation requiring constant time must be performed on one of the machines (or different constant time operations are performed on the different machines). These operations may be viewed as batching operations, where all jobs of a given batch undergo some type of process which is performed in constant time, independent of the number of jobs in the batch. Such operations may include special loading or recording of arriving batches on the first machine, initial quality assurance, or special preparation of batches prior to processing. Constant time operations on the last machine include, again, preparation of batches for shipment and dispatching of batches (stamping, spray painting), quality assurance procedures (random testing of a fixed number of items or batching procedures such as scanning), or administrative operations which may include paperwork, recording of data, and so forth.We distinguish between the following two (similar but nonsymmetric) cases:(i) the setup on the first machine is larger than the setup on the second machine, and, (ii) the setup on the first machine is smaller than the setup on the second machine. For both cases, we show that the makespan minimization problem is solved efficiently in O(n) time, where n is the number of jobs. It is important to note that the existing algorithms solve a special case of the problem studied in this paper, namely, when s1=s2, in O(n) time. Thus, the algorithm presented in this paper reduces the computational effort required to obtain an optimal solution even if the problem is more complex. It should be noted that both the existing algorithms and the current solution procedure are not polynomial in the problem input size. Since we consider unit processing time jobs, the input consists of three values (O(1)), the number of jobs, and the setup time on each of the two machines. Thus, even a procedure requiring O(n) time is exponential in the input size. Nevertheless, we doubt that there is a way to express the optimal solution to this problem more efficiently.It should be noted that a first step in the solution consists of solving the “relaxed version” in which integrality of the batch sizes is not required (see below). This, in fact, is alot streaming problem, as it consists of splitting given jobs into sublots in order to allow their overlapping processing on the two successive machines of the flowshop. Chen and Steiner [8, 9], and Liu [10] addressed lot streaming problems on flow-shops with batches of integer size. Vickson [11] addressed lot streaming of a flow-shop with machine-dependent setup times. However, to the best of our knowledge, the model considered in this paper (assuming machine-dependent setups, and requiring integrality of batch sizes), has not been studied before.In Section2, we present the notation and formulation of the problem. The optimal solution is provided in Section 3 (and the appendix). Section 4 contains concluding remarks and ideas for future research.


## 2. Formulation

n independent jobs are available for processing on a 2-machine flowshop at time zero. pij denotes the processing time of job  j(j=1,2,…,n) on machine i(i=1,2). We assume unit processing times, therefore  pij=1 for  j=1,2,…,n and for i = 1,2. The scheduler's task is to partition jobs into batches (i.e., find their optimal number and size), and to schedule the batches so as to minimize makespan.Prior to processing a new batch, an (integer) machine dependent setup time,si,i=1,2, is incurred. As mentioned above, setups are assumed to be nonanticipatory. For a given allocation to batches, let k denote the number of batches, and let nj denote the size of the jth batch. The total processing time of batch j is clearly equal to its size. We assume (see above) batch-availability and batch consistency. Cj denotes the completion time of batch j, which is the completion time of all the jobs contained in batch j. Using the conventional three field notation, the problem studied in this paper is      F2/s-batch,pij=1,si/Cmax.Comment 1.
A standard assumption is that all input parameters are nonnegative integers, implying in our case that both the (identical) processing times and the (machine-dependent) setups are integers. One can assume that after appropriate scaling all processing times have unit time, but clearly the setups do not necessarily remain integers. Thus, we do allow and investigate the case of noninteger setup times; see Comment3 in Section 3 and Comment A.1 in the appendix.  (Note that the computational effort for this more general case remains  O(n) through the use of the proposed algorithm.)


## 3. A Closed Form Solution forF2/pij=1,si/Cmax

We focus here on the case that the setup time on the first machine is smaller, that iss1<s2. (The case s1>s2, although not completely symmetric, is similar and its analysis appears in the appendix. The case of machine independent setups, that is, when s1=s2, is studied in [4, 6].)   For convenience we begin by solving the relaxed version of the problem (denoted by  PR), in which batch sizes are allowed to have noninteger values.First, we introduce a lower bound on the optimal makespan for a given number of batches,k. As in the classical 2-machine flow-shop problem, a lower bound is obtained when no idle time is incurred between consecutive batches on the second machine. Given the unavoidable idle time prior to the processing of the first batch on the second machine, we obtain(3.1)LB=s1+n1+ks2+n.A schedule attaining this lower bound must contain no idle time between consecutive jobs on the second machine. A necessary and sufficient condition for no idle time is the following:nj+1≤n1+j(s2-s1),j=1,…,k-1. This is true since the completion time of batch j+1 on the first machine (=(j+1)s1+n1+n2+⋯+nj+1) cannot exceed the completion time of batch  j on the second machine (=s1+n1+js2+n1+n2+⋯+nj). One schedule satisfying these conditions consists of batch sizes obtained by the following set of  equalities: nj+1=n1+j(s2-s1),j=1,…,k-1. The resulting schedule consists of the following sequence of increasing batch sizes: nj+1=nj+(s2-s1),j=1,…,k-1. Given the fact that   ∑j=1knj=n, we easily obtain that(3.2)n1=nk-k-12(s2-s1),nj+1=nj+(s2-s1),j=1,…,k-1.
The above schedule has a makespan value which is equal to the lower bound, and is therefore optimal for problem PR and a given k value.The makespan value of the above schedule is(3.3)Cmax(k)=s1+nk-k-12(s2-s1)+ks2+n=nk+n+k+12(s1+s2).
Note that (3.3) is a strictly convex function in k  and the unique minimum is given by(3.4)k*=2ns1+s2.
Recall that k denotes the optimal (integer) number of batches, and therefore, due to the convexity of(3.3)(3.5)k=⌈k*⌉ork=⌊k*⌋.
Both k=⌈k*⌉ and  k=⌊k*⌋ should be considered.We conclude that an optimal solution for the relaxed version of the problem (PR) is given by (3.4), (3.5), and (3.2).We now consider the original problem, where batch sizes are restricted to be integers, denoted byPINT. A lower bound on the optimal solution is(3.6)LB(k)=⌈s1+nk-k-12(s2-s1)+n+ks2⌉=s1+⌈nk-k-12(s2-s1)⌉+n+ks2.
(Note that as defined above n1  is the size of the first batch of the solution of relaxed version. In the special case that n1=n/k-((k-1)/2)(s2-s1) is integer, then, clearly, the “ceiling” is redundant, and the lower bound is identical to the makespan value given in (3.3).)The lower bound given in (3.6) is the smallest integer which is larger than or equal to the makespan value for problem  PR. Any schedule that consists of batches of integer size yielding this makespan is clearly optimal.Ifn1 (given in (3.2) is integer, then clearly all batches are integers and the solution for problem PR is optimal for the original problem, PINT. For the general case, where n1 is not necessarily integer, let Δ=n1-⌊n1⌋(=ni-⌊ni⌋,i=1,…,k).Sincen=∑i=1kni=∑i=1k(⌊ni⌋+Δ)=∑i=1k⌊ni⌋+kΔ, we obtain that kΔ is an integer (strictly smaller than k). Based on the solution for problem PR, we construct a solution for problem  PINT by rounding down the size of l batches and rounding up the size of the remaining k-l batches, where l=(1-Δ)k. One option is to round up the size of the first k-l batches, and round down the size of the last l batches. The resulting job allocation to batches is ⌈n1⌉,⌈n2⌉,…,⌈nk-l⌉,⌊nk-l+1⌋,⌊nk-l+2⌋,…,⌊nk⌋. It is easily verified that in the above schedule: (i) the idle time prior to batch 1 on machine 2 is s1+⌈n1⌉=s1+⌈n/k-((k-1)/2)(s2-s1)⌉, and (ii) there is no idle time between consecutive batches on machine 2. Thus, the makespan value of this schedule is(3.7)Cmax(k)=s1+⌈nk-k-12(s2-s1)⌉+n+ks2.
Note that the above value for the makespan is identical to the lower bound for problem PINT given in (3.6). We conclude that for any value of k, the above schedule is optimal.Comment 2.
It is worth mentioning that the optimal solution is not unique, and other rounding procedures may lead to other optimal schedules. One alternative example consists of rounding down the firstl batches and rounding up the last k-l batches.
The resulting job allocation to batches is⌊n1⌋,⌊n2⌋,…,⌊nl⌋,⌈nl+1⌉,⌈nl+2⌉,…,⌈nk⌉.
In this case, it is easily verified that(i) there is no idle time between consecutive batches on machine 2 for j=1,2,…,l, (ii) there exists 1 unit of idle time between batches l and l+1, and (iii) there is no idle time between consecutive batches on machine 2 for j=l+1,…,k. The makespan value of this schedule (clearly, given that n1 is not integer) is
(3.8)Cmax(k)=⌊n1⌋+s1+n+ks2+1=⌊nk-k-12(s2-s1)⌋+s1+n+ks2+1.
This value for the makespan is identical to the value given in (3.7), implying that this schedule is optimal as well.It remains to find the optimal number of batches,k. Note that due to the integrality of s1 and s2, the makespan function (3.7) can be slightly modified as follows:(3.9)Cmax(k)=s1+⌈nk-k-12(s2-s1)⌉+n+ks2=⌈s1+nk-k-12(s2-s1)+n+ks2⌉.
It follows that the k value minimizing (3.7) also minimizes (3.9). Hence the optimal k value for the relaxed version given in (3.4) and (3.5) is optimal for the integer version. We denote the latter by kopt. A formal algorithm  is provided in Algorithm 3.1.Algorithm 3.1 (flowshop_makespan_s1<s2).
Input:n,s1,s2.Step 1 (Optimal number of batches).
Calculatek1=⌈k*⌉and k2=⌊k*⌋ (from (3.4) and (3.5).
IfCmax(k1)≤Cmax(k2) (in (3.7), then kopt=k1; otherwise kopt=k2.Step 2 (Optimal batches).
(3.10)n1=nkopt-kopt-12(s2-s1),nj+1=nj+(s2-s1),j=1,…,kopt-1
(from (3.2).Step 3 (Rounding).
Calculate the non-integer part of the batch size,Δ=n1-⌊n1⌋.
Calculate the number of batches to be rounded down,l=(1-Δ)kopt.
An optimal integer allocation to batches is⌈n1⌉,⌈n2⌉,…,⌈nkopt-l⌉,⌊nkopt-l+1⌋,⌊nkopt-l+2⌋,…,⌊nkopt⌋.Running Time
It is easily verified that the algorithm is performed inO(n) time. While the calculation of the optimal number of batches and the optimal makespan are performed in constant time, Step 2 of the algorithm requires calculating the batch sizes. Since the number of batches is O(n), the computational effort required is O(n). Step 3 can easily be performed in O(n) time, and consequently, the total running time Algorithm 3.1is O(n).The use of  Algorithm3.1 is demonstrated  in the following example.Example 3.2.
Assumen=80, and s1=2,  s2=3. In Step 1 we calculate k*=5.66, and kopt=6, (the associate optimal makespan value is 111). In Step 2 we obtain the batch sizes (for the relaxed problem): n1=10.833,n2=11.833,n3=12.833,n4=13.833,n5=14.833, and n6=15.833. The rounding procedure (Step 3) leads to the following optimal sequence of batch sizes: n1=11,n2=12,n3=13,n4=14,n5=15, and n6=15; see Figure 1. The makespan as a function of the number of batches (both for the relaxed and for the integer versions) is presented in Figure 2.Figure 1
Optimal schedule of a 2-machine flowshop (Example3.2: n=80,s1<s2,s1=2,s2=3).Figure 2
Makespan as a function of the number of batches for the relaxed and the integer versions (Example3.2: n=80,s1<s2,s1=2,s2=3).Comment 3.
Consider the interesting generalization to the case ofnon-integer setup times. In this case, the optimal k value for (3.7) may be different from that of (3.3),  (e.g., if n=80, s1=2.1 and s2=2.2, we obtain k*=6.099, implying that the optimal k value for the relaxed problem is either 6 or 7, however, the optimal k value for the integer version is 5.) It appears that in this general case (non-integer setups), a closed form expression for the optimal k value does not seem to exist, and a search must be performed. Clearly, a search over all possible k values (1 through n) guarantees an optimal solution. However, a limited search appears to be sufficient, due to the fact that the smallest batch n1 must be nonnegative. From (3.2) we obtain n1=n/k-((k-1)/2)(s2-s1)≥0. Consequently, 1/2-1/4+2n/(s2-s1)≤k≤1/2+1/4+2n/(s2-s1). The first term is strictly negative (recall that s2>s1), implying that k is an integer in the range 1,…,m, where
(3.11)m=⌊12+14+2ns2-s1⌋.
We conclude that despite the need to consider a range of possible values for the number of batches, k, the computational effort required for solving the problem with non-integer setup times remains O(n).Comment 4.
It is easily verified that the algorithm proposed in this section generalizes the algorithm introduced in Mosheiov and Oron [4], for the case of machine-independent setups. When substituting s1=s2=s in the expressions along the above algorithm, we obtain the optimal solution for this special case. In particular, substituting s1=s2=s in Step 2 leads to “equal allocation” to batches (using the terminology of [4]), and the rounding procedure, that is, rounding up the size of the first k-l batches and rounding down the size of the remaining l batches generates an optimal integer solution.


## 4. Conclusion

We study a new version of makespan minimization on a 2-machine flowshop. We consider unit time jobs which may be grouped into batches. The setup times are assumed to be machine-dependent. We introduce an elegant closed form solution for two different cases.A challenging extension is to the setting of anm-machine flowshop (m≥3). Another interesting question refers to a 2-machine jobshop setting. Although not published yet, both problems appear to have similar properties and structures and may have closed form solutions for the number of batches and their sizes. The m-machine jobshop case is known to be strongly NP-hard even with no setups [12]. Thus, future research dealing with this extension may focus either on an introduction of heuristics/approximations or on developing exact (pseudopolynomial) solution algorithms.



---

*Source: 153910-2009-08-16.xml*