17
Makespan Minimization in the Two-Machine Flowshop Batch Scheduling Problem T.C.E. Cheng, 1 B.M.T. Lin, 2 A. Toker 3 1 Office of the Vice-President (Research and Postgraduate Studies), The Hong Kong Polytechnic University, Kowloon, Hong Kong 2 Department of Information Management, Ming Chuan University, Taiwan, Republic of China 3 Department of Management, The Hong Kong Polytechnic University, Kowloon, Hong Kong Received August 1998; revised June 1999; accepted September 24, 1999 Abstract: In this paper we consider a practical scheduling problem commonly arising from batch production in a flexible manufacturing environment. Different part-types are to be produced in a flexible manufacturing cell organized into a two-stage production line. The jobs are processed in batches on the first machine, and the completion time of a job is defined as the completion time of the batch containing it. When processing of all jobs in a batch is completed on the first machine, the whole batch of jobs is transferred intact to the second machine. A constant setup time is incurred whenever a batch is formed on any machine. The tradeoff between the setup times and batch processing times gives rise to the batch composition decision. The problem is to find the optimal batch composition and the optimal schedule of the batches so that the makespan is minimized. The problem is shown to be strongly NP-hard. We identify some special cases by introducing their corresponding solution methods. Heuristic algorithms are also proposed to derive approximate solutions. We conduct computational experiments to study the effectiveness of the proposed heuristics. c 2000 John Wiley & Sons, Inc. Naval Research Logistics 47: 128144, 2000 Keywords: flowshop scheduling; batching; makespan; computational complexity 1. INTRODUCTION This paper is motivated by a scheduling problem observed in a manufacturer of pneumatic valves. Valves of different sizes and shapes (known as part-types) are produced from plastic molds in a flexible manufacturing cell organized into a two-stage production line. The first stage is a multipurpose machining center where machining operations are performed to produce valves of intrigue shapes. The second stage is an inspection station where all manufactured valves are electronically inspected for quality conformance before delivery to customers. The part-types are Correspondence to: T.C.E. Cheng Contract grant sponsor: RGC of Hong Kong Contract grant number: HKP54/94 c 2000 John Wiley & Sons, Inc.

Makespan minimization in the two-machine flowshop batch scheduling problem

Embed Size (px)

Citation preview

Makespan Minimization in the Two-Machine Flowshop BatchScheduling Problem

T.C.E. Cheng,1 B.M.T. Lin,2 A. Toker3

1Office of the Vice-President (Research and Postgraduate Studies),The Hong Kong Polytechnic University, Kowloon, Hong Kong

2Department of Information Management, Ming Chuan University,Taiwan, Republic of China

3Department of Management, The Hong Kong Polytechnic University,Kowloon, Hong Kong

Received August 1998; revised June 1999; accepted September 24, 1999

Abstract: In this paper we consider a practical scheduling problem commonly arising from batchproduction in a flexible manufacturing environment. Different part-types are to be produced ina flexible manufacturing cell organized into a two-stage production line. The jobs are processedin batches on the first machine, and the completion time of a job is defined as the completiontime of the batch containing it. When processing of all jobs in a batch is completed on the firstmachine, the whole batch of jobs is transferred intact to the second machine. A constant setuptime is incurred whenever a batch is formed on any machine. The tradeoff between the setuptimes and batch processing times gives rise to the batch composition decision. The problem is tofind the optimal batch composition and the optimal schedule of the batches so that the makespanis minimized. The problem is shown to be strongly NP-hard. We identify some special casesby introducing their corresponding solution methods. Heuristic algorithms are also proposed toderive approximate solutions. We conduct computational experiments to study the effectivenessof the proposed heuristics. c© 2000 John Wiley & Sons, Inc. Naval Research Logistics 47: 128–144, 2000

Keywords: flowshop scheduling; batching; makespan; computational complexity

1. INTRODUCTION

This paper is motivated by a scheduling problem observed in a manufacturer of pneumaticvalves. Valves of different sizes and shapes (known as part-types) are produced from plasticmolds in a flexible manufacturing cell organized into a two-stage production line. The first stageis a multipurpose machining center where machining operations are performed to produce valvesof intrigue shapes. The second stage is an inspection station where all manufactured valves areelectronically inspected for quality conformance before delivery to customers. The part-types are

Correspondence to: T.C.E. ChengContract grant sponsor: RGC of Hong KongContract grant number: HKP54/94

c© 2000 John Wiley & Sons, Inc.

Cheng, Lin, and Toker: Two-Machine Flowshop Batch Scheduling Problem 129

mounted on pallets for machining. While a pallet can only hold a finite number of part-types,its capacity is normally quite large and so can be reasonably assumed to be unlimited. The part-types mounted on the same pallet are processed together as a batch for their first operation at themachining center and are transferred to the inspection station only when all part-types on the samepallet have finished processing. Thus, the part-types assigned to the same pallet share the samecompletion time, which is called the batch completion time. A setup time is needed to remove aprocessed pallet and to install a new one on either the machining center or the inspection station.The setup time is relatively fixed and is in the same order of magnitude as the processing time.

While the pallets have the same capacities, loading a pallet to its full capacity may not necessar-ily be beneficial as it may lead to long batch processing times. Hence, the number of part-typesto be mounted on a pallet is a decision variable. The goal is to determine simultaneously theoptimal batching of the part-types for mounting on the pallets and the optimal processing orderof the pallets in order to finish the production in the shortest time.

