13
ELSEVIER European Journal of Operational Research 91 (1996) 190-202 EUROPEAN JOURNAL OF OPERATIONAL RESEARCH Theory and Methodology Single-machine scheduling with time windows and earliness/tardiness penalties Christos Koulamas Department of Decision Sciences and Information Systems, Florida International University, Miami, FL 33199, USA Received September 1994; revised April 1995 Abstract We study the single machine earliness/tardiness problem with arbitrary time windows (STW). We show that STW is NP-hard and then decompose it into the subproblems of finding a good job sequence and optimally inserting idle time into a given sequence. We propose heuristics for the sequencing subproblem by appropriately modifying heuristics originally developed for other single machine scheduling problems. Experimentation with randomly generated problems shows that one of the proposed heuristics is computationally efficient and capable of finding good solutions to problems of arbitrary size. We also propose an algorithm to optimally insert idle time into a given job sequence. Keywords: Scheduling; Single machine; Time windows; Earliness/tardiness 1. Introduction Single-machine scheduling with time windows (STW) has received relatively little attention in the literature, although it has wide applications in just-in-time (JIT) manufacturing, chemical pro- cessing, PERT/CPM scheduling etc. In manufac- turing (e.g. MRP systems) the time 'bucket' con- cept can be used to transform an ideal job com- pletion time defined by a point in time to a more realistic completion time tolerance window de- fined by a time interval. The length of the toler- ance window is proportional to individual job characteristics, like its complexity, its position in the overall manufacturing process, etc. Jobs com- pleted within their respective windows incur no costs. Jobs that complete early must be held in finished goods inventory until their delivery date, 0377-2217/96/$15.00 © 1996 Elsevier Science B.V. All rights SSDI 0377-2217(95)00116-6 while jobs that complete after their due dates may cause problems like customer dissatisfaction, disturbance of subsequent operations, etc. In pro- ject management, the PERT/CPM algorithm computes a time window (defined by the early start and the late finish times) for each task. When several tasks require the same resource, the objective is to schedule the use of the re- source, so tasks can utilize it within their respec- tive time windows. The production of perishable goods is another related example; assume that a chemical manufacturer combines a certain chemi- cal A, which deteriorates rapidly, with a second chemical B to produce chemical C. If A is pro- duced before B is ready, it will deteriorate. If A is produced late, delays in production of C may prove costly. The above situations translate into the reserved

Single-machine scheduling with time windows and earliness/tardiness penalties

Embed Size (px)

Citation preview

Page 1: Single-machine scheduling with time windows and earliness/tardiness penalties

ELSEVIER European Journal of Operational Research 91 (1996) 190-202

EUROPEAN JOURNAL

OF OPERATIONAL RESEARCH

Theory and Methodology

Single-machine scheduling with time windows and earliness/tardiness penalties

Christos Koulamas Department of Decision Sciences and Information Systems, Florida International University, Miami, FL 33199, USA

Received September 1994; revised April 1995

Abstract

We study the single machine earliness/tardiness problem with arbitrary time windows (STW). We show that STW is NP-hard and then decompose it into the subproblems of finding a good job sequence and optimally inserting idle time into a given sequence. We propose heuristics for the sequencing subproblem by appropriately modifying heuristics originally developed for other single machine scheduling problems. Experimentation with randomly generated problems shows that one of the proposed heuristics is computationally efficient and capable of finding good solutions to problems of arbitrary size. We also propose an algorithm to optimally insert idle time into a given job sequence.

Keywords: Scheduling; Single machine; Time windows; Earliness/tardiness

1. Introduct ion

Single-machine scheduling with time windows (STW) has received relatively little attention in the literature, although it has wide applications in just-in-time (JIT) manufacturing, chemical pro- cessing, P E R T / C P M scheduling etc. In manufac- turing (e.g. MRP systems) the time 'bucket ' con- cept can be used to transform an ideal job com- pletion time defined by a point in time to a more realistic completion time tolerance window de- fined by a t ime interval. The length of the toler- ance window is proportional to individual job characteristics, like its complexity, its position in the overall manufacturing process, etc. Jobs com- pleted within their respective windows incur no costs. Jobs that complete early must be held in finished goods inventory until their delivery date,

0377-2217/96/$15.00 © 1996 Elsevier Science B.V. All rights SSDI 0377-2217(95)00116-6

while jobs that complete after their due dates may cause problems like customer dissatisfaction, disturbance of subsequent operations, etc. In pro- ject management , the P E R T / C P M algorithm computes a time window (defined by the early start and the late finish times) for each task. When several tasks require the same resource, the objective is to schedule the use of the re- source, so tasks can utilize it within their respec- tive time windows. The production of perishable goods is another related example; assume that a chemical manufacturer combines a certain chemi- cal A, which deteriorates rapidly, with a second chemical B to produce chemical C. If A is pro- duced before B is ready, it will deteriorate. If A is produced late, delays in production of C may prove costly.

The above situations translate into the

reserved

Page 2: Single-machine scheduling with time windows and earliness/tardiness penalties

C. Koulamas /European Journal o f Operational Research 91 (1996) 190-202 191

scheduling objective of processing all jobs within their prespecified windows to the greatest degree possible.

In this paper we consider the following static, deterministic, single-machine scheduling prob- lem. There is a set of jobs Jr, i = 1, 2 . . . . ,n, all available at time zero. Each job Ji has a known deterministic processing time p~, and a time win- dow (b i , d i) with window length w i = d i - b i. If a job Jr is processed entirely within its time window it incurs no penalty. On the other hand, if the start time s~ of Ji commences prior to b~ (s t < b i)

or the completion time of J~, ci = s i + Pi, exceeds d i (c i > di) , an earliness (tardiness) penalty E i (T,) incurs proportional to the corresponding de- viation. Thus

