20
ELSEVIER European Journal of Operational Research 96 (1997) 518-537 EUROPEAN JOURNAL OF OPERATIONAL RESEARCH Theory and Methodology Scheduling with batch setup times and earliness-tardiness penalties Zhi-Long Chen Department of Civil Engineering and Operations Research, Princeton University, Princeton, NJ 08544, USA Received 1 August 1995; accepted 1 February 1996 Abstract We consider a scheduling model in which several batches of jobs need to be processed by a single machine. During processing, a setup time is incurred whenever there is a switch from processing a job in one batch to a job in another batch. All the jobs in the same batch have a common due date that is either externally given as an input data or internally determined as a decision variable. Two problems are investigated. One problem is to minimize the total earliness and tardiness penalties provided that each due date is externally given. We show that this problem is NP-hard even when there are only two batches of jobs and the two due dates are unrestrictively large. The other problem is to minimize the total earliness and tardiness penalties plus the total due date penalty provided that each due date is a decision variable. We give some optimality properties for this problem with the general case and propose a polynomial dynamic programming algorithm for solving this problem with two batches of jobs. We also consider a special case for both of the problems when the common due dates for different batches are all equal. Under this special case, we give a dynamic programming algorithm for solving the first problem with an unrestrictively large due date and for solving the second problem. This algorithm has a running time polynomial in the number of jobs but exponential in the number of batches. Keywords: Single-machine scheduling; Batch setup times; Earliness-tardiness penalties; Common due date; NP-hardness; Dynamic programming algorithm I. Introduction Machine scheduling problems with earliness and tardiness penalties have received tremendous attention in the last fifteen years due to the growing interest in Just-In-Time (JIT) production strategies in industry. For a comprehensive survey of the literature on these problems till 1990, readers are referred to the paper by Baker and Scudder [1]. During the last five years, a bunch of new results on these problems appeared in the literature. They can be found in the papers by Hall and Posner [14], Hall et al. [13], Lee et al. [16], Sung and Joo [25], Davis and Kanet [9], Li et al. [17], Herrmann and Lee [15], Liman and Lee [20], Li and Cheng [18], Cheng and Chen [6], Federgruen and Mosheiov [10], Li et al. [19], and Chert [4], among others. All of the researchers have assumed that there is no setup time between two adjacent jobs, i.e. another job can be processed immediately after the machine finishes processing one job. However, this assumption is not always valid in real-world applications. In many practical scheduling environments where several batches of related jobs need to be processed, a setup is required and hence a setup time is incurred whenever there is a 0377-2217/97/$17.00 Copyright © 1997 Elsevier Science B.V. All rights reserved. PH S0377-2217(96)00096-3

Scheduling with batch setup times and earliness-tardiness penalties

Embed Size (px)

Citation preview

Page 1: Scheduling with batch setup times and earliness-tardiness penalties

ELSEVIER European Journal of Operational Research 96 (1997) 518-537

EUROPEAN JOURNAL

OF OPERATIONAL RESEARCH

Theory and Methodology

Scheduling with batch setup times and earliness-tardiness penalties

Zhi-Long Chen Department of Civil Engineering and Operations Research, Princeton University, Princeton, NJ 08544, USA

Received 1 August 1995; accepted 1 February 1996

Abstract

We consider a scheduling model in which several batches of jobs need to be processed by a single machine. During processing, a setup time is incurred whenever there is a switch from processing a job in one batch to a job in another batch. All the jobs in the same batch have a common due date that is either externally given as an input data or internally determined as a decision variable. Two problems are investigated. One problem is to minimize the total earliness and tardiness penalties provided that each due date is externally given. We show that this problem is NP-hard even when there are only two batches of jobs and the two due dates are unrestrictively large. The other problem is to minimize the total earliness and tardiness penalties plus the total due date penalty provided that each due date is a decision variable. We give some optimality properties for this problem with the general case and propose a polynomial dynamic programming algorithm for solving this problem with two batches of jobs. We also consider a special case for both of the problems when the common due dates for different batches are all equal. Under this special case, we give a dynamic programming algorithm for solving the first problem with an unrestrictively large due date and for solving the second problem. This algorithm has a running time polynomial in the number of jobs but exponential in the number of batches.

Keywords: Single-machine scheduling; Batch setup times; Earliness-tardiness penalties; Common due date; NP-hardness; Dynamic programming algorithm

I. In t roduc t ion

Machine scheduling problems with earliness and tardiness penalties have received tremendous attention in the last fifteen years due to the growing interest in Just-In-Time (JIT) production strategies in industry. For a comprehensive survey of the literature on these problems till 1990, readers are referred to the paper by Baker and Scudder [1]. During the last five years, a bunch of new results on these problems appeared in the literature. They can be found in the papers by Hall and Posner [14], Hall et al. [13], Lee et al. [16], Sung and Joo [25], Davis and Kanet [9], Li et al. [17], Herrmann and Lee [15], Liman and Lee [20], Li and Cheng [18], Cheng and Chen [6], Federgruen and Mosheiov [10], Li et al. [19], and Chert [4], among others.

All of the researchers have assumed that there is no setup time between two adjacent jobs, i.e. another job can be processed immediately after the machine finishes processing one job. However, this assumption is not always valid in real-world applications. In many practical scheduling environments where several batches of related jobs need to be processed, a setup is required and hence a setup time is incurred whenever there is a

0377-2217/97/$17.00 Copyright © 1997 Elsevier Science B.V. All rights reserved. PH S0377-2217(96)00096-3

Page 2: Scheduling with batch setup times and earliness-tardiness penalties

Z.-L. Chen / European Journal of Operational Research 96 (1997) 518-537 519

switch from processing a job from one batch to a job from another batch. One such example, described in Conway et al. [8], is the production of different colors of paint on the same machine where a setup time for cleaning the machine is necessary whenever there is a color change. For more practical examples where setup times between jobs are not negligible, see Monma and Potts [21] and Potts and Van Wassenhove [24]. In fact, recently, machine scheduling problems with batch setup times have become a new research area that is attracting more attention. For the results on these problems, readers are referred to the papers by Monma and Potts [21,22], Potts and Van Wassenhove [24], Chen [3], Cheng and Chen [5], and Ghosh [12].

So a more realistic model for the problems with earliness-tardiness penalties should take into account possible setup times. In this paper we consider such a new scheduling model where the objective of minimizing the total earliness-tardiness penalties needs to be achieved in the presence of batch setup times. The new model is motivated by the following example which commonly occurs in many real-world scheduling environments. There are some customers, each having a number of jobs to be processed by a single main facility. Jobs from different customers require different auxiliary facilities. Hence it needs a setup time to change auxiliary facilities whenever there is a switch from processing a job from one customer to a job from another customer. Each customer wants to pickup all of his jobs at a due date which is either predetermined by the customer or assigned by the owner of the facility. Thus, if a job is finished before its due date, it has to be held in inventory until its due date and hence incurs an earliness penalty resulting, for example, from deterioration, storage or insurance. On the other hand, if a job is finished after the due date, it incurs a tardiness penalty due to customer dissatisfaction, contract penalty, or potential loss of reputation. In this example, both earliness-tardiness penalties and batch setup times are involved.

This new model can be formally formulated as follows. We are given b (b > 1) batches of jobs to be processed on a single machine where preemption is not allowed. Each batch i, for 1 _< i < b, contains a set of n i jobs: N i = { J i l , J i 2 . . . . . Jini }. Let n = Eb~ lni and N = IJ b= I N i represent the total number of jobs and the whole job set respectively. Each job Jik ~ N has a given processing time P,k. Each batch i (1 < i < b) has a common due date d i, i.e. all the jobs Jik ~ Ni from the same batch i has the same due date d i. This due date di is either externally given as an input data or internally determined as a decision variable. During processing, a setup time sij is needed whenever a job from batch j is processed immediately after a job from batch i. We let s , = 0 for all 1 < i < b. Also, an initial setup time s0i is needed if a job from batch j is processed first on the machine. The setup times may be sequence dependent, i.e. sij may not be equal to sky for i ~ k. However, we make a reasonable assumption, as in the literature (see, e.g. Monma and Potts [21]), that the setup times satisfy the triangle inequality: Sik + Sky > S~j for all 0 < i < b, 1 < k < b, and 1 < j < b. Let C~k denote the completion time of job Jik in a schedule. We say a job Jik is early i f Cik < d i and tardy i f Cik > d i.

Define, for l < k < n i and l < i < b ,

Eik = m a x ( 0 , d i - Cik ) = earliness of job Jik,

Tik = max(O,Cik -- d i ) = tardiness of job Jik.

Each batch i (1 < i < b) has a common earliness penalty weight a~ and a common tardiness penalty weight fl~, i.e. all the jobs J~k E Ni from the same batch i have the same earliness penalty weight ct i and the same tardiness penalty weight /3~. The total earliness and tardiness penalties in a schedule 7r is then given by

b ni

i = 1 k = l

In this paper, we consider two problems with this model. One problem is to find an optimal schedule zr for the jobs in N so that the total earliness and tardiness penalties TET(Tr) are minimized, provided that each common due date d i (1 < i < b) is externally given as an input data. We denote this problem by PI:

(P1) min TET(~-) .

Page 3: Scheduling with batch setup times and earliness-tardiness penalties

5 2 0 Z.-L. Chen / European Journal of Operational Research 96 (1997) 518-537

