image (8.27)

Also using the fact that j=1kLm-1(j)=m-1image (why?) we obtain, from Equation (8.26), the following:

m-1=λm-1j=1kπjWm-1(j)

image

or

λm-1=m-1i=1kπiWm-1(i) (8.28)

image (8.28)

Hence, from Equation (8.27), we obtain the recursion

Wm(j)=1μj+(m-1)πjWm-1(j)μji=1kπiWm-1(i) (8.29)

image (8.29)

Starting with the stationary probabilities πj,j=1,,kimage, and W1(j)=1/μjimage we can now use Equation (8.29) to determine recursively W2(j),W3(j),,Wm(j)image. We can then determine the throughput rate λmimage by using Equation (8.28), and this will determine Lm(j)image by Equation (8.26). This recursive approach is called mean value analysis.

Example 8.9

Consider a kimage-server network in which the customers move in a cyclic permutation. That is,

Pi,i+1=1,i=1,2,k-1,Pk,1=1

image

Let us determine the average number of customers at server jimage when there are two customers in the system. Now, for this network,

πi=1/k,i=1,,k

image

and as

W1(j)=1μj

image

we obtain from Equation (8.29) that

W2(j)=1μj+(1/k)(1/μj)μji=1k(1/k)(1/μi)=1μj+1μj2i=1k1/μi

image

Hence, from Equation (8.28),

λ2=2l=1k1kW2(l)=2kl=1k1μl+1μl2i=1k1/μi

image

and finally, using Equation (8.26),

L2(j)=λ21kW2(j)=21μj+1μj2i=1k1/μil=1k1μl+1μl2i=1k1/μi

image

Another approach to learning about the stationary probabilities specified by Equation (8.22), which finesses the computational difficulties of computing the constant Cmimage, is to use the Gibbs sampler of Section 4.9 to generate a Markov chain having these stationary probabilities. To begin, note that since there are always a total of mimage customers in the system, Equation (8.22) may equivalently be written as a joint mass function of the numbers of customers at each of the servers 1,,k-1image, as follows:

Pm(n1,,nk-1)=Cm(πk/μk)m-njj=1k-1(πj/μj)nj=Kj=1k-1(aj)nj,j=1k-1njm

image

where aj=(πjμk)/(πkμj),j=1,,k-1image. Now, if N=(N1,,Nk-1)image has the preceding joint mass function then

P{Ni=nN1=n1,,Ni-1=ni-1,Ni+1=ni+1,,Nk-1=nk-1}=Pm(n1,,ni-1,n,ni+1,,nk-1)rPm(n1,,ni-1,r,ni+1,,nk-1)=Cain,nm-jinj

image

It follows from the preceding that we may use the Gibbs sampler to generate the values of a Markov chain whose limiting probability mass function is Pm(n1,,nk-1)image as follows:

1. Let (n1,,nk-1)image be arbitrary nonnegative integers satisfying j=1k-1njmimage.

2. Generate a random variable Iimage that is equally likely to be any of 1,,k-1image.

3. If I=iimage, set s=m-jinjimage, and generate the value of a random variable Ximage having probability mass function

P{X=n}=Cain,n=0,,s

image

4. Let nI=Ximage and go to step 2.

The successive values of the state vector (n1,,nk-1,m-j=1k-1nj)image constitute the sequence of states of a Markov chain with the limiting distribution Pmimage. All quantities of interest can be estimated from this sequence. For instance, the average of the values of the jimageth coordinate of these vectors will converge to the mean number of individuals at station jimage, the proportion of vectors whose jimageth coordinate is less than rimage will converge to the limiting probability that the number of individuals at station jimage is less than rimage, and so on.

Other quantities of interest can also be obtained from the simulation. For instance, suppose we want to estimate Wjimage, the average amount of time a customer spends at server jimage on each visit. Then, as noted in the preceding, Ljimage, the average number of customers at server jimage, can be estimated. To estimate Wjimage, we use the identity

Lj=λjWj

