• Nem Talált Eredményt

6.4 Analysis of the departure process

6.4.3 The lag-n joint transform of the departure process

[0, . . . , 0,βk, 0, . . . , 0](−S1)⊗θDk λ

=α, (196)

which is the stationary phase distribution of theMMAPat arrival instants. In (196) we utilized thatµk =βk(−Sk)1and thatα=Kk=1θDk/λ.

6.4.2 Phase transitions over the busy period of the age process

In [75] it is proven that matrixT is the minimal solution of the matrix equation T =SI+

Z

x=0eTx(−S1⊗I)eD0xdx

| {z }

Y0

K k=1

σ(k)Dk

. (197)

Theorem 4.4 in [41] also indicates that all the eigenvalues ofTlie in the open left half plane.

The integral term of the matrix equation (197) involving two matrix exponentials has a closed form solution. Theorem36(in AppendixA.2) implies thatY0is the unique solution of the following Sylvester matrix equation:

TY0+Y0D0= (S1)⊗I. (198)

MatrixY0 has an important role in the departure process analysis, that has a stochastic interpretation as well. Entry (Y0)i,j of this matrix is the probability that the age process returns to level0in phasejfor the first time, given that it left level0in phasei.

One way to computeY0 from matrixT is the solution of (198). However, matrixΨof the MFMcorresponding to the transformed age process (Section6.1) gives exactly this quantity, henceY0 =Ψ.

6.4.3 The lag-njoint transform of the departure process

In this section we derive an expression for the joint LST of the 1st and (n+1)th inter-departure time. LetTndenote thenth departure time withT0 =0and letHn = Tn−Tn1

88 analysis of the mmap[k]/ph[k]/1-fcfs qeue

denote thenth inter-departure time forn ≥ 1. Furthermore, letCndenote the type of the nth departing customer. Then fH((k,pn)∗) (s1,s2), the LSTof the joint distribution of two inter-departure times and the corresponding customer types can be defined as

fH((k,pn)∗) (s1,s2) =

Observe that the inter-departure times are

• either equal to service times (during the busy periods of the queue),

• or, if a customer arrives to an idle queue, they are equal to the service time of the customer plus the preceding idle time.

Due to this kind of relation between the busy periods and the inter-departure times we intro-duce several busy period related quantities before providing the solution for (199).

Denote Ii = [I 0 . . . 0]andJi = [0 . . . 0 I]T such that they have sizeNA×i·NAand i·NA×NA, respectively. Further, letJi,j = [JjT 0 . . . 0]T such that it is a sizei·NA×NA matrix.

We start by defining (Mk,i(t))j,j0, fori ≥ 1,k ∈ {1, . . . ,K}and j,j0 ∈ {1, . . . ,NA}, as the probability thaticustomers get served during a busy period that was initiated by a typek arrival, while the service time of the initial typekcustomer is at mosttand theMMAPphase equalsjat the start andj0 at the end of the busy period. LetMk,i(t)be the matrix with entry (j,j0)equal to(Mk,i(t))j,j0. LetMk,i (s)be theLSTofMk,i(t)and denoteMk,i (0) = Mk,i() asMk,i.

The following lemma gives an expression for the matricesMk,i (s). We note that the final results do note require the computation (nor the inversion) of the sizei·NA×i·NAmatrices Qidefined in this lemma.

Lemma 2. The matricesMk,i (s)can be expressed recursively as

Mk,i (s) = (σkIi)((sISk)⊕Qi)1(−Sk1⊗Ji). (200)

(For the identities of the Kronecker operations see AppendixA.1).

6.4 analysis of the departure process 89

As such it suffices to prove that Mk,i (s) =

Z

y=0 fSk(y)esyIieQiyJidy, (202) withQigiven by (201). The result fori=1is immediate as I1= I = J1,Q1 =D0and

Mk,1(t) =

Z t

y=0 fSk(y)eD0ydy,

as there should be no arrivals during the service of the typekcustomer that initiated the busy period.

To establish the general case, we assume that the order of service is preemptive (resume) last-come-first-served instead ofFCFS. Notice, the probabilities(Mk,i(t))j,j0are not affected by the order of service and therefore the expressions are also valid for theFCFSorder consid-ered in this chapter.

