Flow Shops and Flexible Flow Shops (Deterministic)
6.1 Flow Shops with Unlimited Intermediate Storage
When searching for an optimal schedule for F m || Cmax the question arises whether it suffices merely to determine a permutation in which the jobs traverse the entire system. Physically it may be possible for one job to “pass” another while waiting in queue for a machine that is busy. The machines may not operate according to theFirst Come First Served principle and the sequence in which the jobs go through the machines may change from one machine to another.
Changing the sequence of the jobs waiting in a queue between two machines may at times result in a smaller makespan. However, it can be shown that there always exists an optimal schedule without job sequence changes between the first two machines and between the last two machines (see Exercise 6.11). This implies that there are optimal schedules for F2 || Cmax and F3 || Cmax that do not require sequence changes between machines. One can find examples of flow shops with four machines in which the optimal schedule does require a job sequence change in between the second and the third machine.
Finding an optimal schedule when sequence changes are allowed is signifi- cantly harder than finding an optimal schedule when sequence changes are not allowed. Flow shops that do not allow sequence changes between machines are calledpermutationflow shops. In these flow shops the same sequence, or permu- tation, of jobs is maintained throughout. The results in this chapter are mostly limited to permutation flow shops.
Given a permutation schedule j1, . . . , jn for an m machine flow shop, the completion time of jobjk at machinei can be computed easily through a set of recursive equations:
Ci,j1 = i
l=1
pl,j1 i= 1, . . . , m
C1,jk= k
l=1
p1,jl k= 1, . . . , n
Ci,jk= m ax(Ci−1,jk, Ci,jk−1) +pi,jk i= 2, . . . , m; k= 2, . . . , n
The value of the makespan under a given permutation schedule can also be computed by determining thecritical pathin a directed graph that corresponds to the schedule. For a given sequencej1, . . . , jnthis directed graph is constructed as follows: for each operation, say the processing of jobjk on machinei, there is a node (i, jk) with a weight that is equal to the processing time of job jk on machine i. Node (i, jk), i = 1, . . . , m−1, and k = 1, . . . , n−1, has arcs
6.1 Flow Shops with Unlimited Intermediate Storage 153
pi+1,jk+1 pi+1,jk
pi,jk pi,jk+1 p2,j1
p1,j1 p1,j2
pm,j1 pm,jn
p1,jn
Fig. 6.1Directed Graph for the Computation of the Makespan in F m|prmu|Cmaxunder sequencej1, . . . , jn
going out to nodes (i+ 1, jk) and (i, jk+1). Nodes corresponding to machinem have only one outgoing arc, as do nodes corresponding to jobjn. Node (m, jn) has no outgoing arcs (see Figure 6.1). The total weight of the maximum weight path fromnode (1, j1) to node (m, jn) corresponds to the makespan under the permutation schedulej1, . . . , jn.
Example 6.1.1 (Graph Representation of Flow Shop)
Consider 5 jobs on 4 machines with the processing times presented in the table below.
jobs j1 j2 j3 j4 j5 p1,jk 5 5 3 6 3 p2,jk 4 4 2 4 4 p3,jk 4 4 3 4 1 p4,jk 3 6 3 2 5
The corresponding graph and Gantt chart are depicted in Figure 6.2. From the directed graph it follows that the makespan is 34. This makespan is
determined by two critical paths. ||
An interesting result can be obtained by comparing twommachine permu- tation flow shops withn jobs. Letp(1)ij and p(2)ij denote the processing time of jobj on machineiin the first and second flow shop, respectively. Assume
p(1)ij =p(2)m+1−i,j.
5 5 3 6 3
4 4 2 4 4
4 4 3 4 1
3 6 3 2 5
0 10 20 30
3 6 3 2 5
4 4 3 4 1
4 4 2 4 4
5 5 3 6 3
Fig. 6.2Directed graph, critical paths and Gantt chart (the numerical entries represent the processing times of the jobs and not the job
indexes)
This basically implies that the first machine in the second flow shop is identical to the last machine in the first flow shop; the second machine in the second flow shop is identical to the machine immediately before the last in the first flow shop, and so on. The following lemma applies to these two flow shops.
Lemma 6.1.2. Sequencing the jobs according to permutationj1, . . . , jn in the first flow shop results in the same makespan as sequencing the jobs according to permutationjn, . . . , j1 in the second flow shop.
Proof. If the first flow shop under sequence j1, . . . , jn corresponds to the dia- gramin Figure 6.1, then the second flow shop under sequencejn, . . . , j1 corre- sponds to the same diagram with all arcs reversed. The weight of the maximum weight path fromone corner node to the other corner node does not change if
all arcs are reversed.
Lemma 6.1.2 states the followingreversibility result: the makespan does not change if the jobs traverse the flow shop in the opposite direction in reverse order.
6.1 Flow Shops with Unlimited Intermediate Storage 155
5 2 3 6 3
1 4 3 4 4
4 4 2 4 4
3 6 3 5 3
0 10 20 30
3 6 3 5 5
4 4 2 4 4
1 4 3 4 4
5 2 3 6 3
Fig. 6.3Directed graph, critical paths and Gantt chart (the numerical entries represent the processing times of the jobs and not the job
indexes)
Example 6.1.3 (Graph Representations and Reversibility)
Consider the instance of Example 6.1.1. The dual of this instance is given in the table below.
jobs j1 j2 j3 j4 j5 p1,jk 5 2 3 6 3 p2,jk 1 4 3 4 4 p3,jk 4 4 2 4 4 p4,jk 3 6 3 5 5
The corresponding directed graph, its critical paths and the Gantt charts are depicted in Figure 6.3. It is clear that the critical paths are determined by the same set of processing times and that the makespan, therefore, is 34 as
well. ||
Consider now the F2 || Cmax problem: a flow shop with two machines in series with unlimited storage in between the two machines. There aren jobs and the processing time of jobjon machine 1 isp1j and its processing time on machine 2 isp2j. This was one of the first problems to be analyzed in the early days of Operations Research and led to a classical paper in scheduling theory by S.M. Johnson. The rule that minimizes the makespan is commonly referred to as Johnson’s rule.
An optimal sequence can be described as follows. Partition the jobs into two sets with Set I containing all jobs withp1j < p2j and Set II all jobs with p1j > p2j. The jobs with p1j = p2j may be put in either set. The jobs in Set I go first and they go in increasing order of p1j (SPT); the jobs in Set II follow in decreasing order ofp2j(LPT). Ties may be broken arbitrarily. In what follows such a schedule is referred to as anSPT(1)-LPT(2)schedule. Of course, multiple schedules may be generated this way.
Theorem 6.1.4. Any SPT(1)-LPT(2) schedule is optimal for F2||Cmax. Proof. The proof is by contradiction. Suppose another type of schedule is op- timal. In this optimal schedule there must be a pair of adjacent jobs, say jobj followed by jobk, that satisfies one of the following three conditions:
(i) job j belongs to Set II and jobkto Set I;
(ii) jobs jand kbelong to Set I andp1j > p1k; (iii) jobs jand kbelong to Set II andp2j < p2k.
It suffices to show that under any of these three conditions the makespan is reduced after a pairwise interchange of jobsj andk. Assume that in the orig- inal schedule jobl precedes jobj and jobm follows jobk. Let Cij denote the completion of jobj on machine i under the original schedule and let Cij de- note the completion time of jobj on machineiafter the pairwise interchange.
Interchanging jobsj andkclearly does not affect the starting time of jobmon machine 1, as its starting time on machine 1 equalsC1l+p1j+p1k. However, it is of interest to know at what time machine 2 becomes available for jobm.
Under the original schedule this is the completion time of jobkon machine 2, i.e.,C2k, and after the interchange this is the completion time of jobj on ma- chine 2, i.e.,C2j. It suffices to show thatC2j ≤C2k under any one of the three conditions described above.
The completion time of jobkon machine 2 under the original schedule is C2k = m ax
max (C2l, C1l+p1j) +p2j, C1l+p1j+p1k
+p2k
= m ax
C2l+p2k+p2j, C1l+p1j+p2j+p2k, C1l+p1j+p1k+p2k
, whereas the completion time of jobjon machine 2 after the pairwise interchange is
C2j= m ax
C2l+p2k+p2j, C1l+p1k+p2k+p2j, C1l+p1k+p1j+p2j
.
6.1 Flow Shops with Unlimited Intermediate Storage 157 Under condition (i) p1j> p2j andp1k< p2k. It is clear that the first terms within the max expressions of C2k and C2j are identical. The second termin the last expression is smaller than the third in the first expression and the third termin the last expression is smaller than the second in the first expression.
So, under condition (i)C2j≤C2k.
Under condition (ii) p1j< p2j,p1k< p2k andp1j> p1k. Now the second as well as the third termin the last expression are smaller than the second term in the first expression. So, under condition (ii)C2j≤C2k as well.
Condition (iii) can be shown in a similar way as the second condition. Actu- ally, condition (iii) follows immediately from the reversibility property of flow
shops.
These SPT(1)-LPT(2) schedules are by no means the only schedules that are optimal forF2 || Cmax. The class of optimal schedules appears to be hard to characterize and data dependent.
Example 6.1.5 (Multiple Optimal Schedules)
Consider a set of jobs with one job that has a very small processing time on machine 1 and a very large processing time on machine 2, say K, with K ≥n
j=1p1j. It is clear that under the optimal sequence this job should go first in the schedule. However, the order of the remaining jobs does not
affect the makespan. ||
Unfortunately, the SPT(1)-LPT(2) schedule structure cannot be generalized to characterize optimal schedules for flow shops with more than two machines.
However, minimizing the makespan in a permutation flow shop with an arbi- trary number of machines, i.e., F m | prmu | Cmax, can be formulated as a Mixed Integer Program(MIP).
In order to formulate the problem as a MIP a number of variables have to be defined: The decision variable xjk equals 1 if job j is the kth job in the sequence and 0 otherwise. The auxiliary variableIik denotes the idle time on machineibetween the processing of the jobs in thekth position and (k+ 1)th position and the auxiliary variableWik denotes the waiting time of the job in thekth position in between machinesiandi+1. Of course, there exists a strong relationship between the variablesWik and the variables Iik. For example, if Iik >0, thenWi−1,k+1 has to be zero. Formally, this relationship can be estab- lished by considering the difference between the time the job in the (k+ 1)th position starts on machinei+ 1 and the time the job in thekth position com- pletes its processing on machine i. If ∆ik denotes this difference and if pi(k) denotes the processing time on machinei of the job in thekth position in the sequence, then (see Figure 6.4)
∆ik =Iik+pi(k+1)+Wi,k+1=Wik+pi+1(k)+Ii+1,k.
pi(k)
pi+ 1(k)
Wik > 0 and Ii + 1, k = 0
pi+ 1(k — 1) pi+ 1(k + 1)
pi(k + 1)
⌬ik
Wik Machine i
Machine i + 1
Iik Wi, k + 1
Fig. 6.4Constraints in the integer programming formulation
Note that minimizing the makespan is equivalent to minimizing the total idle time on the last machine, machinem. This idle time is equal to
m−1 i=1
pi(1)+
n−1
j=1
Imj,
which is the idle time that must occur before the job in the first position reaches the last machine and the sum of the idle times between the jobs on the last machine. Using the identity
pi(k)= n j=1
xjkpij,
the MIP can now be formulated as follows.
min m−1
i=1
n j=1
xj1pij+
n−1 j=1
Imj
, subject to
n j=1
xjk= 1 k= 1, . . . , n, n
k=1
xjk= 1 j= 1, . . . , n,
Iik+ n j=1
xj,k+1pij+Wi,k+1
6.1 Flow Shops with Unlimited Intermediate Storage 159
−Wik− n j=1
xjkpi+1,j−Ii+1,k= 0 k= 1, . . . , n−1; i= 1, . . . , m−1, Wi1= 0 i= 1, . . . , m−1,
I1k= 0 k= 1, . . . , n−1.
The first set of constraints specifies that exactly one job has to be assigned to positionkfor anyk. The second set of constraints specifies that jobjhas to be assigned to exactly one position. The third set of constraints relate the decision variablesxjk to the physical constraints. These physical constraints enforce the necessary relationships between the idle time variables and the waiting time variables. Thus, the problem of minimizing the makespan in an m machine permutation flow shop is formulated as a MIP. The only integer variables are the binary (0−1) decision variablesxjk. The idle time and waiting time variables are nonnegative continuous variables.
Example 6.1.6 (Mixed Integer Programming Formulation)
Consider again the instance in Example 6.1.1. Because the sequence is now not given, the subscriptjk in the table of Example 6.1.1 is replaced by the subscriptj and the headingsj1, j2, j3, j4 andj5 are replaced by 1, 2, 3, 4, and 5, respectively.
jobs 1 2 3 4 5 p1,j 5 5 3 6 3 p2,j 4 4 2 4 4 p3,j 4 4 3 4 1 p4,j 3 6 3 2 5
With these data the objective of the MIP is
5x11+ 5x21+ 3x31+ 6x41+ 3x51+ 4x11+ 4x21+ 2x31+ 4x41+ 4x51+ +4x11+ 4x21+ 3x31+ 4x41+x51+I41+I42+I43+I44= 13x11+ 13x21+ 8x31+ 14x41+ 8x51+I41+I42+I43+I44
The first and second set of constraints of the programcontain 5 constraints each. The third set contains (5−1)(4−1) = 12 constraints. For example, the constraint corresponding tok= 2 andi= 3 is
I32+ 4x13+ 4x23+ 3x33+ 4x43+x53+W33
−W32−3x12−6x22−3x32−2x42−5x52−I42= 0. ||
. . .
. . .
. . .
Fig. 6.53-PARTITION reduces toF3||Cmax
The fact that the problem can be formulated as a MIP does not immediately imply that the problem is NP-hard. It could be that the MIP has a special structure that allows for a polynomial time algorithm (see, for example, the integer programming formulation for Rm ||
Cj). In this case, however, it turns out that the problemis hard.
Theorem 6.1.7. F3||Cmax is strongly NP-hard.
Proof. By reduction from3-PARTITION. Given integersa1, . . . , a3t, b, under the usual assumptions, let the number of jobsnequal 4t+ 1 and let
p10= 0, p20=b, p30= 2b,
p1j = 2b, p2j=b, p3j = 2b, j= 1, . . . , t−1, p1t= 2b, p2t=b, p3t= 0,
p1,t+j= 0, p2,t+j =aj, p3,t+j = 0, j= 1, . . . ,3t.
Let z = (2t+ 1)b. A makespan of value z can be obtained if the first t+ 1 jobs are scheduled according to sequence 0,1, . . . , t. Theset+ 1 jobs then form a framework, leaving t gaps on machine 2. Jobs t+ 1, . . . , t+ 3t have to be partitioned intotsets of three jobs each and theset sets have to be scheduled in between the firstt+ 1 jobs. A makespan of valuez can be obtained if and only if3-PARTITIONhas a solution (see Figure 6.5).
This complexity proof applies to permutation flow shops as well as to flow shops that allow sequence changes midstream (as said before, for three machine flow shops it is known that a permutation schedule is optimal in the larger class of schedules).
Even thoughF m|prmu|Cmaxis strongly NP-hard it is of interest to study special cases that have nice structural properties. A number of special cases are important.
6.1 Flow Shops with Unlimited Intermediate Storage 161 One important special case of F m | prmu | Cmax is the so-called propor- tionate permutation flow shop. In this flow shop the processing times of job j on each of them machines are equal to pj, i.e., p1j =p2j =· · · =pmj = pj. Minimizing the makespan in a proportionate permutation flow shop is denoted byF m | prmu, pij = pj | Cmax. For a proportionate flow shop an SPT-LPT sequence can be defined as follows. The jobs are partitioned into two sets; the jobs in one subset go first according to SPT and the remaining jobs follow ac- cording to LPT. So a sequencej1, . . . , jn is SPT-LPT if and only if there is a jobjk such that
pj1 ≤pj2 ≤ · · · ≤pjk
and
pjk ≥pjk+1≥ · · · ≥pjn.
FromTheorem6.1.4 it follows that whenm= 2 any SPT-LPT sequence must be optimal. As might be expected, these are not the only sequences that are optimal. This flow shop has a very special structure.
Theorem 6.1.8. ForF m|prmu, pij =pj |Cmax the makespan equals Cmax=
n j=1
pj+ (m−1) max(p1, . . . , pn)
and is independent of the schedule.
Proof. The proof is left as an exercise.
It can be shown that permutation schedules are also optimal in the larger class of schedules that allow jobs to pass one another while waiting for a ma- chine, i.e.,F m|pij =pj |Cmax(see Exercise 6.17).
The result stated in the last theoremindicates that the proportionate flow shop is in one aspect similar to the single machine: the makespan does not depend on the sequence. Actually there are many more similarities between the proportionate flow shop and the single machine. The following results illustrate this fact.
(i) The SPT rule is optimal for 1||
Cj as well as forF m|prmu, pij = pj|
Cj.
(ii) The algorithmthat results in an optimal schedule for 1 ||
Uj also results in an optimal schedule forF m|prmu, pij =pj|
Uj.
(iii) The algorithmthat results in an optimal schedule for 1 || hmax also results in an optimal schedule forF m|prmu, pij =pj|hmax.
(iv) The pseudo-polynomial dynamic programming algorithm for 1||
Tj can also be applied to F m|prmu, pij =pj |
Tj. (v) The elimination criteria that hold for 1||
wjTj also hold for F m| prmu, pij=pj|
wjTj.
Not all results that hold for the single machine hold for the proportionate flow shop. For example, WSPT does not necessarily minimize the total weighted completion time in proportionate flow shops. Counterexamples can be found easily. However,F m|pij =pj|
wjCjcan still be solved in polynomial time.
The proportionate permutation flow shop model can be generalized to include machines with different speeds. If the speed of machineiisvi, then the time jobj spends on machineiis pij =pj/vi. The machine with the smallestvi is called thebottleneck machine. The makespan is now no longer schedule independent.
Theorem 6.1.9. If in a proportionate permutation flow shop with different speeds the first (last) machine is the bottleneck, then LPT (SPT) minimizes the makespan.
Proof. From the reversibility property it immediately follows that it suffices to prove only one of the two results stated in the theorem. Only the case where the last machine is the bottleneck is shown here.
Consider first the special subcase with
vm≤v1≤min (v2, . . . , vm−1);
that is, the last machine is the bottleneck and the first machine requires the second longest processing times for each one of thenjobs. It is easy to see that in such a flow shop the critical path only turns to the right at machinemand therefore turns down only once at some jobjkin the sequencej1, . . . , jn. So the critical path starts out on machine 1 going to the right, turns down at jobjk
and goes all the way down to machinembefore turning to the right again. That SPT is optimal can be shown through a standard adjacent pairwise interchange argument. Consider a schedule that is not SPT. There are two adjacent jobs of which the first one is longer than the second. Interchanging these two jobs affects the makespan if and only if one of the two jobs is the job through which the critical path goes frommachine 1 tom. It can be shown that an interchange then reduces the makespan and that SPT minimizes the makespan.
In order to complete the proof for the general case, call machineh an in- termediate bottleneck if vh < min (v1, . . . , vh−1). There may be a number of intermediate bottlenecks in the proportionate flow shop. The arguments pre- sented above for the case with the only intermediate bottleneck being machine 1 extend to the general case with multiple intermediate bottlenecks. The critical path now only turns right at intermediate bottleneck machines. This structure can be exploited again with an adjacent pairwise interchange argument showing
that SPT minimizes the makespan.
AsF m|prmu |Cmax is one of the more basic scheduling problems, it has attracted a great deal of attention over the years. Many heuristics have been developed for dealing with this problem. One of the first heuristics developed for this problemis theSlopeheuristic. According to this heuristic a slope index