An optimal online algorithm for single parallel-batch machine scheduling with incompatible job families to minimize makespan

An optimal online algorithm for single parallel-batch machine scheduling with incompatible job families to minimize makespan

Operations Research Letters 41 (2013) 216–219 Contents lists available at SciVerse ScienceDirect Operations Research Letters journal homepage: www.e...

207KB Sizes 1 Downloads 102 Views

Operations Research Letters 41 (2013) 216–219

Contents lists available at SciVerse ScienceDirect

Operations Research Letters journal homepage: www.elsevier.com/locate/orl

An optimal online algorithm for single parallel-batch machine scheduling with incompatible job families to minimize makespan Ruyan Fu a , T.C.E. Cheng b , C.T. Ng b,∗ , Jinjiang Yuan c a

College of Sciences, China University of Mining and Technology, Xuzhou, Jiangsu 221116, People’s Republic of China

b

Department of Logistics and Maritime Studies, The Hong Kong Polytechnic University, Hung Hom, Kowloon, Hong Kong Special Administrative Region, People’s Republic of China

c

Department of Mathematics, Zhengzhou University, Zhengzhou, Henan 450001, People’s Republic of China

article

info

Article history: Received 22 April 2009 Accepted 4 January 2013 Available online 16 January 2013

abstract We consider the online scheduling of incompatible job families on an unbounded parallel-batch machine to minimize the makespan, where jobs arrive over time and the number of job families, f , is known in √ advance. We provide an optimal online algorithm for the problem with a competitive ratio of 1 + 4f 2 +1−1 . 2f

© 2013 Elsevier B.V. All rights reserved.

Keywords: Online scheduling Parallel-batch machine Incompatible job families Competitive ratio

1. Introduction Parallel-batch scheduling has been widely researched. A parallel-batch machine can process several jobs simultaneously in a batch. The processing time of a batch is given by the maximum processing time of the jobs in the batch. Jobs in the same batch have the same starting time and the same completion time. If batch capacity is unbounded (unrestricted), then we can process as many jobs as we wish in a batch. In early scheduling research, it was often assumed that all the jobs’ information is given before a scheduling decision is made. Under this assumption (known as off-line scheduling), researchers have obtained many fruitful results for various scheduling problems involving a single parallel-batch machine or m parallel-batch machines to minimize the makespan, total weighted completion time or other performance measures, see, e.g., [2,4,6,11], among others. In reality, sometimes we do not have all the information about the jobs in making scheduling decisions. So semi-online scheduling and online scheduling have emerged. In semi-online problems, we do have some, but not all the information about the future jobs, e.g., we know that the jobs arrive in decreasing order of their processing times, or we know the largest processing time of the jobs, the sum of the processing times of all the jobs, and so on. In this paper we study a kind of standard online scheduling problem, which means that



Corresponding author. E-mail address: [email protected] (C.T. Ng).

0167-6377/$ – see front matter © 2013 Elsevier B.V. All rights reserved. doi:10.1016/j.orl.2013.01.003

we have a job’s information only at its arrival instant. So we can only make scheduling decisions for the arrived jobs, but not for the pending jobs. Compared with the semi-online problems, the standard online problems are more difficult because of the lack of information about the future jobs. Assume that there are f incompatible job families and each job belongs to a given family. Jobs from different families cannot be processed in the same batch because, e.g., they may have different chemical properties, or they may need different operations. Hence, we must schedule the jobs into batches where each batch consists of jobs from the same family and the number of jobs in a batch does not exceed the capacity of the machine. For earlier results on off-line parallel-batch scheduling problems with incompatible job families, the reader may refer to [1,4,7,8], among others. The quality of an online algorithm is measured by its competitive ratio. For a minimization problem, the competitive ratio of an algorithm A is equal to the smallest number ρ such that for any job list L, A(L) ≤ ρ · opt(L), where A(L) is the objective value generated by algorithm A and opt(L) is the off-line optimal objective value. We study online scheduling of f families of jobs on an unbounded single parallel-batch machine to minimize the makespan. Preemption or restart is not allowed and the value of f is known in advance. We denote the problem as 1|online, rj , p-batch, +∞, f -family|Cmax . When f = 1, Zhang et al. [12], Deng et al. [3] and Poon et al. [10] independently provided an optimal online algorithm with a √ competitive ratio of √

