# M/G/1 Queue with Exponential Working Vacation and Gated Service (Queueing Theory) (Analytical and Stochastic Modeling) Part 2

## The Stationary Number of Customers at an Arbitrary Epoch

In this section we determine the PGF of the stationary number of customers at an arbitrary epoch from the PGFs of the stationary number of customers in the service period and in the vacation period. These PGFs are determined in terms of f (z) and m(z). Putting all these together and applying the formulas for f (z) and m(z) derived in the previous section gives the PGF of the stationary number of customers at an arbitrary epoch.

We define q(z) as the PGF of the stationary number of customers in an arbitrary epoch as

### The Stationary Number of Customers in the Service Period

We define qb(z) as the PGF of the stationary number of customers in the service period as

Let G(k) be the number of customers served in the service period in the k-th cycle for k > 1. Let tsk z and tf e denotes the epoch at the start and just after the end of the £-th customer service in the service period in the k-th cycle for I =1, …G(k) and k > 1, respectively.

Furthermore we define qs (z) as the PGF of the stationary number of customers at the customer service start epochs in the service period as

Similarly we define qd(z) as the PGF of the stationary number of customers left in the system at the customer departure epochs in the service period as

Proposition 1. In the stable M/G/1 multiple working vacation model with gated discipline satisfying assumptions A.1 – A.3 the stationary PGF of the number of customers in the service period is given as

Proof. Given the number of customers at the end of the vacation period the service process is independent of the fact whether the model has working or regular vacation. Therefore the expression of qd(z) in terms of f (z) and m(z) in , which holds for the regular vacation model, is valid also in our working vacation model. In fact in  this expression has been derived for q(z), but a standard up-and down-crossing argument combined with PASTA  shows that the stationary number of customers at customer departure, at customer arrival and at arbitrary epochs are all the same. According to this qd(z) can be expressed as

Furthermore the number of customers just before the customer departure epoch is one more than the number of customers just after that customer departure epoch. On the other hand it is the sum of the number of customers at the start of the previous customer service and the number of customers arriving during that customer service, which are independent. It leads to

Applying (31) in (32), qs(z) can be expressed as

The interval between the starting time of a customer service in the service period and an arbitrary epoch in that service time is the backward recurrence customer service time, whose probability density function (pdf) is given by

The number of customers at an arbitrary epoch in any customer service time is the number of customers at the start of that customer service and the number of customers arriving in between. The later can be obtained by integrating the customer arrivals with the backward recurrence customer service time. Thus for qb(z) we obtain

Rearrangement of (35) and using the definition of q (z) leads to

Applying (34) and the integral property of LT, that is in (36) yields

Applying (33) in (37) results in the statement of the proposition. □

### The Stationary Number of Customers in the Vacation Period

We define q" (z) as the PGF of the stationary number of customers in the vacation period as

Proposition 2. In the stable M/G/1 multiple working vacation model with gated discipline satisfying assumptions A.1 – A.3 the stationary PGF of the number of customers in the vacation period is given as

Proof. The interval between the starting time of a vacation and an arbitrary epoch in that vacation is the backward recurrence vacation time. Let v*(t) denote the probability density function (pdf) of the backward recurrence vacation time.

Following the same line of argument as in theorem 1 the PGF of the number of customers present at an arbitrary epoch in the vacation can be expressed as

Due to the exponential distribution of the vacation time the backward recurrence vacation time is also exponentially distributed. Thus the right side of (39) is the same as the right side of (6), from which the statement of the proposition follows.

### Computation of q(z)

Theorem 4. In the stable M/G/1 multiple working vacation model with gated discipline satisfying assumptions A.1 – A.3 the stationary PGF of the number of customers at an arbitrary epoch is given as

Proof. Let a be the mean stationary length of the service period. Under gated discipline each customer present at the start of service period generates a service with mean length b. Applying Wald’s lemma leads to

The state of the working vacation model alternates between service periods and vacation periods. According to the renewal theory the probabilities that the random epoch t finds the model in service period or in vacation are given as

It follows from the theorem of total probability that

Applying (41), (42), and propositions 2 and 1 in (43) leads to

Applying (9) and (10) results in the statement of the theorem. Corollary 1. Based on (40) the mean number of customers is

## The Stationary Waiting Time

Let WT be the waiting time in the system at time t . We define the distribution function of the stationary waiting time, W(t), as

The LST of the stationary waiting time is defined as

Theorem 5. In the stable M/G/1 multiple working vacation model with gated discipline satisfying assumptions A.1 – A.3 the LST of the stationary waiting time is given as

Proof. The model assumptions imply that a new arriving customer do not affect the time in the system of any previously arrived customers. This ensures the applicability of the distributional Little’s law . Furthermore the time in the system of an arbitrary customer is the sum of its waiting time and its service time, which are independent due to the model assumptions. Taking it also into account the distributional Little’s law can be given to our model as

Substituting and rearranging yields

The statement comes from (48) and (40).

From (48) the mean waiting time,

which is the regular Little law obtained from the distributional Little law.