90
European Journal of Operational Research 40 (1989) 90-98 North-Holland
Theory and Methodology
A new integer programming formulation for the permutation flowshop problem A.M.
FRIEZE
*
Department of Computer Science and Statistics, Queen Mary College, London University, England, UK J. Y A D E G A R
**
DAP Support Unit, Queen Mary College, London University, England, UK
Abstract: We describe a new integer p r o g r a m m i n g formulation for the permutation flowshop p r o b l e m in which the objective is to minimise the makespan. This formulation can have an exponential n u m b e r of constraints, but its linear p r o g r a m m i n g relaxation can be solved by a novel (row generation) algorithm in polynomial time. W e present some c o m p u t a t i o n a l experience. Keywords: Scheduling, integer programming, assignment, heuristic, graphs
1. I n t r o d u c t i o n
In this paper, we discuss a new integer prog r a m m i n g formulation for the p r o b l e m of minimising makespan in a permutation flowshop. The usual assumptions about the p e r m u t a t i o n flowshop problem will be adopted. Thus, assume that we have n j o b s Jl, J2 . . . . . J~ which have to be processed on m machines M t, M 2 . . . . . M m in this order, and we let Pij be the processing time for J, on Mj. At any time, each machine can process at most one j o b and each j o b can be processed on at most one machine. Once the processing of a j o b on a machine has started, it must be completed without interruption. A feasible schedule can be represented by a permutation a of (1, 2 . . . . . n }.
* Present address: Department of Mathematics, CarnegieMellon University, Pittsburgh, USA. * * This research was funded in part by a University of London Studentship. Present address: Active Memory Technology, Inc., Irvine, CA 92714, USA. Received February 1987; April 1988
This means that each machine processes the jobs in the order Jo(1),Jot2)..... Jot,). We let F(o) denote the elapsed time between the start of Jot1) on M 1 and the completion of Jot,) on M m. This is referred to as the makespan or the flow-time of sequence o. T h e n the p r o b l e m is to minimise
o~S.
F(a),
where S~ = ( o : o
(1) is a permutation of {1, 2 . . . . .
n}). F o r m = 2, the optimal schedule can be obtained in O(n log n) steps b y J o h n s o n ' s algorithm [16]. However, for m = 3, the problem is k n o w n to be N P - H a r d - - s e e G a r e y and J o h n s o n [9], Garey, J o h n s o n and Sethi [10], or Lenstra, R i n n o o y K a n and Brucker [ 2 1 ] - - a n d it has an extensive literature. For a review on the flowshop problem, we refer the reader to Baker [1,2], Bellman, Esogbue and N a b e s h i m a [3], Bestwick and Hastings [4], Brown and Lomnicki [5], Campbell, D u d e k and Smith [6], Conway, Maxwell and Miller [7],
0377-2217/89/$3.50 © 1989, Elsevier Science Publishers B.V. (North-Holland)
A.M. Frieze and J. Yadegar / A new integer programming formulation for the flowshop problem
Graham et al. [13], Ignall and Schrage [15], Lageweg, Lenstra and Rinnooy Kan [18], Lenstra [20], Lomnicki [22], McMahon and Burton [23], Ports [24], Rinnooy Kan [25], and Szwarc [27]. In Section 2, we describe our integer programming formulation for the makespan problem and in Section 3, we present an algorithm for solving the linear programming relaxation of the integer program, giving a lower bound. This bound is then compared with known bounds. Finally, computational experience is reported in Section 4 which is followed by some concluding remarks in
Section 5.
2. An integer programming formulation for the makespan problem It is well known that for a given o, we can compute F ( o ) as the length of the longest path in a certain acyclic digraph Go = (N, A ) - - s e e Figure 1--where the set of nodes N is given by N = {s, f } U { [ k , / ] : k = l , 2
. . . . . n, / = 1 , 2 . . . . . m},
s 0 Machines
t"
o"
M2 ....................................
Mrn.1
Mm
[1,1] Po'(1)1
Pa(1)2
Po"(1)m-1
Po"(1)m
l
1
l
l
Po'(2)1
PO(2)2 "
PO(',~m-1
Po(2)m
o'(2) [2,11 l
I [n-1,1] o'(n-1) Po'(n-1)1
o-(n)
[n,l] P~(n)l
i
,n_l,m_,,
t %(,[n-.1)2 ,
]
91
P(n-1)m-1
1 [r
n)2
Po"(n)m-1
t
l
[n-l,m] P(n-1)m
t I ~(n)m
1 Figure 1. Go = (N, A)
92
A.M. Frieze and J. Yadegar / A new integer programming formulation for the flowshop problem
S
o
Machines M2
....................................
Mm.1
Mm
[1,1] PO)I
o ,i
L l
o.(rl)
i!
[r1'11
'
[r1'2] I
P(rl)2 i
[r2 ,2]
%(,2)2
-"
i
[rm.l,m-1]
o"(rm.I )
PG(rm.1)rn-1
[rm-l'm] I
P(rm.1)m
[n,m] P(n)m
(7(n)
",,o
Figure 2
and
ever, each arc u has a length l ( u ) associated with it. That is,
A = ( ( s , [1, 1]), ( [ n , m ] , f ) )
u ( ( [ k , l ] , [ k + l , l ] ) : k = ] , 2 ..... . - a , /=1,2
..... m)
U { ( [ k , 1], [ k , l + 1 ] ) : k = 1, 2 . . . . . n, /=1,2
..... rn- 1).
N o t e that N and A are independent of o. H o w -
l(s, [1, 11)= o and i ( u ) =Po(i)j
if arc u has tail [i, j ] for all i = 1 . . . . . n and j = 1 . . . . . m.
A . M . F r i e z e a n d J. Y a d e g a r / A n e w integer p r o g r a m m i n g f o r m u l a t i o n f o r the f l o w s h o p p r o b l e m
93
Machines
MI
M 2 ...........
Mr1 . . . . . . . . . . . . . . . . . .
Mr2 . . . . . . . . . . . . . . . . . . . . . . . . .
Mrn-. 1
................
Mm
.0 ........
,0
~o . . . . . . . o
¢(1) o
~(2)
'I
:o . . . . . . . . o
I !
o'(n-1) o'(n) Figure
Then, as shown in reference [3, pp. 141-145], we have
tofinG
N o w for 7 = (rl, r2 . . . . . r,, ~), we can see from the d e f i n i t i o n of A , that rk
F ( Ü ) = the length of the longest p a t h froms
r(7, o)= E
o.
k=l
N o w let T b e the set of p a t h s from s to f in Go. W e c a n r e p r e s e n t a p a t h ~" E T b y a sequence of integers 1 ~< r 1 ~< r 2 ~< ~< r~_~ ~< n - - s e e F i g u r e 2 - - i n d i c a t i n g the p o s i t i o n s of the ' h o r i z o n t a l ' sections of 7. T h u s 7 is the set of arcs •
•
0
3
E po(j,
m
=
(3)
j=r A 1 rk
E
E
k=l
.]=r k
n
E
°
po(i)kXo(i)!
i=1
I
•
m
r~
n
= E
E
Y'. p,~.x,,°
k=l
A T : { ( s , [1, 11)} m
U U {{([i,k],[i+l,k])'G-,~i~G}
j=r k
n
m
rk
= E
E
E
i--1 k - 1
j=r~
k=l
tl
U { ( [ r k, k l , [ G ,
k+l])}},
:
(4)
] i=1
PikX;, t
n
EE
P i" j X°t ] ,
i--I j-- 1
w h e r e r0 = 1, rm = n a n d [r,,, m + 1] d e n o t e s f . W e let
where
F ( 7 , o ) = the length of the p a t h 7 in G o.
P,5 =
Y'k:r~
P,k,
i, j : 1, 2 . . . . . n.
(5)
l <~j~r~
T h e n P r o b l e m (1) b e c o m e s : minimise o~S,,
m a x i m u m F ( 7, o ).
(2)
"rE T
W e n o w i n t r o d u c e an n × n p e r m u t a t i o n m a t r i x X° = ][ xi~ I[ for each o ~ S,, where
Thus, if P " is the n × n m a t r i x I[ P~/H, then P r o b l e m (2) can be written as the following integer p r o g r a m : minimise subject to
o {10 x,~ =
ifi=o(j), otherwise.
-PTX>~0,
7~T,
(6a)
n
N o t e that the m a p p i n g o ~ X ° i s 1 - 1 . W e n o w express F ( 7 , 0 ) in terms of X °.
Y'~ x i / = 1, i=1
j=1,2
. . . . . n,
(6b)
A.M. Frieze and J. Yadegar / A new integer programming formulation for the flowshop problem
94
~xij=l,
i=l,2,...,n,
(6c)
j=l
x/j=0
or 1,
i, j = l , 2
. . . . . n,
(6d)
where P~X = Z ~i=l~)=lPijXij " for ~-~ T. Note that as
the large number of constraints, it is clear that the only feasible approach to solving LP is by some row generation scheme. One possibility is described next. For T * _ T let L P ( T * ) denote the linear program obtained from LP by replacing (6a) by ~-P'X>~O,
,T[ =(n+m-2) m-1
'
this formulation can have an exponential number of constraints. It is worth noting that a path r ~ T can also be represented by an (n - 1)-tuple 1 ~< r( ~< r 2' ~< - . . ~< r , ' 1 ~< m of integers--see Figure 3 - - i f we consider individual jobs on various machines rather than considering various jobs on individual machines. In this case, the expression for F(~', a) becomes, t
ro=l,
3.1. Algorithm BOUND
begin choose an initial set of paths T * _ T; bub := o 0 - - b e s t (smallest) upper bound on the optimal value of LP computed so far; bib := - o ¢ - - b e s t (largest) lower bound on the optimal value of LP computed so far;
¢
G=m
i = 1 k=ri'_ I rj t
z
repeat
i=1 ./=1 k=r;_~
A:
~P
= £ k Zp,x,: i=l j=l
B:
k=rT_ ]
i=1 j=l
t
E
let ~*, X* be an optimal solution LP(T*); let # = P ~ * X * = max~c r P ~ X * ; bub .'= min (bub, /~); if ~* >~ bub then terminate {remark: ~*, X* is optimal}
to
else if ~ * = b l b t h e n T * : = T * U ( ~ ' * ) else (remark: ~* > blb} begin
where ~rij-
(8)
Given T * we solve the LP relaxation L P ( T * ) , obtaining ~*, X*. We then check to see if ~*, X* is feasible for LP. If it is we are done, otherwise we add a violated constraint and throw away slack constraints, and repeat. Formally:
r,'
o)= E E po,,,k,
r~T*.
Pik,
i, j = l 2,
n.
(7) c:
It is not difficult to see that the expression T given for ~ro-r in (7) is the same as that given for p~j in (5), and thus one obtains the same integer programming formulation as that of (6). We next show how to solve the usual linear programming relaxation of the integer program (6). This, generally, yields a good lower bound on the optimal value of the makespan problem.
3. Lower bounds Let LP denote the linear programming relaxation of (6)--i.e. replace (6d) by xij >~O. Because of
blb : - ~*; T * :--- (;r* u {t* })
-(~'~T*:~*>P~X*} end until termination end Note that the sequence of minima ~* 's obtained by relaxation in Statement A is monotone non-decreasing. Now, it is well k n o w n - - s e e Lasdon [19]--that Algorithm BOUND will solve the linear programming problem LP. *, X* in Statement A can be found using the simplex algorithm as we can expect I T * [ to be relatively small ( [ T * ] ~< n 2 - - 2n + 2 if we only keep the minimum number of tight constraints needed to define ~*, X * ) .
95
A.M. Frieze and J. Yadegar / A new integer programming formulation for the flowshop problem
We now have to explain how to execute Statement B efficiently. If X* were an integer matrix, i.e. X* = X ° for some o ~ S,, then we simply find the longest path in Go. For X* non-integer we can do the same, i.e. define a digraph Gx. and find its longest path. Now, Gx. has the same nodes N and arcs A as before. Arc lengths are as defined below. F r o m (4) we have rk k = l j=rk_ 1 i=1 m
i-,
= E
E P~,
(9)
k=l j=rk_ 1
where rt
p ~ = Y'~pikx~*j f o r j = l , 2 i=1
k=l,2
. . . . . n, . . . . . m.
T t = ( 1 . . . . . 1, n . . . . . n)
Comparing (9) and (3), we see that P ' X * is indeed the length of the path r if arcs having tail [j, k] have length p ~ for all j, k. Using this definition of arc length, we see that the maximisation problem in Statement B is a longest path problem and is solvable in O(mn) time. (In the terminology of GriStschel, Lovfisz and Schrijver [14], the separation problem for the polyhedral feasible region of the linear programming problem LP is solvable in polynomial time. Hence, LP is solvable in polynomial time using their variant of Khachian's algorithm [17].) We note, using [28], that ~*=minimum(
~ ~'r~T*
h*P')X
where ( and ~* are the optimal values to the integer program (6) and its linear relaxation LP respectively. It is worth noting that for a fixed path r ~ T, the problem mino~ s F ( r , o) ( = m i n x ~ a P'X, where A is the set of 0 - 1 X ' s , satisfying constraints (6b), (6c), (6d)) is an assignment problem. One can actually give an interpretation for this assignment problem: namely, shuffle the rows (jobs) in the digraph Go such that the length of path r is minimised. We will now show that there exists a subset T N p = ( "rl, "r2. . . . . "rm } of T which in place of T in (11a) reduces the lower bound LB to the machine-based bound obtained by Brown and Lomnicki [5] and Ignall and Schrage [15]. For this purpose, let us first define the elements of TNp by using the ( m - 1 ) - t u p l e representation of a path. That is,
(10)
Tm = (1, 1 . . . . . 1), where the first n in % occurs in the l-th place. Therefore, the /-th path of TNp in Go of Figure 1 is the horizontal path from node [1, 1] to node [1, l], then vertically down from node [1, 1] to node [n, l], followed by the horizontal path from node [n, l] to node [n, m]. We next define: LB l = minF(~-l, o) o~S
LB =
max LB/.
l ~l<~m
L B / = min
,-1 1 -81/) ~
o~S
. P.(a)k + ~ Poo)/
k=l
j=l
+(1-sm,)k=,+lpo,o,k} . = Y'~ pj,+ j=l
It is easy to see that
o~S r~T
..... m
and
(
3.2. Comparison with other lower bounds
~< ~* ~ rain m a x F ( r , o) = ~,
forl=l
Now, using (3), it is easy to see that
where ~k* is the optimum dual solution to L P ( T * ). The solution to the assignment problem (10) was used to provide heuristic solutions to the flowshop problem.
r~T t~S
..... m-1
and
subject to (6b), (6c) and (6d),
LB = max minF(r, o)
forl=l
{( min
l<.o(1),o(n)~n
1-1 1 -8,/)
a(1)=~ a(n)
~
Po(1,k
k=l
(lla) + (1 - 8m') k=l+l~ P o ( n ) k } ' (llb)
where 8k~ is the Kronecker delta.
A.M. Frieze and J. Yadegar / A new integer programming formulation for the flowshop problem
96
It is now clear that LB is indeed the machinebased lower bound produced by Brown and Lomnicki [5] and also by Ignall and Schrage [15]. Furthermore, since L B < LB, it follows that the bounds of [5] and [15] are weaker than the bound obtained by Algorithm BOUND. The bound of Bestwick and Hastings [4], the job-based bound introduced by McMahon and Burton [23], and the two-machine bound proposed by Lageweg et al. [18] and Potts [24] are incomparable with our bound,
Thus X* can be used in (10) to achieve (hopefully) a good permutation schedule X" satisfying (6b), (6c) and (6d). We then use Statement B in Algorithm BOUND (i.e. compute the longest path in Go) to find a feasible solution for (6). No special method was employed to solve the linear program L P ( T * ) . We had a program available, based on the simplex algorithm for solving a general linear program with bounded variables, and so we used it. A primal-dual algorithm based on that of Ford and Fulkerson [8] was used to solve the weighted assignment problem (10). We have carried out some computational experiments to try to evaluate the strength of the proposed bound. The results of these experiments are given in Table 1. The algorithm was coded in FORTRAN IV and run on an ICL 2980 computer.
4. Computational experience In each iteration of Algorithm B O U N D , w e also compute an upper bound on ~, that is, on the value of an optimal permutation schedule for the flowshop problem in (6). This is done as follows: Let X* be an optimal multiplier vector (dual solution) associated with constraints (8) in the linear program L P ( T * ), which is readily available from the optimal vector of shadow prices for L P ( T * ) . Now, from Geoffrion [11], the vector X* is also optimal for the dual problem max p(X)
Explanation of Table 1 P
,
A : Y ' . ~ r ) , ~ = I a n d X.~O>-
where
X,P~) X"
q~(X) = m i n ( 2
n
= Source of problems: Problem 1 is from Ignall and Schrage [15]. Problems 2-3 are from Brown and Lomnicki [5]. Problems 4 - 9 are from Giglio and Wagner [12]. Problem 10 is from Smith and Dudek [26]. Problems 11-15 are randomly generated. The processing times are integers selected from the interval [10, 40] for problems 11-12, and from the interval [0, 10] for problems 13-15. = Number of jobs. = Number of machines
X~A \r~T
]
P
n
m
T* a
[~J* 1
ub
t
MB
JB
TMB
bv
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
10 6 6 6 6 6 6 6 6 5 5 7 7 10 10
3 3 5 3 3 3 3 3 3 3 3 3 4 3 4
15 6 20 4 1 5 1 8 8 2 7 7 2 8 10
61 99 85 55 64 69 63 65 69 1051 179 221 35 66 48
66 114 97 59 64 80 63 70 81 1086 202 241 38 68 62
6.55 0.70 4.79 0.63 0.54 0.77 0.57 1.03 1.04 0.62 0.73 1.14 0.63 1.78 1.15
59 99 75 53 64 69 63 63 67 1051 161 214 34 65 47
61 107 90 54 61 69 49 68 75 1011 202 240 22 65 44
65 107 90 54 64 69 63 68 75 1051 202 240 35 66 48
66 109 97 57 64 69 63 68 76 1078 202 241 38 68 62
m
Table I
b b b b b b b b b b h
a T h e c o m p u t e r p r o g r a m u s e d d i d n o t i m p l e m e n t S t a t e m e n t C in A l g o r i t h m BOUND. T h u s , the t r u e n u m b e r of p a t h s n e e d e d to solve L P will be less t h a n o r e q u a l t h o s e i n d i c a t e d in T a b l e 1. b I n d i c a t e s t h a t this is k n o w n to be o p t i m a l .
A.M. Frieze and J. Yadegar / A new integer programming formulation for the flowshop problem
= N u m b e r of paths used before reaching the optimal solution of LP. = T h e optimal value of LP. Since the processing times are integers, it follows that [~*] is a valid lower bound. ub = The best solution value c o m p u t e d . t The C P U time in seconds on an ICE 2980 computer. MB = The bound obtained using the machinebased bound. JB = The b o u n d obtained using the j o b - b a s e d bound. TMB = The bound obtained using the t w o - m a chine bound. bv = The value of the best k n o w n solution to these problems. T •
5. Concluding remarks W e have constructed a new integer programm i n g formulation of the flowshop problem. The lower bounds c o m p u t e d are either independent or superior to the w e l l - k n o w n bounds. The m o s t interesting aspect seems to us to be the way w e have extended the use of the acyclic digraph Go to deal with fractional solutions. The c o m p u t a t i o n a l results are not sensational but there is hope that the bound can be useful as an addition to the two machine bound, which has tended to d o m i n a t e our bound in the tests. The c o m p u t a t i o n time for the bound does not s e e m to be a problem, given that we did not use a very efficient version of the simplex algorithm in our tests. N o t e also that the number of tight constraints needed to define a basic solution is at m o s t n 2 - 2n + 2, where n is the number of j o b s and so is independent of the number of machines.
Acknowledgements W e thank Chris Potts for providing us with s o m e useful information.
References [1] Baker, K.R., Introduction to sequencing and scheduling, Wiley, New York, 1974. [2] Baker, K.R., "A comparative study of flow-shop algorithms", Operations Research 23 (1975) 62-73.
97
[3] Bellman, R., A.O. Esogbue, and Nabeshima, I., Mathematical Aspects of Scheduling and Applications, Pergamon Press, Oxford, 1982. [4] Bestwick, P.F., and Hastings, N.A.J., "'A new bound for machine scheduling", Operational Research Quarterly 27, (1976) 479 487. [5] Brown, A.P.G., and Lomnicki, Z.A., "Some applications of the branch-and-bound algorithm to the machine scheduling problem", Operational Research Quarterly 17 (1966) 173 186. [6] Campbell, H.G., Dudek, R.A., and Smith, M.L., "'A heuristic algorithm for the n job, m machine sequencing problem", Management Science 16 (1970) B630-B637. [7] Conway, R.W., Maxwell, W.L., and Miller, L.W., Theory of Scheduling. Addison-Wesley, Reading, MA, 1967. [8] Ford, L.R., and Fulkerson, D.R., Flow,s m Networks, Princeton University Press, Princeton, N J, 1962. [9] Garey, M.R., and Johnson, D.S., Computers and lntractibili(v: A Guide to NP-Completeness, Freeman and Company, San Francisco, CA, 1979. [10] Garey, M.R., Johnson, D.S., and Sethi, R., "'The complexity of flowshop and jobshop scheduling", Mathematics ~: Operations Research 1 (1976) 117-129. [11] Geoffrion, A.M., "Lagrangean relaxation for integer programming", Mathematical Programming Study 2 (1974) 82 114. [12] Giglio, R.J., and Wagner, H.M., "Approximate solutions to the three-machine scheduling problem", Operations Research 12 (1964) 305 324. [13] Graham, R.L., Lawler, E.L., Lenstra, J.K., and Rinnooy Kan, A.H.G., "Optimization and approximation in deterministic sequencing and scheduling: A survey". Annals of Discrete Mathematic 5 (1979) 287-326. [14] G65tschel, M., Lovfisz, L., and Schrijver, A., "The ellipsoid method and its consequences in combinatorial optimization", Combinatorica 1 (1981 ) 169 - 197. [15] lgnall, E., and Schrage, L., "'Application of the branch and bound technique to some flow-shop scheduling problems", Operations Research 13 (1965) 400-412. [16] Johnson, S.M., "'Optimal two- and three-stage production schedules with setup times included". Naval Research Logistic Quarterly 1 (1954) 61 68. [17] Khachian, L.G., "A polynomial algorithm in linear programming", Doklactv Akademii Nauk USSR. Nova Serm 244/5 (1979) 1093 1096: Translated in Sovwt Mathematics Doklady 20 (1979) 191 194. [18] Lageweg, B.J., Lenstra. J.K., and Rinnooy Kan, A.H.G., "A general bounding scheme for the permutation flowshop problem", Operations Research 26 (1978) 53 67. [19] Lasdon, L.S., Optimization Theory Jbr l~lrge ,~vstems, MacMillan, London, 1970. [20] Lenstra, J.K., Sequencing t~v Enumerative Method~', Mathematical Centre Tract 69, Mathematisch Centrum, Amsterdam, 1977. [21] Lenstra, J.K., Rinnooy Kan, A.H.G., and Brucker, P., "Complexity of machine scheduling problems", Annals ~( Discrete Mathematics 1 (1977) 343 362. [22] Lomnicki, Z,A., "A branch-and-bound algorithm for the exact solution of the three-machine scheduling problem", Operational Research Quarterly 16 (1965) 89-100.
98
A.M. Frieze and J. Yadegar / .4 new integer programming formulation for the flowshop problem
[23] McMahon, G.B., and Burton, P.G., "Flow-shop scheduling with the branch-and-bound method", Operations Research 15 (1967) 473-481. [24] Potts, C.N., "An adaptive branching rule for the permutation flow-shop problem", European Journal of Operational Research 5 (1980) 19-25. [25] Rinnooy Kan, A.H.G., Machine Scheduling Problems: Classification, Complexity and Computations, Nijhoff, The Hague, 1976.
[26] Smith, R.D., and Dudek, R.A., "A general algorithm for solution of the n-job, M-Machine sequencing problem of the flowshop", Operations Research 15 (1967) 71-82. [27] Szwarc, W., "Elimination methods in the m × n sequencing problem", Naval Research Logistics Quarterly 18 (1971) 295-305. [28] Yadegar, J., "Studies in combinatorial optimisation", PhD Thesis, University of London, 1984.