^{1}

^{1}

An algorithm is presented for estimating the expected number of customers for a class of Markovian queueing systems. The class is characterized by those systems whose transition matrix for the underlying customer arrival and departure process is finite, irreducible, and aperiodic. The algorithm does not depend on a closed-form solution for the limiting behavior of the queue. The expected number of customers is frequently used as a measure of effectiveness to describe the behavior of the system or to optimize its design or control. To calculate such a quantity one must usually obtain a closed-form expression for the steady-state probabilities. Unfortunately, of the myriad of Markovian queueing systems, only a few have known closed-form expressions for their steady-state probabilities. The most well-known, using Kendall’s notation, are the M/M/1 and the M/M/c system. The algorithm described below estimates the expected number in the system under steady-state without a need for closed form steady-state probabilities. All that is needed is the transition matrix for the underlying Markov chain.

Consider a Markovian queueing system in which the customer arrival and departure process is described by a finite, irreducible, and aperiodic Markov Chain { X n : n = 0 , 1 , ⋯ } whose N × N transition matrix is given by A = ( a i j ) , where a i j = p r { X n = j | X n + 1 = i } .

It is well known that for a finite, irreducible, aperiodic Markov chain, there exists a unique stationary probability vector V = ( v 0 , ⋯ , v 0 ) such that V A = V [

Let L = Expected number of customers in the steady state system. The expected number of customers is frequently used as a measure of effectiveness to describe the behavior of the system or to optimize its design or control [

F = ( 0 , 1 , ⋯ , N − 1 ) t

A Z F = ( w 0 ( z ) , ⋯ , w N − 1 ( z ) ) t = W ( z )

w _ ( z ) = min i { w i ( z ) : i = 0 , 1 , ⋯ , N − 1 }

w ¯ ( z ) = max i { w i ( z ) : i = 0 , 1 , ⋯ , N − 1 }

L ^ ( z ) = ( w ¯ ( z ) + w _ ( z ) ) 2

Theorem 1 For any positive integer z,

1)

| L − L ^ ( z ) | ≤ ( w ¯ ( z ) + w _ ( z ) ) 2

2)

lim z → ∞ L ^ ( z ) = L

Proof.

1)

L = V F = V A Z F = ∑ v i w i ( z )

since w i ( z ) ≤ w ¯ ( z )

then,

∑ v i w i ( z ) ≤ ∑ v i w ¯ ( z ) = w ¯ ( z ) ∑ v i = w ¯ ( z )

Similarly, since

w i ( z ) ≥ w ¯ ( z )

we have,

∑ v i w i ( z ) ≥ ∑ v i w _ ( z ) = w _ ( z ) ∑ v i = w _ ( z )

thus

L − L ^ ( z ) ≤ w ¯ ( z ) − ( w ¯ ( z ) + w _ ( z ) ) 2 = ( w ¯ ( z ) − w _ ( z ) ) 2

and

L − L ^ ( z ) ≥ w ¯ ( z ) − ( w ¯ ( z ) + w _ ( z ) ) 2 = − ( w ¯ ( z ) − w _ ( z ) ) 2

It follows that

| L − L ^ ( z ) | ≤ ( w ¯ ( z ) + w _ ( z ) ) 2

2) Let A z = ( p 0 ( z ) , ⋯ , p N − 1 ( z ) ) t , where p i ( z ) is the ( i + 1 ) th row of A z . Since we are concerned with finite, irreducible, aperiodic Markov chains, we have

lim z → ∞ p i ( z ) = V

For all i. It follows that

lim n → ∞ w i ( z ) = lim z → ∞ p i ( z ) F = V F = L

For all i. Let ( s n ) be the sequence formed by combining the N sequences ( w 0 ( z ) ) , ⋯ , ( w N − 1 ( z ) ) according to the ascendant order of z. Clearly,

lim z → ∞ s n = L

Since ( w ¯ ( z ) ) and ( w _ ( z ) ) are both subsequence of ( s n ) , it is clear that

lim z → ∞ w ¯ ( z ) = lim z → ∞ w _ ( z ) = L

It therefore follows that

lim z → ∞ L ^ ( z ) = lim z → ∞ ( w ¯ ( z ) + w _ ( z ) ) 2 = ( lim z → ∞ w ¯ ( z ) + lim z → ∞ w _ ( z ) ) 2 = L + L 2 = L .

The relationship between L ^ and L as stated in Theorem 1 can be used to develop an iterative algorithm for estimating the expected number of customers from the system’s transition matrix.

Definition 1

The absolute error of an estimation is the absolute value of the difference between the estimation and the true value. When the true value is unknown, the largest absolute error that may occur is called the maximal absolute error.

Definition 2

The relative error of an estimation is the ratio of the absolute error of the estimation to the true value. When the true value is unknown, the largest relative error that may occur is called the maximal relative error.

The algorithm can now be stated as follows:

Step 1. Determine the allowable maximal absolute error a.

Step 2. Set z = 0 and W ( 0 ) = ( 0 , ⋯ , N − l ) t .

Step 3. Compute W ( z + 1 ) = A W ( z ) .

Step 4. If ( w ¯ ( z + 1 ) − w _ ( z + 1 ) ) 2 ≤ a , go to step 5; otherwise, increase z by 1 then go to step 3.

Step 5. The desired accuracy has been reached. Let L = L ^ ( z + 1 ) = ( w ¯ ( z + 1 ) + w _ ( z + 1 ) ) 2 . Terminate

Theorem 2 Let L ^ ( n ) be the estimation of the expected number of customers obtained from the Algorithm above. Using an allowable maximal absolute error of a, we then have that

