An exponential queue with competition for service

An exponential queue with competition for service

European Journal of Operational Research 126 (2000) 587±602 www.elsevier.com/locate/dsw Theory and Methodology An exponential queue with competitio...

178KB Sizes 4 Downloads 101 Views

European Journal of Operational Research 126 (2000) 587±602

www.elsevier.com/locate/dsw

Theory and Methodology

An exponential queue with competition for service P.H. Brill b

a,b

, M. Hlynka

b,*

a Department of Management Science, University of Windsor, Windsor, Ont., Canada N9B 3P4 Department of Mathematics and Statistics, University of Windsor, Windsor, Ont., Canada N9B 3P4

Received 1 August 1998; accepted 1 April 1999

Abstract We consider an M=M=c queue, where a single `special' customer Cp arrives. If Cp must wait, then either Cp will eventually start service at some completion epoch with probability p, or Cp will `¯oat' into service at the end of a busy period. The model is interpreted as Cp competing for service against the regular customers. We study the waiting time of Cp . We analyze the e€ect of Cp on the waiting times of the regular customers. Examples and applications are discussed. Ó 2000 Elsevier Science B.V. All rights reserved. Keywords: Queueing; M=M=c; Ballot theorem; Laplace±Stieltjes transform; Computational algorithm

1. Introduction This paper studies the waiting time Wp of a single special customer Cp that arrives at an M=M=c system which is in equilibrium. Cp may be either a member of the arrival stream, or may arrive at an arbitrary time point. Cp starts service on arrival if at least one server is unoccupied. Otherwise, Cp must wait. If Cp is waiting alone and there is a service completion, then Cp starts service by default. If other customers are also waiting, then Cp starts service with some probability p, 0 6 p 6 1. We denote this model by M=M=c…Cp †. Two cases are considered. In Case 1, p is independent of the state. Two values of p are of particular interest. If p ˆ 0, C0 is the `polite' customer [6, p. 233], or the extreme case of Takacs [20]. C0 must wait until the ®rst service completion after all currently waiting customers and all customers who arrive while C0 is waiting, start service. C0 may not be polite, but rather the servers are deliberately avoiding C0 , or C0 is trying to avoid or postpone service. If p ˆ 1, C1 is an `aggressive' customer who waits only until the next service completion. C1 may not be aggressive, but rather the servers are deliberately choosing C1 .

*

Corresponding author. Tel.: +1-519-253-3000.

0377-2217/00/$ - see front matter Ó 2000 Elsevier Science B.V. All rights reserved. PII: S 0 3 7 7 - 2 2 1 7 ( 9 9 ) 0 0 3 1 3 - 6

588

P.H. Brill, M. Hlynka / European Journal of Operational Research 126 (2000) 587±602

In Case 2, p depends on the state at service completion epochs whenever other customers are also waiting. Thus p depends on how long Cp has waited or on the total number of customers waiting, or both. An example where p varies while Cp waits is p ˆ 1=…number of customers waiting†. This queue models situations with competition for service. An example with one special customer occurs when an airplane arrives at an airport and is low on fuel. What value of p should the air trac controller assign to this arrival? A comparison of the expected time until the fuel tank is empty with the expected time to land, is required. Or, we may set the p value so that the probability of landing before the fuel tank is empty is very close to 1. An example with two special customers occurs when a group of patients including an elderly and a young person, are waiting for an organ transplant. How long does the elderly person have to wait for an organ? It depends on the two patients' relative p values. In a sense, this is a priority queueing system, with continuous priority p in ‰0; 1Š [9, pp. 158±159]. The concept of special customers was introduced in [3,11,19]. Larson [15] and Gordon [8] examined some of these issues in terms of social justice. Customers are allowed to `slip' backward or `skip' forward by one step. In our paper, a `special' customer can jump into service (`queue jumping'). Larson [14] gave examples of social injustice and resulting `queue rage.' Recently, `road rage' has become a serious problem in transportation. Special drivers who are aggressive, give themselves a p ˆ 1 value in congested trac and get `served' by passing regular drivers, with a potential for accidents. Bribery might be viewed as a socially unjust method to receive faster service [2,16]. A special customer might be willing to pay for a higher p value. Non human `customers' also have competitive methods for faster service. Biologists (Alexander [1], Hack [10], and Smith [18]) study how animals and insects compete for food, territory and mates. Physicists study particles which have greater or lesser attraction for an object. Astronomers observe threatening comets which arrive in earth's neighborhood, and may require special service. Section 2 derives an expression for the c.d.f. of Wp for 0 6 p 6 1 by applying the ballot theorem, when p is ®xed while Cp is waiting. This solution is used computationally to evaluate the c.d.f., mean, and variance of Wp . Section 3 derives the Laplace Stieltjes Transform (LST) of Wp , which leads directly to the moments. Section 4 develops a computational algorithm for the c.d.f. and moments of Wp when p varies with the state while Cp waits. Section 5 presents computational results. Section 6 examines the e€ect of Cp on the average waiting time of regular customers. Section 7 considers examples of dynamic scheduling with `special order' jobs.