image

where λjimage is the rate at which customers arrive at server jimage. Setting λjimage equal to the service completion rate at server jimage shows that

λj=P{jis busy}μj

image

Using the Gibbs sampler simulation to estimate P{jis busy}image then leads to an estimator of Wjimage.

8.5 The System M/G/1image

8.5.1 Preliminaries: Work and Another Cost Identity

For an arbitrary queueing system, let us define the work in the system at any time timage to be the sum of the remaining service times of all customers in the system at time timage. For instance, suppose there are three customers in the system—the one in service having been there for three of his required five units of service time, and both people in queue having service times of six units. Then the work at that time is 2+6+6=14image. Let Vimage denote the (time) average work in the system.

Now recall the fundamental cost Equation (8.1), which states that the

average rate at which the system earns=λa×average amount a customer pays

image

and consider the following cost rule: Each customer pays at a rate of y/unit time when his remaining service time is y, whether he is in queue or in service. Thus, the rate at which the system earns is just the work in the system; so the basic identity yields

V=λaE[amount paid by a customer]

image

Now, let Simage and WQimage denote respectively the service time and the time a given customer spends waiting in queue. Then, since the customer pays at a constant rate of Simage per unit time while he waits in queue and at a rate of S-ximage after spending an amount of time ximage in service, we have

E[amount paid by a customer]=ESWQ+0S(S-x)dx

image

and thus

V=λaE[SWQ]+λaE[S2]2 (8.30)

image (8.30)

It should be noted that the preceding is a basic queueing identity (like Equations (8.2)(8.4)) and as such is valid in almost all models. In addition, if a customer’s service time is independent of his wait in queue (as is usually, but not always the case), then we have from Equation (8.30) that

V=λaE[S]WQ+λaE[S2]2 (8.31)

image (8.31)

8.5.2 Application of Work to M/G/1

The M/G/1image model assumes (i) Poisson arrivals at rate λimage; (ii) a general service distribution; and (iii) a single server. In addition, we will suppose that customers are served in the order of their arrival.

Now, for an arbitrary customer in an M/G/1image system,

customer’s wait in queue=work in the system when he arrives (8.32)

image (8.32)

This follows since there is only a single server (think about it!). Taking expectations of both sides of Equation (8.32) yields

WQ=average work as seen by an arrival

image

But, due to Poisson arrivals, the average work as seen by an arrival will equal Vimage, the time average work in the system. Hence, for the model M/G/1image,

WQ=V

image

The preceding in conjunction with the identity

V=λE[S]WQ+λE[S2]2

image

yields the so-called Pollaczek–Khintchine formula,

WQ=λE[S2]2(1-λE[S]) (8.33)

image (8.33)

where E[S]image and E[S2]image are the first two moments of the service distribution.

The quantities L,LQimage, and Wimage can be obtained from Equation (8.33) as

LQ=λWQ=λ2E[S2]2(1-λE[S]),W=WQ+E[S]=λE[S2]2(1-λE[S])+E[S],L=λW=λ2E[S2]2(1-λE[S])+λE[S] (8.34)

image (8.34)

8.5.3 Busy Periods

The system alternates between idle periods (when there are no customers in the system, and so the server is idle) and busy periods (when there is at least one customer in the system, and so the server is busy).

Let Iimage and Bimage represent, respectively, the length of an idle and of a busy period. Because Iimage represents the time from when a customer departs and leaves the system empty until the next arrival, it follows, since arrivals are according to a Poisson process with rate λimage, that Iimage is exponential with rate λimage and thus

E[I]=1λ (8.35)

image (8.35)

To determine E[B]image we argue, as in Section 8.3.3, that the long-run proportion of time the system is empty is equal to the ratio of E[I]image to E[I]+E[B]image. That is,

P0=E[I]E[I]+E[B] (8.36)

image (8.36)

To compute P0image, we note from Equation (8.4) (obtained from the fundamental cost equation by supposing that a customer pays at a rate of one per unit time while in service) that