This scheduling problem, commonly arising from batch production in a flexible manufacturingenvironment, can be formally described as follows. A set of n independent and simultaneouslyavailable jobs are to be processed in a two-machine flowshop. The jobs have to be batched as wellas scheduled. We assume that the batch composition that is formed on the first machine cannot bealtered, and that the batch capacity is unlimited. These assumptions follow from the observationsthat a batch is a pallet with a given set of part-types mounted on it and it is time consuming tochange the pallet composition between the two machines, and that the pallet capacity is largerelative to the sizes of the part-types. The completion time of a job is defined as the completiontime of the batch containing it. Transferring of jobs to the second machine is possible only whenprocessing of all jobs in the same batch is completed on the first machine. A constant setup timeis incurred whenever a batch is formed on any machine. The problem is to determine the optimalbatch composition and to schedule the batches optimally so that the makespan is minimized. Wecall this problem the two-machine flowshop batching problem and denote it by 2MFB. It isevident that having a few setups, thus a small number of batches each with a long processingtime on the first machine, is likely to incur undesirable idle time on the second machine. Onthe other hand, if we create too many batches, then we will end up with a long makespan dueto the increased number of setups. Specifically, the tradeoff between the setup times and batchprocessing times gives rise to the batch composition decision. Therefore, minimization of themakespan for the 2MFB problem is achieved not by solely minimizing the total idle time onmachine two like that in the two-machine flowshop problem without batching but by a tradeoffbetween the total idle time and the total setup time. The following example gives an illustrationof this observation.

EXAMPLE 1: Consider a 2MFB problem with the following set of five jobs. In the job set,pi and qi denote the processing times of job i on machines one and two, respectively:

jobs 1 2 3 4 5pi 2 3 4 5 4qi 3 4 4 3 2

Assume that the batch setup time is s = 2. Let schedules S1 = {{1, 2}, {3, 4, 5}}, S2 ={{1, 4}, {2, 3}, {5}}, and S3 = {{1, 2, 3}, {4, 5}}. From Figure 1, we know that Z(S1) =33, Z(S2) = 32, and Z(S3) = 31. The total setup time of S2 is two units larger than that of S1.On the other hand, the total idle time of S2 on machine two is three units less than that of S1.Therefore, the makespan under S2 is one unit shorter than that under S1. Schedule S3 containstwo batches, like S1, and achieves a makespan of 31 because of a better batching decision.

130 Naval Research Logistics, Vol. 47 (2000)

Figure 1. Three example schedules.

2. LITERATURE REVIEW

Flowshop scheduling has been a popular topic of scheduling research for many years [21].The traditional flowshop scheduling model involves a unidirectional flow of work: Jobs mustvisit machines, or work stations, in a given order, and the objective is to complete all jobs in theearliest possible time. In his seminal work [15], Johnson formally introduced the basic two- andthree-stage flowshop scheduling problems for minimizing the maximum completion time of thejobs, i.e., the makespan. He showed that it is sufficient to consider only permutation schedulesand presented an O(n log n) algorithm for the two-stage problem. Johnson’s algorithm is alsoapplicable for some special cases of the three-stage problem; the general three-stage problem is,however, NP-hard [13]. Due to the theoretical challenges and practical significance, flowshopscheduling problems have received considerable attention from researchers for decades. See, forexample, [3, 11, 13, 14] for comprehensive surveys and [16, 18, 23] for different generalizations.

There has been increasing interest in batch scheduling problems in the last decade. The practicalexamples suggested by Conway, Maxwell, and Miller [10] have spurred much interest in theseproblems. The batch setup times are defined as the change-over costs for the processing of jobsfrom different families. In [20], Potts and Van Wassenhove presented a comprehensive surveyon this type of batch scheduling problem. Recently, many researchers have paid attention to thebatch scheduling problem where setup times refer to the costs for creating batches of jobs forprocessing on the machines. In this paper, we study a batch scheduling problem of this type.Recent surveys of batch scheduling problems can be found in [17, 24].

The majority of previous research on batch scheduling problems has mainly focused on thesingle machine problem. To minimize the total completion time, Naddef and Santos [19] first

Cheng, Lin, and Toker: Two-Machine Flowshop Batch Scheduling Problem 131

presented an O(n) algorithm for the special case where all jobs have the same processing time.An improved algorithm was later provided by Coffman, Nozari, and Yannakakis [8] which runs inO(

√n) time. A formula to determine batch sizes was suggested by Shallcross [22]. Coffman et

al. [9] constructed an O(n log n) algorithm to solve the problem with different processing times.In [2], Albers and Brucker derived polynomial algorithms for some special cases. In [5], Cheng,Kovalyov, and Lin studied the problem to minimize the sum of total weighted job earliness andmean batch delivery time. Parallel machine batching and scheduling problem was studied byCheng et al. [4]. Other related literature and applications can be found in [24]. A study similarto our work was conducted for batch scheduling to minimize the makespan in a two-machineflowshop with a limited buffer installed for accommodating the jobs transferred from machineone to machine two. Jobs of the same type are all grouped into a single batch and processedconsecutively. When the number of jobs in a batch exceeds the buffer size, the batch is split intosubbatches [1]. In a recent paper, Cheng and Wang [6] considered another two-machine flowshopscheduling problem to minimize the makespan where one machine processes jobs in batches andthe other machine process jobs individually. Another study by Cheng and Wang [7] considereda fabrication scheduling problem in a two-machine flowshop where the first machine processesthe unique job components individually and the common components in batches and the secondmachine performs the assembly operations of each job. However, it appears that the problemof batching and scheduling a given set of jobs in a flowshop with batching on both machines tominimize the makespan has not been tackled.

The rest of the paper is organized as follows. We first introduce the notation to be used inSection 3. In Section 4, we give a strong NP-hardness proof by a reduction from the 3-PARTITIONproblem. In Section 5, we present properties and efficient algorithms for some special cases of2MFB. In Section 6, we design several heuristic algorithms for deriving approximate solutions.Numerical results are also included. Finally, we present our conclusions in the last section.

3. PROBLEM FORMULATION AND OPTIMALITY PROPERTIES

In this section, we first give a formal definition of 2MFB. The preliminary notation that willbe used throughout this paper is first defined:

N = {1, 2, . . . , n} = job set to be processed,pi = processing time of job i on machine one,qi = processing time of job i on machine two,s = batch setup time,S = a schedule for the job set N ,

Bl = the lth batch,bl = number of jobs in batch Bl,Pl = aggregate processing time of Bl on machine 1, i.e., Pl = s +

∑j∈Bl

pj ,Ql = aggregate processing time of Bl on machine 2, i.e., Ql = s +

∑j∈Bl

qj ,C1

l = completion time of batch Bl on machine 1,C2

