7
A New Heuristic for a Single Machine Scheduling Problem with Set-Up Times Author(s): David Williams and Andrew Wirth Source: The Journal of the Operational Research Society, Vol. 47, No. 1 (Jan., 1996), pp. 175- 180 Published by: Palgrave Macmillan Journals on behalf of the Operational Research Society Stable URL: http://www.jstor.org/stable/2584261 . Accessed: 24/09/2013 02:07 Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at . http://www.jstor.org/page/info/about/policies/terms.jsp . JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range of content in a trusted digital archive. We use information technology and tools to increase productivity and facilitate new forms of scholarship. For more information about JSTOR, please contact [email protected]. . Palgrave Macmillan Journals and Operational Research Society are collaborating with JSTOR to digitize, preserve and extend access to The Journal of the Operational Research Society. http://www.jstor.org This content downloaded from 128.252.67.66 on Tue, 24 Sep 2013 02:07:29 AM All use subject to JSTOR Terms and Conditions

A New Heuristic for a Single Machine Scheduling Problem with Set-Up Times

Embed Size (px)

Citation preview

A New Heuristic for a Single Machine Scheduling Problem with Set-Up TimesAuthor(s): David Williams and Andrew WirthSource: The Journal of the Operational Research Society, Vol. 47, No. 1 (Jan., 1996), pp. 175-180Published by: Palgrave Macmillan Journals on behalf of the Operational Research SocietyStable URL: http://www.jstor.org/stable/2584261 .

Accessed: 24/09/2013 02:07

Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at .http://www.jstor.org/page/info/about/policies/terms.jsp

.JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range ofcontent in a trusted digital archive. We use information technology and tools to increase productivity and facilitate new formsof scholarship. For more information about JSTOR, please contact [email protected].

.

Palgrave Macmillan Journals and Operational Research Society are collaborating with JSTOR to digitize,preserve and extend access to The Journal of the Operational Research Society.

http://www.jstor.org

This content downloaded from 128.252.67.66 on Tue, 24 Sep 2013 02:07:29 AMAll use subject to JSTOR Terms and Conditions

Journal of the Operational Researh Society (1996) 47, 175-180 ? 1996 Operational Research Society Ltd. All rights reserved. 0160-5682/96 $12.00 9

A New Heuristic for a Single Machine Scheduling Problem with Set-up Times

DAVID WILLIAMS1 and ANDREW WIRTH2 'University of British Columbia, Canada and 2University of Melbourne, Australia

This paper examines the problem of scheduling jobs on a single machine with set-up times. The jobs are divided into mutually exclusive classes and a set-up task is required when processing switches from a job of one class to a job of another class. The set-up times are assumed to be sequence independent. A number of necessary conditions for a schedule to minimize mean flow time have previously been stated, but do not uniquely define the optimal solution, and the problem is apparently NP-complete. We propose a new polynomial-time heuristic, based on these conditions, and compare its performance with some existing heuristics.

Key words: heuristics, scheduling

INTRODUCTION

Practical scheduling problems often involve processing several batches of related jobs on common facilities where a set-up time is incurred whenever there is a switch of processing from a job in one batch to a job of another batch. If the set-up times are sequence dependent the problem is NP-complete1 and thus difficult to solve. Various scheduling problems in manufacturing and service organizations can be formulated as single facility problems with job classes, for example, the scheduling of jobs for a flexible manufacturing system that can produce several different types of product on the same machine but which requires a set-up to rearrange or retool workstations when there is a switch in product type. Other examples are the scheduling of source code programs that are to be executed by a computer using different compilers, and the allocation of a worker who must switch from machine to machine.

We consider the problem of sequencing jobs on a single machine in order to minimize mean flow time, given that the jobs are divided into classes or batches, set-ups are required when we change classes and set-up times are sequence independent. Gupta2 has proposed a greedy heuristic for the problem with (possibly) sequence dependent set-up times. Mason and Anderson3 considered the sequence independent case and found several conditions that must be satisfied by the optimal solution. Unfortunately, these conditions are not sufficient. Nevertheless, Mason and Anderson3 found them useful in reducing the size of the search tree when seeking the minimal solution. The new heuristic, discussed in this paper, is based on these conditions and indeed satisfies them.

Below, we introduce the necessary notation and then compare the performance of this new heuristic with Gupta's heuristic and the optimal no class splitting solution.

THE PROBLEM AND NECESSARY CONDITIONS

Following Mason and Anderson3, we introduce the following notation, where a run is a maximal subsequence of consecutive jobs from the same class:

c = the number of classes of jobs; ni = the number of jobs in class i; si = the set-up time for class i;

a;, = the jth job in class i; t = the processing time of job a11;