average number of busy servers=λE[S]

image

However, as the left-hand side of the preceding equals 1-P0image (why?), we have

P0=1-λE[S] (8.37)

image (8.37)

and, from Equations (8.35)(8.37),

1-λE[S]=1/λ1/λ+E[B]

image

or

E[B]=E[S]1-λE[S]

image

Another quantity of interest is Cimage, the number of customers served in a busy period. The mean of Cimage can be computed by noting that, on the average, for every E[C]image arrivals exactly one will find the system empty (namely, the first customer in the busy period). Hence,

a0=1E[C]

image

and, as a0=P0=1-λE[S]image because of Poisson arrivals, we see that

E[C]=11-λE[S]

image

8.6 Variations on the M/G/1image

8.6.1 The M/G/1 with Random-Sized Batch Arrivals

Suppose that, as in the M/G/1image, arrivals occur in accordance with a Poisson process having rate λimage. But now suppose that each arrival consists not of a single customer but of a random number of customers. As before there is a single server whose service times have distribution Gimage.

Let us denote by αj,j1image, the probability that an arbitrary batch consists of jimage customers; and let Nimage denote a random variable representing the size of a batch and so P{N=j}=αjimage. Since λa=λE(N)image, the basic formula for work (Equation (8.31)) becomes

V=λE[N]E(S)WQ+E(S2)2 (8.38)

image (8.38)

To obtain a second equation relating Vimage to WQimage, consider an average customer. We have that

his wait in queue=work in system when he arrives+his waiting time due to those in his batch

image

Taking expectations and using the fact that Poisson arrivals see time averages yields

WQ=V+E[waiting time due to those in his batch]=V+E[WB] (8.39)

image (8.39)

Now, E(WB)image can be computed by conditioning on the number in the batch, but we must be careful because the probability that our average customer comes from a batch of size jimage is not αjimage. For αjimage is the proportion of batches that are of size jimage, and if we pick a customer at random, it is more likely that he comes from a larger rather than a smaller batch. (For instance, suppose α1=α100=12image, then half the batches are of size 1 but 100/101image of the customers will come from a batch of size 100!)

To determine the probability that our average customer came from a batch of size jimage we reason as follows: Let Mimage be a large number. Then of the first Mimage batches approximately Mαjimage will be of size j,j1image, and thus there would have been approximately jMαjimage customers that arrived in a batch of size jimage. Hence, the proportion of arrivals in the first Mimage batches that were from batches of size jimage is approximately jMαj/jjMαjimage. This proportion becomes exact as Mimage, and so we see that

proportion of customers from batches of sizej=jαjjjαj=jαjE[N]

image

We are now ready to compute E(WB)image, the expected wait in queue due to others in the batch:

E[WB]=jE[WBbatch of sizej]jαjE[N] (8.40)

image (8.40)

Now if there are jimage customers in his batch, then our customer would have to wait for i-1image of them to be served if he was iimageth in line among his batch members. As he is equally likely to be either 1st, 2nd, image , or jimageth in line we see that

E[WBbatch is of sizej]=i=1j(i-1)E(S)1j=j-12E[S]

image

Substituting this in Equation (8.40) yields

E[WB]=E[S]2E[N]j(j-1)jαj=E[S](E[N2]-E[N])2E[N]

image

and from Equations (8.38) and (8.39) we obtain

WQ=E[S](E[N2]-E[N])/2E[N]+λE[N]E[S2]/21-λE[N]E[S]

image

8.6.2 Priority Queues

Priority queueing systems are ones in which customers are classified into types and then given service priority according to their type. Consider the situation where there are two types of customers, which arrive according to independent Poisson processes with respective rates λ1image and λ2image, and have service distributions G1image and G2image. We suppose that type 1 customers are given service priority, in that service will never begin on a type 2 customer if a type 1 is waiting. However, if a type 2 is being served and a type 1 arrives, we assume that the service of the type 2 is continued until completion. That is, there is no preemption once service has begun.