Assume that the typekcustomer is in service and that the first arrival that occurs during the service is of type q. Then with probability (Mq,r1)j,j0 this arrival induces its own sub-busy period during whichr1 customers are served, while the MMAPphase changes from jto j0. Hence, when the typek customer resumes service theMMAPphase equalsj0. If an-other customer arrives while the typekcustomer is served, this customer will induce another sub-busy period during whichr2customers are served, etc. Hence, when the initial type k customer gets interrupted for then-th time, theMMAPphase changes according to the ma-trix∑Kq=1DqMq,rn. In order to have exactlyicustomers served, the sum of all thernvalues should equali−1. Hence, if the service time of the initial typekcustomer equalsy, we there-fore find that(IieQiyJi)j,j0 represents the probability thaticustomers are served during the busy period initiated by the typekcustomer, while theMMAPphase equalsjat the start and j0 at the end of the busy period. This suffices to establish (202).

Define the(Zk,i(t))j,j0, fori≥1,k∈ {1, . . . ,K}andj,j0 ∈ {1, . . . ,NA}, as the probability that theith customers leaves the server idle at departure time, given that a type k arrival (called the 1st customer) initiated a busy period, the service time of customer1is at mostt and theMMAPphase equals jat the start of the busy period andj0 when theith customer leaves. Note, theith customer marks the end of a busy period, but not necessarily the one initiated by customer1(unlessi = 1). LetZk,i(t)be the matrix with entry(j,j0)equal to (Zk,i(t))j,j0. LetZk,i(s)be theLSTofZk,i(t)and denoteZk,i(0) =Zk,i()asZk,i.

Lemma 3. TheNA×NAmatricesZk,i(s)can be expressed recursively as Zk,1 (s) =Mk,1 (s),

Zk,i(s) =Mk,i (s) +

i1 j

=1

Mk,j (s)

K q=1

PqZq,ij

!

, (203)

fori≥2.

Proof. The equalityZk,1(s) =Mk,1 (s)is immediate as(Zk,1(t))j,j0and(Mk,1(t))j,j0represent the same probability. Fori ≥ 2, there are two options: either the busy period initiated by customer1 ends when the i-th customer leaves (which corresponds to Mk,i (s)) or it ends when thejth customer leaves with j<i. In the latter case assume thej+1th customer is of

90 analysis of the mmap[k]/ph[k]/1-fcfs qeue

typeq, then this customer initiates another busy period and we still demand that customer i> jleaves the server idle. Hence, in the latter case we find

Zk,i(t) = following conditional probability: given that an agexcustomer (labeled customer0) departs and theMMAPphase at its arrival time wasj,(Hk,n(t,x))j,j0 holds the probability that (a) the next customer (labeled customer1) is of type k, (b) the inter-departure time between customers0and1is at mostt, (c) customernleaves the server idle and (d) theMMAPphase equalsj0 when customer ndeparts. Let Hk,n(t,x)be the matrix with entry (j,j0)equal to

Proof. The probabilities(Hk,n(t,x))j,j0are not affected by the amount of time that customer0 had to wait, we may therefore assume that customer0initiated a busy period and his service time equalsx.

We consider two cases. First, with probabilityeD0x, there are no arrivals while customer0 is in the system. In this case the inter-departure time between customer0and1consists of an idle period plus the service time of customer1. Hence, by the probabilistic interpretation ofZk,n(t), the first case results in

Hk,n (t,x,cust.0leaves the queue empty) =eD0x Z t

a=0eD0aDkZk,n(t−a)da, which yields the first term appearing in (204).

Second, if there is at least one arrival while customer 0is in the system, then the inter-departure time between customer0and1equals the service time of customer1. Hence, in this case(Hk,n(t,x))j,j0 is also equal to the following conditional probability: given that a customer (labeled customer0) initiates a busy period, requires service timexand theMMAP phase at its arrival time wasj,(Hk,n(t,x))j,j0holds the probability that (a) at least one arrival occurs during the service of customer0and the first arrival is of type k (labeled customer 1), (b) the service time of customer1is at mostt, (c) customern leaves the server idle and (d) theMMAPphase equals j0 when customerndeparts. Note, the above probability is not