The other problem is to find an optimal schedule for the jobs in N and an optimal due date d~ for each batch i (1 < i < b) so that the total earliness and tardiness penalties plus the total due date penalty are minimized, provided that each due date d; (1 < i < b) is a decision variable (that needs to be determined internally together with the scheduling decision). We denote this problem by P2:

b

(P2) min TET(w) + E ")tidi, ~ " d l . . . . . d b i = 1

where % is the due date penalty weight for batch i. We note that the assumption made in this paper that all the jobs from the same batch have a common due

date has been commonly accepted in the area of earliness-tardiness scheduling (see, e.g. Baker and Scudder [1]) to model the problems where jobs should be treated equally. We also note that it makes sense to treat due dates as decision variables, as in our problem P2. For example, if we think of a company that offers a due date to each of its customers during sales negotiations, but must offer a price reduction if the due date is set too late. In such a situation, late due dates are discouraged and hence a penalty associated with each due date should be included in the objective. For the related literature taking due dates as decision variables, see, e.g. Panwalker et al. [23], and Cheng and Gupta [7].

Now let us give a brief review of the known results related to the problems P1 and P2. When there is only one batch of jobs (i.e. b = 1, N = N~, there is only one due date dl, and there is no batch setup time), the problem P2 is polynomially solvable (Panwalker et ai. [23]), the problem P1 with an unrestrictively large due date (i.e. d~ > E j ~ N~ Plk) is polynomially solvable (Bagchi et al. [2]), and the problem P1 with a restrictive due date (i.e. d I <~j ,~ • N, Plk) is NP-hard (Hail et al. [13]). For a discussion of restrictive and unrestrictive due dates for common due date earliness-tardiness problems without batch setup times, see, e.g. Hail et al. [13]. From these known results, it is clear that the problem P1 (where b > 1 in general) is NP-hard in the case with restrictive due dates.

The major contribution of this paper is that we clarify the computational complexity for almost every significant case of the problems P1 and 1>2 by either showing its NP-hardness or giving a polynomial algorithm for it. This provides theoretical insights for further research, both in theory and in application, on these problems. We organize the remainder of this paper as follows. In Section 2, we show that the problem P1 is NP-hard even with two batches of jobs (i.e. b = 2) and unrestrictively large due dates. In Section 3, we give some optimality properties for the problem P2 with the general case and propose a polynomial dynamic programming algorithm for solving the problem P2 with two batches of jobs (i.e. b = 2). In Section 4, we consider a special case for both of the problems P1 and P2 when all the due dates for different batches are identical (i.e. d i = d for all 1 < i < b). Under this special case, we give a dynamic programming algorithm for solving the problem P1 with an unrestrictively large due date and for solving the problem P2. This algorithm has a running time polynomial in the number of jobs but exponential in the number of batches. Finally, we conclude the paper in Section 5.

2. Problem P1

In this section we prove that the problem P1 is NP-hard even with two batches of jobs (i.e. b = 2) and unrestrictively large due dates (i.e. d i , d 2 > E j j ~ NPij) by showing that its associated decision problem is NP-complete by a reduction from the even-odd i~artition problem, a known NP-complete problem (Garey et al. [11]). An instance I of the even-odd partition problem can be stated as follows.

1 t ' ~ 2 m -- Given 2m positive integers x l , x 2 . . . . . x2m with x I < x 2 < . . . <x2m such that A = ~'L,i= l,~i is an integer, does there exist a partition of S = { 1,2 . . . . . 2m} into subsets S 1 and S 2 such that ~ i E s, xi = ~ • szX~ = A and such that for each i, 1 < i ~ m, S l (and hence S 2) contains exactly one of {2i - 1,2i}?

Page 4: Scheduling with batch setup times and earliness-tardiness penalties

Z.-L. Chen / European Journal of Operational Research 96 (1997) 518-537 521