Correspondence: A. Wirth, Department of Mechanical and Manufacturing Engineering, University of Melbourne, Parkville, Victoria 3052 Australia

This content downloaded from 128.252.67.66 on Tue, 24 Sep 2013 02:07:29 AMAll use subject to JSTOR Terms and Conditions

176 Journal of the Operational Research Society Vol. 47, No. I

Ak = the number of jobs in run Rk; CYkE]] = the jth job in the kth run;

-k[I] = the processing time of job CVk[j]; Uk = the set-up time for the kth run; Tk = the processing time of the kth run

Ak

= Uk + E rk[j]; j=1

Mk = the mean processing time of the kth run = TkIAk-

Thus, for example, the sequence a1l, a12, a13, a21, a22, a14 consists of three runs, namely: (i) a1l, a12, a13; (ii) a21, a22; and (iii) a14. Thus, for example, the completion time for job a21 is s1 + t11 + t12 + t13 + s2 + t21. The sum of the completion times of the jobs; that is, the total flowtime, is

Si + tii + (s1 + tll + t12) + (s1 + tll + t12 + t13) +

= 6s, + 6t11 + 5t12 + 4t13 + 3S2 + 3t21 + 2t22 + Sl = t14. (1)

The objective is to minimize the mean flow time, or equivalently the sum of the completion times of the jobs. The number of runs is to be determined, and is bounded below by c.

Mason and Anderson3 state that an optimal sequence must satisfy the following conditions.

Condition 1. Within a run, jobs are arranged in order of non-decreasing processing time (shortest processing time rule).

Condition 2. Runs are arranged in order of non-decreasing mean processing time.

Condition 3. The mean processing time, taken over all jobs sequenced between the last job of a run and the first job of a later run of the same class, satisfies:

'v-1

E Tk + Uv v-i jr k=+[1] (2)

E Ai= n

in=u+1

where u < v and RU and RV, are runs of the same class.

Conditions (1) and (2) are extensions of the shortest processing time rule, for minimizing flowtime for the problem without set-up times. Condition (3) states, informally, that if a sufficiently large gap exists between the processing times of two successive jobs in the same class, we may break up that class.

SOME HEURISTICS

No class splitting

Suppose that we add the additional constraint that classes are not to be split. Then, the optimal solution is to sequence the classes in non-decreasing mean processing time order. Furthermore, within each class jobs are sequenced in non-decreasing processing time order. Suppose that in the optimal no class splitting solution, class a is followed immediately by class b. We show that Ma < Mb. Without loss of generality we assume that these are the first two classes. Note that naMa = Ta = Sa + Eil=a[j]

As for (1) above, the sum of the flow times of the jobs in the two classes is