6.4 analysis of the departure process 91 affected by the order of service either. In this case we may therefore think in terms of a preemptive (resume) last-come-first-served system in which customer0 has service timex.

The first arrival during the service of customer0must be of typek, its service time should be at mosttand theMMAPphase when customer0resumes service is determined byDkMk,r1(t), provided that customer1induces a sub-busy period during whichr1customers are served.

A possible second arrival of some typeqwill cause theMMAPphase to change according to DqMq,r2, for somer2, etc. Notice, in this case there is no restriction on the service time of the

is anNA×NAmatrix with entry(j,j0)equal to the following conditional probability: given that customer0initiates a busy period, has a service time of x and theMMAPphase at its arrival time wasj, entry(j,j0)holds the probability that (a) customer1is of typekand arrives while customer0is in the system, (b) the service time of customer1is at mostt, (c) customeri leaves the server idle and (d) theMMAPphase equalsj0when customerideparts. Ifi=nthis results in the term containingJn+1in (204). Otherwise, we need another arrival of some type q(labeled customeri+1) that initiates a busy period such that customernleaves the server idle. This explains the terms containing∑qK=1PqZq,ni in (204), fori=1, . . . ,n−1.

Define (vk,n(t))j, forn ≥ 1,k ∈ {1, . . . ,K}and j ∈ {1, . . . ,NA}, as the probability of the following event: assume we observe the system at an arbitrary departure instant, then the next inter-departure time is at mosttand involves a type kcustomer (labeled customer 1), while customernleaves the server idle and the phase of theMMAPisjwhen customern departs. Letvk,n(t)be the vector with entryjequal to (vk,n(t))j. Letvk,n(s)be theLSTof vk,n(t).

Finally, let (v0)j, for j ∈ {1, . . . ,NA}, be the probability that the server becomes idle at an arbitrary departure instant while theMMAPphase equalsj. Denotev0as the vector with entryjequal to(v0)j.

Proof. From the probabilistic interpretation ofHk,n(t,x)it is clear that vk,n(t) =

Z

x=0aD(x)Hk,n(t,x)dx,

where aD(x) is the density of the age process at departure times. The expression in (205) therefore follows from (195). The expression forv0is immediate from

v0 =

Z

x=0aD(x)eD0xdx, and the definition ofa(0)andY0.

92 analysis of the mmap[k]/ph[k]/1-fcfs qeue

Theorem 23. The LSTof the joint distribution of the1st and (n+1)th inter-departure time with the first one being of typekand then+1th of type pis given by

fH((k,pn)∗) (s1,s2) = h

(α−v0)(−D0)1+v0(s1ID0)1iDkPn1Pp1fSk(s1)fSp(s2) +vk,n(s1)h(s2ID0)1−(−D0)1iDp1fSp(s2).

(206)

Proof. We can write the jointLST as the sum of the jointLST in the case that the server is idle at the start of the(n+1)th inter-departure time and the jointLSTin the case it is not.

Due to the probabilistic interpretation of the vectorvk,n(s1), theLSTfor the case where the server is idle at the start of the(n+1)th inter-departure time is given by

vk,n(s1)(s2ID0)1Dp1fSp(s2). (207) The vectorv0 andα−v0 correspond to the cases where the1st inter-departure time starts with and without an idle period, respectively. Hence, the term

h

(α−v0)(−D0)1+v0(s1ID0)1iDkPn1Pp1fSk(s1)

in (206) holds theLST of the first inter-departure time when the(n+1)th inter-departure time involves a typepcustomer, denoted by fH((k,pn)∗) (s1, 0). This implies that

fH((k,pn)∗) (s1, 0)−vk,n(s1)(−D0)1Dp1

holds theLST of the first inter-departure time when the(n+1)th inter-departure time in-volves a type p customer in case the server is not idle at the start of the (n+1)th inter-departure time. If the server is not idle at the start of the(n+1)th inter-departure time, itsLSTis given by fSp(s2), as it is equal to theLSTof the service time of the(n+1)th cus-tomer, the type of which isp. Hence, the jointLSTin case the server is busy at the start of the(n+1)th inter-departure time is given by

fH((k,pn)∗) (s1, 0)fSp(s2)−vk,n(s1)(−D0)1Dp1fSp(s2). (208) Combining (207) and (208) establishes (206).