1 = completion time of batch Bl on machine 2,Z(S) = makespan of schedule S (i.e., Cmax = max{C2

l }).

The three-field notation introduced by Conway, Maxwell, and Miller [10] is adopted in thispaper. We denote the problem under study by 2MFB//Cmax. Here, the second field states

132 Naval Research Logistics, Vol. 47 (2000)

special constraints imposed on the problem. For example, 2MFB/pi = p/Cmax denotes the2MFB//Cmax problem where all jobs have the same processing time on machine one.

Next, we present two general properties that will be useful throughout our study on2MFB//Cmax.

LEMMA 1: There is an optimal schedule, B1B2 · · ·Bk, in which, for any batches Bl and Bm,if

(1) Pl ≤ Ql, Pm ≤ Qm, and Pl ≤ Pm, or(2) Pl > Ql, Pm > Qm, and Ql ≥ Qm, or(3) Pl ≤ Ql and Pm > Qm,

then batch Bl precedes batch Bm.

PROOF: Any batch Bl can be treated as a composite job whose corresponding processingtimes on machines one and two are Pl and Ql, respectively. The proof follows directly fromthe pairwise job interchange argument used to establish Johnson’s result for the two-machineflowshop scheduling problem to minimize the makespan.

LEMMA 2: There is an optimal schedule in which, for any jobs i ∈ Bl and j ∈ Bm, if pi ≤ pj

and qi ≥ qj , then l ≤ m.

PROOF: If l > m, then we swap the positions of jobs i and j. It is clear that the makespan willnot be increased by such a pairwise job interchange operation. The proof readily follows.

4. STRONG NP-HARDNESS

In this section, we show that 2MFB//Cmax is strongly NP-hard by a reduction from 3-PARTITION, which is known to be NP-hard in the strong sense [12].

3-PARTITION. Given an integer M and a set A of 3n positive integers {x1, x2, . . . , x3n},

M/4 < xi < M/2, 1 ≤ i ≤ 3n, such that∑3n

i=1 xi = nM , does there exist a partitionA1, A2, . . . , An of the set A such that |Al| = 3 and

∑xi∈Al

xi = M, 1 ≤ l ≤ n?

THEOREM 1: Minimization of the makespan for the two-machine flowshop batch schedulingproblem is strongly NP-hard even if pi < qi for all job i.

PROOF: It is clear that 2MFB//Cmax is in NP. We next perform a polynomial-time re-duction from 3-PARTITION. Given an instance of 3-PARTITION, we construct an instance of2MFB//Cmax consisting of 4n jobs as follows:

Ordinary jobs: pi = xi, qi = 2xi, 1 ≤ i ≤ 3n,

Enforcer jobs: p3n+i = Y + 2(i − 1)M, q3n+i = Y + (2i − 1)M, 1 ≤ i ≤ n,

where Y is a constant greater than 12n2M ,

setup time s = 3nM.

Note that, in the above instance, pi < qi for any job i, 1 ≤ i ≤ 4n. The sum of the processingtimes of all jobs on machine one is nM + [Y + (Y + 2M) + (Y + 4M) + · · · + (Y + 2(n −

Cheng, Lin, and Toker: Two-Machine Flowshop Batch Scheduling Problem 133

1)M)] = nY + n2M . Similarly, the sum of the processing times of all jobs on machine twois 2nM + [(Y + M) + (Y + 3M) + (Y + 5M) + · · · + (Y + (2n − 1)M)] = nY + (n2

+ 2n)M . We claim that there is a desired partition for the set A if and only if there exists anoptimal schedule for the instance of 2MFB//Cmax with a makespan of Z∗ ≤ nY + (n2 +2n)M + (3nM + Y + M) + 3n2M .

(⇒) Let the subsets A1, A2, . . . , An be a partition as specified for the set A in 3-PARTITION.Let job 3n + l and the jobs corresponding to the elements of Al form batch Bl, 1 ≤ l ≤ n. Theconfiguration of this schedule is depicted in Figure 2. In the derived schedule, the makespanis [nY + (n2 + 2n)M ] + [3nM + Y + M ] + [3n2M ], where the first term is the sum of theprocessing times on machine two, the second is the idle time on machine two for the first batch,and the third is the sum of the setup times.

(⇐) Suppose that there is an optimal schedule S for 2MFB/pi < qi/Cmax whose completiontime is no more than nY +(n2 +2n)M +(3nM +Y +M)+3n2M . Since the total processinglength of all jobs on machine two is nY + (n2 + 2n)M , for schedule S, the sum of idle timesand setup times on machine two cannot be greater than (3nM + Y + M) + 3n2M .

FACT 1: In schedule S, each batch contains at most one enforcer job.

PROOF: Assume there is some batch that contains more than one enforcer job. Let batch Bl

be the first batch containing at least one enforcer job. Consider the following two cases:

CASE 1. Batch Bl contains more than one enforcer job.

Because batch Bl contains two or more enforcer jobs, it will incur an idle time no less than2Y − 2nM , where 2nM is the maximum possible contributions made by the ordinary jobs. That2Y − 2nM is greater than (3nM + Y + M) + 3n2M leads to a contradiction.

CASE 2. Batch Bl contains exactly one enforcer job.

In this case, batch Bl will incur an idle time no less than Y − 2nM , and the first batch containingtwo or more enforcer jobs will incur an idle time no less than Y −2nM −(n−2)M . The total idletime for this case is no less than 2Y −5nM +2M , which is greater than (3nM +Y +M)+3n2M .

Therefore, from the above analysis, we know that there cannot be more than one enforcer jobin any batch in schedule S.

Figure 2. Configuration of an optimal schedule.

134 Naval Research Logistics, Vol. 47 (2000)

From this result, we know that schedule S contains at least n batches.

FACT 2. Schedule S contains at most n batches.

PROOF: If there are more than n batches in S, then there must be some batch consisting of theordinary jobs only. Furthermore, by Lemma 1, such a batch precedes the batches containing theenforcer jobs. The idle time on machine two before the first batch is at least 3nM , while the idletime on machine two before the first batch containing the enforcer jobs is at least Y −2nM , where2nM is the maximum possible contributions made by the ordinary jobs. The sum of idle time istherefore no less than Y +nM . Furthermore, the sum of the setup times on machine two is no lessthan 3n(n+1)M . The sum of Y +nM and 3n(n+1)M is greater than (3nM +Y +M)+3n2M ,a contradiction.