Let WQiimage denote the average wait in queue of a type iimage customer, i=1,2image. Our objective is to compute the WQiimage.

First, note that the total work in the system at any time would be exactly the same no matter what priority rule was employed (as long as the server is always busy whenever there are customers in the system). This is so since the work will always decrease at a rate of one per unit time when the server is busy (no matter who is in service) and will always jump by the service time of an arrival. Hence, the work in the system is exactly as it would be if there was no priority rule but rather a first-come, first-served (called FIFO) ordering. However, under FIFO the preceding model is just M/G/1image with

λ=λ1+λ2,G(x)=λ1λG1(x)+λ2λG2(x) (8.41)

image (8.41)

which follows since the combination of two independent Poisson processes is itself a Poisson process whose rate is the sum of the rates of the component processes. The service distribution Gimage can be obtained by conditioning on which priority class the arrival is from—as is done in Equation (8.41).

Hence, from the results of Section 8.5, it follows that Vimage, the average work in the priority queueing system, is given by

V=λE[S2]2(1-λE[S])=λ((λ1/λ)E[S12]+(λ2/λ)E[S22])2[1-λ((λ1/λ)E[S1]+(λ2/λ)E[S2])]=λ1E[S12]+λ2E[S22]2(1-λ1E[S1]-λ2E[S2]) (8.42)

image (8.42)

where Siimage has distribution Gi,i=1image, 2.

Continuing in our quest for WQiimage let us note that Simage and WQimage, the service and wait in queue of an arbitrary customer, are not independent in the priority model since knowledge about Simage gives us information as to the type of customer, which in turn gives us information about WQimage. To get around this we will compute separately the average amount of type 1 and type 2 work in the system. Denoting Viimage as the average amount of type iimage work we have, exactly as in Section 8.5.1,

Vi=λiE[Si]WQi+λiE[Si2]2,i=1,2 (8.43)

image (8.43)

If we define

VQiλiE[Si]WQi,VSiλiE[Si2]2

image

then we may interpret VQiimage as the average amount of type iimage work in queue, and VSiimage as the average amount of type iimage work in service (why?).

Now we are ready to compute WQ1image. To do so, consider an arbitrary type 1 arrival. Then

his delay=amount of type 1 work in the system when he arrives+amounts of type 2 work in service when he arrives

image

Taking expectations and using the fact that Poisson arrivals see time average yields

WQ1=V1+VS2=λ1E[S1]WQ1+λ1E[S12]2+λ2E[S22]2 (8.44)

image (8.44)

or

WQ1=λ1E[S12]+λ2E[S22]2(1-λ1E[S1]) (8.45)

image (8.45)

To obtain WQ2image we first note that since V=V1+V2image, we have from Equations (8.42) and (8.43) that

λ1E[S12]+λ2E[S22]2(1-λ1E[S1]-λ2E[S2])=λ1E[S1]WQ1+λ2E[S2]WQ2+λ1E[S12]2+λ2E[S22]2=WQ1+λ2E[S2]WQ2from Equation(8.44)

image

Now, using Equation (8.45), we obtain

λ2E[S2]WQ2=λ1E[S12]+λ2E[S22]211-λ1E[S1]-λ2E[S2]-11-λ1E[S1]

image

or

WQ2=λ1E[S12]+λ2E[S22]2(1-λ1E[S1]-λ2E[S2])(1-λ1E[S1]) (8.46)

image (8.46)

Remarks

(i) Note that from Equation (8.45), the condition for WQ1image to be finite is that λ1E[S1]<1image, which is independent of the type 2 parameters. (Is this intuitive?) For WQ2image to be finite, we need, from Equation (8.46), that

λ1E[S1]+λ2E[S2]<1

image

Since the arrival rate of all customers is λ=λ1+λ2image, and the average service time of a customer is (λ1/λ)E[S1]+(λ2/λ)E[S2]image, the preceding condition is just that the average arrival rate be less than the average service rate.

