Computers ind. Engng Vol. 17, Nos 1-4, pp. 359-365, 1989 Printed in Great Britain. All rights reserved
0360-8352/89 $3.00+ 0.00 Copyright © 1989 Pergamon Press pit
A HEURISTIC N-JOBS/M-MACHINES
SCHEDULING ALGORITHM ALl M. ALLI, Ph.D., P.E. Meinders School of Business Oklahoma City University Oklahoma City, Oklahoma 73106
ABSTRACT
This paper p r e s e n t s a heuristic algorithm to minimize the makespan of the N-Job/M-machine job-shop scheduling problem. The algorithm is based on the assumption that the (different) technological ordering of machines for each Job is deterministic and that the problem is static. Heuristic priority' rules are used to determine the Job with the highest priority at each (scheduling) stage. The illustrative example accomplish the scheduling.
demonstrates
the
systematic
iteration
to
INTRODUCTION This article describes a heuristic algorithm which will yield an optimal or near-optimal makespan to the N-Job/M-machine Job shop scheduling problem. In principle, an optimal solution can always be determined by the application of integer programming techniques or by using a branch-and-bound procedure. However, in terms of computational effort and computer time required, these solutlon procedures are not feasible. S p e n c e r and Dudek [4] p r e s e n t e d a h e u r i s t i c algorithm b a s e d on PERT/CPM t e c h n i q u e s ; S h a k e l t o n [5] d e s c r i b e d a g r a p h i c a l method t h a t p r o d u c e s a l o w e r b o u n d and an u p p e r bound on t h e o p t i m a l makespan. Conway e t a l [2] r e f e r r e d t o a b r a n c h - a n d - b o u n d a p p r o a c h t o t h e p r o b l e m , and t h e y p r e s e n t e d d i f f e r e n t possibilities for the bounds. All of them provide a practical approach to the Job shop problem. The heuristic algorithm presented here, however, is even more practical in terms of computational effort and ease of application. The solution procedure schedules Jobs onto machines in a stage-wise process, and a tableau format has been developed to accomplish this. THE JOB-SHOP PROBLEM
2.
Assume N Jobs are to be completed on M machines. Let the vector S i contain the machine-proc, ssing sequence to produce Job i, i-l,..., N. S i ffi (S i - (el, s2, ..., ek, ...), i = 1,2, ..., N. where s k = machine number in the production sequence of Job i at t h e Kth stage; 1 ~ s k ~ M Note t h a t t h e p r o c e s s i n g s e q u e n c e Si i s d i f f e r e n t
f o r each Job i .
Moveover, i f Job i i s n o t s c h e d u l e d on Machine (M/c) s k a t t h e Kth s t a g e , t h e n s k becomes Sk+l, Ski. 1 becomes s ~ 2 ,
amd so on.
Let t i ( k )
be t h e time
at which Job i is available at the k -h stage, for k = I, 2, ..., and ti(O)= 0. Also l e t J = I, 2,
r j (k) be the time at which M/c J is available at the k th stage, for . . . .
M, and rj
(0)
- 0.
At the k th stage, assuming no two Jobs require the same M/c Sk, three cases exist.
Denoting the time at which a Job i is expected to be scheduled
on M/c ek by T i (k) . Maximum
[ ti
(k)
rsk (k) ], idle time of M/c s k by
is k (k) , and the waiting time of Job i by referring
t o F i g u r e i , we have: 359
wi(k), for k - I, 2 . . . . .
and
360
Proceedings of the 1 lth Annual Conference on Computers & Industrial Engineering
Case II: Case I:
rsk
(k)
>
ti
rsk
(k) = t1(k)
(k) (k) T. (k) = ti(k) = rsk i
Ti(k) =
(k) rsk Isk(k) = Ti(k) - r
Isk
(k) = Tz(k) •
= 0 (k)
Case III:
r
= Ti
(k)
-t. 1
(k)
=0
= T i ( k ) - t z.( k ) > 0
(k)< sk
In all three cases t i (k)
t. (k+l) z
T. (k) = t. (k) i i
above, = T. ( k ) + P. z zs k
(k+l) rsk
Isk
=0
sk
(k) - rsk
Wi wi(k)
(k)
(k) = Ti(k)
- rsk
(k) = Ti
+ Pisk
(k) > 0 Where Plsk
wi(k) = Ti(k) _ ti(k) = 0
time required by M/c sk to process Job i. r
I
Previous job
Job I, Case I
t~ (k)
Job i, Case II
ti(k)
< r~k
(k)
M/c sk
(k) ~_ wi(k)
= rsk
(k) Isk(-~
Job i, Case III
t$(k)
r~k
(k)
Figure I : Job i requires M/c sk with no machine conflict
'I
Alli: Heuristic scheduling algorithm
361
If, however, two 3obs p and q require the same Mlc sk at the k th stage, i.e. in the case of a machine conflict, then some priority rules must be used to determine which Job is to be scheduled first on that machine. A set of heuristic priority ruIes is presented in the next section.
These
priority rules have for objective the minimization of the makespan P of the Job-shop problem, i.e.
Minimize P = Maximum [ T I ]
1
(1) Let. ~ S p and q be ll'l Conflict for H/c sk. the M/c sk before the availability of ~
I f 3oh q can tele•se
p, then ~h q IS scheduled on M/C sk.
Refer to Figure 2. The~efoces I f tq (k+l) <_Tp(k), Mlere tq (k*l) . Tq(k) ÷ PqskB then lnh q is sche~led f i r s t on ~Vc sk. Othe~lse, go to Step (2).
?
Tp(k)
.I
tn(k,~_) - _,-1
I."_
q
Fl~Jre 2 - The case rot Priority Rule 1 Tp(k) > tq! k÷~) (2) The JoD with the 9 ~ t e s t sue of t m l n l n 9 pcoceseln9 times (APT) is cllolen to be icheduled f i r s t .
Refez to Figure ).
Itmtefore, 0oh q Is
scheduled f i r s t on N/c sk i f (flPT)q:P (FPT)p. Zn case of • tie, i.e. (PPT)q • (~T)p, than 0o to Step ).
~rJ-~l .------- tqlk.l)
q I"
(l~T)q Tp(k) • tq (k÷l)
4
362
Proceedings of the 1lth Annual Conference on Computers & Industrial Engineering
(3) ScheduleJob q if Pqsk~ Ppsk, Referto Flgure4. In caseof a
(4) Refer
to
Flguce 5.
e. 5clleoule 3ob q i f Tq(k)< Tp(k).
tie, i.e. Pqsk = Ppsk,then9o to Step4.
b. I f Tq(k) = Tp(k), then choose
P
lp(k )
q
Tq(k)
JoO arbitrarily.
L L ,L L "°l-
PpSk
Figure 4
s
i?_c7-[--i - The
case for Priority
..
Rule )
(RPT)q = (RPT)p
v.>
] "oeR]
'o<''
i_ ,,o.
i
Figure 5 - The case for Priority Rule 4a and
Pqsk< Ppsk
Illustration
A 3 x 3 job-shop problem has the following orderlngs and processing times: Job I - M41 , M22 , M33 Job 2 ~ M32, M31 , M33 Job 3 - M53, M31 , M22 where Mtj represents M/c j requiring t tlme-unlts. Tableau I represents the first stage of the process. For each Job i, the processing time of M/c s I in S i is entered in the tableau at the appropriate location. Since no machine conflict exist, each Job is scheduled on the machine it requires. This Job-to-machlne schedule is entered in the barchart shown in Figure 6. The times that Job i and M/c i are available are updated to 4 and placed in Tableau II. The same is done for Job 2 and M/c2, and Job 3 and M/c 3. The first machine in Si, i = 1,2,3, is deleted and the updated S i is recorded in the second tableau. (RPT) I, i = 1,2,3, is also updated and recorded in Tableau II. Similarly, the waiting time of Job i so far, Ii, are updated and recorded in Tableau II. Stage 2 then proceeds by inserting t~e processing time of M/c s 2 in S i, i - 1,2,3, at the appropriate location in Tableau II. Tableau II now shows a machine conflict between Jobs 2 and 3. Since Job 2 cannot release M/c i before Job 3 needs it, i.e,
T~2) = Max. [ t~2), r (l2) , r
T~2) +
P21 > T~2),
] = Max. [ 3 , 4
] = 4 , and P21 = 3
] = Max. [ 5,4 ) = 5, so
or 4 + 3 > 5
then Priority Rule 1 does not apply.
By Priority Rule 2,
ab.
Alli: Heuristic scheduling algorithm
(RPT)2 Job 2 is the one to be of Job 3 is now passed is now "crossed out" to schedule Job l on M/c III, which is completed I in Tableau III.
>
(RPT) 3
or 6 >
363
5
scheduled first on M/c 1. All the information in the row on to that row in Tableau III. This row in Tableau II show this situation. The next step at this stage is to 2. All information is updated and passed on to Tableau by inserting ~ 3 and P23" Note that W 2 = i, and 12 =
At the third stage, Jobs I and 2 are in conflict for M/c 3. However, Priority Rule i does not apply, nor does Priority Rule 2 since (RPT) 1 = (RPT) 2. Moreover, since ~ 3 = P23' we have to resort to Priority Rule 4a to resolve the conflict. Therefore, Job i is scheduled on M/c 3 at this stage. Next, Job 3 is scheduled on M/c I, and the information in row of Job 2 is transferred to that row in Tableau IV. Tableau IV demonstrates the last stage for this problem. Figure 6 illustrates the completed schedule. Tableau V contains the summary at the end of the scheduling process, i.e.
~W I = O, EW2 = 3, ~W 3 = 2, ~ I I = O, ~ 1 2 = 5, ~ I 3 = I , and T 1 = 9, T 2 = 12, T3 = 12, hence, P = 12.
Machine 3
.]e~l
I
I
4
2
2
3
3 rll)
0
0
o
o
t~I)
(RPT)i
0
9
1,2,3
o
0
9
2,1,}
o
0
10
3,I,2
Si
Tnhl~atJ I
E~zj
Ist stage of Illustration
~achine j 30hi
1
2
I
2
(RPT)i
Sl
~w l
4
5
2,~
0
6
1,3
0
5
1,2
0
3 5
J
r~2)
t~2)
2
4
Tableau IX ~I,
0
0
2nd stageof illustration
364
Proceedings of the 1 lth Annual Conference on Computers & Industrial Engineering
Nachlne J 3obl
ti3)
(RPT)I
Sl
~Wi
3
~
g
5
1,2
0
2
I
6
2
7
3
5
Ta01A~j I I I 3rd stage of i l l u s t r a t i o n
~c~Ine t t~ 4)
(FAT)i
I
9
o
2
7
3
3
I
10
2
2
2
3oh I
I
1
2
3
2
r~4)
SI
~w i
3
10
6
0
I
g
Tableau IV
~zj,,
Machine
.lobl
1
2
J
t~ ~)
(RPT)I
9
0
2
12
0
],
12
0
10
12
S~
3
1
rJ 5)
4th s t s g e o f i l l u s t r a t i o n
0 :3
-
2
12 Tableau v
T, zj
o
1
SUlri~ry Of I l l u s t r a t i o n
+, I
,,',:,
.,'+:+
+o+
+
,+
I
+
;o.
ii+++.I "++:+.
I
Ii .]c:,
t
I
I
I,,,o,
;+
.,'~+:+ I
I,+'o+I
FJ.gute 6 - Bar Chart of' Ule Schedule Developed for the ~ x 3 3oDoShopProblem
Alli: Heuristic scheduling algorithm
4.
COMPUTER IMPLEMENTATION OF THE ALGORITHM
The computer program for this algorithm is written by: Mr. Mehaad-Ali Tegally. The program's summary output for the given example is described below. The program output gives the waiting time and completion time for each job, the machines utilization and the Idle time for each machine, and Gantt chart as a graphical presentation.
5.
CONCLUSION
A heuristic N-Job/M-machlne job-shop scheduling algorithm has been developed and presented here. Our limited computational experience with the algorithm has shown that an optimal makespan is obtained when it is applied to the N x M Job-shop problem, for N < 3. However, for N > 3, the algorithm is known to perform well in terms of Job idle time and machine utilization, together with the makespan it produces. Its ease of application and computer implementation makes it a very practical tool in the hands of the interested user.
BIBLIOGRAPHY
I.
Alli, A.M., and M.A. Tegally, "A 3 Jobs/M Machines Sequence Scheduling Algorithm", Presented at Dallas Joint ORSA/TIMS National Meeting, November, 1984.
2.
Conway, R.W., W.L. Maxwell, and L.W. Miller, Theory of Scheduling, Addison-Wesley Publishing company, Reading, 1967, Chapter 6.
3.
Bellman, R., A.O. Esogbue, and I. Nabeshima, Mathematical Aspects of Schedulin~ and Applications, Pergamon Press Ltd., Oxford, 1982.
4.
Spencer, D.L., and R. A. Dudek, "The Dependent Shop Sequencing Algorithm: A General Algorithm for Solving Flow Shop, Job Shop, and Dependent Shop Sequencing Problems", Int., J. Prod. Res., 1973, Vol. Ii, No. 4, Pages 325-339.
5.
Shakelton, Jr., J.J., "Approaches to the J-Job M-Machine Scheduling Problem", Master's Thesis, U.S. Naval Postgraduate School, California, 1971.
365