From the above two facts, we see that schedule S consists of exactly n batches, each ofwhich contains exactly one enforcer job. Furthermore, because for any job pair 3n + k and3n + l, 1 ≤ k < l ≤ n, p3n+k < p3n+l and q3n+k − p3n+k = q3n+l − p3n+l = M , theenforcer job 3n + k will precede the enforcer job 3n + l in schedule S, for otherwise we mayswap their positions without increasing the makespan. In other words, in schedule S the enforcerjob 3n + l, 1 ≤ l ≤ n, is contained in the lth batch Bl.

FACT 3. In schedule S, Pl = 3nM + (Y + 2(l − 1)M) + M, 1 ≤ l ≤ n.

PROOF: By Lemma 1(1), we assume that, in schedule S, if l ≤ m, then Pl ≤ Pm. LetPl = 3nM + (Y + 2(l − 1)M) + ρl, 1 ≤ l ≤ n, where ρl corresponds to the sum of theprocessing times of the ordinary jobs in batch Bl. We now show that ρ1 = ρ2 = · · · = ρn = Mmust hold.

Assume that ρ1 ≤ ρ2 ≤ · · · ≤ ρn, for otherwise we may exchange, without increasing themakespan, all ordinary jobs of any two consecutive batches not satisfying the inequality. We nowdetermine the total idle time incurred. Let k, k > 1, be the first batch such that ρk > M . Onmachine two, the idle time before batch B1 is 3nM + Y + ρ1, while the idle time before batchB2 is max{(3nM +Y +2M + ρ2)− (3nM +Y +M +2ρ1), 0} = max{M + ρ2 − 2ρ1, 0} =M + ρ2 − 2ρ1 because M > ρ1 and ρ2 ≥ ρ1. In general, the idle time on machine two for batchBl, 2 ≤ l ≤ k, is M + ρl − 2ρl−1. Adding up these numbers, we have

(3nM + Y + ρ1) + (M + ρ2 − 2ρ1) + (M + ρ3 − 2ρ2) + · · · + (M + ρk − 2ρk−1)= (3nM + Y + ρk) + (M − ρ1) + (M − ρ2) + (M − ρ3) + · · · + (M − ρk−1)> 3nM + Y + M.

The above inequality leads to a contradiction since the total idle time cannot exceed 3nM +Y + M . Therefore, ρl = M must hold for l = 1, 2, . . . , n and the proof is concluded.

With Fact 3, a partition for the set A is obtained by letting the elements corresponding to theordinary jobs in batch Bl, 1 ≤ l ≤ n, to form the subset Al. Then,

∑xi∈Al

xi = M , and |Al| = 3because M/4 ≤ xi ≤ M/2.

With Theorem 1, it is very unlikely that even a pseudopolynomial time algorithm for 2MFB/pi < qi/Cmax can be found. A counterpart of 2MFB/pi < qi/Cmax is 2MFB/pi > qi/Cmax.For the mirror problem, we can look backward from the reverse side of the time horizon andestablish its NP-hardness. More specifically, we create 4n jobs such that pi = 2xi, qi = xi for

Cheng, Lin, and Toker: Two-Machine Flowshop Batch Scheduling Problem 135

1 ≤ i ≤ 3n and p3n+i = Y +(2i− 1)M, q3n+i = Y +2(i− 1)M for 1 ≤ i ≤ n. In the optimalschedule, the enforcer job 3n + l is associated with batch Bn−1+1, 1 ≤ l ≤ n.

5. EFFICIENT ALGORITHMS FOR SPECIAL CASES

In this section, we give useful properties and propose efficient algorithms for some specialcases of 2MFB//Cmax.

5. 1. 2MFB2MFB2MFB/pppiii = qqqiii = ppp/CCCmax

The first case deals with the situation where all jobs are homogeneous and their processingtimes on machines one and two are the same.

LEMMA 3: For 2MFB/pi = qi = p/Cmax, if l < m, then there exists an optimal schedulein which bl ≤ bm.

PROOF: Simply by Lemma 1.

LEMMA 4: For 2MFB/pi = qi = p/Cmax, there exists an optimal schedule in which, forany batches Bl and Bm, |bl − bm| ≤ 1.

PROOF: Let k be given as the number of batches. Without loss of generality, assume k is nota proper divisor of n. The case where k properly divides n can be similarly analyzed. Let thebatches be scheduled by the rule stated in Lemma 3. We use

⌊n

k

⌋, . . . ,

⌊n

k

⌋,

⌈n

k

⌉, . . . ,

⌈n

k

as the thresholds for confining the numbers of jobs evenly distributed in these k batches. Let Bl

be the first batch such that bl < bl+1, and batch Bm, 1 < m, be the first batch whose size exceedsits threshold value. By Lemma 3, we have l < m. Consider the effects of transferring one jobfrom Bm to Bl, which will give rise to the following events:

1. The idle time before batch Bl is increased by p. By the definition of batch Bl,in the original schedule, the completion time of batch Bl on machine one isequal to the completion time of its preceding batch on machine two. Insertinga new job into batch Bl will cause an idle time of p for Bl.

2. The idle time before batch Bl+1 is decreased by p. By the definition of batchBl, batch Bl+1 must have a nonzero idle time. After inserting an extra job intobatch Bl, the completion times of batch Bl on both machines are delayed by pand 2p, respectively. Thus, the idle time for batch Bl+1 is reduced by p.

3. The idle time before batch Bm is decreased by p. By the definition, batch Bm

has a nonzero idle time. Removing a job batch Bm will expedite its completiontime on machine one by p and thus reduce its idle time on machine two by p.

4. The idle time before batch Bm+1 is increased by p. Because bm ≤ bm+1, thecompletion time of batch Bm+1 on machine one is no earlier than the completiontime of batch Bm on machine two. Therefore, the idle time for batch Bm+1will be increased by p when a job is removed from batch Bm.