(ii) If there are nimage types of customers, we can solve for Vj,j=1,,nimage, in a similar fashion. First, note that the total amount of work in the system of customers of types 1,,jimage is independent of the internal priority rule concerning types 1,,jimage and only depends on the fact that each of them is given priority over any customers of types j+1,,nimage. (Why is this? Reason it out!) Hence, V1++Vjimage is the same as it would be if types 1,,jimage were considered as a single type I priority class and types j+1,,nimage as a single type II priority class. Now, from Equations (8.43) and (8.45),

VI=λIE[SI2]+λIλIIE[SI]E[SII2]2(1-λIE[SI])

image

where

λI=λ1++λj,λII=λj+1++λn,E[SI]=i=1jλiλIE[Si],E[SI2]=i=1jλiλIE[Si2],E[SII2]=i=j+1nλiλIIE[Si2]

image

Hence, as VI=V1++Vjimage, we have an expression for V1++Vjimage, for each j=1,,nimage, which then can be solved for the individual V1,V2,,Vnimage. We now can obtain WQiimage from Equation (8.43). The result of all this (which we leave for an exercise) is that

WQi=λ1E[S12]++λnE[Sn2]2j=i-1i(1-λ1E[S1]--λjE[Sj]),i=1,,n (8.47)

image (8.47)

8.6.3 An M/G/1 Optimization Example

Consider a single-server system where customers arrive according to a Poisson process with rate λimage, and where the service times are independent and have distribution function Gimage. Let ρ=λE[S]image, where Simage represents a service time random variable, and suppose that ρ<1image. Suppose that the server departs whenever a busy period ends and does not return until there are nimage customers waiting. At that time the server returns and continues serving until the system is once again empty. If the system facility incurs costs at a rate of cimage per unit time per customer in the system, as well as a cost Kimage each time the server returns, what value of n,n1image, minimizes the long-run average cost per unit time incurred by the facility, and what is this minimal cost?

To answer the preceding, let us first determine A(n)image, the average cost per unit time for the policy that returns the server whenever there are nimage customers waiting. To do so, say that a new cycle begins each time the server returns. As it is easy to see that everything probabilistically starts over when a cycle begins, it follows from the theory of renewal reward processes that if C(n)image is the cost incurred in a cycle and T(n)image is the time of a cycle, then

A(n)=E[C(n)]E[T(n)]

image

To determine E[C(n)]image and E[T(n)]image, consider the time interval of length, say, Tiimage, starting from the first time during a cycle that there are a total of iimage customers in the system until the first time afterward that there are only i-1image. Therefore, i=1nTiimage is the amount of time that the server is busy during a cycle. Adding the additional mean idle time until nimage customers are in the system gives

E[T(n)]=i=1nE[Ti]+n/λ

image

Now, consider the system at the moment when a service is about to begin and there are i-1image customers waiting in queue. Since service times do not depend on the order in which customers are served, suppose that the order of service is last come first served, implying that service does not begin on the i-1image presently in queue until these i-1image are the only ones in the system. Thus, we see that the time that it takes to go from iimage customers in the system to i-1image has the same distribution as the time it takes the M/G/1image system to go from a single customer (just beginning service) to empty; that is, its distribution is that of Bimage, the length of an M/G/1image busy period. (Essentially the same argument was made in Example 5.25.) Hence,

E[Ti]=E[B]=E[S]1-ρ

image

implying that

E[T(n)]=nE[S]1-λE[S]+nλ=nλ(1-ρ) (8.48)

image (8.48)

To determine E[C(n)]image, let Ciimage denote the cost incurred during the interval of length Tiimage that starts with i-1image in queue and a service just beginning and ends when the i-1image in queue are the only customers in the system. Thus, K+i=1nCiimage represents the total cost incurred during the busy part of the cycle. In addition, during the idle part of the cycle there will be iimage customers in the system for an exponential time with rate λ,i=1,,n-1image, resulting in an expected cost of c(1++n-1)/λimage. Consequently,