E i = max{O, b i - s i } ,

T i = max{0, c i - d i } .

The objective is to determine a schedule so the total earl iness/tardiness penalty ET=~(Ei + 7],) is minimized. Each job's time window is longer than its processing time (wi >p i ) so a job cannot be both early and tardy. There are no other restric- tions imposed on time windows; windows may overlap a n d / o r a job's window may be entirely contained into another job's time window. Pre- emption is not allowed and the machine is contin- uously available.

The literature in single-machine time window scheduling (STW) is quite limited. Sidney [13] considered a similar problem but with the objec- tive of minimizing the maximum earl iness/ tardi- ness penalty. He also imposed the condition that no job's time window is allowed to contain the window of another job as a proper subset. This condition leads directly to an optimal sequence with jobs sequenced in ascending order of their target start times. Sidney then developed an opti- mal procedure to determine the actual job start times to minimize the maximum earl iness/ tardi- ness penalty. Sidney's algorithm was further re- fined by Lakshminarayan et al. [8].

The STW problem can be viewed as a general- ization of the single-machine ear ly / ta rdy (SMET) problem with distinct job due dates. A recent survey for that problem can be found in Baker

and Scudder [2]. In subsequent sections we mod- ify algorithms for the ear ly / tardy problem so they can be used for the STW problem. Notice that STW reduces to an equivalent SMET problem when d i = b i + p i for all jobs Ji. In other words the SMET problems constitute a subclass of the more general STW problems. Clearly STW is in NP and since SMET (a subclass of STW) is NP-hard (Garey et al. [6]) so is STW.

The rest of the paper is organized as follows. The overall STW problem can be divided into the subproblems of deriving a job sequence and de- termining the actual job start times for all jobs in the sequence. In Section 2 an algorithm is pre- sented to determine the optimal job start times when a job sequence is given. In Section 3 we consider the sequencing subproblem. Heuristic methods are presented to determine a job se- quence for the STW problem and their perfor- mance and computational requirements are eval- uated in Section 4. The conclusions of this re- search are summarized in Section 5.

2. Job start time determination for a given job sequence

The complexity status of STW gives strong evidence that there are no polynomial time algo- rithms for STW unless P = NP. Furthermore, since we allow for overlapping time windows and for windows entirely contained within other win- dows, it is difficult to develop effective domi- nance conditions among jobs. Dominance condi- tions, when available, can be used to curtail the computational requirements of implicit enumera- tion methods like branch and bound or dynamic programming. In the case of the simpler SMET problem Abdul-Razaq and Potts [1] used branch and bound combined with a relaxed dynamic programming scheme to obtain good bounds. However, their computational results suggest that excessive computational times are needed to solve problems containing more than 20 jobs. We can anticipate substantially higher computational re- quirements for an analogous method for STW, since STW has less structure compared to SMET.

Page 3: Single-machine scheduling with time windows and earliness/tardiness penalties

192 C. Koulamas / European Journal o f Operational Research 91 (1996) 190-202

The unavailability of effective dominance condi- tions for STW dictates a different solution ap- proach to it.

The approach researchers followed to solve the SMET problem was to decompose it into the subproblems of finding a good job sequence and inserting idle t ime to a given sequence. We will follow the same approach to solve the STW prob- lem. In this section we show how to optimally insert idle time into a given job sequence and in the next section we present heuristics to find a good job sequence.

Garey et al. [6] showed how to optimally insert idle time in single machine ea r ly / t a rdy problems with time windows such that d~ +pg ~< d~+~ for all jobs Ji in a given sequence. Garey et al. defined a block B as a set of jobs J/ that are scheduled contiguously, that is s i + ~ = s i + p i for all jobs J~ in the block. Garey et al. parti t ioned the jobs in a block B into two subsets early (E ) and tardy (T). All jobs in E have Sg < b i and all jobs in T have

c i > d i. We lift the condition

d i + P i < ~ d i + l , i = 1 . . . . . n,

imposed by Garey et al. on the time windows and show how to optimally insert idle time to a given job sequence in STW problems with arbitrary time windows. In accordance with our problem definition, we allow for overlapping windows a n d / o r windows entirely contained within other windows.

We also define a block of jobs B as Garey et al. did, but because of the structure of the STW problem we partition the jobs in B into three subsets E, O, and T respectively. E and T con- tain the jobs which are early and tardy respec- tively. O contains the jobs in B which are neither early nor tardy, that is O contains all jobs Ji with s i ~ b i and c~ ~< dg. A key property for all blocks B is:

(i) Either the block start time s R = 0, or (ii) [ E l > IT] where [E l is the number of

early jobs in the block and IT[ is the number of tardy jobs in the block.

The optimal job start times s~ (i = 1 . . . . . n) are determined sequentially in accordance with the predetermined job sequence. We follow a two-

step procedure for each job J~. First its start time s~ is determined. Then the entire job block con- taining J~ is shifted to the left (if necessary). The start time determination procedure is terminated when the s i values have been determined for all jobs Ji, i = 1 . . . . . n .

We now describe the two-step procedure to determine s,+ 1 assuming that s j , j = 1 . . . . . i , have been determined.

S t e p 1. The following three cases arise when c i

is compared to the characteristics of Ji+ 1.

(i) c i < bi+l; (ii) c/>t b i+ l and c i + Pi+ 1 <~ di+ 1,

(iii) c i >1 b i+ 1 and c i + Pi+ 1 > d i + 1.

In case (i), Ji+l is started at Sg+~ =bg+l. As a result idle time is inserted and a new block is created with initial counters IO] = 1, [E} = 0, ] T] = 0. In cases (ii) and (iii), J/+ l is started at si+ L = % As a result J~+~ is appended to the block of jobs containing Ji. In case (ii), the cur- rent block counters are updated as I E ] = ] E l , [OI = [O[ +1, and ITI = ]T[ . In case (iii), the current block counters are updated as ] E] = [ E [ , [ O [ = [ O [ , a n d IT[ = [ T I + I .

S t e p 2. After si+ 1 is determined, the counters of the current block B are examined. If either s B = 0 or [ E[ > [ T[ for B, no additional action is taken and we proceed with the determination of si+ 2 for the next job in the sequence (Ji+2) using Step 1. If the addition of J;+~ to B results in s e ~ O a n d [E l = l i T [ f o r B, t h e n w e shift B to the left by

m i n ( m i n ( s i - b i ) + 1 , m i n ( c i - d i ) , S B - - C B _ I } , kJ i~O J i l T

where c B 1 is the completion time of the last job in the previous block B - 1. Let us examine the outcome of the shifting action. If the shift length is determined by

min (s i - b i) + 1, J i cO

then I E I = [ E [ + 1 for block B. If the shift length is determined by

min ( c i - d i ) , Ji~: T

then ] T] = [ T [ - 1 for block B. In both cases the property ] E ] > IT] is reinstated for B and no

Page 4: Single-machine scheduling with time windows and earliness/tardiness penalties

C. Koulamas / European Journal o f Operational Research 91 (1996) 190-202 1 9 3

further action is needed. If the shift length is determined by SB -- CB - 1 '

then block B is merged into block B - 1 . The two-step procedure is then repeated until an opti- mal start time s i has been determined for all remaining jobs Jj, j = i + 2 . . . . . n.

We will now prove the optimality of the start times s i generated by the above two-step proce- dure (let us call it PS), given a predetermined job sequence.

Proof. By induction on the number of jobs n. Optimality is obvious for an one job sequence. We will show that if PS determines optimal start times s i for i = 1 , . . . , n, then it also determines s,,+l optimally. There are three possible cases to consider. Case L c n < b ~ + l .

Case II. c , >~ b~ + l and c n + p , + l ~< d , + L. In both cases 1 and II, the addition of J , +j to the schedule does not generate any additional earli- ness/ tardiness penalty, therefore the schedule remains optimal. Case I lL c,, >~ b,, + l and cn + pn + 1 > d , + 1" Assume that there is an alternative procedure (AS) to determine the si values resulting in c~ >/c,. Since PS is assumed optimal for determining si, i = 1 . . . . . n, the earl iness/tardiness penalty under PS (ET(PS)) is less than the earl iness/tardiness penalty under AS (ET(AS)) for jobs Ji, i =

I 1 , . . . , n. Since c, >/c, and c , -t-Pn+l > d n + l , Jn+l is tardy under both AS and PS. The tardiness of J ,+l under AS is no less than its tardiness under PS, therefore PS determines ss optimally for i = 1 , . . . , n , n + 1.

The only remaining subcase is when c I < cn. In that case J, + ~ is scheduled with s, + l = cn under PS and with s,1 + 1 -- c,I under AS. Under PS, J , +l is appended to the rightmost block (let say B) of contiguously scheduled jobs, let say jobs Jk,

1 Jk+~ ..... J~, J ,+l . Since c , < c n all contiguously scheduled jobs in B have start times s~ greater than the corresponding start times s] under AS (s~ > s I for all jobs Ji in block B). Due to the way PS works, [ E l > IT] for block B. The earlier start times under AS coupled with the fact that

there are more early than tardy jobs in B result in

ET(PS) < ET(AS)

for jobs Jk , Jk + 1 . . . . . .In, J,, + l in block B.

(1)

Let us temporarily ignore jobs Jk, J~ +1 . . . . , J , , J~ + 1. By the induction hypothesis,

ET(PS) < ET(AS) for jobs J 1 , - - ' , J k - l " (2)

By combining (1) and (2) we conclude that

ET(PS) < ET(AS) for all jobs Ji . . . . . J ,+ l .

Therefore the proof is completed when c~ < c,. Since this is the last subcase to be examined, the overall proof is also completed.

The above procedure can be easily imple- mented in O(n 2) time given a job sequence. How- ever, as Garey et al. [6] point out in their similar approach for the SMET problem, it is possible to reduce the running time to O(n log n) by using appropriate data structures (heaps or priority queues). However, due to ease of implementa- tion, we utilize the simpler O(n 2) approach in the experiments of Section 4.

3. Heuristics for the STW sequencing subproblem

Before we formally introduce the proposed heuristics, we present the evolution of STW from other more widely researched single machine scheduling problems. This presentation will guide the development of heuristics for STW. A widely studied scheduling problem is the single machine total tardiness problem. In that problem domi- nance conditions prespecifying the ordering of some jobs in an optimal schedule have been de- rived (Emmons [3]). These dominance conditions have been used in both optimal curtailed enu- meration techniques and heuristics (for recent surveys see Potts and Van Wassenhove [12] and Koulamas [7]). The introduction of earliness penalties voids Emmons' dominance conditions. Consequently solution algorithms based on Em- mons' conditions cannot be extended to the SMET problem. A look at the total tardiness survey papers indicates that among the surveyed

Page 5: Single-machine scheduling with time windows and earliness/tardiness penalties

194 C. Koulamas / European Journal of Operational Research 91 (1996) 190-202

heuristics only the Apparent Urgency (AU) heuristic (Morton et al. [9]) which does not use Emmons' dominance conditions was later modi- fied and applied to the SMET problem by Ow and Morton [10]. We will further modify this method, so it can be applied to the STW prob- lem.

The adjacent job pairwise interchange (API) method is a local search technique which can be used heuristically in almost any single machine scheduling problem. Fry et al. [5] used API in the total tardiness problem; Fry et al. [4] used API in the SMET problem. We will show how to use API to determine job sequences in the STW problem.

In earlier work for the single machine total tardiness problem we developed and tested a simple heuristic (PSK) (Panwalkar, Smith and Koulamas [11]). PSK has extremely modest com- putational requirements and produces solutions of comparable quality with other methods. We will develop two PSK-based heuristic for STW which, like their parent, have modest computa- tional requirements. We now present the pro- posed heuristics for STW.

3.1. A n apparen t urgency (AU) heurist ic

Ow and Morton [10] experimented with differ- ent versions of an AU heuristic for the SMET problem and concluded that the most effective job urgency function is constructed from two non-linear functions. Although they originally proposed their heuristic for the weighted early/tardy problem, we present here its version for the unweighted SMET problem.

The AU heuristic first computes a priority PR~ for all unscheduled jobs J/ as follows:

I 1 / p i if SLi < 0,

l e x p / 2SL;~ 1 - PP / i f 0 < S L i < ~ k ( P P ) ,

Pi L

P R i = .] 1 2SLi ]3 ~/[1 k(pp) l

if lk(PP) < SLi < k(PP),

- 1 / p ~ if SLi >~ k(PP),

where PP is the average job processing time, k is a lookahead parameter, and

SLi = d i - P i - t

is the slack of job i (t is the earliest time the machine is available). At each step the job with the highest PRi value is scheduled next. When a job is in no danger of being tardy, it has a low priority. The job's priority increases as its slack decreases reaching its maximum when the job is on time or late. The look ahead parameter k controls the time at which the job's priority be- gins to increase. Ow and Morton [10] provide guidelines about the appropriate value of k for different problem data sets.

In the STW case we modify the AU rule by computing the slack SL i as

SLi = di - Pi - max{t, bi} .

If t > b~, then the rule yields the same priority for job Ji as in the SMET case. Whenever b i > t, the priority of job Ji in SMW is less than the corre- sponding priority in SMET. The objective is to discourage scheduling a job before its target start time. The AU heuristic for the STW problem determines the priority of J~ according to its 'window' slack if the machine is available prior to its target start time b r The heuristic operates as in the SMET case, that is it makes n passes, in each pass the priorities of all unscheduled jobs are computed and the job with the highest prior- ity is scheduled next. The time complexity of AU is O(n2).

3.2. A n ad jacen t pairwise in terchange (API ) heuris- tic

The implementation of the API heuristic in STW problems is straightforward. The jobs are initially sorted according to some criterion and then each adjacent job pair is switched starting from the left end of the sequence. If switching a job pair (e.g. jobs Ji, Ji+~) lowers the total earli- ness/tardiness penalty, then the switch is imple- mented and the job switching procedure resumes at the i - 1 position. The procedure is terminated when no more beneficial switches can be made. The API heuristic is considered because of its

Page 6: Single-machine scheduling with time windows and earliness/tardiness penalties

C. Koulamas / European Journal o f Operational Research 91 (1996) 190-202 195

very good performance in total tardiness prob- lems (Fry et al. [5]) and in SMET problems (Fry et al. [4]). The API heuristic is implemented in STW using four different initial job orderings according to shortest processing time (SPT), ear- liest due date (EDD), minimum slack SL i = d i -

Pi, and minimum window slack SW i = d i - P i - bi respectively. The best among these four solutions is selected as the API solution. The time com- plexity of API is also O(n 2) but its computational requirements can become excessive since four different solutions are determined for each prob- lem.

3.3. PSK-based heuristics

The PSK heuristic for the single machine total tardiness problem is listed in the appendix in pseudocode. PSK has modest computational re- quirements since it makes n passes and it always schedules a job in each pass. The PSK logic is based on identifying an active job in each pass and scheduling it. In each pass the jobs are scanned from left to right (in nondecreasing pro- cessing time order) in order to identify the active job. If the leftmost job is tardy if scheduled immediately, then it is defined as the active job. In any other case jobs with early due dates are favored to become active.

We propose two PSK-based heuristics for the STW problem. The first one (TW1) operates like PSK in the sense that it makes n passes through the list of unscheduled jobs and in each pass it picks up a job and adds it to the schedule. TW1 is listed in the appendix in pseudocode. We high- light the differences between PSK and TW1.

1. The tardiness computations in PSK are re- placed by earl iness/tardiness computations in TW1.

2. In Step 2 of TW1, a job Ji is considered for immediate scheduling if it is not early, while in Step 2 of PSK a job J~ is considered for immedi- ate scheduling only if it is tardy.

3. In Step 5 of TW1 the active job Ji remains active as long as its target start time h i <~b k where Jk, k = 1 , . . . , n, are the jobs to the right of J~ in the unscheduled job list (the corresponding

condition in PSK is that Ji remains active as long as d i <~ dk).

The complexity of TW1 is O ( n 2 log n). The initial sorting requirements require O(n log n) operations. The key element in each pass of TWl is the determination of the active job. Since each job is compared only to the jobs to its right while determining the active job, the complexity of each TW1 pass is also O(n log n). TW1 makes a total of n passes resulting in O(n 2 log n) overall com- plexity.

The second PSK-based heuristic (TW2) de- composes STW into two total tardiness problems by separating the earliness penalties from the tardiness penalties and by building the schedule from both ends.

In the tardiness subproblem SB T each job Ji has a processing time PiT = Pi, a due date d~T = di, the earliness penalties are ignored and time moves forward from 0 to ET= l Pi as the SB T schedule is constructed.

The earliness subproblem SB E is easily trans- formed into a tardiness problem by using a mirror image transformation: Each job has a processing time Pm =P~, a due date

d i e = Pi - b i , i

and a target start time

biE = Pi -- di" i

The earliness penalties in the original problem are the tardiness penalties for the SB e and the tardiness penalties of the original problem are ignored. Time moves backward from En ,=lPi to 0 as the SB e schedule is constructed. The i posi- tion in the SB e schedule corresponds to the n - i + 1 position in the original problem sched- ule. The PSK logic is applied concurrently to both SB T and SBe; therefore the original prob- lem schedule is built from both ends. At each step of TW2 two pending scheduling decisions are made (one for SB r and one for SB e) by applying the PSK logic to SB r (SB e) respectively. Using the original problem data, the earliness plus tardiness penalty is then computed for each

Page 7: Single-machine scheduling with time windows and earliness/tardiness penalties

196 C. Koulamas /European Journal of Operational Research 91 (1996) 190-202

one of the two jobs pending scheduling in SB T and SB E respectively. The job yielding the smaller earliness/tardiness penalty is scheduled; if it is the job from the SB r (SB E) subproblem, then one more job is added to the front (back) end of the original problem schedule. The procedure is repeated until all n jobs are scheduled. TW2 is presented in pseudocode in the Appendix. The complexity of TW2 can be directly determined from the complexity of PSK as O(n 2 log n). The performance of all presented heuristics is evalu- ated in the next section.

4. Evaluation of the heuristics' performance

The AU, API, TWl and TW2 heuristics were programmed in FORTRAN. We combined TW1 and TW2 into a TW meta-heuristic by applying

both TW1 and TW2 to each problem and select- ing the best solution as the TW solution. The problem generation procedure was inspired by the problem generation procedure of Potts and Van Wassenhove [12] in single machine tardiness problems. For each job Ji an integer processing time pi is generated from the uniform distribu- tion (0, 100). Job due dates depend on the rela- tive range of due dates (RDD) and on the aver- age tardiness factor (TF). RDD and TF values are selected from the set {0.2, 0.4, 0.6, 0.8, 1.0}. Given a combination of RDD and TF values, an integer due date d i is generated for Ji from the uniform distribution

[ P P ( 1 - T F - ½RDD), P P ( 1 - TF + ½RDD)],

where PP = E']=lPi. If a negative due date is drawn, the due date is set equal to zero. A time

Table 1 Heuristic comparison with WW = 2 and n = 100 jobs

RDD TF AU

Penalty CPU

API TW

Penalty CPU Penalty CPU

0.2 0.2 229032 6.84 0.4 0.2 222142 3.20 0.6 0.2 219 895 2.60 0.8 0.2 217498 3.74 1.0 0.2 215 137 2.63

0.2 0.4 165 211 2.72 0.4 0.4 154 142 2.80 0.6 0.4 142 611 5.05 0.8 0.4 133 772 2.22 1.0 0.4 135 153 4.28

0.2 0.6 130092 1.66 0.4 0.6 119731 3.59 0.6 0.6 112944 2.90 0.8 0.6 114093 6.67 1.0 0.6 118 242 2.09

0.2 0.8 126277 1.71 0.4 0.8 126794 1.75 0.6 0.8 128962 1.56 0.8 0.8 129740 2.40 1.0 0.8 129839 1.59

0.2 1.0 164421 2.09 0.4 1.0 158096 1.64 0.6 1.0 152814 1.73 0.8 1.0 148032 1.74 1.0 1.0 144274 1.59

106138 36.48 97535 0.58 105 675 18.06 86 663 0.19 109367 11.07 87 173 0.20 113 433 13.68 108 200 0.19 114916 10.19 115 763 0.21

71 328 10.25 71 453 0.16 57376 9.54 57535 0.18 44042 11.87 40 237 0.64 33 524 4.69 33 979 0.19 33 787 7.43 35 233 0.41

70026 7.25 76 247 0.16 54759 11.62 57505 0.61 42021 14.95 42 127 0.25 36 123 11.12 36 179 0.44 37909 4.80 37394 0.14

102236 8.20 102901 0.13 96534 8.24 96799 0.14 94909 7.14 94 130 0.13 96 711 10.55 96195 0.20 85 764 6.48 85 548 0.15

161 839 16.99 161 863 0.14 151 697 11.73 151 746 0.13 142 115 13.25 142359 0.20 133019 10.60 133 454 0.14 124959 10.00 125 142 0.15

Page 8: Single-machine scheduling with time windows and earliness/tardiness penalties

C. Koulamas / European Journal of Operational Research 91 11996) 190-202 197

window w i >/pi is generated for Ji from the uni- form distribution [Pi, Pi )< ~rl'V], where WW is a window length factor set to either 2 or 4 with equal probabilities. After a w~ value is drawn for J~, its target start time is computed as b i = di - w,. A negative b~ value is set equal to zero. It is well documented that conclusions about heuristic per- formance based on small problems cannot be extrapolated to large problems. In accordance with this observation we excluded small problems from our experiments. However, later in this sec- tion, we evaluate the absolute performance of the heuristics by comparing their solutions against the optimal solutions of small problems (with n = 15 jobs) which are obtained by curtailed enu- meration. We ran one set of experiments with medium sized problems containing n = 100 jobs

each. For each combination of TF, RDD, and WW values five problems were generated; the average earliness/tardiness penalty for each 5 problem set is reported in Tables 1 and 2 along with the total CPU times (seconds) for each 5 problem set on a VAX 8800 mainframe. The look ahead parameter in the A U heuristic was set to k = 2 w h e n T F = 0 . 2 , k = 3 w h e n T F = 0 . 4 , k = 4 when TF --- 0.6, and k = 5 when TF ~ {0.8, 1.0}.

After a complete job sequence is found by either the AU or TW heuristic, the O(n 2) idle time insertion algorithm is applied to that se- quence. Since the idle time insertion algorithm is utilized once for each problem, the use of its simpler O ( n 2) version does not pose any compu- tational problems. The CPU times reported in Tables 1, 2 for the AU, TW heuristics are total

Table 2 Heuristic comparison with WW = 4 and n = 100 jobs

RDD TF AU

Penalty CPU

API TW

Penalty CPU Penalty CPU

0.2 0.2 213086 2.27 0.4 0.2 206087 2.19 0.6 0.2 203 141 1.83 0.8 0.2 200472 2.57 1.0 0.2 198 730 2.77

0.2 0.4 155 830 3.20 0.4 0.4 146234 7.60 0.6 0.4 135 648 8.76 0.8 0.4 118199 3.78 1.0 0.4 110711 2.13

0.2 0.6 125 422 2.46 0.4 0.6 113 303 3.13 0.6 0.6 96 861 2.30 0.8 11.6 91854 2.68 1.0 0.6 93 595 2.13

0.2 0.8 124 620 6.27 0.4 0.8 118 176 3.39 0.6 0.8 119 458 2.95 0.8 0.8 118 751 3.91 1.0 0.8 117031 2.05

0.2 1.0 163913 2.62 0.4 1.0 156751 1.76 0.6 1.0 150356 1.41 0.8 1.0 144584 1.74 1.0 1.0 139468 1.74

101874 11.95 94 683 0.17 100867 12.13 82 312 0.28 104850 8.53 83 514 0.19 108262 10.28 100849 0.20 109 964 12.65 110 298 0.53

68390 25.49 70036 0.21 54418 22.19 54241 0.48 40870 16.09 40 188 0.36 29896 10.45 29 254 0.28 29323 4.22 31 933 0.22

68 257 8.27 74527 /).18 53 318 7.43 56003 0.20 41028 5.96 41 078 0.23 35 838 7.39 35 154 11.21 36 915 5.23 36 995 0.16

101589 29.39 102 331 0.57 96424 19.99 96 628 0.30 94853 13.80 94033 0.23 90665 12.77 90096 0.22 85 163 10.06 85 162 0.15

161836 19.38 161 852 0.16 151 686 14.31 151 714 0.18 142 098 10.52 142 299 0.18 133 002 11.59 133 394 0.13 125 328 9.55 125 030 0.13

Page 9: Single-machine scheduling with time windows and earliness/tardiness penalties

198 C. Koulamas /European Journal of Operational Research 91 (1996) 190-202

CPU times. The idle time insertion procedure requires only 0.02 and 0.05 seconds per problem (on average) when n = 100 and n = 200 respec- tively.

In the case of the API heuristic our prelimi- nary experimentation indicated that the quality of the resulting solutions improves when the idle time insertion procedure is implemented after each job pairwise interchange instead of after all job switches have been made. The API results reported in Tables 1, 2, 3 reflect this implementa- tion approach and the corresponding CPU times for the idle time insertion procedure are 0.8 and 1.9 seconds per problem (on average) when n = 100 and n = 200 respectively.

The AU heuristic did not do well in most of the problems tried. This is because AU is specifi- cally designed for the weighted problem and it loses its effectiveness when all jobs have equal weights. The TW solution was provided by TW2 when the due dates were either tight (TF = 1.0) or loose (TF = 0.2). TW1 provided the TW solu- tion in all other cases. This is expected due to the logic of the PSK heuristic. PSK performs well when it is able to make distinct job selections during the early phase of schedule construction. TW2 schedules are constructed from both ends by the concurrent application of two PSK algo- tithms each one working on its respective end of the schedule. When due dates are loose (tight), the PSK algorithm working on the SB e (SB r ) subproblem is able to make distinct job selections

during the early phase of its respective schedule construction resulting in a good overall TW2 schedule. On the other hand, when TF {0.4, 0.6, 0.8}, the initial arbitrary selections made by both PSK algorithms embedded in TW2 dete- riorate the quality of the TW2 solutions. As a result, TW1 provides better solutions than TW2 in these cases. TW1 is a modification of PSK such that most of its scheduling decisions are based on job target start times rather than on due dates. When job due dates are not concentrated on either end of the schedule, job scheduling deci- sions based on target start times result in good scheduling decisions during the early phase of schedule construction. This leads to good overall TW1 schedules in these cases.

The API and TW heuristics yielded solutions of comparable quality in most cases. However, in any case, the CPU time required by API was at least 50 times higher than the CPU time required by TW. In order to further sharpen the compari- son between API and TW we ran part of our initial experiments using problems with n = 200 jobs. The results are summarized in Table 3. The results of Table 3 indicate that although the quality of API and TW solutions remains compa- rable when n = 200, the CPU time difference between API and TW is further exacerbated. We selected the TF = 0.4, RDD = 0.4 combination and ran 5 problems with n = 500 jobs. TW yielded an average earl iness/tardiness penalty of 947 214 in 3.83 seconds of CPU time while API yielded

Table 3 Heuristic comparison with WW = 2 and n = 200 jobs

RDD TF AU

Penalty CPU

API TW

Penalty CPU Penalty CPU

0.2 0.2 935 559 16.88 0.4 0.2 911 065 14.23 0.6 0.2 903 339 11.95 0.8 0.2 900821 21.16 1.0 0.2 898 711 16.30

0.2 0.4 673 700 10.46 0.4 0.4 633 923 10.36 0.6 0.4 571 043 10.38 0.8 0.4 528 599 10.90 1.0 0.4 548 304 12.22

437 445 145.7 392172 1.32 448 836 104.4 352 878 0.68 476 868 64.6 363 070 0.76 500 131 84.3 497163 0.89 540 860 77.0 544 070 0.98

292 160 58.8 304 714 0.57 241 421 40.6 228 450 0.60 195 761 31.3 157 804 0.58 163 061 31.4 169 851 0.60 177 652 30.6 183 647 0.75

Page 10: Single-machine scheduling with time windows and earliness/tardiness penalties

C. Koulamas / European Journal of Operational Research 91 (1996) 190-202

Table 4 Comparison with the optimal solutions when WW = 2 and n = 15 jobs

199

RDD TF Optimal API TW

Penalty CPU Penalty CPU Penalty CPU

11.2 0.2 9 710 186.8 11 612 3.65 9 752 0.06 11.4 0.2 8 662 183.2 11 566 1.83 8 866 0.02 I).6 0.2 8 712 174.6 12 928 1.11 8 817 0.02 1/.8 0.2 10 421 176.7 13 326 1.34 10 621 0.1)2 1.0 0.2 10 311 179.6 12 487 1.15 11 475 0.112

0.2 0.4 7 132 172.7 7 430 1.04 7 345 0.01 0.4 0.4 5 755 178.8 6 133 0.96 5 953 11.112 0.6 0.4 4 123 185.1 4802 1.19 4423 0.06 0.8 0.4 3 365 176.2 3 854 0.44 3 496 0.02 1.11 0.4 3 372 174.2 3 877 0.72 3 422 0.04

0.2 0.6 7 002 171.6 7 109 0.74 7 522 0.02 (1.4 0.6 5 364 173.5 5 571 1.14 5 651 0.116 0.6 0.6 4 236 182.9 4 403 1.46 4 311 I).113 0.8 0.6 3 609 175.6 3 810 1.13 3 716 0.05 1.11 0.6 3 738 182.2 3 988 0.47 3 838 11.02

0.2 11.8 10 234 185.7 11 221 0.81 10 888 0.01 0.4 11.8 9 657 184.6 9 950 0.83 9 779 0.01 [1.6 0.8 9 455 183.5 9 688 0.72 9 512 0.02 (I.8 11.8 9 601 182.4 9 769 1.04 9 620 1/.02 1.11 0.8 8 554 188.5 8 574 0.66 8 562 0.02

11.2 1.0 16 182 185.3 16382 1.72 16284 0.01 (1.4 1.0 15 048 178.6 15 267 1.13 15 272 001 1t.6 1.0 14 077 181.7 14 112 1.41 14 434 002 0.8 1.0 13 165 183.6 13 202 1.05 13 242 002 1.0 1.0 12 483 182.5 12 594 1.01 12 611 0.02

an average e a r l i n e s s / t a r d i n e s s penal ty of 1 004538 in 323.54 seconds of CPU time on a VAX 8800 mainframe. Based on the above, we conclude that TW is the best available algorithm to determine job sequences in STW problems when both solution quality and CPU require- ments are taken into account.

We now evaluate the absolute quality of the heuristic solutions by comparing them to the opti- mal solutions. Since the previous results clearly demonstra ted that AU does not perform as well as the other two heuristics, we compare the API and TW solutions against the optimal solutions. Unfortunately, the lack of strong dominance con- ditions dictates the derivation of optimal solu- tions using enumerat ion and therefore limits the applicability of this approach to small problems

with n = 15 jobs. In order to reduce the enumer- ation requirements we derive some dominance conditions. These conditions apply when a partial sequence has been determined with completion time C for the last job in this partial sequence and the next job in the sequence must be selected from the set of the still unscheduled jobs U. When jobs {Ji, Jj} ~ U satisfy one of the following conditions then the question of which one (Ji or Jj) is to be scheduled next can be resolved with- out resorting to evaluating both alternative se- quences.

Condit ion I. I f

C>/ max {di, dj}, gi,yj~v

then Ji, Jj shouM be scheduled in SPT order.

Page 11: Single-machine scheduling with time windows and earliness/tardiness penalties

200 C. Koularnas / European Journal of Operational Research 91 (1996) 190-202

Proof. Both Ji and Jr will be tardy regardless of their sequencing order and it is well known from the single machine tardiness problem that the SPT sequence is optimal in this case.

ing optimal solution. These findings justify the use of heuristics to obtain reasonably good solu- tions for the STW problem.

Condition 2. f f

C +Pi +Pr ~ min {bi, bj}, J,,Jj~U

then Ji, Jr should be scheduled in L P T order.

Proof. The condition is a mirror image of Condi- tion 1 with earliness penalties only.

Condition 3. I f

C>~ max {bi, br}, Ji,Jj~U

Pi <~ Pr and d~ <~ d r,

then Ji ~ Jr (Ji shouM preceded Jr).

Proof. Both Ji and Jj will incur only tardiness penalties (if any) in this case and this ordering results as a consequence of Emmons' [3] domi- nance condition for the single machine total tar- diness problem.

Condition 4. I f

C +Pi +Pr <~ min {di, dj}, Ji,J~Eu

Pi >~ Pr and b i <~ br,

then Ji ~ Jr (Ji should precede Jr).

Proof. The condition is a mirror image of Condi- tion 3 with earliness penalties only.

The above conditions were used to curtail the enumeration required to find the optimal solu- tion for problems with n = 15 jobs and WW = 2. The idle time insertion procedure was imple- mented on each complete sequence to obtain the final schedule and its cost. However, as the re- sults of Table 4 indicate, the CPU times required to find optimal solutions are still high. These results also show that the quality of the heuristic solutions is relatively high. On average, the best heuristic solution is within 5% of the correspond-

5. Conclusions

The single machine earliness/tardiness prob- lem with arbitrary time windows (STW) was shown to be NP-hard. STW was decomposed into the subproblems of finding a good job sequence and optimally inserting idle time into a given se- quence. We proposed heuristics for the sequenc- ing subproblem which are based on heuristics developed for other single machine scheduling problems and showed that one of them (TW) is the best alternative with respect to both solution quality and computational requirements. We also showed how to optimally insert idle time into a given job sequence.

Appendix

A. 1. The PSK heuristic for the total tardiness prob- lem

Let U be the ordered set of all unscheduled jobs according to SPT with ties broken with EDD. Let S be the ordered set of scheduled jobs and C be the completion time of the last job in S. Let Pk, dk be the processing time and due date re- spectively of job Jk.

Step 1. If U contains only one job, then sched- ule it in the last position in S and go to Step 9; else label the leftmost job in U as the active job

gi. Step 2. If C + Pi ~> di, go to Step 8. Step 3. Select the next job on the right in U as

job gj. Step 4. If d i <~ C + pj, go to Step 8. Step 5. If d~ ~< d j, go to Step 7. Step 6. Job Jr now becomes the active job Ji. If this is the last job in U, go to Step 8; else return to Step 2. Step 7. If Jj is the last job in U, go to Step 8;

Page 12: Single-machine scheduling with time windows and earliness/tardiness penalties

c. Koulamas / European Journal of Operational Research 91 (1996) 190-202 201

else return to Step 3. Step 8. Remove J~ from U and put it in the last

position in S, increase C by Pi and return to Step 1.

Step 9. Calculate the total tardiness for the schedule and terminate.

A.2. The TW1 heuristic for the earliness/tardiness problem with time windows

The symbols are as in PSK above.

Step 1. If U contains only one job, then sched- ule it in the last position in S and go to Step 9;

else label the leftmost job in U as the active job Ji.

Step 2. If C >~ b~, go to Step 8. Step 3. Select the next job on the right in U as

job S t Step 4. If d~ ~< C + pj, go to Step 8. Step 5. If b i <~ bj, go to Step 7. Step 6. Job J1 now becomes the active job Ji. If this is the last job in U, go to Step 8; else return to Step 2. Step 7. If Jj is the last job in U, go to Step 8; else return to Step 3. Step 8. Remove J~ from U and put it in the last

position in S, increase C by Pi and return to Step 1.

Step 9. Calculate the total penalty (earliness plus tardiness) for the schedule and terminate.

Jobs are initially ordered according to SPT in both subproblems.

Step 2. For i = 1 . . . . . n: Apply one pass of PSK to both SB r and SB E.

Let Jj (Jk) be the job selected by PSK to be scheduled next on SB r (SB E) respectively. Let C T, C E, be the completion time of the last sched- uled job on SB T, SB E respectively. Compute

Pr = max{0, C v + p j . - d j } + max{0, b j - C T }

and

PE = max{0, C E +Pk - d k E }

+ max{0, bkE-- CE}.

Step 3. If PT <~ PE, T H E N add Jj to the front end of the original problem

schedule; delete Jj from the list of unscheduled jobs in

SBE; ELSE add J~ to the back end of the original problem

schedule; delete Jk from the list of unscheduled jobs in

SB v. Step 4. Repeat Steps 2 -3 until all n jobs are

scheduled. Step 5. Compute the total ear l iness / tardiness

penalty for the complete schedule of the original problem and terminate.

A.3. The TW2 heuristic for the earliness/tardiness problem with time windows References

Step 1. Genera te two n-job tardiness subprob- lems SB T, SB E as follows:

In SB T each job Ji, i = 1 . . . . . n, retains its orig- inal Pi, bi, di values.

In SB E each job Jg, i = 1 . . . . . n, has

PiE =Pi,

i=1

biE ~- Pi -- di. i

[1] Abdul-Razaq, T., and Potts, C., "'Dynamic programming state-space relaxation for single-machine scheduling", Journal of the Operational Research Society 39 (1988) 141-152.

[2] Baker, K.R., and Scudder, G.D., "Sequencing with earli- ness and tardiness penalties: A review", Operations Re- search 38 (1990) 22-36.

[3] Emmons, H., "One-machine sequencing to minimize cer- tain functions of job tardiness", Operations Research 17 (1969) 701-705.

[4] Fry, T., Armstrong, R., and Blackstone, J., "Minimizing weighted absolute deviation in single machine schedul- ing", liE Transactions 19 (1987) 445-450.

[5] Fry, T., Vicens, L., MacLeod, K., and Fernandez, S., "A heuristic solution procedure to minimize T on a single

Page 13: Single-machine scheduling with time windows and earliness/tardiness penalties

202 C. Koulamas /European Journal of Operational Research 91 (I 996) 190-202

machine", Journal of the Operational Research Society 40 (1989) 293-297.

[6] Garey, M., Tarjan, R., and Wilfong, G., "One-processor scheduling with symmetric earliness and tardiness penal- ties", Mathematics of Operations Research 13 (1988) 330- 348.

[7] Koulamas, C., "The total tardiness problem: Review and extensions", Operations Research 42 (1994) 1025-1041.

[8] Lakshminarayan, S., Lakshmanan, R., Papineau, R., and Rochette, R., "Optimal single-machine scheduling with earliness and tardiness penalties", Operations Research 26 (1978) 1079-1082.

[9] Morton, T.E., Rachamadugu, R.M., and Vepsalainen, A., "Accurate myopic heuristics for tardiness scheduling",

GSIA Working Paper No. 36-83-84, Carnegie-Mellon University, 1984.

[10] Ow, P., and Morton, T., "The single machine early-tardy problem", Management Science 35 (1989) 177-191.

[11] Panwalkar, S.S., Smith, M.L., and Koulamas, C.P., "A heuristic for the single machine tardiness problem", Eu- ropean Journal of Operational Research 70 (1993) 304-310.

[12] Potts, C.N., and Van Wassenhove, L.N., "Single machine tardiness sequencing heuristics", liE Transactions 23 (1991) 346-354.

[13] Sidney, J., "Optimal single-machine scheduling with ear- liness and tardiness penalties", Operations Research 25 (1977) 62-69.