42
European Journal of Operational Research 8 (1988) 42-45 North-Holland
Single facility scheduling with multiple job classes J a t i n d e r N.D. G U P T A Department of Management Science, Ball State University, Muncie, I N 47306, U.S.A.
Abstract: This paper considers a static single facility scheduling problem where jobs are divided into several mutually exclusive classes. The jobs in a given class need not be processed together. In addition to a known processing time for each job, there is a switching time involved which depends on the class of the job immediately preceding a job. A heuristic algorithm is proposed to find a minimum mean flow time schedule. The effectiveness of the proposed heuristic algorithm is empirically evaluated and found to indicate that the solutions obtained from this heuristic algorithm are often close to optimal. Keywords: Scheduling-single facility, multiple job classes, heuristic algorithm
Introduction Consider a static single facility problem where jobs are divided into K mutually exclusive and collectively exhaustive job classes. Associated with each job i is a processing time t~, i = 1, 2 . . . . . n. The switching (or changeover) time from class r to class s is a,.s with a , , = 0 , r = 0 , 1 , 2 . . . . . K; s = 1, 2 .... , K. The jobs in a given class need not be processed together. It is desired to find a schedule that minimizes the mean flow time defined as the average time spent by a job in the shop. This problem has several applications and various resource constrained scheduling problems in manufacturing and service organizations can be formulated as single facility problems with multiple job classes [2]. For example, Sahney's [5] single server two-machine problem can be considered as a single facility scheduling problem with two job classes. In addition, the problem of scheduling aircraft landings considered by Psaraftis [4] can be
The author wishes to thank the anonymous reviewers whose comments, particularly the reference to the paper by Psaraftis [4], improved the presentation of the results. Received October 1985; revised March 1986
formulated as a constrained single facility problem with multiple job classes. If a,s = 0 for all r and s, the problem can be solved by arranging jobs in a non-decreasing order of their processing times without any inserted idle times [1,6]. For K = 2, a polynomically bounded algorithm is available to find an optimal schedule [3]. For K > 2, a dynamic programming approach is suggested by Psaraftis [4] under the assumption that jobs in the same class are identical. Even for this special case, Psaraftis found that the computational effort and storage requirements are exponential functions of the total number of job classes [4]. The general single facility scheduling problem with multiple job classes, however, remains unsolved and appears to be NP-complete [2] implying that it may be highly unlikely that a polynomially bounded optimization algorithm can be developed to solve the problem. This paper describes a heuristic algorithm to solve the above problem. The proposed heuristic algorithm builds schedules using the shortest processing time discipline, modified suitably for the problem at hand. The effectiveness of the proposed heuristic algorithm in finding optimal or near optimal schedules is empirically evaluated. Results of the computational experience are discussed.
0377-2217/88/$3.50 © 1988, Elsevier Science Publishers B.V. (North-Holland)
J. N.D. Gupta / Single facility scheduling with multiplejob classes
Problem definition Let the number of jobs in class r be n r and the subset of jobs in class r be represented by N . Now, consider a partial schedule oa formed by concatenating job a ~ N s to an already known partial schedule o with its last job belonging to class r. Let the number of jobs in a be k. Then, the contribution of partial schedule oa to the total flow time of a complete schedule with oa as its initial partial schedule, F ( o a ) is given by the following recursive relation [3]. F ( a a ) = F ( o ) + (n - k )(t~ + 0[,s) where F ( q , ) = 0 and ~ is a null (empty) schedule and r = 0 i f a = ~ . Then the above scheduling problem is one of minimizing F ( o a ) / n where o ranges over all possible permutations of (n - 1) jobs not containing job a and job a ranges over all integers from 1 through n.
Proposed heuristic algorithm It is well known that the shortest processing time rule minimizes mean flow time for a problem consisting of only one class [1,6] (i.e., 0[,s = 0 for all r and s). This shortest processing time rule is modified to generate an approximate solution for the case when the switching time for various classes are non-zero. The proposed heuristic algorithm can be described as follows: Step O. Initialization. For each a ~< K, let Sq = [a~ q,, a~2q,, . . . . a,q (q) ] be the schedule obtained by arranging jobs in Nq in a non-decreasing order of their processing times. Let o = ~ , p = 0 , r = 0 , kq = 1 for all q ~< K. Further let/3 = [a~qq); kq <~nq, q ~< K ] and Q = [17 2 . . . . . K]. Enter Step 1. Step 1. Schedule augmentation. Augment job a ~ N~ to partial schedule o such that: 0[,,+t,=
min (0[rq+ti), i~{BnN u}
q~Q.
In case of a tie, choose job a such that either it belongs to class r or belongs to a class that has the minimum number of jobs left. Set o = o~, p = p + 1, r = l . If p < ( n - 1 ) enter Step 2, otherwise proceed to Step. 3. Step 2. Updating. Set fl =/3 (~ J where ~ repre-
43
sents ' n o t job a ' . If k s < n s, set k s = k s + 1,/3 =/3 u a k(s)" otherwise set Q = Q N g. Return to Step. 1. s Step 3. Approximate solution. Find the only job a not in o and set S = aa. Find its mean flow time and accept this as an approximate solution to the problem.
A numerical illustration As an illustration of the proposed heuristic algorithm, consider the following seven job problem with three job classes. The processing times of seven jobs are given by t = (74, 52, 46, 10, 40, 48, 30) with N~ = (1, 2, 3), N 2 = (4, 5, 6) and N 3 = (7). The switching times for various classes are given in Table 1. Now, to solve the problem proceed as follows: 1. For each of three classes, arrange the jobs in non-decreasing order of their processing times. Thus, S 1 = (3, 2, 1), S 2 = (4, 5, 6) and S 3 = (7). Set a=q~, p = 0 , r = 0 and k a = k 2 = k 3 = l . This gives/3 = (3, 4, 7) and Q = [1, 2, 3]. Enter step 1. 2. The sum of the switching and processing times of each job i ~ / 3 , 2~, are calculating as follows: For j o b 3 : 2 3 = a 0 1 + t 3 = 4 5 + 4 6 = 9 1 , For job 4 : 2 4 = 0[02 -~- t 4 = 96 + 10 = 106, For job 7:27 = 0[03 + t7 = 70 + 30 = 100. Therefore, a = 3, s = 1. Thus oa = (3), p = p + 1 = 1 , and r = s = l . Since p < ( n - 1 ) = 6 , enter step 2. 3. Set fl = f l f ) ~ = (4, 7). Since k ~ = 1 < n s = 3, set k~ = k s + 1 = 2, fl = (2, 4, 7). Return to step 1. 4. The sum of switching and processing times for each job i ~/3, t i, are found as follows: For job 2:~2=0111 + t 2 = 0 + 5 2 = 5 2 , For job 4 : 2 4 = ot12 -4- t 4 = 5 7 + 1 0 = 67, For job 7 : t 7 = 0113+ t7 = 8 + 30 = 40. Table 1 S w i t c h i n g times for t h r e e j o b classes r
0 1 2 3
s
1
2
3
45 0 57 8
96 57 0 35
70 8 35 0
44
J.N.D. Gupta / Single facifity scheduling with multiplejob classes
times the percent deviation was less than or equal to 5 percent (#DEV5). The results of Table 2 indicate that the proposed heuristic algorithm is quite effective in finding an optimal or near optimal schedule for the single facility scheduling problem with multiple job classes. The computational time for the proposed heuristic algorithm was not measured. In the worst case, the computational effort of the proposed algorithm will be no more than O ( n K + n log n) indicating that very large problems can be solved in a polynomially bounded computational effort.
Therefore a - 7 and s = 3 , and 0 a = ( 3 , 7 ) . Set p=p+l=l+l=2, r=s=3. Sincep<(n-1) = 6, enter step 2. 5. Set fl = (2, 4). Since k s = ns, Q = (1, 2). Since p < (n - 1) = 6, return to step 1. .
.
.
.
Proceeding as above, the complete schedule S = (3, 7, 4, 5,, 2, 1) is obtained with mean flow time of 1686/7. The optimal schedule, found by complete enumeration, for this problem is S* = (3, 2, 7, 4, 5, 6, 1) with mean flow time of 1666/7. Thus the approximate schedule is only 1.20 percent away from the optimal schedule.
Conclusions Computational experience This paper has described an efficient heuristic algorithm for finding a minimum mean flow time schedule for a single facility problem with multiple job classes where the switching time of a job depends on the class of the job immediately preceding it. Computational experience with problems involving five to seven jobs and three job class indicates that the proposed algorithm is quite effective in finding an optimal or near optimal schedule. In addition to finding an approximate solution to large sized problems for which exact optimization methods may prove to be rather expensive, the proposed heuristic algorithm can be used in an implicit enumeration procedure, if one is made available, to curtail the search thereby improving the efficiency of any implicit enumeration procedure.
Efforts to find worst case error bounds for the proposed algorithm were nos successful. Therefore, the effectiveness of the proposed heuristic algorithm was empirically evaluated. For this purpose, the proposed heuristic algorithm was programmed to solve randomly generated problems. Since optimal solutions could be found only for small problems, only 5 to 7 job problems with three job classes were used. The processing and switching times were generated from a uniform random distribution in the range [1,99]. The optimal schedule for each problem was found by complete enumeration. The percent deviation of the mean flow time of the heuristic schedule from the mean flow time of the optimal schedule was computed for each problem. Based on 20 problems in each of the six sets, Table 2 depicts the minimum (MIN), the average (AVR), the maximum (MAX) percent deviation of the heuristic mean flow time from the optimal mean flow time, the number of times the heuristic solution was optimal (#opT) and the number of
References [1] Conway, R.W. Maxwell, W.L., and Miller, L.W., Theory of Scheduling, Addison-Wesley, Reading, MA, 1967.
Table 2 Percent deviation of the heuristic mean flow time from minimum mean flow time n
n1
n2
n3
MIN
AVR
MAX
# OPT
~ DEV5
5 6 6 7 7 7
2 2 3 2 3 4
2 2 2 2 3 2
1 2 1 3 1 1
0.0 0.0 0.0 0.0 0.0 0.0
2.01 1.22 1.38 1.67 3.16 1.55
9.78 5.69 10.02 12.37 13.78 15.17
12 13 11 14 9 12
15 19 18 17 15 19
J.N.D. Gupta / Single facility scheduling with multiple job classes [2] French, S.I Sequencing and Scheduling, Ellis Horwood, Chichester, 1982. [3] Gupta, J.N.D., "Optimal schedules for single facility with two job classes", Computers and Operations Research 11 (4) (1984) 409-413. [4] Psaraftis, H.N., "A dynamic programming approach for sequencing groups of identical jobs", Operations Research 28 (6) (1980) 1347-1359.
45
[5] Sahney, V.K., "Single server, two-machine sequencing problem with switching times", Operations Research 20 (1) (1972) 26-36. Also, see his Errata, Operations Research 22 (1974) 1120. [6] Smith, W.E., "Various optimizers for single stage production", Naval Research Logistics Quarterly 3 (1) (1956) 59-66.