Let B = F,~= l(m - i + 1Xx2i_ 1 -1" X2i), D = B + A, H = (2m2 + 3 m ) D + B + (m + 2) A + m + 2, and Q = 2mD + 2 A + 3 H + 4. The corresponding instance II of the problem P1 is constructed as follows.

• Number of batches: b = 2. • Number of jobs: n = n I + n 2 = 2 m + 3 where n I = 2 m + 2 and n 2 = 1.

• Job set: N = N l U N 2 where N 1 = {J l l , J l2 . . . . . Jl.Em+2} and N 2 = { J 2 1 } "

Processing times: P t j = D + xj for each job Jl j ~ Ni \ { J I . 2 m + l,Jl.Em+2}'Pl,Em+ I = 2 H + l , PL2m+2 = H +

1, P2I = 1. Setup times: sij = 0 for every 0 < i < 2 and 1 < j < 2.

Common due dates: d 1 = Q for N 1, d 2 = Q + mD + A + 1 for N 2. • Penalty weights: a I = a 2 = fie = 2 H + 1, /31 = 1.

Threshold for objective function value: y - - 2 H.

It is easy to see that in the above instance II, d 2 > d I > F,j, j~ N P~ ' and hence each due date is unrestrictively large. Also, it is easy to see that instance II can be constructed from instance I in polynomial time.

L e m m a 2.1. I f there is a " y e s " answer to the instance I o f the even-odd partition problem, then there exists a schedule 7r for the instance H o f the problem P1 with the total earliness-tardiness penalties F(zr ) < y.

Proof . Let S t and S 2 be an even-odd partition of S such that ~.ie s xi = F-.iE s2Xi = A and S l (and hence 52) contains exactly one of {2i - 1,2i}, for each i ( l < i < m). Clearly, S l = [$2[ = m. Construct a schedule 7r for instance II as shown in Fig. l , where W I = {Jij [ J ~ Sl}, I4/2 = {J l j I j ~ $2}, and the jobs in W l and W E are in nondecreasing order of their processing times. Clearly,

E Pl j = E Pl j = r o D + A " J I j ~ W I J l j ~ W 2

Hence the total earliness and tardiness penalties of the schedule ~- are

F ( , n ' ) = TI.2,+2 + E TIj J I j E W I U W 2

= ( 2 m D + 2 A + H + 2) + ~ ( m - - i + 1 ) (P l ,2 i_ I + P l , 2 i ) + m ( m D + a + 1) i = 1

= ( 2 m D + 2 A + H + 2 ) + m ( m + I ) D + B + m ( m D + A + 1)

= ( 2 m 2 + 3 m ) D + B + ( m + 2 ) A + H + m + 2

= 2 H = y . []

L e m m a 2.2. In any schedule 7r for the instance H o f the problem P1 with the total earliness-tardiness penalties F(Tr) < y, the following properties hold: (1) Job J21 must be completed exactly at its due date d 2 .

dt d2

Fig. 1. Schedule ~" for instance II.

Page 5: Scheduling with batch setup times and earliness-tardiness penalties

522 Z.-L. Chen/ European Journal of Operational Research 96 (1997) 518-537

dl d 2

Fig. 2. The structure of schedule ~- with F(Ir) < y.

(2) Job JL2~ + l must be scheduled first and completed no earlier than d 1 .

(3) Job JL2m+2 must be scheduled last and completed no earlier than d 2 + mD + A + H + 1.

Proof . We prove the lemma by contradiction. (1) I f J2l is not completed exactly at its due date d 2, then it incurs at least one unit of earliness or tardiness.

In either case, it contributes at least 2 H + 1 to the total earliness-tardiness penalties F(Tr) since c~ 2 = 13 2 = 2 H + 1. Thus F(Tr) > y, leading to a contradiction.

(2) Since cq = a 2 = 2 H + 1, the first job in 7r must be completed no earlier than its due date because otherwise F(Tr) > 2 H + 1 > y. Hence its completion time must be no less than dl since d~ < d 2. This implies that if job J~,2 m + ~ is not scheduled first then its completion time is at least dl + PL2 m + ~ and hence its earliness is at least 2 H + 1 > y (since P~,2,~+~ = 2 H + 1), leading to a contradiction.

(3) Property (2) implies that Ti,2m+2 >PL2m÷2 and that the last job must be completed no earlier than d~ + ~'sij~ N\ts,.:,+l~Pij = dj + 2mD + 2A + H + 2 > d 2. Then by Property (1), job J21 is not the last job. I f job Jl.2m+2 is not scheduled last, then some job J~t ~ N1 \{Ji .2m÷ i,Ji,2m+z} must be scheduled last, and hence Clt> Ci,2m+2 > dl +PL2m÷2. This means that F ( T r ) > Tit + TL2m+ 2 > 2pL2m+2 = 2 H + 2 > y , leading to a contradiction. []

L e m m a 2.3. I f there is a schedule ~r for the instance H of the problem P1 with the total earliness-tardiness penalties F(Tr) < y, then there is a " ye s" answer to the instance I of the even-odd partition problem.

Proof . By L e m m a 2.2, the structure of ~ can be illustrated as Fig. 2, where the two job s e t s W l and W 2 form a partition of {Jll . . . . . JI,2m}, and 8>__0 (8 is the difference between the starting time of job J21 and the completion time of the last job in W 1).

Let k = Iw~l, then Iw21 = 2m - k. Let the j-th job from W 1 U W 2 in schedule 7r be denoted as J[lj], then the jobs from WI U W 2 are scheduled in the order (Jtl~l,Jt~21 . . . . . JIl 2.,1 ) in ~ . Note that by this notation the last jobs in W 1 and W 2 are JE~*I and JtL2,~l respectively. Let [ j ] denote the index of the element in the set S that corresponds to job J[ul E W¿ U W 2 such that P[uI = D + x[j 1. Clearly, in schedule 7r,

k

C[ lk ]= dl + E P [ l j l = d 2 - 8 - 1, (1) j= l

2m

C~,2m+ 2 = d2 + ~ p t u I + H + 1, j = k + l

J J

T[Ij] = E P[Iil = j D + E Xti l, for j = 1 . . . . . k, i~ l i=1

J J

T I l j l = d 2 - d l + E P [ l i l = d 2 - d l + ( j - k ) D + E x[i l, for j=k+l . . . . . 2 m . i~k+ I i=k+ 1

Page 6: Scheduling with batch setup times and earliness-tardiness penalties

Z.-L. Chen / European Journal o f Operational Research 96 (1997) 518-537 523

Hence

Ti .2m+2 = C1,2m+2 - d I = d 2 -I'- ( 2 m - k)D + 2m

Y'~ x [ j . I + H + 1 - d l , (2) j = k + l

k k ( k + 1) k E rlj= E 2 D + E ( k - j + llxtj (3/

Jt jE W I j ~ 1 j= 1

2m

E T l j ~ - E T[Ij] Jij~-w2 j = k + I

= ( d 2 - d l ) ( 2 m - k) + ( 2 m - k ) ( 2 m - k + 1) 2 m - k

D + ~_, ( 2 m - - k - - j + l)xtk+i 1. (4) jffil

First let us prove that Iw~l = Iw21 = m. We show it by contradiction. If k = Iw¿l ~ m + 1, then Ctlkl > d I + (m + 1)D > d 2, leading to a contradiction with (1). If k = Iwll < m - 1 (and hence Iw21 = 2 m - k > m + 1), then by (2), (3) and (4),

E E r,j+r,,2.+2 Ji jE W~ J~)~ W 2

> ~ D + ( 2 m - k ) ( d 2 - d , ) + ( 2 m - k ) ( 2 m - k + 2 1) D]

+ [ d 2 - d , + ( 2 m - k ) D + H + 1]

> ( m + 2 ) ( m D + A + l) + ( m + l ) D + ( k 2 - 2 m k + 2 m 2 + m ) D + H + 1

> _ ( m + 2 ) ( m D + A + I ) + ( m + I ) D + [ ( m - 1) 2 - 2 m ( m - 1 ) + 2 m 2 + m ] D + H + I

=(2mZ + 4 m ) O + ( m + 2 ) A + 2 D + m + H + 3 > 2 H = y , (5)

leading to a contradiction with the fact that F(Tr) < y. So it must hold that Iwll = Iw21 = m. In the following we prove that E j, ~ w~ PU = EJ~ ~ w2 Pl i = A and W l (and hence W 2) contains exactly one • j .

of {JI.2i- l,JI.2i}, for each 1 < i < m. 7i~lms the two corresponding sets S l = {jl J u ~ Wl} and S 2 = {jl Jij ~ W2} give an answer to the instance II of the even-odd partition problem. Since we have shown that k = Iw~l = m, by (1) and the fact that 6 > 0, we have

2m

E j = m + l

x[ j ]= ~_, x[j] - x[j] = 2 A - ( d2 - dl - mD - 1 - 6 ) j = l j = l

>_2A - ( d 1 - d r - r o D - 1 ) = A . (6)

Page 7: Scheduling with batch setup times and earliness-tardiness penalties

524 Z.-L. Chen / European Journal o f Operational Research 96 (1997) 518-537

By (1), (2), and (3), we have

F("n') = E TIj 4" E TIj + TI,2,,,+2 Jij E W I Jij E W 2

m(m + 1) " m(m + 1) O+ ~., ( m - j + 1)xtjl + m ( d 2 - d i ) +

2 2 j = l

2m

D

+ ~ ( m - j + l ) x l m + j l + d 2 - d l + m D + ~_, X t j l + H + l jffil j=ra+ l

=(2m2 + 3 m ) D + ( m + 1)A + m + 2 +H +A

2m

+ ~ ( m - j + l ) ( x t j l + x t m + j l ) + ~., xtj 1. (7) jffil j = m + l

Since F(~r) < y = 2H, thus (7) implies that

m 2m

E ( m - - j + 1)(x[j]+X[m+j]) + ~, x[ j]<A+B. (8) jffil j = m + l

It is not difficult to verify that the minimum possible value of the first summation on the left hand side of (8) is F, j Q l ( m - j + 1Xx2j_ 1 +x2j)=B, resulted from assigning the j-th minimum pair (x2j_l,x2j) to the j-th maximum weight (m - j + 1) (i.e. letting {x[jl,xtm+j 1} = {x2j_ I ,X2j}), f o r every j (1 < j < m). Since xtq ~ xtj 1 for any i # j, this assignment is the only solution to having the minimum value. Along with (6), this implies that in order for (8) to hold, the following must be tree

2m

E XIj I=A, jffim+ l

and

{xtjl,xtm+jl} = {x2j_l,X2j }, for j = 1,2 . . . . . m.

This shows that Ej ,~ w, Plj = Ej,j~ w2 P~j = A and W 1 (and hence W 2) contains exactly one of {Ji.2j-I,JI.2j}" []

It is clear that the associated decision problem of P1 belongs to the NP class. Note that in the instance II there are only two batches of jobs and the due dates are both unrestrictively large. Thus by Lemmas 2.1 and 2.3, we have shown

Theorem 2.4. The problem PI is NP-hard even with two batches of jobs and unrestrictively large due dates.

3. Problem P2

In this section, we give some optimality properties for the problem P2 with the general case and propose a polynomial time dynamic programming algorithm for solving the problem P2 with two batches of jobs.

Page 8: Scheduling with batch setup times and earliness-tardiness penalties

Z.-L. Chen / European Journal of Operational Research 96 (1997) 518-537 525

3.1. Optimality properties

As we mentioned earlier, when there is only one batch of jobs (i.e. b = 1, N = N I , there is only one due date d l, and there is no batch setup time), the problem P2 is polynomially solvable. In this case, an optimal schedule has the following three properties (Panwalker et ai. [23]):

1. Jobs are processed continuously from time 0 without any idle time; 2. The schedule is V-shaped, i.e. the early jobs form the longest processing time first (LPT) order, and the tardy

jobs form the smallest processing time first (SPT) order; 3. The optimal common due date is 0 if n~/3~ - 3q -< 0, and otherwise the completion time of the k-th job, i.e.

d l*= Ctk 1, where k = [(n I/31 - ")/l ) / / ( o/ i "-[- i l l ) I , and Ix] denotes the least integer greater than or equal to x.

It is easy to see that in an optimal schedule for the problem P2 (where b > 1 in general) the processing is continuous except during the time intervals used for setups. So, if we do not treat setup times as idle times, then Property 1 holds for the problem P2.

Obviously, V-shape is only applicable to schedules for the problem with only one common due date. For the problem P2 where several batches of jobs and several different due dates are involved, we define a similar structure: batch V-shape. We say a schedule for the problem P2 (or the problem P1) is batch V-shaped if all the jobs from each batch i, N i, for 1 < i < b, form a V-shape with respect to their common due date di. Unfortunately, we do not know whether an optimal schedule for P2 is batch V-shaped or not. The concept of batch V-shape will be used again in Section 4.

However, an optimal schedule for the problem P2 has a similar property to Property 3, that is,

3'. The optimal common due date d/* for each batch N i (1 _< i _< b) is 0 if n~ ta - Yg -< 0, and otherwise the completion time of the ki-th job from N i, i.e. d i*= Ciik, 1, where k i - [ ( n i t i - Y i ) / ( a i + i i )L and [ik i] represents the ki-th job from N i.

The validity of Property 3' can be easily justified as follows. Given any schedule 7r, when determining the optimal due date d~* for batch N,. (1 < i < b) in 7r, we can ignore all the jobs in N \ N i since d[ is not directly related to these jobs. Applying the same argument as in Panwalker et al. [23] to the partial schedule of the jobs of N~ given in the schedule rr, we can show immediately that the optimal due date d~* for N i in the schedule zr is 0 if n i fli - Ti ~ O, and C[iki ] otherwise.

3.2. A D P algorithm for P2 with b = 2

When there are only two batches of jobs, there are two possibilities for the optimal due dates d~* and d; : either d~ < d 2 or d~* > d 2 . Let us assume that d~ < d 2 . The case with d~ > d 2 can be treated similarly. Then by Property 3', the structure of an optimal schedule can be described as Fig. 3, where each job in the subset X is completed before or at dl*, each job in the subset Y is started after or at d~* and completed before or at d~, and each job in the subset Z is started after or at d 2. Note that X, Y and Z may be empty. Let X ~ = { J l ~ N l l J ~ i ~ X } , Y l = { J l j ~ N l l J ~ j ~ Y } , and Z I = { J ~ j ~ N J I J I j ~ Z } . Let X 2 = X \ X ~, Y2 = Y \ Y I , and Z 2 = Z \ Z 1. Let k i = [(n i i i -- ~/i)//(Oli + t i ) ] , for i = 1,2. Then we have the following:

, x I Y b z i d; d~

Fig. 3. The structure of an optimal schedule for P2 with b = 2 and d I• < d2*.

Page 9: Scheduling with batch setup times and earliness-tardiness penalties

526 Z.-L. Chen / European Journal of Operational Research 96 (1997) 518-537

Lemma 3.1. If in an optimal schedule for the problem P2 with b = 2 the two optimal due dates satisfy: dl*< d 2 , then (1) Ix]l= kl, JX21+lY21=k2; (2) Jobs in X l and jobs in X 2 are scheduled in LPT order respectively; (3) Each job in Yl is scheduled earlier than all the jobs in Y2, i.e. the sequence in Y = (Yi, Y2); (4) Jobs in Y~ are scheduled in SPT order, and jobs in Y2 are scheduled in LPT order; (5) Jobs in Z] and jobs in Z 2 are scheduled in SPT order respectively.

Proof. The result in (1) follows immediately from Property 3'. The results in (2), (4) and (5) can be easily verified by the job interchange argument. In the following we prove the result in (3).

First notice that the optimal due dates dl* and d~ with d~* < d 2 have three possible cases: Case 1: dl*= d2* = 0; Case 2: d2* = d l > 0; and Case 3: d 2 > d I > 0. If Case 1 occurs, then X and Y are both empty and the result in (3) is trivial. If Case 2 occurs, then by Property 3', a job from N I and a job from N 2 both complete at time dl*= d~, which is impossible since the machine can only process one job at a time. This means that Case 2 will not happen. So, we need only to prove the result in (3) for Case 3.

We prove it by contradiction. If Case 3 occurs, then by Property 3', there exists some job J2q E Y2 that completes at d~. Suppose that not all the jobs in Y] are scheduled earlier than Y2. Then there exist two jobs J2h, J2k E Y2 such that (i) J2h is scheduled earlier than J2k; (ii) there is at least one job scheduled between J2h and Jzk; and (iii) all the jobs between J2h and J2k are from Y]. This can be illustrated by schedule 0], as shown in Fig. 4(a), where J,v ~ Y is the job right before J2h, A C Y is the set of jobs scheduled between dr* and the starting time of J,v, B c_ Yl ([B] > 1) is the set of jobs scheduled between J2h and J2k, and C is the set of jobs scheduled between J2~ and J2q" Note that J2q may be the same job as Jzk (in this case C is empty) and that J,o may belong to Y1 or Y2 (or empty in the case where Jzh is the first job in Y). Now move job J2h to the position right before J2k, tighten the schedule after job J,v, and adjust d2* accordingly so that it is still equal to the completion time of job J2q" The new schedule is shown as 02 in Fig. 4(b). Let C,j(~-) denote the completion time of job Ju in a schedule 7r. It is easy to see that C2h(02)> C2h(O 1) and CU(02) < CU(O 1) for each job Jij ~ B. Since B ___ YI and dl* remains the same in 02 as in 0j, each job in B has a less tardiness in 02 than in 0~. Clearly,

C2q ( O, ) = d ; -I- t I q- Su2 -]- P2h -Jr- $21 --I- Z 2 -]- s12 -1- t 3 , (9)

C2q(02) = d I -~ LI "~- Sul "~- L 2 "~- s12 ~- P2h dr L] , (10)

where L E, L2, L 3 are lengths of the three intervals as shown in Fig. 4(a) and Fig. 4(b), and s.2 and s.l are possible setup times between J. . and J2h and between J. . and the first job of B respectively. The triangle inequality for setup times implies that s.2 + Sz, > S.l. Thus, by (9) and (10). we have

C2q (02) __~ C2q (01), (11)

]_ LI Ls L3 J

I , ,;b d; d;

L Lt L2 L3 J

I I I I d~

{b)

Fig. 4. (a) Schedule 01; (b) Schedule 02.

Page 10: Scheduling with batch setup times and earliness-tardiness penalties

Z.-L. Chen /European Journal of Operational Research 96 (1997) 518-537

, x l , Iz, a; a~

Fig. 5. The structure of an optimal schedule for P2 with b = 2 and da* < d2*.

527

and hence d~ decreases from 0~ to 0 2. Thus job J2h has a less earliness in 0 2 than in 0~. On the other hand, (11) implies that Cij(0 2) < Cu(0 l) for each Ju ~ C and hence T~j(0 2) < Tij(0 ~) for each J~j ~ C n Y~. As for each job in C n Y2, its earliness remains unchanged since its relative distance from d 2 remains the same. Combining all the above observations, we have shown that each job in 0 2 has a less or equal contribution to the objective function than in 01. Thus 0 t is not optimal, leading to a contradiction. []

By Lemma 3.1, an optimal schedule with d( < d~ for the problem P2 with b = 2 has a structure shown in Fig. 5, where X, Ym, Y2, and Z are defined as earlier. Based on this observation, we propose in the following a dynamic programming algorithm for solving the problem P2 with b = 2, provided that the optimal due dates d( and d 2 satisfy: d~* < d2*. The algorithm iteratively constructs a schedule by assigning, in each iteration, an unscheduled job from N~ or N 2 with the largest processing time to one of the following three positions (see Fig. 6):

(i) the current rightmost position in X (i.e. position a in Fig. 6); (ii) the current leftmost position in Z (i.e. position d in Fig. 6); (iii) the current leftmost position in Yi (i.e. position b in Fig. 6) if the job belongs to N~, or the current

rightmost position in Y2 (i.e. position c in Fig. 6) if the job belongs to N 2. As for the other possible case with all* > d2*, the algorithm still works if we interchange N I and N 2. So we

focus on the case with d( _< d2* in the remainder of this section, and we will not give an algorithm for the other case.

Algorithm 1

(la) Re-index jobs in N 1 and N 2 such that p l 1 > p ~ 2 > . . . - > P l , , , and p2~>_p22>_ . . . >P2n2. Let ki = [(ni ~i - Ti)/(c~i + fli)] for i = 1,2.

(lb) Define Fij(Vl,V2,Wl,W2,Xl,X2,yj ,y 2) to be the minimum total contribution to the objective function made by the first vj jobs from N l (i.e. jobs Jll,J12 . . . . . Jto,) and the first v 2 jobs from N 2 (i.e. jobs J2~,J22 . . . . . J2,2), provided that in the final optimal schedule for the whole job set N = N~ t.)N 2 there are exactly w~ and w 2 jobs in the final Yl and Y2 respectively, and that in the current partial schedule containing these v I + v 2 jobs, the following hold: (1) there are x l, x 2, Yl and Y2 jobs in the current X~, X 2, Y~ and Y2 respectively, and (2) the rightmost job in the current X and the leftmost job in the current Z are from the i-th batch N i and the j-th batch Nj respectively ( i , j ~ {0,1,2}), where N O is empty, meaning that if the rightmost job in the current X (the leftmost job in the current Z) is from N o then the current X (the current Z) is empty.

a b ¢ d

Fig. 6. Possible positions (a,b,c,d) for a job scheduled by Algorithm 1.

Page 11: Scheduling with batch setup times and earliness-tardiness penalties

528 Z.-L. Chen/ European Journal of Operational Research 96 (1997) 518-537

D e f i n e Zl = vl - Xl - Yl, z2 -- /32 - x2 - Y2, ql = nl - kl - w l , a n d q2 = n2 - k2. T h e n in t he c u r r e n t

schedule corresponding to Fij(1)l,OE,Wl,WE,Xl,X2,Yl,y 2) there are zl and z2 jobs in the current Z l and Z 2 respectively, and in the corresponding final opt imal schedule there are k I, k 2 - w E, ql and qz jobs in the f inal

X 1, X 2, Z 1 and Z 2 respectively. ( l c ) Initial values:

For 0 ,~ w I < n I - k l , 0 ~ W 2 ~_~ k2:

( ( ~ , ( 1 + q l ) + 7 2 ) ( s 0 1 + P l , ) , if w t = 1,w2 = k2, and k I = 0 ,

F o o ( l ' O ' w l ' w z ' O ' O ' l ' O ) = ] ( f l , ( 1 + q l ) + ° t 2 ( k z - w z ) + Y 2 ) P 1 1 , if w , > 2 , /

otherwise.

( ( f l tq l + T2) ( So2 + P 2 1 ) , if w, = O, w 2 = k 2 , and k I = O, /

~( f l ,q, + a z ( k 2 - w2) + ~t2)($12 + P 2 1 ) , if w I = O,w 2 _> 1, and k, = O, Foo( O,l ,w l ,w2 ,0,O,O,1) I

[ ( f l l q , + a 2 ( k 2 - w 2 ) + ' / 2 ) ( s 1 2 + p 2 1 ) , i f w l ~ l , a n d w 2 > 1,

0% otherwise.

=[(Tl+Y2)(Sol+Pll)' i f k I > 1, Fio(1,O,Wl,W2,1,O,O,O)

, otherwise.

f l l ( s 2 1 + P l l ) , i f w 2 ~ l , q l = l , a n d q 2 = O , Fol (1 ,0 ,w 1,w 2 ,0 ,0 ,0 ,0 ) = t i l l P11, if q~ > 1,

/ I, o% otherwise.

= [ ( T I + T 2 ) ( s o E + P 2 1 ) ' i f w 2 < k 2 - 1 , F2 o (0 ,1 , W l , W 2 , 0 , 1 , 0 , 0 )

~ , otherwise.

=[/32P2~' if q2 >1, FOE(0,1 ~0 ~09090) 9Wl 9W 2

~ , otherwise.

Fij( O1,02 ,Wl ,w2 ,Xl ,x2 ,Yl ,Y2) = oo, if w I > 1, and W 2 = O.

F i j ( v l , v 2 , w l , w 2 , x i , x 2 , y l , y 2 ) = ~ , if k I = 09 and k 2 > w z.

Foj (Vl ,V2 ,Wl ,W2,Xl ,x2 ,y t , y2)=0% i f x 1 + x 2 > 0 .

Fio( vl ,u2 ,Wl ,w2 ,Xl ' x 2 ' Y t ,Y2) ~- oe, i f Z I 4" Z2 > 0 .

Fij( vl ,v2 ,wl ,WE ,Xl ,X2 ,Yl ,Y2) = ~ , if X i = 0, i 4= 0.

Fi j ( v I ,U 2 ,W¿ ,W2,X I , x2 ,Y 1 ,Y2) = oe, if Zj = 0, j # : O.

Fij( vl ,v2 ,Wl ,w2 ,Xl ,x2 ,Yl ,Y2) = ~ , if the state does not satisfy:

Xl --< k l , x2 -- k2 - w2 , Yl - Wl, Y2 - w2 , Zl ~ q l , z2 ~ q2-

(1 d) Recursive relations:

For l < v I < n l, 1 < v 2 < n 2, 0 < x I < m i n ( v l , k l ) , 0 < x 2 < min(v2 ,k2) , 0 < Yl < m i n ( v l , n l -- kt) , 0 < Y2 < min( v2 ,k2 ):

min ( { F°°( Vl ,rE ,wl ,w2,0,0,Yl - 1 ,yz) + GY 1 , Foo( /)l 9Wl 9W2 ,O,0 ,Yl 9Y2)

Foo ( v I ,v 2 ,w I ,w 2 ,0,0, el ,Y2 - l ) + GY 2 . (12)

Page 12: Scheduling with batch setup times and earliness-tardiness penalties

Z.-L. Chen / European Journal o f Operational Research 96 (1997) 518-537 529

Flo( vl ,v2,wl ,w2 ,Xl ,x2 ,Yl ,Y2) = min~

F20( 131 ,v2 ,Wl ,w2 ,Xl , x 2 , y l ,Y2) = min,

Fol( Ul ,u2 ,Wl ,w2,0,0,Yl ,Y2) = rain

F02 ( 01 ,/32 ,w I ,w 2 ,0,0,Y¿ ,Y2) = min.

FII( Vl ,v2 ,wl ,w2 ,xl ,x2 ,Yl ,Y2) -- min

FI2( UI 'U2 'Wl 'W2 'Xl 'X2'yl 'Y2) = min,

'Foo(V 1 - 1 , v 2 , W l , W 2 , X 1 - 1 , x 2 , y t , y 2 ) - I - G X o l ,

Flo( V 1 - 1 , v 2 , W l , W 2 , X 1 - 1 , x 2 , Y l , Y 2 ) .at-GXII ,

F2o ( D 1 - - 1,V 2 ,Wl,W 2 ,X 1 - - 1 , xE ,y I ,Y2) + GX21,

Flo( V l - 1,v 2 , w t , w 2 , x l , x E , Y l - 1,Y2) + G Y I ,

F l o ( Ol,V 2 - 1 , w l , w E , X l , X 2 , Y l , y 2 - 1) + G Y 2 .

IFoo(Vl,V 2 - l , W l , W 2 , X l , X 2 - 1,yl,y2) + GXoz,

FtO( VI,O 2 - l , W l , W E , X l , X 2 - 1,y l ,Y2) + G X I 2 ,

F 2 0 ( v l , v 2 - - 1 , W l , W 2 , X l , X 2 - l , y l , y 2 ) + G X 2 : ,

F20(o I - 1 , v 2 , w l , w E , x l , x E , Y ! - 1,Y2) + GY I,

F20( v l , v 2 - 1 , W l , W 2 , X l , x 2 , y l , y : -- 1) + G Y 2.

' F 0 1 ( V l - l , I ) 2 , W l , W 2 , 0 , O , y I - - l ,y : ) + GY I,

Fol ( V l , V 2 - 1 , w l , W E , O , O , y t , y 2 -- 1) + G Y : ,

Foo( v l - 1 , V E , W l , W 2 , 0 , 0 , y l ,Y2) -t-GZol ,

Fot(V I - 1 , V 2 , w l , w 2 , 0 , O , y l , y 2 ) + G Z I I ,

F02 ( v I - 1 ,v 2 ,w I ,w: ,0,0, y 1 ,Y2) + GZ21"

F o E ( v l - 1 , v 2 , w l , W E , O , O , y I - 1,y2) + GY 1,

F02(UI,U2 -- 1 ,Wl ,WE,O,O, y l , y 2 -- 1) + G Y 2 ,

Foo( V l ,V2- 1,Wl ,w2,0 ,0 ,y l ,Y2) -I-GZo2 ,

Fol ( 01 ,v 2 - 1 ,w I ,w E , 0 ,0 ,y I ,Y2) -t- GZI2 ,

F o 2 ( v l , V 2 - 1 ,wI ,w2 ,0 ,0 ,y l ,Y2) -F GZE2.

'Fol ( v t - - 1 , v 2 , w l , w 2 , x I - - 1 , x 2 , y t , y 2 ) + G X o j ,

Fro ( v I , v 2 - 1 , w I , w 2 , x I , x 2 ,Y l , Y 2 ) + G Z o l ,

Ft l (V l -- 1 , v 2 , W l , W 2 , X 1 - 1 , x 2 , Y l , Y 2 ) + GXlt ,

F21(v I -- 1 , V 2 , w t , w E , X I - - 1 , x 2 , y l , y 2 ) + GX21 ,

FII(O I - 1 , v 2 , w l , w 2 , x l , x 2 , Y 1 - 1,y2) + GY~,

Fl l (V l -- 1 , V 2 , W l , W E , X l , X 2 , Y l , Y 2 ) + GZII ,

F12 ( V l -- 1,V 2 ,w l ,w 2 ,x l , x 2 , y l , y 2 ) + GZ2t,

F I t ( OI,U 2 -- l,W I , W E , X l , X 2 , Y l , Y 2 1 ) + G Y 2 .

: Fo2( V l - - 1 , v 2 , w l , w 2 , x I - - 1 , x 2 , Y l , Y 2 ) + G X o l ,

FIO ( v l ,v 2 - 1,w l ,w 2 ,x I ,x 2 , y l , y 2 ) + GZ02,

El2(/) 1 - 1 , V E , W l , W 2 , X I - 1,xz,yl,y2) + GXtl ,

F22 (v l -- 1 , v 2 , w l , w 2 , x t - - 1 , x 2 , Y l , Y 2 ) + GX21 ,

FI2( V l - 1 , V z , W l , W 2 , X l , X 2 , y ! -- 1,y2) + G Y I,

FII(/JI ,O 2 -- 1 , w 1 , W x , X l , X 2 , Y l , y 2 -- 1) + G Y 2 ,

F l l ( V t , V 2 - 1 ,wi ,w 2 , X l , X 2 , Y l , Y 2 ) + GZI2,

Ft2 ( Ul ,/32 - - 1 ,wt ,w 2 ,x t ,x 2 ,Yl ,Y2) --F GZ22.

(13)

(14)

(15)

(16)

(17)

(18)

Page 13: Scheduling with batch setup times and earliness-tardiness penalties

530 Z.-L. Chen / European Journal of Operational Research 96 (1997) 518-537

F21( u1 ,u2 ,Wl ,w2 ,xI ,x2 ,Yl ,Y2) = min

F22( Vl ,v2 ,Wl ,w2 ,Xl ,x2 ,Yl ,Y2) = min,

F m ( v 1 ,v 2 - 1 ,w I ,w 2 ,x I ,x 2 - - 1 , y l , y 2 ) + GX02,

F20 ( v I ,v 2 ,w 1 ,w 2 ,x , ,x 2 ,Yl ,Y2) + GZm,

F I I ( UI,U 2 -- 1 , W I , W E , X I , X 2 -- 1 , y l , y 2 ) + G X l 2 ,

[:21( Vl ,V2 - 1,wl ,w2,x l , x 2 -- 1 , y l , y 2 ) + GX22 ,

F21(o I - l , v2 ,Wl ,W2 ,X l , x2 ,Y 1 - 1,Y2) + GY 1,

F21 ( v l , v 2 - 1 ,Wj ,Wz ,X l ,X2 ,Y l , y 2 -- 1) + GY 2,

F21 ( v 1 - 1 ,O 2 ,W 1 ,W 2 ,X 1 ,X 2 .Yl .Y2) + GZlz.

F22(v I - 1 , v 2 . w m . w 2 . x l . x 2 . y l , y 2 ) + GZ21.

'Fo2( V l , v 2 - 1 , w l , w 2 , x l , X 2 -- 1 , y l , y 2 ) at-GXo2 ,

F 2 0 ( V l , V 2 - 1,Wl ,W2,Xl ,XE,Yl ,Y2) + GZ02,

El2( O I , O 2 - 1 , W I , W 2 , X I , X 2 -- 1 , y l , y z ) + GXI2,

F22 ( o I ,u 2 -- 1 ,W 1 ,W2,X 1 ,X 2 -- 1 'Yl 'Y2) + GX22 ,

F22( Ol - 1 , v 2 , w l , w 2 , x I , x 2 , Y l - l , y z ) + GY 1,

F22( Ul,U 2 - 1 , W l , W 2 , X I , X z , y l , y 2 -- 1) + GY 2 .

F21 (Ol,/.) 2 -- 1 ,Wl ,Wz ,Xl ,X2 ,Y l ,Y2) + GZI2,

F22 ( v l ,v 2 - 1,w I ,w E,x I ,x 2 ,y l 'Y2) + GZz2.

~/here

CXo, = + )(sol +p,o,) ,

GXo2 = ( Y, + 3'2)( So2 +P2~2) .

GX,, = (o t , ( x , - 1) + a 2 x 2 + Y, + Y2)Pl . , .

GX,2 = ( a l X , 4-c~2(x 2 - 1 ) + ~/1 "JF ~ /2) ($12 3 t 'P2v2) ,

GX21 = ( f f l ( Y l - 1) -1 t- ff2x2 -~- ")/1 + "Y2)(s21 "ILPlvl),

GX22 = ( a , x , + oe2(x 2 - 1 ) + Y, + Y2)P2v2,

( i l l ( Y , + q l ) + ° t 2 ( k 2 - W2) "{- T2) (S0 ' + P l y , ) ,

Grl = ( f l ,( Y, + q l ) + az( kz - wz) + Y2)P , . , .

( f l , q l + ° t2(Y2-- 1) + 3'2)(So2 + P 2 o : ) .

( f l l q , + a2( Y 2 - 1 + k 2 - w = ) + ~2)(112 q'-P2v2),

GY2= ( f l , q t + a 2 ( Y 2 - 1 + k 2 - w 2 ) + y z ) ( S , 2 + P 2 o 2 ) .

( /3 ,q , + a 2 ( Y 2 - 1 + k 2 - w 2 ) + y z ) p 2 o 2,

_~ [ fll( Szl b Plvl) . if q1= l . qz = O. and w2 > O.

GZm ~ flK P1<, otherwise,

GZ02 = [3 2 P2v 2 ,

(19)

(20)

i f Y l = W l _ > 1,k~=O, andk 2 = w 2,

otherwise,

if k z = w I = 0, k 2 = w 2 ~ 1, and Y2 = 1,

if ~P'l = 0 , k I >_ 1, and Y2 = 1

i f w l _ > l , a n d y 2 = l ,

otherwise,

Page 14: Scheduling with batch setup times and earliness-tardiness penalties

Z.-L. Chen /European Journal of Operational Research 96 (1997) 518-537 531

GZll = ~ l Z l

~ l Z t

= [ (/31 zl GZ12 (~iz,

GZ21 = ~1( Z!

/3~(z,

"+ ~2 Z2)(SoI +Plo,) ,

+ f12 Z2)(S21- t -Pie , ) ,

d-~2z2)Plvl ,

i f z I = q l , z2 = q2, and w 2 = O,

if Zl = ql , Z2 ~" q2, and w 2 > O,

otherwise,

-1- [32( Z 2 -- l ) ) ( S02 "1- P2 o 2 -b S21 ) -1- J~2( S02 dr" P2 v 2 ) ' if Z, = q I, Z2 = q2, and w 2 = 0,

+ ]32( z2 - 1))( P2o: + s21) + fl2P2o:, otherwise,

- 1) + f12 Z2)(So, +Pl,.,, +Sl2) "1-]3,(sol +Pa, , )

l) -I" ]~2 Z2)(s21-I-ply, "~ s12 ) "l" j~l( $21 "}-Plot )

1) + f12 Zz)(Plo~ + sl2) + fllPlv,,

i f z~ = q l , z2 = q2, and w 2 = O,

if z t = q ~ , z z = q 2 , a n d w 2 > 0 ,

otherwise,

( ( fll z! + fl2 z2)( So2 + P2v:), if zt = ql, z2 = q2, and w2 = 0 ,

GZ22 = ( fll Zl + fl~ Z2) P2o:, otherwise.

(1 e) The Optimal solution is generated by computing:

min{ Fu( n I ,n 2 ,w I ,w E ,k I ,k 2 - w E ,w I ,w 2) I0 < w I < n I - k I , 0 < w E < k 2 , 0 < i, j < 2}.

T h e o r e m 3.2. Algorithm 1 generates an optimal schedule for the problem P2 with b = 2 and d~ < d E in time bounded by O(nS).

Proof . For any given s t a t e (Vl ,V2 ,Wl ,W2,Xl ,X2,Yl ,Y2 , i , j ) , the last job scheduled by the algorithm in the partial schedule corresponding to Fij(Vl,VE,Wl,W2,Xl,X2,yl,y 2) is either Jto, or J2o2- By Lemma 3.1, if that last job is Jlo, (or J2o:), then, as we mentioned earlier, it must be scheduled at one of the following three positions: (1) the rightmost position in the current X, (2) the leftmost position in the current Yl if it is J~o, (or the rightmost position in the current 1"2 if it i s JEv2), o r (3 ) the leftmost position in the current Z. Suppose that that last job is Jlo~. Now let us compute in the following the contribution made by Jlv, to the total objective function. For the case when that last job is J2o2, a similar proof can be given, and thus we will not discuss this case.

Case 1. If Jlo, is the rightmost job in the current X, then its contribution is (a) GXol if Jlo, is also the leftmost job in X (i.e. x I = l , x 2 = O) since it contributes an initial setup time plus its processing time (i.e. s01 +Plo , ) to the final due dates d I and d E ; (b) GXil if the job fight before Jlo, is from batch N / ( i = 1 or 2) since it contributes its processing time Plo, (if i - - 1) or a setup time plus its processing time s21 +Plo , (if i = 2) to the earliness of each of the x 2 jobs from N 2 and the x I - 1 jobs from N I that are scheduled before it, and to the due dates d I and d E .

Case 2. If Jlo, is the ieftmost job in the current Yl, then its contribution is GY 1 since it contributes P~o, or s01 +Ply, (if Jio, is the first job in the final optimal schedule, i.e. Yl = w~ > l, k I = 0, k 2 = w E) to the tardiness of each of the Yl + q~ jobs from N l that are scheduled after Jto~ (including Jlv, itself) in the final optimal schedule, to the earliness of each of the k 2 - w 2 jobs from N 2 that will be scheduled before Jio, in the final optimal schedule, and to the due date d~.

Case 3. I f Jlv, is the leftmost job in the current Z, then there are three subcases as follows. (a) I f Jlo, is also the rightmost job in Z (i.e. zl = 1, z2 = O), then its contribution is GZ m since it contributes Plo~ o r s21 -I-Plv~ to

its own tardiness. Here s2~ is due to the case when J~o, is the only job in Z in the final optimal schedule, i.e. ql = l, q2 = O, w 2 > O. In this case, it needs a setup time SEl to process Jlo, since the job fight before it belongs to I"2 GN2 in the final optimal schedule. (b) I f the job fight after J~o, is from N I , then its contribution is GZll since it contributes Plo,, So~ + P lo,, or SEl + P~o, to the tardiness of each of the zj jobs from Nt and the z2 jobs from N 2 scheduled after it (including Jto, itself). Here Sol is due to the case when JJv, is the first job in the

Page 15: Scheduling with batch setup times and earliness-tardiness penalties

532 Z.-L. Chen / European Journal of Operational Research 96 (1997) 518-537

final optimal schedule, i.e. zl = ql, z2 -- q2, w2 = 0 (in this case it needs a setup time Sol to process Jlo,), and s2~ is due to the case when Jlv, is also the leftmost job in Z in the final optimal schedule and when the final Y2 is not empty, i.e. zl = ql, zz = q2, w2 > 0 (in this case it needs a setup time s21 to process Jto,). (c) I f the job fight after Jlv. is from N 2, then its contribution is GZ21. The reason is as follows. If Jloj is the first job in the final optimal schedule, i.e. zl = ql, z2 = q2, w2 = 0, then it contributes Sol +Plo. to its own tardiness, and sol +Pl~, + s l 2 to the tardiness of each of the zl - 1 jobs from N 1 and the z2 jobs from N 2 scheduled after it. Here Sot is due to the initial setup time needed to process Jlo,. If Jlv. is also the leftmost job in Z in the final optimal schedule and when the final Y2 is not empty, i.e. zl = ql, z2 = q2, w2 > 0, then it contributes s21 +Pl~, to its own tardiness, and s21 +Plo, + sl2 to the tardiness of each of the z l - 1 jobs from N l and the z 2 jobs from N 2 scheduled after it. Here s2t is due to the setup time needed to process Jlv~ right after the last job of

r2. To compute the value function Fij(Vl,V2,Wl,W2,Xl,X2,yl,y 2) for any possible state (Vl,V2,Wz,W2,Xl,Xz,yl,

yz,i , j) , the algorithm enumerates all the nine possible combinations of the state variables i and j. Each possible combination corresponds to one of the nine relations (12)- (20) respectively. The validity of these relations can be easily proved from the above observations. As for the validity of the initial values given in the algorithm, it is quite straightforward, and we will not give a proof for it.

Clearly, there are at most O(n 8) possible different states involved in the dynamic program since there are only nine possible combinations of the two state variables i and j and there are at most n possible values for each of the other eight state variables v 1 , v 2, w l, w 2, x 1, x 2, Yl, and Y2. The algorithm compares at most eight values and hence uses a constant time to find the value Fij(Vl,V2,W~,W2,Xl,Xz,yl,y 2) for each possible state (Vl,V2,Wl,W2,Xl,X2,yl,Y2,i,j). ThUS, the overall time complexity of the algorithm is bounded by O(n8). []

Note that as we mentioned earlier, this algorithm can also be used to get an optimal schedule with dr* > d2* for the problem P2 with b = 2 if we interchange N~ and N 2. Then the better one, chosen from the two optimal schedules generated by the algorithm (one with dj* < d2* and the other with d( > d2* ), must be the optimal schedule for the problem P2 with b = 2. This shows that the problem P2 with b = 2 is polynomially solvable by Algorithm 1. However this algorithm is only of theoretical significance because the high order of its time complexity will make it incapable of solving large, even medium sized problems.

4. Problems PI and P2 with d i = d

In this section we consider a special case for both of the problems when the common due dates for different batches are all equal, i.e. d i = d. Under this special case, we give a dynamic programming algorithm for solving the problem P1 with an unrestrictively large due date and for solving the problem P2. We assume the unrestrictively large due date in the problem P1 to be d > A = Y',@ ~ NPij + n max 0 _< i.j s m{s~i}. It is easy to see that the assumed due date will not constrain the scheduling decision. Then we have the following lemma. However, we do not know whether the assumed lower bound A for the due date d is necessary for the problem P1 in order for this lemma to hold.

L e m m a 4.1. For the problem P1 with the externally given due dates d i = d > A, there exists an optimal schedule where

(1) there is no inserted idle time (excluding setup times), (2) each batch of jobs form a batch V-shape (see the definition for batch V-shape in Section 3.1), (3) some job completes at the due date d.

Proof . The result in (1) is straightforward. The result in (2) follows immediately by the job interchange argument. We prove the result in (3) by contradiction. Given an optimal schedule ~ where no job is completed at time d. Then there are three cases in 7r:

Page 16: Scheduling with batch setup times and earliness-tardiness penalties

Z.-L. Chen / European Journal of Operational Research 96 (1997) 518-537 533

Case 1. Cij > d for all Jij ~ N. Then simply shift the whole schedule left until the completion time of the first job is d. Clearly this rearrangement decreases the total earliness and tardiness penalties.

Case 2. C~i < d for all Jo" ~ N. Similarly, the total earliness and tardiness penalties will decrease by shifting the whole schedule right until the completion time of the last job is d.

Case 3. Ctm < d < Chk for some two adjacent jobs Jtm and Jhk" Let ~1 = d - Ctm, and ~2 = C h k - - d. For 1 < i < b, let u i and v i be the numbers of jobs from N i that are scheduled before job Jr,, and after job Jhk

respectively. By shifting the whole schedule left until the new completion time of Jhk is d, the total earliness-tardiness penalties decrease by

i=1 i=1

On the other hand, by shifting the whole schedule right until the new completion time of Jtm is d, the total earliness-tardiness penalties decrease by

Clearly A 2 = --A 1 ~ 1 / / ~ 2 . Hence one of A l and A 2 must be nonnegative. This means that the new schedule obtained by one of the above two shiftings is better than the original schedule.

In all the above three cases, each shifting is feasible because we have assumed d is unrestrictively large. Each case leads to a contradiction with the fact that the original schedule ~r is optimal. This ends the proof. []

L e m m a 4.2. For the problem P2 with the due dates d i =-- d, there exists an optimal schedule where (1) there is no idle time (excluding setup times), (2) each batch of jobs form a batch V-shape, (3) the optimal due date d* is either 0 or the completion time of some job.

Proof. Similar to the proof of Lemma 4.1. We thus omit it. []

We note that an optimal schedule for the problem P2 with d,. = d starts at time 0 and its optimal due date may be 0. Whereas, an optimal schedule for the problem P1 with d / = d > ,4 may start later than time 0 and its optimal due date must be the completion time of some job. Also, we note that Property 3, described in Section 3.1, for the problem without batch setup times and with a common due date, is not valid for the problems P I and P2 even with one common due date.

By Lemma 4.2, we can assume that an optim~il schedule for the problem P2 with d i = d has a structure as shown in Fig. 7, where all the jobs in X are early (i.e. they complete before or at the optimal due date d* ) and all the jobs in Z are tardy (i.e. they start after or at d* ), In the following we propose a dynamic programming algorithm, based on the above observation, for the problem P2 with di = d to be determined. The algorithm constructs an optimal schedule by assigning, in each iteration, an unscheduled job from some batch N i with the largest processing time either to the rightmost position of the current early job set X or to the leftmost position of the current tardy job set Z. It is easy to see that the problem P1 with d i = d > A is equivalent to the problem

I x I z I d*

Fig. 7. The structure of an optimal schedule for P2 with d~ -= d.

Page 17: Scheduling with batch setup times and earliness-tardiness penalties

534 Z.-L. Chen / European Journal of Operational Research 96 (1997) 518-537

P2 with d i =- d and ~/i ~ O. Thus the algorithm can also solve the problem P1 with d i = d > A if we fix % = 0 in the algorithm.

Algor i thm 2

(2a) For each i, 1 < i < b, re-index jobs in N i such that Pil > Pi2 > . . . > Pi, , . (2b) Define F ( v I . . . . . v b , x I . . . . . x b , l , m ) to be the minimum total contribution to the objective function made

by the first v i jobs (i.e. jobs J~l . . . . . J~o) from each batch iV,, for 1 < i < b, provided that in the current partial schedule containing these E,.b= iv; jobs there are x i jobs from each batch N~ (1 < i < b) that are scheduled in the current early job set X, and that the rightmost job in the current early job set X and the leftmost job in the current tardy job set Z are from N I and N m respectively ( l , m E {0,1 . . . . . b}), where N O is empty, meaning that if the rightmost job in the current X (the leftmost job in the current Z) is from N O then the current X (the current Z) is empty.

Define z; = vi - x i , for each 1 < i < b. Note that zi is the number of jobs from Ni that are scheduled in the current tardy job set Z in the current schedule corresponding to F ( v I . . . . . v b, x 1 . . . . . x b , l ,m) . Define 3~ = y'b= 13'~.

(2C) Initial values: For any state satisfying y,b= iV i = 1 and Ebi= l x i < 1:

f ( Soi + P i l )~ / ,

F ( v , . . . . . Vb,X , . . . . . x b , l , m ) = l p i i ~ i ,

if v i = x i = l , l = i , a n d m = O ,

if v i = l , l = O , m = i , and x / = 0 f o r a l l j : l < j < b ,

otherwise.

For any state with x; > v,. for some i (1 < i < b):

F ( v I . . . . . v b , x I . . . . . x b , l , m ) = oo.

For any state with x i = 0, and l = i (or x; -- vi, and m = i) for some i (1 _< i < b):

F ( v I . . . . . Vb,X I . . . . . x b , l , m ) = oe.

(2d) Recursive relations: F o r O ~ l ) i ~ n i , O < k i ~ n i , O < x i < m i n ( v i , k i ) , 1 < i < b , O < l < b , and O < m < b :

F ( v, . . . . . v b , x , . . . . . X b , t , m ) = min{O, ,G2}, (21)

where

a . = min { F ( o , . . . . . v , - 1 . . . . . Ob,X , . . . . . X , - - 1 . . . . . X b , h , m ) + G X h t r , } , O~h<b

(22)

G 2 = min ' "[FI, v, . . . . . v , , - 1 . . . . . Vb,X , . . . . . X . . . . . . x b , t , n ) ' ' ' + G / ~ l h m l , ~ ' O<_h<b

(23)

x i a i _ a t + 7 ( s h t + P t v , ) ,

( sh, + p,o,) + ,,m z, , i = l i=1

b

if E v i < n , i=l

b b

if ~ _ ~ v i = n , and ~ x i < n , i=l i = 1

(24)

Page 18: Scheduling with batch setup times and earliness-tardiness penalties

Z.-L. Chen/ European Journal of Operational Research 96 (1997) 518-537 535

GZIh" =

1" p " o ,

s ," +

Y Z i [ ~ i - - f l m ( P " v + S " h ) + f l " P " o , i=l

z, - (st ." + p ."° . + + + i=l

b

if h = 0, and ~ v i < n , i=l

b if h = O, and ~ 2 v ~ = n ,

i = 1

b

if h 4-- O, and ~ . . v , < n , i = 1

b

if h ~ O, and ~ . , v i = n . i = l

(25)

(2e) An optimal schedule is obtained by computing:

min{F( n I . . . . . nb ,X I . . . . . Xb,l,m ) l 0 --< X i ~ n i, 1 <_ i < b,O < 1, m ~ b}. (26)

Theorem 4.3. Algori thm 2 f inds an optimal schedule f o r the problem P2 with d i - d in time bounded by O ( n 2 b / b 2 b - 3 ) .

Proof. For any given s t a t e (/)1 . . . . . Ob,Xl . . . . . Xb,l ,m), the last job scheduled by the algorithm in the partial schedule corresponding to F(v~ . . . . . vb ,x I . . . . . Xb,l,m) is either the rightmost job in the current early job set X or the leftmost job in the current tardy job set Z. By Lemma 4.2, if that last job is the rightmost job in the current X then it must he job Jto,, otherwise it must be job J,,o.. Now let us compute the contribution made by that last job to the total objective function.

Case I. If that last job is the rightmost job in the current X, then it is Jl~, and its contribution is GXht,,, where h and m represent that the job right before Jto, is from N h and the leftmost job in the current Z is from Arm respectively. The reason is as follows. Clearly, job Jtv, contributes shj +Pry, to the earliness of each of the x i jobs from N t (for 1 < i < b, i 4= l), and the x I - 1 jobs from N t scheduled before Jto,. If all the jobs have now been scheduled and there is at least one job in Z, i.e. E/b= lvi = n, and E/b= i xi ~ n, then Jtv, also contributes st" . to the tardiness of each of the o i - x i jobs from N i (for 1 < i _< b) scheduled in Z.

Case 2. If that last job is the ieftmost job in the current Z, then it is job J,,o, and its contribution is GZth", where h and l represent that the job right after J,,v. is from N h and the rightmost job in the current X is from N t respectively. To show this, we need to consider four possible cases. (a) If J,~v, is also the rightmost job in Z (i.e. h = 0) and if not all the jobs have been scheduled (i.e. ]~b= jV i < n), then it simply contributes Pmo. to its own tardiness. (b) If J " , . is also the rightmost job in Z (i.e. h = 0) and if all the jobs have been scheduled (i.e. E/b= ~v i = n), then it contributes st" . +P"v. t o its own tardiness, where s t . . is due to the setup between J"~. and the job right before J"o. (that is the rightmost job in X in this case). (c) If J , , , . is not the rightmost job in Z (i.e. h ~ 0) and if not all the jobs have been scheduled (i.e. E/b= lVi < n), then it contributes p,.¢. to its own tardiness, and P"om + S"h to the tardiness of each of the z" - 1 jobs from Arm and the zi jobs from N i (for 1 < i < b, i ¢ m) scheduled after J , .~. (d) If J"v. is not the rightmost job in Z (i.e. h v~ 0) and if all the jobs have been scheduled (i.e. Y'.~= jv~ = n), then it contributes st, " +p"~ . to its own tardiness, and 5l" -FP"v. "~- S"h tO the tardiness of each of the z,. - 1 jobs from Arm and the z~ jobs from N~ (for 1 < i < b, i ~ m) scheduled after J"o.- Here st," is due to the setup between J"o. and the job right before J " , . (that is the rightmost job in X in this case), and s" h is due to the setup between J"o . and the job scheduled right after J,.~..

By the above observations, we can easily prove the validity of the recursive relations given in (21). The validity of the initial values given in the procedure (2c) is quite straightforward.

Page 19: Scheduling with batch setup times and earliness-tardiness penalties

536 Z.-L. Chen /European Journal o f Operational Research 96 (1997) 518-537

Now let us see the time complexity of the algorithm. It is easy to see that total number of possible states is bounded by

B = m a x n i x i lml ~ x i < Y ' . n i = n , O < l , m < b i=1 i = l

< ( b + l ) 2 - - O ~ . (27)

On the other hand, to compute the value F ( v I . . . . . o b , x 1 . . . . . Xb,l,m) for any possible state (v~ . . . . . Vb,X ~ . . . . . xb, l ,m), the algorithm compares 2b + 2 values and hence uses O(b) time. Thus the overall time complexity of the algorithm is bounded by O(n2b/b2b-3) . []

As we mentioned earlier, the problem P1 with d~ - d > A can also be solved by this algorithm by simply letting each "y~ = 0 (for 1 < i < b) in the algorithm. Thus, by Theorem 4.3, we have shown that the problem PI with d i - d > A and the problem P2 with d i = d are both polynomially solvable if the number of batches is fixed (i.e. b is a given fixed number). We note that when there are two batches of jobs (i.e. b = 2), this algorithm has a time complexity O(n4), which is quite acceptable in terms of its possible running time when applied to medium or large sized problems.

5. Conclusion

We have considered a practical scheduling model in which both batch setup times and earliness-tardiness penalties are involved. Two problems: problem P1 and problem P2 with this model have been investigated. We have shown the NP-hardness for the problem P1 even with b = 2 and unrestrictively large due dates. We have given some optimality properties (Properties 1 and 3') for the general problem P2, and proposed an O(n 8) dynamic programming algorithm for solving the problem P2 with b = 2. The algorithm provides a theoretical result that the problem P2 is polynomially solvable when b = 2. However, the algorithm may be incapable of solving even medium sized problems due to its high order of complexity.

We have also considered a special case for both of the problems when the common due dates for different batches are all equal (i.e. d i = - d ) . We have presented a dynamic programming algorithm for solving the problem P1 with d i - d unrestrictively large and the problem P2 with d i =-d. The algorithm is polynomial when b is fixed.

As for the possible future research in this area, the most urgent task is perhaps to give a faster algorithm for the problem P2 with b = 2 that can be used for solving large sized problems. Another important task is to investigate the question whether the problem P2 with b > 3 is NP-hard or polynomially solvable.

When the number of batches b is arbitrary, the complexities of the problem P1 with d i - d unrestrictively large and the problem P2 with d i = d also needs to be resolved in the future. We believe these problems have the same complexity as another yet-to-be-resolved open problem, that is, the single machine total completion time problem with batch setup times and an arbitrary number of batches, as originally posed in Monma and Potts [21] and later posed again in Ghosh [12].

References

[1] Baker, K.R., and Scudder, G.D., "Sequencing with earliness and tardiness penalties: A review", Operations Research 38 (1990) 22-36.

Page 20: Scheduling with batch setup times and earliness-tardiness penalties

Z.-L. Chen / European Journal of Operational Research 96 (1997) 518-537 537

[2] Bagchi, U., Chang, Y., and Sullivan, "Minimizing absolute and squared deviations of completion times with different earliness and tardiness penalties and a common due date", Naval Research Logistic Quarterly 34 (1987) 739-751.

[3] Chen, B., " A better heuristic for preemptive parallel machine scheduling with batch setup times", SlAM Journal on Computing 22 (1993) 1303-1318.

[4] Chen, Z.L., "Scheduling and common due date assignment with earliness-tardiness penalties and batch delivery costs", European Journal of Operational Research 93 (1996) 49-60.

[5] Cheng, T.C.E., and Chen, Z.L., "Parallel machine scheduling with batch setup times", Operations Research 42 (1994) 1171-1174. [6] Cheng, T.C,E., and Chen, Z.L., "Parallel machine scheduling with earliness and tardiness penalties", Journal of the Operational

Research Society 45 (1994) 685-695. [7] Cheng, T.C.E., and Gupta, M.C., "Survey of scheduling research involving due date determination decisions", European Journal of

Operational Research 38 (1989) 156-166. [8] Conway, R.W., Maxwell, W.L., and Miller, L.W., Theory of Scheduling, Addison-Wesley, Reading, MA, 1967. [9] Davis, J.S., and Kanet, J.J., "Single-machine scheduling with early and tardy completion costs", Naval Research Logistics 40 (1993)

85-101. [10] Federgruen, A., and Mosheiov, G., "Simultaneous optimization of efficiency and performance balance measures in single-machine

scheduling problems", Naval Research Logistics 40 (1993) 951-970. [11] Garey, M.R., Tarjan, R.E., and Wilfong, G.T., "One-processor scheduling with symmetric earliness and tardiness penalties",

Mathematics of Operations Research 13 (1988) 330-348. [12] Ghosh, J.B., "Batch scheduling to minimize total completion time", Operations Research Letters 16 (1994) 271-275. [ 13] Hall, N.G., Kubiak, W., and Sethi, S.P., "Earliness-tardiness scheduling problems, II: Deviation of completion times about a restrictive

common due date", Operations Research 39 (1991) 847-856. [14] Hall, N.G., and Posner, M.E., "Earliness-tardiness scheduling problems, I: Weighted deviation of completion times about a common

due date", Operations Research 39 (1991) 836-846. [15] Herrmann, J.W., and Lee, C.-Y., "On scheduling to minimize earliness-tardiness and batch delivery costs with a common due date",

European Journal of Operational Research 70 (1993) 272-288. [16] Lee, C.-Y., Danusaputro, S.L., and Lin, C.S., "Minimizing weighted number of tardy jobs and weighted earliness-tardiness penalties

about a common due date", Computers and Operations Research 18 (1991) 379-389. [17] Li, C.-L., Chen, Z.-L., and Cheng, T.C.E., "A note on one-processor scheduling with asymmetric earliness and tardiness penalties",

Operations Research Letters 13 (1993) 45-48. [18] Li, C.-L., and Cheng, T.C.E., "The parallel machine min-max weighted absolute lateness scheduling problem", Naval Research

Logistics 41 (1994) 33-46. [19] Li, C.-L., Cheng, T.C.E., and Chen, Z.-L., "Single-machine scheduling to minimize the weighted number of early and tardy agreeable

jobs", Computers and Operations Research 22 (1995) 205-219. [20] Liman, S.D., and Lee, C.-Y., "Error bound of a heuristic for the common due date scheduling problem", ORSA Journal on Computing

5 (1993) 420-425. [21] Monma, C.L., and Potts, C.N., " o n the complexity of scheduling with batch setup times", Operations Research 37 (1989) 798-804. [22] Monma, C.L., and Potts, C.N., "Analysis of heuristics for preemptive parallel machine scheduling with batch setup times", Operations

Research 41 (1993) 981-993. [23] Panwalkar, S., Smith, M., and Seidmann, A., "Common due date assignment to minimize total penalty for one machine scheduling

problem", Operations Research 30 (1982) 391-399. [24] Potts, C.N., and Van Wassenhove, L.N., "Integrating scheduling with batching and lot-sizing: A review of algorithms and

complexity", Journal of Operational Research Society 43 (1992) 395-406. [25] Sung, C.S., and Joo, U.G., "A single machine scheduling problem with earliness/tardiness and starting time penalties under a

common due date", Computers and Operations Research 19 (1992) 757-766.