2. The c.d.f. of Wp when p is ®xed (case 1) Consider an M=M=c queue in equilibrium with arrival rate k and service rate l. If all servers are occupied, the probability that the next service completion occurs before the next arrival is aˆ

cl 1 ˆ ; cl ‡ k 1 ‡ q

where q ˆ k=cl < 1. The probability that the next customer arrives before the next service ends is b ˆ 1 ÿ a. Let pi , i P 0, denote the steady-state probability of i customers in an M=M=c system (e.g. [9]). Assume that Cp arrives at time point s0 ˆ 0 and must wait for service. De®ne a continuous time Markov chain fX …t†; t P 0g having state space f/; 1; 2; . . .g. For j P 1, X …0† ˆ j if there are j ÿ 1 other customers waiting at t ˆ 0. fX …†g will be absorbed into state / just after Cp starts service. Absorption will occur in a ®nite time a.s. since q < 1. Consider the states at jump (arrival and departure) epochs 0 ˆ s0 < s1 < s2 <    of fX …†g while Cp is waiting.

P.H. Brill, M. Hlynka / European Journal of Operational Research 126 (2000) 587±602

589

If X …sÿ i † ˆ j (j P 2; i P 1), then X …si † ˆ j ‡ 1 with probability b; X …si † ˆ j ÿ 1 with probability a…1 ÿ p†; X …si † ˆ / with probability ap: If X …sÿ i † ˆ 1 (i P 1), then X …si † ˆ 2 with probability b; X …si † ˆ / with probability a: Then Wp ˆ sn , where n ˆ minfi : X …si † ˆ /g. The intervals si ÿ siÿ1 , i ˆ 1; . . . ; n; are i.i.d. exponentially distributed with rate k ‡ cl. Thus Wp is a phase type random variable [17]. First we employ the ballot theorem to determine the probability distribution of the number of steps taken by the embedded Markov chain fXs g to get absorbed. Second, conditional on fXs g taking n steps, Wp is Erlang…n; k ‡ cl†. Third, unconditioning gives the c.d.f. of Wp . P1 …j ! k† as the number of di€erent sample paths for fXs g of length n ÿ 1 steps each, starting De®ne Nnÿ1 in state j and ending in state k, restricted to the states {1; 2; 3; . . .}. Let fX s g be the Markov chain with the same transition probabilities having unrestricted state space f. . . ; ÿ2; ÿ1; 0; 1; 2; . . .g, where no states are absorbing. Let Nnÿ1 …j ! k† denote the number of di€erent sample paths for fXs g of length n ÿ 1 steps each, starting in state j and ending in state k. Lemma 1. P1 …j Nnÿ1

 ! k† ˆ

nÿ1 u



 ÿ

 nÿ1 ; v

j P 1; k P 1; n P 1;

where nÿ1‡kÿj ; uˆ 2

nÿ1‡k‡j vˆ ; 2

  0 ˆ 1; 0



nÿ1 y

…2†

 ˆ0

(unless 0 6 y 6 n ÿ 1 and y is an integer.) P1 …j ! k† ˆ Nnÿ1 …j ! k† ÿ Nnÿ1 …ÿj ! k†. Using the ballot theorem Proof. From the re¯ection principle, Nnÿ1 [7], let u and v denote the number of upward jumps when evaluating Nnÿ1 …j ! k† and Nnÿ1 …ÿj ! k†. Then   nÿ1‡kÿj nÿ1‡k‡j nÿ1 ; vˆ ; Nnÿ1 …j ! k† ˆ ; uˆ u 2 2   nÿ1 . Expression (2) follows.  and Nnÿ1 …ÿj ! k† ˆ v

Theorem 1. De®ne qn …p† as the probability that fX …s †g is absorbed on step n. Then qn …p† ˆ

1 j‡nÿ1 X X  n ÿ 1  jˆ1

kˆ1

u

 ÿ

nÿ1 v



bu …a…1 ÿ p††nÿ1ÿu hk pc‡jÿ1 ;

0 6 p 6 1;

…3†

where u and v are de®ned in (2), and hk is the probability that absorption from state k occurs on step n and is given by h1 ˆ a, hk ˆ ap for k P 2.

590