E[C(n)]=K+i=1nE[Ci]+n(n-1)c2λ (8.49)

image (8.49)

To find E[Ci]image, consider the moment when the interval of length Tiimage begins, and let Wiimage be the sum of the initial service time plus the sum of the times spent in the system by all the customers that arrive (and are served) until the moment when the interval ends and there are only i-1image customers in the system. Then,

Ci=(i-1)cTi+cWi

image

where the first term refers to the cost incurred due to the i-1image customers in queue during the interval of length Tiimage. As it is easy to see that Wiimage has the same distribution as Wbimage, the sum of the times spent in the system by all arrivals in an M/G/1image busy period, we obtain

E[Ci]=(i-1)cE[S]1-ρ+cE[Wb] (8.50)

image (8.50)

Using Equation (8.49), this yields

E[C(n)]=K+n(n-1)cE[S]2(1-ρ)+ncE[Wb]+n(n-1)c2λ=K+ncE[Wb]+n(n-1)c2λρ1-ρ+1=K+ncE[Wb]+n(n-1)c2λ(1-ρ)

image

Utilizing the preceding in conjunction with Equation (8.48) shows that

A(n)=Kλ(1-ρ)n+λc(1-ρ)E[Wb]+c(n-1)2 (8.51)

image (8.51)

To determine E[Wb]image, we use the result that the average amount of time spent in the system by a customer in the M/G/1image system is

W=WQ+E[S]=λE[S2]2(1-ρ)+E[S]

image

However, if we imagine that on day j,j1image, we earn an amount equal to the total time spent in the system by the jimageth arrival at the M/G/1image system, then it follows from renewal reward processes (since everything probabilistically restarts at the end of a busy period) that

W=E[Wb]E[N]

image

where Nimage is the number of customers served in an M/G/1image busy period. Since E[N]=1/(1-ρ)image we see that

(1-ρ)E[Wb]=W=λE[S2]2(1-ρ)+E[S]

image

Therefore, using Equation (8.51), we obtain

A(n)=Kλ(1-ρ)n+cλ2E[S2]2(1-ρ)+cρ+c(n-1)2

image

To determine the optimal value of nimage, treat nimage as a continuous variable and differentiate the preceding to obtain

A(n)=-Kλ(1-ρ)n2+c2

image

Setting this equal to 0 and solving yields that the optimal value of nimage is

n=2Kλ(1-ρ)c

image

and the minimal average cost per unit time is

A(n)=2λK(1-ρ)c+cλ2E[S2]2(1-ρ)+cρ-c2

image

It is interesting to see how close we can come to the minimal average cost when we use a simpler policy of the following form: Whenever the server finds the system empty of customers she departs and then returns after a fixed time timage has elapsed. Let us say that a new cycle begins each time the server departs. Both the expected costs incurred during the idle and the busy parts of a cycle are obtained by conditioning on N(t)image, the number of arrivals in the time timage that the server is gone. With C¯(t)image being the cost incurred during a cycle, we obtain

E[C¯(t)N(t)]=K+i=1N(t)E[Ci]+cN(t)t2=K+N(t)(N(t)-1)cE[S]2(1-ρ)+N(t)cE[Wb]+cN(t)t2

image

The final term of the first equality is the conditional expected cost during the idle time in the cycle and is obtained by using that, given the number of arrivals in the time timage, the arrival times are independent and uniformly distributed on (0,t)image; the second equality used Equation (8.50). Since N(t)image is Poisson with mean λtimage, it follows that E[N(t)(N(t)-1)]=E[N2(t)]-E[N(t)]=λ2t2image. Thus, taking the expected value of the preceding gives

E[C¯(t)]=K+λ2t2cE[S]2(1-ρ)+λtcE[Wb]+cλt22=K+cλt22(1-ρ)+λtcE[Wb]

image

Similarly, if T¯(t)image is the time of a cycle, then

E[T¯(t)]=E[E[T¯(t)N(t)]]=E[t+N(t)E[B]]=t+ρt1-ρ=t1-ρ