optimal online

5+1 . 2

When f = 2, Fu et al. [5] proposed an

17+3 -competitive 4

algorithm. For general f , Nong

R. Fu et al. / Operations Research Letters 41 (2013) 216–219

et al. [9] studied the same problem. They gave an online algorithm with a competitive ratio of 2 and proved that it is asymptotically optimal, i.e., when the number of families tends to infinity, there exists no online algorithm with a competitive ratio less than 2. For i = 1, 2, let αi be the positive root of the equation i · α 2 + √ √

α − i = 0. Then α1 =

and α2 = 174−1 . Thus, for the online scheduling problem under study, the results in Zhang et al. [12] and Fu et al. [5] imply that the optimal online algorithm is (1 + αi )competitive for i = 1, 2 job families. So we naturally guess that for the problem studied in this paper, if the number of job families is f , then the optimal online algorithm is (1 + αf )-competitive, where αf is the positive root of the equation f · α 2 + α − f = 0, i.e., 5−1 2



αf =

4f 2 +1−1 . 2f

We show this result in this paper. We organize the rest of the paper as follows: In Section 2 we prove that the competitive ratio of any online √ algorithm for the 4f 2 +1−1

scheduling model under study is at least 1 + . In Section 3 2f we provide an optimal online algorithm that finds a solution that matches this lower bound. This generalizes the results for the problem with f = 1, 2 in the literature. Throughout this paper, we use σ and π to denote the schedule given by an online algorithm and an optimal off-line algorithm, respectively. 2. A lower bound Let f be the number of incompatible job families, which is √ known in advance. Recall that αf =

4f 2 +1−1 2f

is the positive root of



the equation f ·αf2 +αf − f = 0. Then f ·αf =

4f 2 +1−1 2

∈ (f − 1, f ).

Theorem 2.1. For problem 1|online, rj , p-batch,+∞, f -family|Cmax , there exists no online algorithm with a competitive ratio less than 1 + αf . Proof. Let ϵ be an arbitrary small positive number that tends to zero. For any online algorithm H, we consider the following job instance generated by the adversary. All the jobs in the instance have a processing time of 1. At time 0, the adversary releases f jobs belonging to the f distinct job families, respectively. In the time interval [0, f · αf ), whenever a job is processed, the adversary releases a new copy of this job, i.e., one with the same processing time and from the same family, exactly ϵ time units later than the starting time of this job. Let S be the starting time of the first job with a completion time greater or equal to f · αf . Clearly, S ≥ f · αf − 1. We consider two possibilities as follows: First, (f · αf − 1) ≤ S < f · αf . It can be observed that there are still f unprocessed jobs available that belong to f distinct job families at time S + 1. Then Cmax (σ ) ≥ S + 1 + f . Assume that in the time interval [0, S + 1) the processed jobs are from k distinct families, say, F1 , F2 , . . . , Fk . The other f − k families are denoted by Fk+1 , Fk+2 , . . . , Ff . For each Fi with 1 ≤ i ≤ k, let Si be the last starting time of the jobs in Fi starting before or at time S. Suppose further that S1 < S2 < · · · < Sk . Then Si+1 −Si ≥ 1 for 1 ≤ i ≤ k−1 and Sk = S. Note that the last arrival time of the jobs in family Fi with 1 ≤ i ≤ k is Si + ϵ and the arrival time of the jobs in family Fi with k + 1 ≤ i ≤ f is 0. We construct a schedule π ∗ in the following way: Each family Fi , 1 ≤ i ≤ f , acts as a single batch in π ∗ starting at time Si∗ , where Si∗ = i − (k + 1), Si∗ = max{Si + ϵ, (f − k) + (i − 1)},