P.H. Brill, M. Hlynka / European Journal of Operational Research 126 (2000) 587±602

Proof. Let qjk n …p† ˆ P …fX …s †g starts in state j, moves to state k in n ÿ 1 steps and be absorbed on step n).Then for n P 1, u P1 qjk n …p† ˆ Nnÿ1 …j ! k†b …a…1 ÿ p††

nÿ1ÿu

hk ;

j P 1; k P 1:

…4†

Averaging (4) over the probabilities of the initial state gives qn …p† ˆ

1 X

j‡nÿ1 X

jˆ1 kˆmax…jÿn‡1;1†

qjk n …p†pc‡jÿ1 ;

which yields (3), from (2) and (4).

…5†



It is well known that 1 pW ˆ P …a customer must wait† ˆ c!

 c k ÿ1 …1 ÿ q† p0 ; l

…6†

so P …Wp ˆ 0† ˆ 1 ÿ pW . Corollary 1. The c.d.f. of Wp , for t P 0, is nÿ1 1 Z t X ……k ‡ cl†x† …k ‡ cl†eÿ…k‡cl†x dx; qn …p† Fp …t† ˆ 1 ÿ pW ‡ …n ÿ 1†! 0 nˆ1

0 6 p 6 1:

…7†

Proof. Wp is Erlang(n,k ‡ cl), given that Cp waits n steps before starting service. Thus (7) follows from (3) and (6).  Corollary 2. The c.d.f. of Wp when p ˆ 1 is F1 …t† ˆ 1 ÿ pW eÿclt

for t P 0:

…8†

Proof. For p ˆ 1 in (3), the factor …a…1 ÿ p††nÿ1ÿu ˆ 0 unless n ÿ 1 ÿ uPˆ 0, when it is 1. Letting u ˆ n ÿ 1, 1 then k ˆ n ÿ 1 ‡ j, v ˆ n ÿ 1 ‡ j and hnÿ1‡j ˆ a. Hence qn …1† ˆ bu jˆ1 hnÿ1‡j pc‡jÿ1 ˆ bnÿ1 apW , and (7) yields (8).  From (8), E…W1 † ˆ

pW ; cl

Var…W1 † ˆ pW

2 ÿ pW …cl†

2

:

Corollary 3. The c.d.f. of Wp when p ˆ 0 is Z t nÿ1 1 X ……k ‡ cl†x† dx qn …0† eÿ…k‡cl†x …k ‡ cl† F0 …t† ˆ 1 ÿ pW ‡ …n ÿ 1†! 0 nˆ1 ˆ 1 ÿ pW ‡

1 X nˆ1

G…n† …t†pn‡cÿ1 ;

…9†

…10† …11†

P.H. Brill, M. Hlynka / European Journal of Operational Research 126 (2000) 587±602

591

where qn …0† ˆ

 n  X nÿ1 nÿj 2

jˆ1

G…n† …t† ˆ qÿn=2

Z 0

t

 ÿ

nÿ1



n‡j 2

b…nÿj†=2 a…n‡j†=2 ;

…12†

n eÿ…k‡cl†x In …2clxq1=2 † dx x

…13†

and In …z† is the modi®ed Bessel function of the ®rst kind given by In …z† ˆ

2m‡n 1 X …z=2† m!…m ‡ n†! mˆ0

for n a positive integer [12]. Proof. C0 starts service on step n after its arrival only if the state is k ˆ 1 on step n ÿ 1 and the next event is a service completion. Thus (3) reduces to (12) when p ˆ 0, and (7) then gives (10). Several algebraic steps yield 1 X

…n†

G …t†pn‡cÿ1 ˆ

1 X

nˆ1

nˆ1

and (11) follows.

Z qn …0†

t 0

eÿ…k‡cl†x …k ‡ cl†

……k ‡ cl†x†nÿ1 dx …n ÿ 1†!



Note 1. F0 …t† can be derived in the form of (11) by observing that C0 would wait j (1-stage) M…k†=M…cl†=1 busy periods, if the starting state of fX …s †g is j. (See [20].) The formula for G…n† …t† is given in [4, p. 187]. Note 2. The following new form of In …z† results directly from the equality of (10) and (11):    1  1X …z=2†2m‡n 2m ‡ n ÿ 1 2m ‡ n ÿ 1 ÿ In …z† ˆ m m‡n …2m ‡ n ÿ 1†! n mˆ0

…n ˆ 1; 2; . . .†:

…14†

From (10) E…W0 † ˆ

pW cl…1 ÿ q†

2

;

Var…W0 † ˆ

pW …2 ‡ 2q ÿ pW † …cl†2 …1 ÿ q†4

:

…15†

Fp …t† (0 6 p 6 1) can be computed from (7), (8), or (10) upon computing qn …p† in (3). Computations were carried out using MAPLE computer software over a wide range of parameter values fc; l; k; pg. Formula (7) allows us to take advantage of MAPLE's ecient numerical integration routines. (See Section 5.)

3. LST and moments of wp when p is ®xed De®ne: /j …s†, s P 0, j ˆ 1; 2 . . . ; to be the LST of Wp given that there are j ÿ 1 customers waiting when Cp arrives; /…s†, s P 0, to be the LST of Wp ; Y …h†, h P 0, to be the LST of the 1-stage busy period of an M…k†=M…cl…1 ÿ p††=1 queue, 0 6 p < 1. It is well known (e.g. [13]) that

592

P.H. Brill, M. Hlynka / European Journal of Operational Research 126 (2000) 587±602

Y …h† ˆ

k ‡ cl…1 ÿ p† ‡ h ÿ

q …k ‡ cl…1 ÿ p† ‡ h†2 ÿ 4kcl…1 ÿ p† 2k

:

…16†

To derive /j …s† (and hence /…s†), we employ a Poisson `catastrophe' process having rate s [13, p. 267] whereby /j …s† is the probability that Cp starts service before the next catastrophe occurs, which can happen in exactly two di€erent ways: e1 …s†: Cp `¯oats' into service before the next catastrophe, at the end of a busy period (when no other customers are waiting and there is a service completion). e2 …s†: Cp gets selected for service before the next catastrophe with probability p when other customers are also waiting. De®ne Z…s† ˆ P …e1 …s† j 0 other customers are waiting when Cp arrives), A…s† ˆ P …e2 …s† j e1 …s† does not occur). Then /j …s† ˆ Z j …s† ‡ …1 ÿ Z j …s††A…s†;

j ˆ 1; 2; . . . ;

0 6 p 6 1;

…17†

j

where Z j …s† ˆ …Z…s†† . Note that Z…s† ˆ Y …clp ‡ s†;

0 6 p 6 1;

…18†

since e1 …s† occurs i€ Wp is less than the minimum of the times until (i) Cp gets selected for service, and (ii) the next catastrophe occurs. From (16), q k ‡ cl ‡ s ÿ …k ‡ cl ‡ s†2 ÿ 4kcl…1 ÿ p† ; 0 6 p 6 1: …19† Z…s† ˆ 2k Clearly A…s† ˆ

clp ; clp ‡ s

0 6 p 6 1:

…20†

Averaging (17) over pc‡jÿ1 , j P 1, yields   …1 ÿ q†Z…s† /…s† ˆ 1 ÿ pW ‡ pW A…s† ‡ …1 ÿ A…s†† ; 1 ÿ qZ…s† It is well known that   n E Wpn ˆ …ÿ1† /…n† …0†; where /…n† …s† ˆ

dn /…s† ; dsn

0 6 p 6 1:

…21†

n P 1;

2

Var…Wp † ˆ /…2† …0† ÿ …/…1† …0†† ;

ÿ/…3† …0† skewness …Wp † ˆ  3=2 ; /…2† …0†

and

/…4† …0† kurtosis …Wp † ˆ  2 : /…2† …0†

These formulas give expressions for E…W1 †, Var…W1 †, E…W0 †, Var…W0 †, which agree with those in (9) and (15). They also lead directly to the moments of Wp , 0 < p 6 1. General formulas for the mean and variance of Wp are

P.H. Brill, M. Hlynka / European Journal of Operational Research 126 (2000) 587±602

593



 1 …1 ÿ q†K1 E…Wp † ˆ pw ÿ ; 0 < p 6 1; 2clpK3 clp p p   2 …1 ÿ q†K1 …1 ÿ q†K1 = K2 † …1 ÿ q†K12 = K2 † ÿ ÿ Var…Wp † ˆ pw 2 2 2 ÿ 2 2 2 c l p K3 clpK3 2clpK32 clp  2 1 …1 ÿ q†K1 ; 0 < p 6 1; ÿ ÿ pw2 2clpK3 clp

…22†

…23†

p where K1 ˆ k ‡ cl ÿ K2 , K2 ˆ …k ‡ cl†2 ÿ 4kcl…1 ÿ p†, and K3 ˆ k…1 ÿ qK1 =2k†. For p ˆ 0, set A…s† ˆ 0 in (21) before deriving the LST. 4. A computational algorithm for computing Fp …t† when p is state dependent (case 2) We develop an algorithm for computing Fp …t†, t P 0, when p is state dependent, which computes the terms qk …p† in (3) recursively. The advantage of the algorithm is that p may vary with the number of steps Cp has waited, or the number of customers waiting. The algorithm checks with the results computed from (7) when p is ®xed. It utilizes the underlying Markov structure directly, handles many model variations, and was implemented using MAPLE. A brief description follows: De®ne R…0; j† ˆ P …just after Cp arrives there are j customers waiting† ˆ pc‡jÿ1 ;