5. The idle time for any other batch remains unchanged.

136 Naval Research Logistics, Vol. 47 (2000)

The net effect of this chain of events is that the total idle time remains unchanged. However,the total idle time will be decreased by p if m is the last batch because event four will not occur.Therefore, repeating the process will not increase the total idle time, but will gradually balancethe batch sizes, i.e., |bl − bm| ≤ 1 for any batches l and m.

From Lemma 4, we see that the total idle time for a given k is s + p(n/k) if k properly dividesn; s + p(bn

k c + 1), otherwise. Or it can be simply written as s + pdnk e. Therefore, minimizing

the makespan is equivalent to minimizing Z = pdnk e + s(k + 1). By a simple loop for each k

from 1 to n, the minimum value can be determined. As a result, 2MFB/pi = qi = p/Cmax issolvable in O(n) time. Note that the computational time is not polynomial because the input ofany instance of 2MFB/pi = qi = p/Cmax contains only three parameters, p, n, and s.

THEOREM 2: Problem 2MFB/pi = qi = p/Cmax is solvable in O(n) time.

5. 2. 2MFB2MFB2MFB/≺≺≺ /CCCmax

In the case 2MFB/ ≺ /Cmax, the jobs can be reindexed by a total order such that pi ≤ pj

and qi ≥ qj if 1 ≤ i < j ≤ n. By virtue of Lemma 2, there is an optimal schedule where ifi < j, then either job i and job j are in the same batch or the batch containing job i precedes thatcontaining job j. Therefore, we can assume that the jobs in any batch of an optimal schedule areconsecutively indexed. The issue left to be resolved is the batching or grouping problem.

LEMMA 5: For 2MFB/ ≺ /Cmax, let S∗k−1 be optimal among all schedules with exactly

k −1 batches for the subset N −{r, r +1, . . . , n}. Then, for the set N , schedule S∗k−1Bk, where

Bk is the batch formed by jobs r, r + 1, . . . , n, is optimal among all schedules where there areexactly k batches and Bk is scheduled last.

PROOF: Let Sk−1 be any schedule with k−1 batches for N −Bk. Since Sk−1 and S∗k−1 have

the same number of batches, they have the same completion time on machine one. Furthermore,the completion time of S∗

k−1 on machine two is the same or smaller than that of Sk−1. It isapparent that Z(S∗

k−1Bk) is no greater than Z(Sk−1Bk). The proof readily follows.

This lemma indeed suggests a backward approach to finding an optimal batching schedule.Let C1(α, β) and C2(α, β) denote the completion times on machine one and machine two,respectively, of an optimal solution for scheduling jobs in {1, 2, . . . , α} into exactly β batches,where 1 ≤ β ≤ α ≤ n. An optimal schedule for N can be obtained by the following algorithm.

Algorithm A:

Line 1: C2(0, 0) = 0;C1(α, β) = ∞, 1 ≤ α, β ≤ n.Line 2: For β = 1 to n doLine 3: For α = β to n do

{Line 4: C1(α, β) = αp + βs.Line 5: C2(α, β) = mini∈I{max{C1(α, β), C2(α − i, β − 1)} +

(s +∑α

j=α−i+1 qj)}}, where I = {1, 2, . . . , α − β + 1}.}

Line 6: Return minβ=1···n{C2(n, β)}.Line 7: Stop.

Cheng, Lin, and Toker: Two-Machine Flowshop Batch Scheduling Problem 137

In Line 5 of Algorithm A, the set I represents the permissible range for the size of the last batchwhen scheduling the first α jobs into β batches. The semantics of Algorithm A can be visualizedas an upper-triangular array as shown in Figure 3. Each cell represents an (α, β)-configuration.The information within cell (α, β) can be used to generate information in some cells with β + 1batches; on the other hand, the information in cell (α, β) is itself generated from informationin some cells with β − 1 batches. The relationships between the cells are established by thepermissible set I . In Figure 4, an example is given to illustrate the running sessions of a set offour jobs.

Due to the nested loop, there are O(n2) possible states, each of which takes a simple inner loopover the set I to determine the optimal solution. In each inner loop iteration, the computationaltime needed is O(n) because the values of different

∑αj=α−i+1 qj in Line 5 can be determined by

preprocessing. Therefore, the overall time complexity of Algorithm A is O(n3), and the followingtheorem concludes the result.

THEOREM 3: Problem 2MFB/ ≺ /Cmax is solvable in O(n3) time.

Besides offering a means to solve 2MFB/ ≺ /Cmax efficiently, Algorithm A can be benefi-cially exploited to find an effective lower bound for the general 2MFB//Cmax problem, as willbe discussed in Section 6.

5. 3. 2MFB2MFB2MFB/pppiii = ppp/CCCmax

The case 2MFB/pi = p/Cmax, where all jobs have the same operation on machine one, is arestricted version of 2MFB/ ≺ /Cmax. By exploiting a useful observation, we further improveAlgorithm A. The main theme of the improvement is to reduce the number of possible values ineach permissible set I .

Figure 3. A graphical representation of Algorithm A.

138 Naval Research Logistics, Vol. 47 (2000)

Figure 4. An example for Algorithm A.

LEMMA 6: There is an optimal schedule with k batches for 2MFB/pi = p/Cmax such that|C1

l − C2l−1| < p for any batch Bl, 1 < l < k.

PROOF: Assume that there is some optimal schedule with k batches in which |C1l − C2

l−1|≥ p for some batch l, 1 < l < k.

CASE 1. C1l − C2

l−1 ≤ −p. This case implies that the completion of batch Bl−1 on machinetwo leaves a sufficiently large time buffer to accommodate the processing of batch Bl on machine

Cheng, Lin, and Toker: Two-Machine Flowshop Batch Scheduling Problem 139

one. Therefore, transferring a job from any batch following batch Bl into Bl will not increasethe total idle time. Therefore, the process can be continued until −p < C1

l − C2l−1 ≤ 0.

CASE 2. C1l − C2