image

Hence, the average cost per unit time, call it A¯(t)image, is

A¯(t)=E[C¯(t)]E[T¯(t)]=K(1-ρ)t+cλt2+cλ(1-ρ)E[Wb]

image

Thus, from Equation (8.51), we see that

A¯(n/λ)-A(n)=c/2

image

which shows that allowing the return decision to depend on the number presently in the system can reduce the average cost only by the amount c/2image. ■

8.6.4 The M/G/1 Queue with Server Breakdown

Consider a single server queue in which customers arrive according to a Poisson process with rate λimage, and where the amount of service time required by each customer has distribution Gimage. Suppose, however, that when working the server breaks down at an exponential rate αimage. That is, the probability a working server will be able to work for an additional time timage without breaking down is e-αtimage. When the server breaks down, it immediately goes to the repair facility. The repair time is a random variable with distribution Himage. Suppose that the customer in service when a breakdown occurs has its service continue, when the sever returns, from the point it was at when the breakdown occurred. (Therefore, the total amount of time a customer is actually receiving service from a working server has distribution Gimage.)

By letting a customer’s “service time” include the time that the customer is waiting for the server to come back from being repaired, the preceding is an M/G/1image queue. If we let Timage denote the amount of time from when a customer first enters service until it departs the system, then Timage is a service time random variable of this M/G/1image queue. The average amount of time a customer spends waiting in queue before its service first commences is, thus,

WQ=λE[T2]2(1-λE[T])

image

To compute E[T]image and E[T2]image, let Simage, having distribution Gimage, be the service requirement of the customer; let Nimage denote the number of times that the server breaks down while the customer is in service; let R1,R2,image be the amounts of time the server spends in the repair facility on its successive visits. Then,

T=i=1NRi+S

image

Conditioning on Simage yields

E[TS=s]=Ei=1NRiS=s+s,Var(TS=s)=Vari=1NRiS=s

image

Now, a working server always breaks down at an exponential rate αimage. Therefore, given that a customer requires simage units of service time, it follows that the number of server breakdowns while that customer is being served is a Poisson random variable with mean αsimage. Consequently, conditional on S=simage, the random variable i=1NRiimage is a compound Poisson random variable with Poisson mean αsimage. Using the results from Examples 3.10 and 3.17, we thus obtain

Ei=1NRiS=s=αsE[R],Vari=1NRiS=s=αsE[R2]

image

where Rimage has the repair distribution Himage. Therefore,

E[TS]=αSE[R]+S=S(1+αE[R]),Var(TS)=αSE[R2]

image

Thus,

E[T]=E[E[TS]]=E[S](1+αE[R])

image

and, by the conditional variance formula,

Var(T)=E[Var(TS)]+Var(E[TS])=αE[S]E[R2]+(1+αE[R])2Var(S)

image

Therefore,

E[T2]=Var(T)+(E[T])2=αE[S]E[R2]+(1+αE[R])2E[S2]

image

Consequently, assuming that λE[T]=λE[S](1+αE[R])<1image, we obtain

WQ=λαE[S]E[R2]+λ(1+αE[R])2E[S2]2(1-λE[S](1+αE[R]))

image

From the preceding, we can now obtain

LQ=λWQ,W=WQ+E[T],L=λW

image

Some other quantities we might be interested in are

(i) Pwimage, the proportion of time the server is working;

(ii) Primage, the proportion of time the server is being repaired;

(iii) PIimage, the proportion of time the server is idle.

These quantities can all be obtained by using the queueing cost identity. For instance, if we suppose that customers pay 1 per unit time while actually being served, then

average rate at which system earns=Pw,average amount a customer pays=E[S]

image

Therefore, the identity yields

Pw=λE[S]

image

To determine Primage, suppose a customer whose service is interrupted pays 1 per unit time while the server is being repaired. Then,

average rate at which system earns=Pr,average amount a customer pays=Ei=1NRi=αE[S]E[R]