j P 1;

R…k; j† ˆ P …Cp and j ÿ 1 other customers are waiting after exactly k steps†;

k; j P 1;

R…k; j† ˆ 0 otherwise: 1. 2. 3. 4.

Algorithm: R…k; j† ˆ bR…k ÿ 1; j ÿ 1† ‡ a…1 ÿ p†R…k ÿ 1; j ‡ 1†; k P 1; j P 1:  P1 0 if j P 2; qk …p† ˆ jˆ1 a…n ‡ p…1 ÿ n††R…k ÿ 1; j†; k P 1; where n ˆ 1 if j ˆ 1: 1 Rt ……k ‡ cl†x†kÿ1 …k ‡ cl†eÿ…k‡cl†x P dx as in …7†: qk …p† Fp …t† ˆ 1 ÿ pW ‡ …k ÿ 1†! kˆ1 0 To obtain E…Wp † and var…Wp † note the expression Z 1 n tnÿ1 …1 ÿ Fp …t†† dt; n P 1: E…Wp † ˆ n 0

In steps 2 and 3, the in®nite sums are truncated after a `large' number M of terms. 5. Computational examples First assume that p is ®xed until service (Case 1). Formula (7) was used to study the e€ect of p on Wp , over a wide range of the parameters p, k, l and c. Table 1 gives the mean and variance of Wp . It includes the standard M=M=c result and the `fair' case where p ˆ 1=…number of customers waiting†, for comparison. The algorithm of Section 4 was used in the fair case. Some representative results are given for arbitrarily chosen parameter values c ˆ 3, k ˆ 4, l ˆ 2:5, q ˆ 0:53333, a ˆ 0:65217, b ˆ 0:34782, for p ˆ 0; 0:2; 0:5; 0:8; 1.

594

P.H. Brill, M. Hlynka / European Journal of Operational Research 126 (2000) 587±602

Table 1 Mean and variance of Wp Mean Var.

pˆ0

p ˆ 0:2

p ˆ 0:5

p ˆ 0:8

pˆ1

M=M=c

Fair

0.16763 0.28664

0.09062 0.06451

0.05704 0.02247

0.04249 0.01170

0.03651 0.00840

0.07823 0.03858

0.07823 0.05484

Fig. 1. E…Wp † vs. p.

Fig. 2. Var…Wp † vs. p.

P.H. Brill, M. Hlynka / European Journal of Operational Research 126 (2000) 587±602

595

Fig. 3. Skewness…Wp † vs. p.

Fig. 4. Kurtosis…Wp † vs. p.

Figs. 1±4 show the mean, variance, skewness and kurtosis of Wp as a function of p for the parameter values of Table 1. The ®gures were obtained using the LST results of Section 3. Denote the c.d.f.s of the wait in the Fair Case by FA …t† and in the standard FCFS M=M=3 case by FM=M=3 …t†. In Fig. 5, FA …t† > FM=M=3 …t† for t 6 0:558, after which FM=M=3 …t† > FA …t†. In Fig. 6, FA …t† ÿ FM=M=3 …t† is plotted, using (7).

596

P.H. Brill, M. Hlynka / European Journal of Operational Research 126 (2000) 587±602

Fig. 5. C.D.F.s for fair case and M=M=3.

Fig. 6. Plot of FA …t† ÿ FM=M=3 …t†.

Next we examine the e€ect of a di€erent number of servers c on Wp . To illustrate, take p ˆ 0:7, k ˆ 0:4, l ˆ 1, and c ˆ 1; 2; 3; 5, where p applies until Cp starts service. In Fig. 7, the lowest c.d.f. corresponds to c ˆ 1. The c ˆ 5 c.d.f. is very close to a horizontal line at 1. Fig. 7 illustrates that if c1 < c2 , then Fpc1 …t† < Fpc2 …t†, t P 0, 0 6 p 6 1. The plots were obtained using (7). Table 2 summarizes the means and variances of Wp for the same parameter values as in Table 1, for di€erent types of p described below. Type 1 and 2 results (Table 1) are repeated in Table 2 for comparison. Type 1: p ˆ 1. Type 2: The fair case.

P.H. Brill, M. Hlynka / European Journal of Operational Research 126 (2000) 587±602

597

Fig. 7. C.D.F.s for c ˆ 1; 2; 3; 5.