if k + 1 ≤ i ≤ f , if 1 ≤ i ≤ k.

It is not hard to see that π ∗ is feasible and Cmax (π ∗ ) = max{S + ϵ, f − 1} + 1 = max{S + ϵ + 1, f }. Since π is an off-line optimal

217

schedule, we have Cmax (π ) ≤ Cmax (π ∗ ). Recall that S < f · αf and S + 1 ≥ f · αf . If Cmax (π ∗ ) = f , then Cmax (σ ) Cmax (π )



S+1+f f

≥ 1 + αf .

If Cmax (π ∗ ) = S + ϵ + 1, as ϵ −→ 0, we have Cmax (σ ) Cmax (π )



S+1+f

−→

S+1+f

S+ϵ+1 S+1 f = 1 + αf . > 1+ f · αf + 1

Second, S ≥ f · αf . In this case, there are still f unprocessed jobs available that belong to f distinct job families at time S, then Cmax (σ ) ≥ S + f ≥ (1 + αf )f . By the definition of S, we observe that all the jobs arrive before or at time f · αf − 1, which is smaller than f − 1. As the discussion in the first case, we have Cmax (π ) = f . Thus Cmax (σ )/Cmax (π ) ≥ 1 + αf . The result follows.  3. An optimal online algorithm Since the batch capacity is unbounded and the processing time of a batch is given by the processing time of the longest jobs in it, we may assume that, at each arrival time, there is at most one job arriving from each job family. For a given batch B, we use p(B) to denote the processing time of B. The last longest job of batch B, denoted by J (B), is defined to be the one of the longest jobs in B having the largest arrival time. r (B) is used to denote the arrival time of J (B). For a collection B of batches, we define  r (B ) = min{r (B) : B ∈ B } and p(B ) = B∈B p(B). r (B ) and p(B ) are called the arrival time and the processing time of B , respectively. We also use JB = B∈B B to denote the set of jobs in B . If B is a processing batch in an online schedule, we use S (B) to denote the starting time of B in the schedule. Similarly, if B is a collection of processing batches in a schedule, we use S (B ) = min{S (B) : B ∈ B } to denote the starting time of B . At a time instant t, we use J (t ) to denote the set of unprocessed jobs. For each job family Fi , where i = 1, . . . , f , set Bi (t ) = J (t ) ∩ Fi . Bi (t ) is called a waiting batch at time t if Bi (t ) ̸= ∅. The collection of the waiting batches at time t is denoted by B (t ). Since there is a single parallel-batch machine and preemption or restart is not allowed, the decision points in an online algorithm are those time instants at which the machine is idle and there exists at least one waiting batch. Our online algorithm, denoted by A(αf ), can be described as follows: Algorithm A(αf ). At time t, if B (t ) ̸= ∅, say, B (t ) = {B1 , . . . , Bi } with p(B1 ) ≥ · · · ≥ p(Bi ), and t ≥ αf (p(B1 ) + · · · + p(Bi )), then start processing the waiting batch B1 ; otherwise, do nothing but wait. From the implementation of algorithm A(αf ), we observe the following lemma. Lemma 3.1. Let B be a processing batch in algorithm A(αf ), and set t = S (B). Then (a) B is the longest waiting batch in B (t ) at time t; (b) t ≥ max{r (B (t )), αf · p(B (t ))}; and (c) if there is an idle time directly before t, then t = max{r (B (t )), αf · p(B (t ))}. Denote by σ and π the schedule given by algorithm A(αf ) and an optimal off-line algorithm, respectively. Assume that the last arrival time of the jobs is rl . Let S ≥ rl be minimum so that some batch starts at S in algorithm A(αf ) and there is no idle time between S and Cmax (σ ). Then B = {B : S (B) ≥ S in A(αf )} = B (S ) forms a block of batches consecutively processed from S (B ) = S to Cmax (σ ). Since S ≥ rl , the block B is composed of some batches that belong to distinct families. Then Cmax (σ ) = S (B ) + p(B ).

218