nasa + ~(na - i + 1)Ta[i] + nb(na Ma) + nbsb + ~(nb -j + lftb[I]. (3) i=i =

This content downloaded from 128.252.67.66 on Tue, 24 Sep 2013 02:07:29 AMAll use subject to JSTOR Terms and Conditions

D. Williams and A. Wirth-Single Machine Scheduling with Set-up Times 177

If Mb < Ma then clearly we can decrease the sum of the flow times by interchanging the order of the two classes, since na(nbMb) < nb(naMa). Thus, in the optimal solution, classes are sequenced in non-decreasing mean processing time order. Since condition 3 is trivially satisfied in the no class splitting case, it follows that, at least for this case, the Mason and Anderson conditions are sufficient.

Gupta's heuristic

As stated above, this heuristic may also be used for the case of sequence dependent class set-up times. Step 1. Sort the jobs within each class in non-decreasing order of processing time. Place all

classes in the unscheduled list. Step 2. Now repeat the following procedure until the unscheduled list is exhausted.

Consider the first job from each class in the unscheduled list. Add the set-up time required to change from the class of the last job on the scheduled list to that of the first job. (If there is no previous job add the initial set-up time.)

Select the job that minimizes these times and move this job from the unscheduled list to the end of the scheduled list. In the case of a tie choose a job that belongs to the same class as the last job on the scheduled list or to a class with the fewest jobs left unscheduled.

A new heuristic based on the Mason and Anderson conditions

Step 1. Sort all the jobs in non-decreasing processing time order (ignoring for the moment the set-up times) and place them in the unscheduled list.

Step 2. Now repeat the following procedure until the unscheduled list is exhausted. (a) Add the next job from the unscheduled list that is of the same class as the last job of the scheduled list, provided this does not result in an increase in the mean processing time Tk/Ak of the run. Otherwise select the first job from the unscheduled list. (b) If the job just added is of a different class to its immediate predecessor in the scheduled list:

test if condition 3 is satisfied with respect to the last previous run of the same class. If it is not, jump the new job to the end of that last previous run, and place all the subsequent jobs at the front of the unscheduled list.

(c) Test if condition 2 is satisfied, with respect to the last two runs in the scheduled list.

If it is not, add further jobs, to the last run, from the unscheduled list until either the class is exhausted or condition 2 is satisfied. If the condition is not satisfied at the end of this process swap this last run with earlier runs until condition 2 is satisfied, and place all the runs following this last run at the front of the unscheduled list.

SOME EXAMPLES

The following examples illustrate the above-mentioned heuristics.

Example 1

The example presented in Table 1 illustrates that, even for a simple case, the heuristics may yield different results.

So, for example, s1 =5 and t22 = 11. Since s2 + t21 =10O+1 < 5+ 7 = s+ t11 it follows that Gupta's heuristic chooses a21 first. The final sequence is: a21, a22, a11, a12 with total

This content downloaded from 128.252.67.66 on Tue, 24 Sep 2013 02:07:29 AMAll use subject to JSTOR Terms and Conditions

178 Journal of the Operational Research Society Vol. 47, No. I

TABLE 1. Example 1

Class Set-up Job number number time

1 2

1 5 7 8 2 10 1 11

flowtime (10 + 1) x 4 + 11 x 3 + (5 + 7) x 2 + 8 = 109. The no class splitting and the new heuristic give: all, a12, a21, a22 with total flowtime (5 + 7) x 4 + 8 x 3 + (10 + 1) x 2 + 11 = 105. The fact that Gupta's heuristic looks only one step ahead causes the problem here.

Example 2

This example in Table 2 illustrates the new heuristic's jump and swap.

TABLE 2. Example 2

Class Set-up Job number number time

1 2 3 4

1 3 3 5 11 17 2 8 10 12 14 3 1 4 5

In this example both the no class splitting and Gupta's heuristic yield the solution: a31, a32, a1l, a12, a13, a14, a2l, a22, a23 with a total flowtime of 372.

We now apply the new heuristic. The first job in the sorted unscheduled list is a1l. The mean processing time of this first run

is (s1 + t1l)/1 = (3 + 3)/1 i 6. Since t12 < 6 we add the next job of the same class to form the run a1l, a12. We do not add a13 to this run at this stage as (S1 + t1l + t12)/2 = 5.5 < t13 = 11.

We now add the next job on the unscheduled list a31 to the scheduled list. Condition 2 is not satisfied and remains unsatisfied after adding a32 to the scheduled list. So we swap the two runs and now our scheduled list is a31, a32, and a1l, a12 are placed at the front of the unscheduled list. After selecting these jobs our scheduled list is now: a31, a32, a1l, a12. We now select a21 and since (S2 + t21)/1 = 18 > t22 we next select a22 and then a23. The next job to be added to the scheduled list is a13 but now condition 3 is not satisfied (since (S2 + t21 + t22 + t23 + s1)/3 = 47/3> t13). So job a13 jumps to the end of the second run. However, a14 does not jump, so the final schedule is: a31, a32, a11, a12, a13, a21, a22, a23, a14

with a total flow time of 368. In this example, the new heuristic is able to exploit the gap between the processing times of

the third and fourth jobs of class 1.

COMPUTATIONAL COMPLEXITY

It is easy to show that the no class splitting heuristic is O(n log n). Gupta2 showed that his heuristic is O(cn + n log n).

We now show that the new heuristic terminates and, in fact, is 0(n 4).

First, note that between two jumps there are 0(n2) swaps. If at some stage we swap one run Rk of jobs from class i, say, ahead of a run R_n of jobs from class j, then at any later stage this swap would not be reversed since then any run that is a superset of the jobs of Rk has a smaller mean processing time. Any superset of the jobs of R,n that is eligible to swap ahead of another run will include all the remaining jobs of class ] and hence has a greater

This content downloaded from 128.252.67.66 on Tue, 24 Sep 2013 02:07:29 AMAll use subject to JSTOR Terms and Conditions

D. Williams and A. Wirth-Single Machine Scheduling with Set-up Times 179

mean processing time (by Step 2a). There are at most n classes and so there are O(n2) swaps, between two jumps.

We now deal with jumps. At the beginning of the scheduling process consider the jobs in a class partitioned thus: aillai2l . .. lain.. A jump involving a job from class i may be considered as a move of one of the partitions I one step to the right, where || is replaced by |. Similarly the creation of a run is also equivalent to moving one partition one or more steps to the right. Since there are O(n.) such possible moves, we see that there are O(n2) jumps between each swap. Note that swapping also moves partitions to the right or keeps them fixed. Since sorting is O(n log n) it follows that the new heuristic is 0(n4).