1) The maximal absolute error of L ^ ( n ) is a,

2) The maximal relative of L ^ ( n ) is a ( L ^ ( n ) − a )

Proof. 1) Step 4 of the algorithm implies ( w ¯ ( n ) − w _ ( n ) ) 2 ≤ a . Thus, by Theorem 1, | L − L ^ ( n ) | ≤ ( w ¯ ( n ) − w _ ( n ) ) 2 ≤ a . Hence, the maximal absolute error of L ( n ) is a.

2) The maximal relative error occurs when L = L ^ ( n ) − a . Thus, the maximal relative error = | L ^ ( n ) − L | L = | L ^ ( n ) − ( L ^ ( n ) − a ) | ( L ^ ( n ) − a ) = a ( L ^ ( n ) − a )

The allowable error associated with the algorithm above is specified in terms of the maximal absolute error, and is thus independent of the magnitude of the expected number of customers. If one needs to associate the error of the estimation with the magnitude of the expected number of customers, then the algorithm may be modified as follows:

Step 1. Determine the allowable maximal relative error r.

Step 2. Set z = 0 and W ( 0 ) = ( 0 , ⋯ , N − l ) t

Step 3. Compute W ( z + 1 ) = A W ( z )

Step 4. If ( w ¯ ( z + 1 ) − w _ ( z + 1 ) ) 2 ≤ r L ^ ( z + 1 ) ( 1 + r ) , go to step 5; otherwise, increase z by 1 then go to step 3.

Step 5. The desired accuracy has been reached. Let L = L ^ ( z + 1 ) = ( w ¯ ( z + 1 ) + w _ ( z + 1 ) ) 2 . Terminate.

Theorem 3 let L ^ ( n ) be the estimation of the expected number of customers obtained from the modified algorithm above, using an allowable maximal relative error of r, then

1) The maximal absolute error of the L ^ ( n ) is r L ^ ( n ) ( 1 + r )

2) The maximal relative error of L ^ ( n ) is r

Proof. 1) Step 4 of the modified algorithm 2 implies ( w ¯ ( n ) − w _ ( n ) ) 2 ≤ r L ^ ( n ) ( 1 + r ) .

Thus, by Theorem 1, | L − L ^ ( n ) | ≤ ( w ¯ ( n ) − w _ ( n ) ) 2 ≤ r L ^ ( n ) ( 1 + r ) . Hence the maximal absolute error of L ^ ( n ) is r L ^ ( n ) ( 1 + r ) .

2) The maximal relative error occurs when L = L ^ ( n ) − r L ^ ( n ) ( 1 + r ) . Thus the maximal relative error = | L ^ ( n ) − L | L = | L ^ ( n ) − ( L ^ ( n ) − r L ^ ( n ) ( 1 + r ) ) | ( L ^ ( n ) − r L ^ ( n ) ( 1 + r ) ) = r

Thus, the initial algorithm will have a maximal absolute error of a, and a maximal relative error of a ( L ^ ( n ) − a ) . The modified algorithm will have a maximal absolute error of r L ^ ( n ) ( 1 + r ) and a maximal relative error of r.

Consider the M/M/c/c queueing system with finite waiting space. Assume that customers arrive according to a Poisson process with rate λ, and that service times are exponential with mean 1/µ. Although the process that describe the number of customers in the system at time is a process that take place in continues time, several relevant Markov chains may be defined for this system in discrete time. For example, consider the Markov chain whose transition is given by

A = a i j = [ 1 − λ λ μ 1 − λ − μ λ 2 μ 1 − λ − 2 μ λ ⋱ ⋱ ( c − 1 ) μ 1 − λ − ( c − 1 ) μ λ c μ 1 − c μ ]

where λ and μ have been scaled such that A is a legitimate transition matrix, a is set at 0.01, and L is computed using the following formulas for the M/M/c/c (Erlang B) system [

Let

B ( c , r ) = p c = r c c ! ∑ i = 0 c r i i !

where r = λ μ and let

C ( c , r ) = c B ( c , r ) c − r + r B ( c , r )

then L q = r c − r C ( c , r ) and L = L q + r ( 1 − p c ) where L q is the expected number in the queue.

Arrival rate | No. of servers | Service rate | Expected number of customers | |
---|---|---|---|---|

L | Algorithm | |||

0.2 | 3 | 0.1 | 2.4678 | 2.4694 |

0.2 | 4 | 0.1 | 1.9834 | 1.9842 |

0.2 | 5 | 0.1 | 1.9664 | 1.9683 |

0.2 | 3 | 0.08 | 5.3058 | 5.3076 |

0.2 | 4 | 0.08 | 2.6583 | 2.6596 |

0.2 | 5 | 0.08 | 2.4560 | 2.4579 |

0.15 | 2 | 0.1 | 2.9630 | 2.9644 |

0.15 | 3 | 0.1 | 1.5353 | 1.5373 |

0.15 | 4 | 0.1 | 1.4728 | 1.4741 |

0.3 | 4 | 0.1 | 3.9100 | 3.9115 |

0.3 | 5 | 0.1 | 3.0241 | 3.0253 |

0.3 | 6 | 0.1 | 2.9427 | 2.9442 |

These computations were made on a 64-bit Intel^{Ò} Core^{TM} m3-6Y30 CPU @ 0.90 GHZ laptop computer.

The authors declare no conflicts of interest regarding the publication of this paper.

Tu, H.-Y. and Kumin, H. (2020) An Algorithm for Estimating the Expected Number of Customers for a Class of Markovian Queueing Systems. American Journal of Operations Research, 10, 132-137. https://doi.org/10.4236/ajor.2020.104009