R. Fu et al. / Operations Research Letters 41 (2013) 216–219

Lemma 3.2. Suppose that there exists an idle time immediately before time S (B ). Then Cmax (σ )/Cmax (π ) ≤ 1 + αf . Proof. Since there exists idle time immediately before time moment S (B ), from Lemma 3.1(c), either S (B ) = rl or S (B ) = αf · p(B ). If S (B ) = αf · p(B ), then Cmax (σ ) = (1 + αf ) · p(B ) ≤ (1 + αf )Cmax (π ) since Cmax (π ) ≥ p(B ). If S (B ) = rl and S (B ) > αf · p(B ), then, for each B ∈ B , J (B) arrives at time rl , i.e., r (B) = rl . Hence, Cmax (σ ) = rl + p(B ) ≤ Cmax (π), since the jobs J (B), B ∈ B , are processed in distinct batches in π . The result follows.  Lemma 3.3. Suppose that there exists no idle time immediately before time S (B ). Then Cmax (σ )/Cmax (π ) ≤ 1 + αf . Proof. The assumption implies that S (B ) is the completion time of some batch, say, B∗ . Then S (B ) = S (B∗ ) + p(B∗ ). By the choice of S, where S = S (B ), we have S (B∗ ) < rl . We divide block B into two batch sets, say, Ba and Bb , such that Ba = {B ∈ B : r (B) > S (B∗ )} and Bb = {B ∈ B : r (B) ≤ S (B∗ )}. Then the last longest job J (B) of each batch B ∈ Ba arrives after time S (B∗ ) and the last longest job J (B) of each batch B ∈ Bb arrives before or at time S (B∗ ). It is possible that Ba or Bb is empty. But this does not affect our following analysis. By the definition of Bb , the family of batch B∗ is distinct from the family of any batch in Bb . Then we have Cmax (σ ) = S (B∗ ) + p(B∗ ) + p(Ba ) + p(Bb ). Since algorithm A(αf ) starts the processing of batch B∗ at time S (B∗ ), from Lemma 3.1(a), p(B∗ ) ≥ p(B) for each B ∈ Bb . Since there exist at most f batches in {B∗ } ∪ Bb , we have p(B∗ ) ≥

p(B∗ ) + p(Bb )

and

f

(1)

Since r (Ba ) > S (B∗ ), the jobs J (B), B ∈ Ba , are processed after time S (B∗ ). Then we have Cmax (π ) > S (B∗ ) + p(Ba ) (if Ba = ∅, then p(Ba ) = 0 and we also have Cmax (π ) ≥ rl > S (B∗ ) + p(Ba )). In view of the fact that Cmax (σ ) = S (B∗ ) + p(B∗ ) + p(Ba ) + p(Bb ), we have Cmax (σ ) − Cmax (π ) ≤ p(B ) + p(Bb ). ∗

(2)

In the optimal schedule π , job J (B ) starts either before time S (B∗ ) or no earlier than time S (B∗ ). We consider two cases as follows: ∗

Case 1 Job J (B∗ ) starts at or after time S (B∗ ) in π . From (1), we have Cmax (π) ≥ S (B∗ ) + p(B∗ ) ≥ αf · (p(B∗ ) + p(Bb )) p(B∗ ) + p(Bb ) f



= αf +

1 f



Cmax (π )

If min{r (B ), r (Bb )} ≥ S (B0 ), from (3), we have Cmax (π ) ≥ min{r (B∗ ), r (Bb )} + p(B∗ ) + p(B ) ≥ S (B0 ) + p(B∗ ) + p(B ). Thus Cmax (σ ) − Cmax (π ) ≤ (S (B0 ) + p(B0 ) + p(B∗ ) + p(B )) − (S (B0 ) + p(B∗ ) + p(B )) = p(B0 ). In view of the fact that S (B0 ) ≥ αf · p(B (S (B0 ))) ≥ αf · p(B0 ) and from (4), we conclude that p(B0 ) 1 = ≤ αf . (αf + 1)p(B0 ) αf + 1 So we further suppose that min{r (B∗ ), r (Bb )} < S (B0 ). We divide batch set Bb into two subsets Bb1 and Bb2 such that Bb1 = {B ∈ Bb : r (B) ≤ S (B0 )} and Bb2 = {B ∈ Bb : r (B) > S (B0 )}. We Cmax (σ ) − Cmax (π ) Cmax (π )



