**5. Numerical Example**

In this section, we illustrate the dependencies of some performance measures of the system on the buffer capacity *N* and show the poor quality of evaluation of the value of the loss probability via the following three simplifications of the model: (i) the arrival flow is assumed to be described not by the *MMAP*, but by the superposition of the stationary Poisson processes; (ii) the service time distribution is assumed to be not of a general phase-type, but exponential; (iii) the arrival flow is assumed to be the superposition of the stationary Poisson processes and the service time distribution is assumed to be exponential.

In this illustrative example, we consider a small information transmission device that is designed for transmission of four types of information. We assume that the distribution of the size of various types information units is the same. The information units of various types have different importance for the system and, correspondingly, have different priority. Let us assume that the arrivals of the units (customers) of different types are modeled by the *MMAP* arrival process defined by the matrices:

$$D\_0 = \begin{pmatrix} -1.8 & 0.0\\ 0.0 & -0.4458 \end{pmatrix}, D\_1 = \begin{pmatrix} 0.51 & 0.04\\ 0.006 & 0.1047 \end{pmatrix},$$

$$D\_2 = \begin{pmatrix} 0.31 & 0.01\\ 0.0 & 0.2641 \end{pmatrix}, D\_3 = \begin{pmatrix} 0.41 & 0.01\\ 0.002 & 0.058 \end{pmatrix}, D\_4 = \begin{pmatrix} 0.5 & 0.01\\ 0.001 & 0.01 \end{pmatrix}.$$

It has the average arrival intensity *λ* = 0.600076, the coefficient of correlation *ccor* = 0.148534, and the coefficient of variation *<sup>c</sup>*2*var* = 1.46139. The intensities of type-*r* customer arrivals are *λ*1 = 0.160747, *λ*2 = 0.270468, *λ*3 = 0.101013, *λ*4 = 0.0678481, respectively.

The *PH* service process is defined by the vector *β* = (0.01, 0.99) and the sub-generator

$$S = \left(\begin{array}{cc} -0.1 & 0.1\\ 0.02 & -2 \end{array}\right).$$

The average service time is *b*1 = 0.706060 and the coefficient of variation is *<sup>c</sup>*2*var* = 8.781. The rest parameters are as follows: *γ*1 = 0.012, *γ*2 = 0.011, *γ*3 = 0.01, *γ*4 = 0.009, *αr* = 0.1,

*r* 2, 4, *p*2,1 = 1, *p*3,1 = *p*3,2 = 0.5, *p*4,1 = *p*4,2 = *p*4,3 = 1 3 , *q* = 0.5. Letusthebuffercapacity*N*overtheinterval[1,25]andcalculatethemainperformance

=

 vary measures of the system. It is worth to note that capacity of the buffer not exceeding 25 is realistic in many real-world applications, e.g., in application for modeling emergency departments in a hospital, the number of waiting patients cannot be large because if this number grows, the ambulance cars will deliver new patients to other neighboring hospitals. In modeling the operation of an information transmission device, the capacity of the buffer can also be not very large due to fast obsolescence of the transmitted information.

For computations, we use a PC with an Intel Core i7-8700 CPU and 16 GB RAM, Mathematica 11.0. The computation time for all 25 different buffer capacities is about 15 min.

Figure 2 illustrates the dependence of the average number of customers in the buffer *Nbu f f er* and the average numbers *N*(*r*) *bu f f er*, *r* = 1, *R*, of type-*r* customers in the buffer on the buffer capacity *N*. As it is expected, the values *Nbu f f er* and *N*(*r*) *buffer*, *r* = 1, *R*, increase with the growth of the buffer capacity *N*.

**Figure 2.** The dependence of *Nbu f f er* and *N*(*r*) *buffer*, *r* = 1, *R*, on the buffer capacity *N*.

Figure 3 illustrates the dependence of the average intensities *λ* ˜ (*r*) of type-*l*, *l* = *r* + 1, *R*, customers transformation to the type-*<sup>r</sup>*, *r* = 1, *R* − 1, customers on the buffer capacity *N*. All these intensities increase with the growth of the buffer capacity *N* because the larger capacity of the buffer implies the longer stay of a customer in the buffer and, therefore, higher chances to increase the priority. The highest value of the intensity *λ* ˜ (1) among the values *λ*˜ (*r*), *r* = 1, *R* − 1, is easily explained by the fact that about 45 percent of arriving customers are type-2 customers that can increase their priority only to type-1, a half of type-3 customers may increase the priority directly to type-1 and one third of type-4 customers may also increase the priority directly to type-1.

**Figure 3.** The dependence of the average intensities *λ* ˜ (*r*) , *r* = 1, *R* − 1, on the buffer capacity *N*.

Figure 4 illustrates the dependence of the probability of an arbitrary customer loss upon arrival *Pent*−*loss* and the probabilities of an arbitrary type-*<sup>r</sup>*, *r* = 1, *R*, customer loss upon arrival *P*(*r*) *ent*−*loss* on the buffer capacity *N*. This figure confirms the intuitively clear fact that all these loss probabilities decrease with the growth of the buffer capacity.