l−1 ≥ p. In this case, we transfer a job from batch Bl to any batch, sayBm, preceding Bl. This job transfer reduces the idle time before Bl by p and increases the idletime before Bm by no more than p. Therefore, we can repeat the job transfer process withoutincreasing the total idle time until the inequality 0 ≤ C1

l − C2l−1 < p is satisfied.

From the analysis of the job transfer process in the above two cases, we can obtain an optimalschedule where |C1

l − C2l−1| < p.

Referring to Figure 3, this lemma reveals that every cell with exactly β batches supports atmost two cells with β + 1 batches. In other words, the information in cell (α, β) will be usedonly for cells (α + r, β + 1), where r can be

max{d[C2(α, β) − C1(α, β)]/pe, n − α}

or

max{b[C2(α, β) − C1(α, β)]/pc, n − α}.

The term ‘‘n − α’’ is used for the situation where the number of remaining jobs is small. Withthis observation, the total number of ‘‘arrows’’ directed from cells in row β (i.e., β batches) tocells in row β + 1 (i.e., β + 1 batches) will be bounded by O(n). Thus, computing C1 and C2

for all cells in the n rows can be finished in O(n2) time.Notice that the mirror case 2MFB/qi = q/Cmax with the job set N can be similarly dealt

with by defining a new job set N ′ = {1′, 2′, . . . , n′} with p′i = qi, q

′i = pi for all i′. Apply the

algorithm for 2MFB/pi = p/Cmax to derive an optimal schedule for N ′. Reversing the orderof the batches in the derived optimal schedule will give an optimal schedule for N . That is, theoptimal schedule B′

1B′2 · · ·B′

k for N ′ corresponds to the optimal schedule BkBk−1 · · ·B1 forN . In summary, we have established the following theorem:

THEOREM 4: Problems 2MFB/pi = p/Cmax and 2MFB/qi = q/Cmax are both solvablein O(n2) time.

For the practical problem of manufacturing pneumatic valves which motivated this study, asdiscussed earlier, the second stage is to perform electronic inspection operations. The inspectiontimes are in the range of 1–2 min while the machining times at the first stage vary from 10 to 15min. Since the inspection times have small variations and are an order of magnitude less than themachining times, they can be reasonably assumed to be equal. Therefore, this problem is quiteclose to the special case where qi = q for all job i and q � pi. According to Theorem 4, the realproblem can be regarded as efficiently solved. In fact, we have applied Algorithm A modifiedfor the case qi = q for all job i to solve several instances of the real problem, which typicallyhas some 40 jobs. The optimal results are on average 30% better than those used in the companywhich were decided by the production scheduler based on personal experience.

6. HEURISTICS

Because of the inherent intractability of 2MFB//Cmax, it is very unlikely that efficient al-gorithms exist for solving the problem exactly. In this section, we design a number of heuristic

140 Naval Research Logistics, Vol. 47 (2000)

algorithms to produce quality approximate solutions efficiently. Extensive computational exper-iments are conducted to evaluate the effectiveness of these proposed heuristics.

6. 1. The Algorithms

The heuristic algorithms are made up of two phases: job sequencing and job dispatching. Inphase one, five strategies for constructing an initial job sequence are pursued:

I1: arrange the jobs by Johnson’s rule;

I2: arrange the jobs in nonincreasing qi − pi;

I3: arrange the jobs in nonincreasing qi/pi;

I4: arrange the jobs in nondecreasing pi;

I5: arrange the jobs in nonincreasing qi.

In the second phase, the number of jobs in the first batch is fixed and two strategies are appliedto dispatch the jobs to form succeeding batches:

D1: From the unscheduled jobs, insert jobs into a new batch until the completiontime on machine one of the new batch is no less than the completion time onmachine two of the current batch. Repeat the process until all jobs are finished.

D2: From the unscheduled jobs, insert jobs into a new batch until the completiontime on machine one of the new batch is greater than the completion time onmachine two of the current batch. If the new batch contains two or more jobs,remove the last job and leave it unscheduled; otherwise, the single job formsthe batch unconditionally. Repeat the process until all jobs are finished.

With a view to producing a better solution, we iterate the second phase on different numbers ofjobs contained in the first batch.

Combining the strategies in the two phases, we construct ten heuristics HIx

Dy, x ∈ {1, 2, 3, 4, 5}

and y ∈ {1, 2}. The following segment of pseudo-codes, given as an example, illustrates proce-dure HI1

D2.

Algorithm HI1D2

:

Line 1: Order the jobs by Johnson’s rule.Line 2: Set Cmax = ∞.Line 3: For k = 1 to n do Line 4 through Line 9.Line 4: Set t1 = s +

∑ki=1 pi; t2 = t1 + (s +

∑ki=1 pi).

Line 5: Set i1 = k + 1.Line 6: Find the largest index i2, i1 ≤ i2 ≤ n, such that t1 + (s +

∑i2j=i1

pj) ≤ t2.If there is no such i2, then set i2 = i1.

Line 7: Set t1 = t1 + (s +∑i2

j=i1pj) and t2 = max{t1, t2} + (s +

∑i2j=i1

qj).Line 8: If i2 < n, then set i1 = i2 + 1; go to Line 6.Line 9: If t2 < Cmax, then set Cmax = t2.Line 10: Stop.

Regarding the time complexity, we see that Line 1 takes O(n log n) time to determine theinitial job sequence. For each fixed k, O(n) time is needed to inspect all jobs to form batches.Therefore, the time complexity of the algorithm is dominated by O(n2).

Cheng, Lin, and Toker: Two-Machine Flowshop Batch Scheduling Problem 141

6. 2. Numerical Results

To measure the effectiveness of the heuristics, we perform a series of computational exper-iments. The lower bounds we use to evaluate the heuristics are the solutions obtained fromapplying Algorithm A to a transformed job set. Let N ′ be a job set transformed from job set Nby letting p′

i be the ith smallest element in {p1, p2, . . . , pn} and q′i be the ith largest element in

{q1, q2, . . . , qn}. Job set N ′ satisfies the condition specified in the problem 2MFB/ ≺ /Cmax

and can be solved using Algorithm A. The following result identifies a useful property for the datatransformation.