distinguish the following two subcases. Case 2.1 r (B∗ ) ≤ S (B0 ). Then S (B0 ) ≥ αf · (p(B0 ) + p(B∗ ) + p(Bb1 )). By the fact that Cmax (π ) ≥ S (B0 ) + p(Bb2 ) + p(Ba ), we have Cmax (σ ) − Cmax (π ) ≤ (S (B0 ) + p(B0 ) + p(B∗ ) + p(Bb1 ) + p(Bb2 ) + p(Ba )) − (S (B0 ) + p(Bb2 ) + p(Ba )) = p(B0 ) + p(B∗ ) + p(Bb1 ). From Lemma 3.1(a), J (B0 ) is the longest job in B0 ∪ {J (B∗ )} ∪ JB 1

p(B ) + p(Bb )

αf + 1

αf +

1 f

1 f



f

b

. Note that

Cmax (σ ) − Cmax (π ) Cmax (π )



1

αf +

1 f

= αf .

Case 2.2 r (B∗ ) > S (B0 ). Then S (B0 ) ≥ αf · (p(B0 ) + p(Bb1 )) and Cmax (π ) ≥ S (B0 ) + p(B∗ ) + p(Bb2 ) + p(Ba ). Thus Cmax (σ ) − Cmax (π ) ≤ (S (B0 ) + p(B0 ) + p(B∗ ) + p(Bb1 ) + p(Bb2 ) + p(Ba )) − (S (B0 ) + p(B∗ ) + p(Bb2 ) + p(Ba )) = p(B0 ) + p(Bb1 ). Recall that J (B0 ) is the longest job in B0 ∪ JB 1 at time S (B0 ). Then we have p(B0 ) ≥

p(B0 )+p(Bb1 ) f

b

. Furthermore, from (4), we have



1

αf +

1 f

= αf . 

Summing up Theorem 2.1, Lemmas 3.2 and 3.3, we conclude the paper with the following final result.

· (p(B∗ ) + p(Bb ))

Theorem 3.4. For problem 1|online, rj , p-batch, +∞, f -family|Cmax , where f is known in advance, the optimal online al√

= αf .

gorithm has a competitive ratio of 1 +

Case 2 Job J (B∗ ) starts before time S (B∗ ) in π . Then S (B∗ ) > r (B∗ ). The definition of Ba implies that J (B∗ ) is processed before each J (B), B ∈ Ba , in π . Furthermore, the family of B∗ is distinct from the families of the batches in Bb . Then the jobs J (B∗ ) and J (B), B ∈ B , are processed in distinct batches in π . Since the earliest arrival time of these jobs is min{r (B∗ ), r (Bb )}, we have Cmax (π) ≥ min{r (B∗ ), r (Bb )} + p(B∗ ) + p(Ba ) + p(Bb )

= min{r (B∗ ), r (Bb )} + p(B∗ ) + p(B ).

p(B0 )+p(B∗ )+p(Bb1 )

S (B0 ) ≥ αf · (p(B0 ) + p(B∗ ) + p(Bb1 )). From (4), we conclude that

This completes the proof of Lemma 3.3.

≤ 

(4)



Cmax (π )



=

Cmax (π ) ≥ rl > S (B∗ ) = S (B0 ) + p(B0 ).

Cmax (σ ) − Cmax (π )

· (p(B∗ ) + p(Bb )).

By using (2), we obtain Cmax (σ ) − Cmax (π )