Table 2 Mean and variance of Wp Mean Var.

Aggressive p ˆ 1

Fair case

p depends on number of steps

p depends jointly on k; j

0.03651 0.00840

0.07823 0.05484

0.04872 0.01446

0.09076 0.08757

Here p ˆ 1=…number of customers waiting† ˆ 1=…j ‡ 1†, where j ˆ 1; 2; . . . is the number of customers waiting (including Cp ) when a server becomes free. Thus Wp ˆ WSRO , the waiting time when service is in random order. The LST can be obtained from [20]. Type 3: p depends on the number of steps. An example is p ˆ k=…k ‡ 1† …k ˆ 1; 2; . . .†, where k is the number of steps (arrivals or service completions) while Cp is waiting. Since p is increasing with k, it might model Cp 's increasing aggressiveness to obtain service, caused by the observation of other service admissions and arrivals. If Cp is waiting alone at a service completion, then Cp starts service. Type 4: p depends jointly on the number of steps and the number of customers waiting. An example is  pˆ

k k‡1



1 j‡1

 …k ˆ 1; 2; . . . ; j ˆ 1; 2; . . .†:

Since p is less than those in Types 2 and 3, the expected wait should be longer, as seen in Table 2. The last three columns of Table 2 were computed using the algorithm of Section 4. The Fair Case results check with known values for service in random order.

598

P.H. Brill, M. Hlynka / European Journal of Operational Research 126 (2000) 587±602

6. E€ect of cp on waiting time of regular customers Assume the queue discipline is FCFS for all regular customers, not including Cp . This section assumes that p is ®xed until Cp starts service. Denote by fCB g the set of customers which are waiting just before Cp arrives (B). Denote by fCA g those customers which arrive after Cp has arrived and before Cp enters service (A). If there were no special customer Cp , the expected waiting time for any customer is the known expression WQ ˆ

…k=l†c …c ÿ 1†!…cl ÿ k†

2

p0 :

E…Wp †; 0 6 p 6 1, is obtainable from Sections 2, 3 or 4. Note that fCB g; fCA g will be empty if Cp does not wait. De®ne Dp ˆ WQ ÿ E…Wp † ˆ E …decrease in waiting time of Cp †; DB ˆ E …aggregate decrease in waiting time of fCB g†; DA ˆ E …aggregate decrease in waiting time of fCA g†: Note that Dp can be positive, zero, or negative, and depends on the value of p. A positive valued Dp indicates that E…Wp † < WQ . A negative value indicates that E…Wp † > WQ . Conservation Law: Dp ‡ DB ‡ DA ˆ 0:

…24†

Explanation: This conservation law is valid because the total expected wait of all customers in the system does not change. So any positive decrease in expected wait of one set of customers must be o€set by a negative decrease among the other sets of customers. We have c

Dp ˆ

…k=l† l …c ÿ 1†!…cl ÿ k†2

p0 ÿ E…Wp †

for 0 6 p 6 1;

…25†

where E…Wp † is given in (22) and (15). Next we compute DB . If Wp ˆ 0, then DB ˆ 0, since fCB g is the empty set. If Wp > 0, condition on the number of customers in fCB g. Let ˆ E …aggregate decrease in waiting time of fCB gjj ÿ 1 in set fCB g†: Djÿ1 B Then, by the mechanism whereby Cp starts service, for j P 1, 0 < p < 1, ˆ Djÿ1 B

i ÿ1 h jÿ2 …j ÿ 1†p ‡ …j ÿ 2†…1 ÿ p†p ‡    ‡ …1 ÿ p† p : cl

…26†

P.H. Brill, M. Hlynka / European Journal of Operational Research 126 (2000) 587±602

599

Unconditioning for p > 0 yields DB ˆ

1 X jˆ1

ˆ

Djÿ1 B pc‡jÿ1

j 1  ÿp X j 1 …1 ÿ p† ÿ 2‡ pc‡jÿ1 p2 cl jˆ1 p p

" # 1 1 ÿ1 X pW 1 X j ‡ ˆ ‰…j ÿ 1† ‡ 1Špc‡jÿ1 ÿ …1 ÿ p† pc‡jÿ1 cl jˆ1 p jˆ1 p " # 1 ÿ1 pW 1 X j ‡ …LQ ‡ pW † ÿ …1 ÿ p† pc‡jÿ1 ; ˆ p cl p jˆ1 DB ˆ

    c ÿ1 1 1 …qc† …1 ÿ p†q LQ ‡ 1 ÿ pW ‡ ; cl p p c! 1 ÿ …1 ÿ p†q

0 < p 6 1:

0 < p 6 1;

…27†

…28†

where LQ ˆ E…number of customers waiting† ˆ kE…WQ †, by Little's formula. Since we have expressions for Dp and DB , we can compute DA from the Conservation Law (24). We next discuss three cases: p ˆ 0, p ˆ 1, and 0 < p < 1. Case p ˆ 0. D0 ˆ WQ ÿ E…W0 † c

ˆ

ˆ

…k=l† l …c ÿ 1†!…cl ÿ k†

2

…k=l†c l

p0 ÿ

pW cl…1 ÿ q†

p ÿ 2 0

2

2

…k=l†2

c!…1 ÿ q†…1 ÿ q† …c ÿ 1†!…cl† …1 ÿ q†   c …k=l† 1 ˆ 1 ÿ p0 1ÿq c!…cl†…1 ÿ q†2 ˆ

D0 ˆ

…k=l†



c

c!…cl†…1 ÿ q† ÿ…k=l†c q c!…cl†…1 ÿ q†

3

2

p0 :

2

…cl†p0

 ÿq p0 : 1ÿq …29†

P1 From (26), DB ˆ jˆ1 Djÿ1 B pc‡jÿ1 ˆ 0. Hence DA ˆ ÿD0 > 0, from (24). When p ˆ 0, customers fCB g which are waiting when C0 arrives, have no change in their expected waiting times. Customers fCA g which arrive while C0 is waiting have a positive decrease in their expected waiting times, by the amount given in (29). The expected decrease in waiting time for each arrival during C0 's wait is 1=cl.

600

P.H. Brill, M. Hlynka / European Journal of Operational Research 126 (2000) 587±602

Case p ˆ 1. D1 ˆ WQ ÿ E…W1 † ˆ WQ ÿ …k=l†c l

ˆ

pW cl p0 ÿ

2

…k=l†c 2

c!…cl† …1 ÿ q†cl …c ÿ 1†!…cl† …1 ÿ q†   c …k=l† 1 ˆ ÿ 1 p0 : c!cl…1 ÿ q† 1 ÿ q c

D1 ˆ

…k=l† q c!cl…1 ÿ q†

2

p0 ˆ

LQ : cl

p0

…30†

Clearly DA ˆ 0 in the case p ˆ 1. Thus DB ˆ ÿD1 < 0. Note that the expression D1 ˆ LQ =cl is intuitively reasonable. Also substitution of p ˆ 1 into (28) results in DB ˆ ÿLQ =cl: The customers fCB g waiting when C1 arrives have a negative decrease (i.e. an increase) in their expected waiting time. Each customer in fCB g has an increase of 1=cl in expected waiting time. Case 0 < p < 1. Dp ˆ WQ ÿ E…Wp †, DB is given by (28), and DA is obtained using (24). In this case DB < 0 so that customers in fCB g have an aggregate negative decrease in expected wait. Thus their expected wait is longer, as a group. Individually their increase in expected wait depends on their position in line when Cp arrives. On the other hand, DA > 0, so that customers fCA g which arrive while Cp is waiting have a positive decrease as a group. 7. Examples: Scheduling special jobs Example 1. Consider a dynamic scheduling system where regular jobs are processed as an M=M=c queue [5]. Assume that k P 2 special jobs arrive at a time point s0 and are scheduled according to the continuous priority p-policy of Section 2, in competition with each other and with the regular jobs. Denote the k jobs by Cp1 ; . . . ; Cpk . Assume that they are predetermined to be processed in that order. Each special job will compete against regular jobs for service, using its own p value. The ordering among the k special jobs may be determined by consensus. A probabilistic ordering method makes a lottery among Cpi …i ˆ 1; . . . ; k†, and selects the ®rst job with probability pi Pk

iˆ1

pi

;

i ˆ 1; . . . ; k:

This lottery is repeated until all the jobs are ranked. We may assume without loss of generality that Cp1 must wait a positive time. Cp1 starts competing at time point s0 ˆ 0. The waiting time of Cp1 will be Wp1 with conditional c.d.f. given by Hp1 …t† ˆ

Fp1 …t† ÿ 1 ‡ pW ; pW

where Fp1 …t† is given by (7).

t > 0;

…31†

P.H. Brill, M. Hlynka / European Journal of Operational Research 126 (2000) 587±602

601

Let ni denote the number Pmof steps special customer i waits while competing in the waiting room, i ˆ 1; . . . ; k. Then Cpm waits iˆ1 ni steps before starting service. Let pm ˆ …p1 ; . . . ; pm †, m ˆ 1; . . . ; k. The joint probability that Cpi waits ni steps, i ˆ 1; . . . ; m, while competing in the waiting room is Qpm …n1 ; . . . ; nm † ˆ