LEMMA 7: For any schedule S for 2MFB//Cmax with job set N , there is a schedule S′ for2MFB/ ≺ /Cmax with job set N ′ such that Z(S′) ≤ Z(S).

PROOF: For any job pair i and j, if i is scheduled before j and pi > pj , then we interchangethe machine-one operations of jobs i and j without altering their machine-two operations. That is,a job has processing times pj and qi, and the other job has processing times pi and qj . It is apparentthat the makespan cannot be increased. After performing all necessary swaps, we then focus onmachine-two operations. If job i precedes job j and qi < qj , then we swap their machine-twooperations and leave their machine-one operations unaltered. The makespan is not increasedeither. After the swaps are finished, the derived schedule is a solution for 2MFB/ ≺ /Cmax

and yields a makespan no less than Z(S′), which is optimal for 2MFB/ ≺ /Cmax. Therefore,the lemma follows.

This interesting property makes it possible to evaluate the effectiveness of heuristic algorithmHIx

Dyby measuring its relative error ratios with respect to the lower bounds. Let ZIx

Dydenote the

makespan given by heuristic HIx

Dy. The relative error ratio is defined by {[ZIx

Dy−Z(S′)]/Z(S′)}×

100%.In the experimental setting, pi’s and qi’s are integers randomly drawn from the interval [50,

150]. The number of jobs, n, is 30, 50, 100, or 300. The setup time, s, is 50, 100, 500, 1000, or3000. Different setup times are used to illustrate the performance versus the relative ratio of setuptime to total processing length. For each combination of n and s, all heuristics are run through100 data sets. We keep track of the largest error ratio and average error ratio among 100 sessionsfor each heuristic. The computational results are given in Tables 1 and 2.

From the numerical results, we can make some general observations that may hint on the designof heuristic algorithms for 2MFB//Cmax.

• With a fixed sequencing strategy, dispatching strategy D2 outperforms strategyD1.

• With a fixed dispatching strategy, sequencing strategies I2 and I3 outperformother sequencing strategies when the problem sizes are small (n = 10, 50).

• With a fixed dispatching strategy, sequencing strategy I1 outperforms othersequencing strategies when the problem sizes are large (n = 100, 300).

• With a fixed dispatching strategy, sequencing strategies taking into accountboth pi and qi (I1, I2, I3) by and large outperform those strategies dependingon either pi or qi (I4, I5).

• The algorithms exhibit minor error ratios when the setup time is relatively largeror smaller than

∑ni=1 pi or

∑ni=1 qi. Refer to the rows with (n = 10, 50; s =

3000) or (n = 300; s = 50).

142 Naval Research Logistics, Vol. 47 (2000)

Table 1. Average error ratio in percentage.

n Setup HI1D1

HI2D1

HI3D1

HI4D1

HI5D1

HI1D2

HI2D2

HI1D2

HI4D2

HI5D2

10 50 5.41 5.01 4.66 6.25 6.53 3.96 3.36 3.43 5.73 5.49150 3.23 2.67 2.88 4.05 4.16 2.93 2.52 2.62 4.00 3.68500 1.33 1.24 1.14 1.75 1.76 1.41 1.24 1.38 1.61 1.72

1000 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.003000 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00

50 50 4.31 3.65 3.59 5.44 5.51 2.32 1.79 1.77 3.60 3.49150 4.05 3.30 2.67 5.60 5.45 3.16 2.67 2.53 4.63 4.63500 3.28 2.74 2.76 4.43 4.44 3.09 2.62 2.63 4.17 4.22

1000 2.18 1.93 1.98 3.01 3.06 2.17 2.04 1.99 3.06 3.133000 0.60 0.60 0.56 0.58 0.57 0.55 0.58 0.57 0.58 0.60

100 50 2.94 2.54 3.75 4.03 4.18 1.53 1.11 2.48 2.62 2.62150 3.38 1.00 4.59 4.71 4.98 2.71 2.06 3.73 4.16 4.20500 3.55 3.10 4.63 4.71 4.97 3.24 2.77 4.38 4.73 4.78

1000 3.18 2.75 4.14 4.50 4.23 3.00 2.71 4.38 4.13 4.303000 1.88 1.83 2.19 2.80 2.83 1.88 1.81 2.07 2.75 2.92

300 50 1.34 1.09 1.84 2.03 2.31 0.75 0.46 1.20 1.22 1.23150 2.02 1.37 2.92 2.99 3.06 1.49 1.01 2.35 2.48 2.54500 2.95 2.43 4.16 4.42 4.44 2.72 2.05 3.91 4.08 4.20

1000 3.33 2.77 4.51 4.90 4.91 3.14 2.65 4.45 4.70 4.733000 3.03 2.67 4.18 4.32 4.31 3.05 2.64 4.13 4.29 4.34

To solve 2MFB//Cmax optimally will take a tremendous amount of time because both thejob sequencing and grouping issues are of high complexity. Our algorithms by and large produce

Table 2. Maximum error ratio in percentage.

n Setup HI1D1

HI2D1

HI3D1

HI4D1

HI5D1

HI1D2

HI2D2

HI1D2

HI4D2

HI5D2

10 50 10.57 10.86 10.62 12.20 14.95 9.19 9.21 7.41 14.05 12.17150 6.20 5.97 7.25 7.51 10.43 8.52 6.67 6.07 8.27 9.06500 4.55 3.21 4.20 4.28 4.47 4.83 4.60 4.48 3.94 4.75

1000 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.003000 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00

50 50 6.91 6.65 5.80 7.69 7.96 4.64 3.19 2.96 5.74 6.09150 5.93 6.55 5.33 8.05 7.87 4.62 4.32 4.15 6.76 6.97500 4.98 5.12 4.53 7.41 6.28 4.77 4.61 4.28 6.29 6.88

1000 3.65 3.32 3.15 4.92 4.66 3.29 3.05 3.54 4.47 5.043000 1.32 1.45 1.68 1.61 1.76 1.54 1.55 1.88 2.00 1.63

100 50 4.49 3.64 4.76 5.29 5.97 2.39 1.65 3.55 4.21 3.81150 4.76 2.28 5.61 6.15 6.54 3.56 2.74 5.00 5.92 5.40500 4.54 4.11 5.57 6.07 5.95 3.92 3.43 5.60 5.97 6.26