We now show that the solution satisfies the three conditions. It is clear that Condition 1 is satisfied, since the first step is to sort the jobs by processing

time. Suppose now that Rk and Rm are runs of the same class with k < m. It follows from

Step 2(a) that

(k + E Tkri])/(Ak C1) (k + XTk Ul])/k.

Hence

Tk[xk] - Tk/Ak < rmI[1] (4)

and so adding a job to the end of a run as a result of a jump increases the run's mean processing time. This, together with Step 2(c) ensures that condition 2 is satisfied by the jobs in the scheduled list.

Finally, we need to show that Condition 3 is still satisfied after a swap. Suppose we have

u[Xu] -<( Tk + Ov, ) n r[1] k=u+1 m=u+1

and runs v and (v - 1) are swapped, that is

Mv Mv-1. (5)

It follows from (4) and Condition 2 that

TUP11 M + ... U MV-.

That is, we have v-2 lv-2

Pu[ I k + Orv )/( 2Am) k=u+l m=u+l

Since v-1

v-1

Tk + Ov TO1]( rv 1iXm k=u+1 1nt=11+1

and by (4) and (5)

TJ11 Tv[Xv] '< TvjIv < Tv-l/Xv-K

so

-TV_1 < -A,-lTv[1

Hence v-2 v-2

E Tk + Cv <

TVn E xnz

k=u+l mn=u?l

and so Condition 3 is still satisfied after a swap. We note that 'at worst' the final solution consists of c runs of complete classes sorted by mean processing time.

This content downloaded from 128.252.67.66 on Tue, 24 Sep 2013 02:07:29 AMAll use subject to JSTOR Terms and Conditions

180 Journal of the Operational Research Society Vol. 47, No. I

ANALYSIS OF PERFORMANCE

The three heuristics (no class splitting, Gupta and new) were tested by coding them in Turbo Pascal and running them on a 386 machine. We tested 250 randomly generated problems, for n = 50 and c = 10, 20, 30, 40 and 50. Following Mason and Anderson3 the set-up times were uniformly distributed integers between 0 and 100 and the job processing times were uniformly distributed integers between 1 and 100. The number of jobs in each class was selected from a uniform distribution subject to the constraint that 50 jobs were required in total. As expected, the three heuristics produced identical (and optimal) results for the case c = 50, since the problem then becomes essentially one of sequencing without set-ups and the three heuristics then reduce to the shortest processing time rule. Table 3 summarizes the results for the other cases. (MAPE is the mean absolute percentage error, NCS is no class splitting.)

TABLE 3. Performance of the three heuristics for n = 50

c Heuristic Best Equal best Best or equal Mean Std. dev. MAPE

10 New 24 7 31 65118 5638 6.94 Gupta 18 0 18 65717 6273 7.70 NCS 1 7 8 66433 5505 6.62

20 New 19 22 41 68315 6334 7.61 Gupta 6 0 6 69423 6872 8.36 NCS 3 22 25 69070 5979 7.14

30 New 7 42 49 73844 7521 8.58 Gupta 0 0 0 76335 7954 8.50 NCS 1 42 43 73975 7438 8.45

40 New 0 48 48 84091 12529 23.84 Gupta 2 0 2 87431 6425 6.02 NCS 0 48 48 84091 12529 23.84

The no class splitting heuristic outperformed the new heuristic in only five out of the 250 trials. For c - 30 these two heuristics generally agreed. The matched sample t-test values for the differences between the new and Gupta's heuristic for c= 10, 20, 30 and 40 were -1.31, -3.04, -7.09 and -1.45, respectively. The results for c = 20 and 30 are significant at

= 0.005 for the one-tail test. The new heuristic thus appears to perform better on average than the other two.

CONCLUSIONS

The new heuristic proposed here has been shown to satisfy the Mason and Anderson necessary conditions for an optimum and to perform well when tested against two alternative heuristics. The above investigations are currently being extended to the parallel machine problem.

REFERENCES

1. A. H. G. RINNOOY KAN (1976) Machine Scheduling Problems: Classification, Complexity and Computations. Nijhoff, The Hague.

2. J. N. D. GUPTA (1988) Single facility scheduling with multiple job classes. Eur. J. Opl Res. 8, 42-45. 3. A. J. MASON and E. J. ANDERSON (1991) Minimizing flow time on a single machine with job classes and setup

times. Naval Res. Logist. 38, 333-350.

Received April 1994; accepted June 1995 after two revisions

This content downloaded from 128.252.67.66 on Tue, 24 Sep 2013 02:07:29 AMAll use subject to JSTOR Terms and Conditions