1 X

j‡n 1 ÿ1 X

jˆ1 i1 ˆmax…jÿn1 ‡1;1†



imÿ1X ‡nm ÿ1 im ˆmax…imÿ1 ÿnm ‡1;1†

im qinmÿ1 …pm †    qjin11 …p1 †pc‡jÿ1 ; m

where q …† is given by (4) and (2). We obtain for t > 0, the c.d.f. of the waiting time of Cpm …m ˆ 1; . . . ; k† as Z t X ……k ‡ cl†x†nÿ1 …k ‡ cl†eÿ…k‡cl†x dx: Qpm …n1 ; . . . ; nm † Hm …t† ˆ …n ÿ 1†! 0 n1 ‡‡nm ˆn

…32†

…33†

nPm

Example 2. Consider a stochastic scheduling problem, where regular jobs are processed as an M=M=c queue. A single special order job Cp arrives having a due date t after its arrival, and is scheduled using the p-policy of Section 2. The probability that Cp will be tardy is 1 ÿ Fp …t †, where Fp is given by (7). Suppose management speci®es that the probability of Cp being tardy should be at most  > 0: Assume that cost increases with the value of p. The optimization problem is Minimize s:t:

p 1 ÿ Fp …t † 6 ; 0 6 p 6 1:

…34†

Problem (34) has a feasible solution provided 1 ÿ F1 …t † 6 , and it can be solved using formula (7) or the computational algorithm (Section 4), together with a bisection method. Related problems occur when Cp represents a perishable item with a limited shelf life, donated blood, medications with expiry dates, and so forth. Acknowledgements We thank the anonymous referees for their helpful suggestions. One of the referees suggested deriving the LST in Section 3. Both authors are supported by grants from the Natural Sciences and Engineering Research Council of Canada (NSERC). References [1] R.D. Alexander, Aggressiveness, territoriality, and sexual behavior in ®eld crickets (orthoptera: gryllidae), Behavior 17 (1961) 130±223. [2] K. Basu, S. Bhattacharya, A. Mishra, Notes on bribery and the control of corruption, Journal of Public Economics 48 (3) (1992) 349±359. [3] P.H. Brill, M. Hlynka, A single server n-line queue in which one customer may receive special treatment, Stochastic Models 14 (4) (1998) 905±931. [4] J.W. Cohen, The Single Server Queue, North-Holland, Amsterdam, 1982. [5] R.W. Conway, W.L. Maxwell, L.W. Miller, Theory of Scheduling, Addison-Wesley, Reading, MA, 1967. [6] R.B. Cooper, Introduction to Queueing Theory, second, North-Holland, Amsterdam, 1981. [7] W. Feller, An Introduction to Probability Theory and its Applications, third edition, vol. 1, Wiley, New York, 1968.

602

P.H. Brill, M. Hlynka / European Journal of Operational Research 126 (2000) 587±602

[8] E.S. Gordon, New problems in queues: Social injustice and server production management, Ph.D. dissertation, Massachusetts Institute of Technology, Cambridge, MA, 1987. [9] D. Gross, C.M. Harris, Fundamentals of Queueing Theory, second, Wiley, New York, 1998. [10] M.A. Hack, Assessment strategies in the contest of male crickets Acheta domesticus (L.), Animal Behavior 53 (1997) 735±747. [11] M. Hlynka, D.A. Stanford, W.H. Poon, T. Wang, Observing queues before joining, Operations Research 42 (1994) 365±371. [12] N.L. Johnson, S. Kotz, Discrete Distributions, Houghton Mi‚in, Boston, MA, 1969. [13] L. Kleinrock, Queueing Systems, vol. 1, Wiley, New York, 1975. [14] R. Larson, Beyond the Physics of Queueing, Plenary Address, CORS/INFORMS Conference, Montreal, 27 April 1998. [15] R. Larson, Perspectives on queues: Social justice and the psychology of queueing, Operations Research 35 (1987) 895±905. [16] F.T. Lui, An equilibrium queuing model of bribery, Journal of Political Economy 93 (1985) 760±781. [17] M.F. Neuts, Algorithmic Probability, Chapman & Hall, London, 1995. [18] J.M. Smith, The theory of games and its relation to animal con¯ict, Journal of Theoretical Biology 47 (1974) 209±221. [19] D.A. Stanford, M. Hlynka, Observing general service queues before joining, Operations Research Letters 18 (1996) 237±245. [20] L. Takacs, Delay distributions for one line with Poisson input, general holding times, and various orders of service, Bell Systems Technical Journal 42 (1963) 487±504.