**Figure 4.** The dependence of the probabilities *Pent*−*loss* and *P*(*r*) *ent*−*loss*, *r* = 1, *R*, on the buffer capacity *N*.

Figure 5 illustrates the dependence of the probability *Pf orce*−*loss* of the loss of an arbitrary customer due to forcing out and the probability *P*(*r*) *f orce*−*loss* of the loss of an arbitrary type-*<sup>r</sup>*, *r* = 2, *R*, customer on the buffer capacity *N*. The behavior of these probabilities for type-3 and type-4 customers is explained as follows. For small values of *N*, these probabilities are small because there is a high probability that such customers are not admitted to the system at all (are lost at the entrance to the system). Then, when the buffer capacity *N* increases, fewer customers of these types are lost at the entrance and, therefore, more customers are accepted to the buffer and are forced out by the high priority customers. After the buffer capacity *N* reaches the values about 2 or 3, the probability that the high priority customers will meet full buffer essentially decreases and these customers have no need to force out type-3 and type-4 customers. Consequently, the probabilities *P*(*r*) *f orce*−*loss*, *r* = 3, 4, decrease when *N* further increases.

**Figure 5.** The dependence of the probabilities *Pf orce*−*loss* and *P*(*r*) *f orce*−*loss*, *r* = 2, *R*, on the buffer capacity *N*.

Figure 6 illustrates the dependence of the probability *Pimp*−*loss* of the loss of an arbitrary customer due to impatience and the probability *P*(*r*) *imp*−*loss*, *r* = 1, *R*, of loss of an arbitrary type-*r* customer due to impatience on the buffer capacity *N*. When the buffer capacity increases, customers of all types spend more time in the buffer and are lost due to the impatience more frequently.

**Figure 6.** The dependence of the probabilities *Pimp*−*loss* and *P*(*r*) *imp*−*loss*, *r* = 1, *R*, on the buffer capacity *N*.

As it was announced above, one of the important goals of our numerical example is to demonstrate the poor quality of approximation of the value of the loss probability in the considered *MMAP*/*PH*/1/*N* model with dynamically variable non-preemptive priorities by the value of the loss probability in more simple models coded below as *MMAP*/*M*/1/*N*, *M*/*PH*/1/*N* and *M*/*M*/1/*N* type priority models with the same rates of the arrival of different types of customers and the service rate. Using the *MMAP*/*M*/1/*N* model, one ignores that we assumed that the service time has the coefficient of variation *<sup>c</sup>*2*var* = 8.781, not *<sup>c</sup>*2*var* = 1, as the exponential distribution of the service time suggests. Using the *M*/*PH*/1/*N* model, one ignores that the inter-arrival times have the coefficient of correlation *ccor* = 0.148534, and the coefficient of variation *<sup>c</sup>*2*var* = 1.46139, not *<sup>c</sup>*2*var* = 1, as the exponential distribution of inter-arrival times of different types of customers suggests. Using the *M*/*M*/1/*N* model, one assumes a zero coefficient of inter-arrival times and the coefficient of variation of inter-arrival of all types of customers and the service times equal to 1.

Figure 7 illustrates the dependence of the probability *Ploss* of the loss of an arbitrary customer on the buffer capacity *N* for the considered *MMAP*/*PH*/1/*N* priority system and its particular cases coded as the *MMAP*/*M*/1/*N*, *M*/*PH*/1/*N* and *M*/*M*/1/*N* type systems.

**Figure 7.** The dependence of the probability *Ploss* on the buffer capacity *N* for the considered set of the system parameters.

One can see that the values of the loss probabilities computed for the approximating models are essentially smaller than the actual value. It is well known that queueing models with a finite buffer can help to solve the important problem of computing the required capacity *N* of the buffer, e.g., the problem of finding the minimum value of *N* such as the loss probability *Ploss* is less than 0.05 can be considered. Using the approximate value of this loss probability computed via the *M*/*M*/1/*N* type system, one can compute that the buffer capacity *N* = 2 is enough to guarantee the fulfillment of the inequality *Ploss* < 0.05. Using the approximate value of this loss probability computed via the *M*/*PH*/1/*N* type system, one can compute that the required buffer capacity is *N* = 8. Using the approximate value of this loss probability computed via the *MMAP*/*M*/1/*N* type system, one can compute that the required buffer capacity is *N* = 9. Furthermore, finally, if one properly accounts the values of the coefficients of correlation and variation via the use of the *MMAP*/*PH*/1/*N* model, he/she obtains that the required buffer capacity is *N* = 21. For *N* = 2, 8 and 9 the loss probability has values 0.1659179, 0.087093, and 0.081367, correspondingly, and is essentially larger than 0.05. Therefore, the simplified models give a quite poor estimation of the required capacity of the buffer.