Then the sum of processing times of the waiting batches at time S (B∗ ) is equal to p(B∗ ) + p(Bb ) + p(B ′ ), which is a lower bound of Cmax (π ). Note that JB ′ ⊂ JBa . If S (B∗ ) = αf · (p(B∗ ) + p(Bb ) + p(B ′ )), by the fact in (3) that Cmax (π ) ≥ p(B∗ ) + p(Ba ) + p(Bb ), we have Cmax (σ ) − Cmax (π ) ≤ (αf · (p(B∗ ) + p(Bb ) + p(B ′ )) + p(B∗ ) + p(Ba ) + p(Bb )) − (p(B∗ ) + p(Ba ) + p(Bb )) ≤ αf · Cmax (π ). Suppose in the following that S (B∗ ) > αf · (p(B∗ ) + p(Bb ) + p(B ′ )). Since S (B∗ ) > r (B∗ ), S (B∗ ) is the completion time of a batch, say, B0 . Then S (B∗ ) = S (B0 ) + p(B0 ). Recall that rl > S (B∗ ). Therefore,

at time S (B0 ). Then we have p(B0 ) ≥

S (B∗ ) ≥ αf · (p(B∗ ) + p(Bb )).

+

Let B ′ be the set of waiting batches of the jobs in J (S (B∗ ))\(B∗ ∪ JBb ) (if any) at time S (B∗ ). If B ′ is empty, we define p(B ′ ) = 0.

(3)

4f 2 +1−1 . 2f



Acknowledgments We thank an AE and two anonymous referees for their helpful comments on earlier versions of our paper. This research was supported in part by the Research Grants Council of Hong Kong under grant number N_PolyU502/07. Fu was also supported by NSFC (11001265), and the Fundamental Research Funds for the Central Universities (2010QNA37) and (2010LKSX06). Yuan was also supported by NSFC (11271338) and NSFC (11171313).

R. Fu et al. / Operations Research Letters 41 (2013) 216–219

References [1] M. Azizoglu, S. Webster, Scheduling a batch processing machine with incompatible job families, Computers and Industrial Engineering 39 (2001) 325–335. [2] P. Brucker, A. Gladky, H. Hoogveen, M.Y. Kovalyov, C.N. Potts, T. Tautenhahn, S.L. van de Velde, Scheduling a batching machine, Journal of Scheduling 1 (1998) 31–54. [3] X.T. Deng, C.K. Poon, Y.Z. Zhang, Approximation algorithms in batch processing, Journal of Combinatorial Optimization 7 (2003) 247–257. [4] G. Dobson, R.S. Nambimadom, The batch loading and scheduling problem, Operations Research 49 (2001) 52–65. [5] R.Y. Fu, J. Tian, J.J. Yuan, On-line scheduling on an unbounded parallel batch machine to minimize makespan of two families of jobs, Journal of Scheduling 12 (2009) 91–97. [6] C.Y. Lee, R. Uzsoy, Minimizing makespan on a single batch processing machine with dynamic job arrivals, International Journal of Production Research 37 (1999) 219–236.

219

[7] S.V. Mehta, R. Uzsoy, Minimizing total tardiness on a batch processing machine with incompatible job families, IIE Transactions 30 (1998) 165–178. [8] L. Mönch, H. Balasubramanian, J.W. Fowler, M.E. Pfund, Heuristic scheduling of jobs on parallel batch machines with incompatible job families and unequal ready times, Computers and Operations Research 32 (2005) 2731–2750. [9] Q.Q. Nong, J.J. Yuan, R.Y. Fu, L. Lin, J. Tian, The single-machine parallelbatching on-line scheduling problem with family jobs to minimize makespan, International Journal of Production Economics 111 (2008) 435–440. [10] C.K. Poon, W.C. Yu, A flexible on-line scheduling algorithm for batch machine with infinite capacity, Annals of Operations Research 133 (2005) 175–181. [11] C.K. Poon, P.X. Zhang, Minimizing makespan in batch machine scheduling, Algorithmica 39 (2004) 155–174. [12] G.C. Zhang, X.Q. Cai, C.K. Wong, On-line algorithms for minimizing makespan on batch processing machines, Naval Research Logistics 48 (2001) 241–258.