1000 4.26 3.44 5.13 5.56 5.30 3.79 3.49 5.60 5.98 5.273000 2.52 2.53 3.13 3.55 3.74 2.48 2.47 2.80 3.55 3.77

300 50 1.98 1.65 2.48 2.65 3.04 0.98 0.66 1.70 1.77 1.76150 2.59 1.84 3.43 3.99 3.82 1.49 1.28 2.90 3.16 3.31500 3.55 3.12 5.03 5.25 5.21 3.21 2.78 4.74 4.72 5.04

1000 3.89 3.44 5.11 5.73 5.57 3.66 3.11 5.20 5.58 5.283000 3.65 3.21 4.58 4.95 5.08 3.54 3.13 4.52 4.91 4.79

Cheng, Lin, and Toker: Two-Machine Flowshop Batch Scheduling Problem 143

approximate solutions with small average error ratios with respect to the lower bounds obtainedby applying Algorithm A to job set N ′.

7. CONCLUDING REMARKS

This research deals with a practical scheduling problem arising from batch production in aflexible manufacturing environment. We have formulated the problem as 2MFB//Cmax andshown its strong NP-hardness. We have also developed an O(n3) algorithm for 2MFB/ ≺/Cmax, O(n2) algorithms for 2MFB/pi = p/Cmax and 2MFB/qi = q/Cmax, and an O(n)algorithm for 2MFB/pi = qi = p/Cmax. Heuristic algorithms have been proposed to deal withthe general problem. Numerical results reveal that the performance of some of the heuristics iseffective in obtaining near-optimal solutions quickly. For further research, it may be interestingto consider flowshop batch scheduling problems with different definitions of setup costs or batchscheduling problems under different machine environments.

ACKNOWLEDGMENTS

This research is supported in part by the RGC of Hong Kong under Grant Number HKP54/94E.The authors are thankful to the anonymous referees for their constructive comments, which helpimprove the paper.

REFERENCES

[1] A. Agnetis, D. Pacciarelli, and F. Rossi, Batch scheduling in a two-machine flowshop with limitedbuffer, Discrete Appl Math 72 (1997), 243–260.

[2] A. Albers and P. Brucker, The complexity of one machine batching problem, Discrete Appl Math 47(1993), 87–107.

[3] K.R. Baker, A comparative survey of flowshop problems, Oper Res 23 (1975), 62–73.[4] T.C.E. Cheng, Z.-L. Chen, M. Kovalyov, and B.M.T. Lin, Parallel-machine batching and scheduling

to minimize total completion time, IIE Trans 28 (1996), 953–956.[5] T.C.E. Cheng, M.Y. Kovalyov, and B.M.T. Lin, Single machine scheduling to minimize batch delivery

and job earliness penalties, SIAM J Optim 7 (1997), 547–559.[6] T.C.E. Cheng and G.Q. Wang, Batching and scheduling to minimize the makespan in the two-machine

flowshop, IIE Trans 30 (1998), 447–453.[7] T.C.E. Cheng and G.Q. Wang, Scheduling the fabrication and assembly of components in a two-

machine flowshop, IIE Trans (1999), in press.[8] E.G. Coffman, Jr., A. Nozari, and M. Yannakakis, Optimal scheduling of products with two subassem-

blies on a single machine, Oper Res 37 (1989), 426–436.[9] E.G. Coffman, Jr., M. Yannakakis, M.J. Magazine, and C. Santos, Batch sizing and job sequencing on

a single machine, Ann Oper Res 26 (1990), 135–147.[10] R.W. Conway, W.L. Maxwell, and L.W. Miller, Theory of scheduling, Addison-Wesley, Reading, MA,

1967.[11] R.A. Dudek, S.S. Panswalkar, and M.L. Smith, A review of flowshop scheduling, presented at

ORSA/TIMS Meeting, Nashville, TN, 1991.[12] M.R. Garey and D.S. Johnson, Computers and intractability: A guide to the theory of NP-completeness,

Freedman, San Francisco, CA, 1979.[13] M.R. Garey, D.S. Johnson, and R. Sethi, The complexity of flowshop and jobshop scheduling, Math

Oper Res 1 (1976), 117–129.[14] T. Gonzalez and S. Sahni, Flowshop and jobshop schedules: Complexity and approximation, Oper

Res 26 (1978), 36–52.[15] S.M. Johnson, Optimal two- and three-stage production schedules with setup times included, Nav Res

Logistics Quart 1 (1954), 61–67.

144 Naval Research Logistics, Vol. 47 (2000)

[16] C.Y. Lee, T.C.E. Cheng, and B.M.T. Lin, Minimizing the makespan in three machine assembly typeflowshop scheduling problem, Manage Sci 39 (1993), 616–625.

[17] C.Y. Lee, L. Lei, and M. Pinedo, Current trends in deterministic scheduling, Ann Oper Res 70 (1997),1–41.

[18] C.Y. Lee and G.L. Vairaktarakis, Minimizing makespan in hybrid flowshops, Oper Res Lett 16 (1994),149–158.

[19] D. Naddef and C. Santos, One-pass batching algorithms for the one-machine problem, Discrete ApplMath 21 (1988), 133–146.

[20] C.N. Potts and L.N. Van Wassenhove, Integrating scheduling with batching and lot-sizing: A reviewof algorithms and complexity, J Oper Res Soc 43 (1992), 395–406.

[21] A. Reisman, A. Kumar, and J. Motwani, Flowshop scheduling/sequencing research: A statisticalreview of the literature, 1952–1994, IEEE Trans Eng Manage 44 (1997), 316–329.

[22] D.F. Shallcross, A polynomial algorithm for a one machine batching problem, Oper Res Lett 46 (1992),213–218.

[23] W. Szwarc, Optimal two-machine ordering in the 3×n flowshop problem, Oper Res 25 (1977), 70–77.[24] S. Webster and K.R. Baker, Scheduling groups of jobs on a single machine, Oper Res 43 (1995),

692–703.