Next Article in Journal
Real Hypersurfaces in Complex Grassmannians of Rank Two
Next Article in Special Issue
Fluid-Flow Approximation in the Analysis of Vast Energy-Aware Networks
Previous Article in Journal
Optimization of Nano-Additive Characteristics to Improve the Efficiency of a Shell and Tube Thermal Energy Storage System Using a Hybrid Procedure: DOE, ANN, MCDM, MOO, and CFD Modeling
Previous Article in Special Issue
Algorithmic Analysis of Finite-Source Multi-Server Heterogeneous Queueing Systems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Performance Evaluation of the Priority Multi-Server System MMAP/PH/M/N Using Machine Learning Methods

by
Vladimir Vishnevsky
1,*,†,
Valentina Klimenok
2,†,
Alexander Sokolov
1,† and
Andrey Larionov
1,†
1
Institute of Control Sciences of Russian Academy of Sciences, 117997 Moscow, Russia
2
Department of Applied Mathematics and Computer Science, Belarusian State University, 220030 Minsk, Belarus
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Mathematics 2021, 9(24), 3236; https://doi.org/10.3390/math9243236
Submission received: 31 October 2021 / Revised: 6 December 2021 / Accepted: 9 December 2021 / Published: 14 December 2021
(This article belongs to the Special Issue Distributed Computer and Communication Networks)

Abstract

:
In this paper, we present the results of a study of a priority multi-server queuing system with heterogeneous customers arriving according to a marked Markovian arrival process (MMAP), phase-type service times (PH), and a queue with finite capacity. Priority traffic classes differ in PH distributions of the service time and the probability of joining the queue, which depends on the current length of the queue. If the queue is full, the customer does not enter the system. An analytical model has been developed and studied for a particular case of a queueing system with two priority classes. We present an algorithm for calculating stationary probabilities of the system state, loss probabilities, the average number of customers in the queue, and other performance characteristics for this particular case. For the general case with K priority classes, a new method for assessing the performance characteristics of complex priority systems has been developed, based on a combination of machine learning and simulation methods. We demonstrate the high efficiency of the new method by providing numerical examples.

1. Introduction

Priority queuing systems, which are an essential part of the queuing theory, are effectively used in the analysis of real technical and social systems [1,2,3,4,5,6,7]. Examples of systems with priority traffic include digital television, in which the transmission of synchronization signals has a higher priority than the transmission of video, and computer networks with Quality of Service (QoS) support, in particular—Internet of Things (IoT) systems [1,2,3,4]. Furthermore, information services with different categories of users [5], as well as any social systems with different types of clients, such as hospitals, are other examples of the systems with priority traffic. As an example of the latter, we can cite the studies [6,7], which investigate the effectiveness of algorithms for allocating places in the organ transplant queue for patients depending on the severity of their disease. In addition, priority systems are used to provide users with priority login when working with various services. For example, the paper [5] provides an analysis of the impact of priorities on the workload, transaction time, and other characteristics, investigating the performance of various databases for users with different access priorities.
It is well-known [8] that traffic in modern computer networks is correlated, and it is essential to use Markovian arrival processes ( M A P ) [9] to model it. A natural generalization of M A P for the case of heterogeneous traffic is marked Markovian arrival process (Marked M A P , M M A P ) [9], which describes correlated arrivals of an arbitrary number of customers types.
Systems with M M A P are poorly studied in the world literature compared to classical M A P arrival processes. The article [10] analyzes the queue size of the priority system M M A P / M A P / 1 . Investigation of the conditions for a stationary mode of a multi-server queueing system with an incoming M M A P is presented in the paper [6]. However, it lacks a description of the algorithm for calculating stationary state probabilities and other system performance characteristics. In recent works [11,12], the problem of finding a stationary solution for priority systems with a M M A P for the case of one server was investigated. The paper [11] examines the relative priority queue, and [12] examines the absolute priority queue.
Paper [13] considers a complex multi-server queueing system with a M M A P , two priority classes, and no buffer. Current research is a development and generalization of this paper. The fundamental difference between this paper and [13] is the presence of a buffer of finite capacity and an arbitrary number of customers types. On the one hand, such a generalization significantly complicates the mathematical analysis even for two customers types. However, on the other hand, it expands the area of the practical application of the model considered in the paper. The key contribution of this research is the development of a new method for studying queueing systems with an arbitrary number of customers types, based on a combination of machine learning and simulation methods. This method can be effectively used to study many problems in the theory of queues, for which finding a rigorous analytical solution and numerical results is either difficult or even impossible using traditional approaches. In particular, this method was applied to study a Fork-join type QS, and in [14] to estimate performance characteristics of complex adaptive polling systems.
This paper presents for the first time the results of a study of a multi-server queueing system with a M M A P , a queue with finite capacity, and an arbitrary number of customers types. The service times for customers of all types have a phase-type ( P H ) distribution with different parameters. Section 2 provides the formal problem statement and description of the model. For a particular case of two types of customers, Section 3 gives an analytical solution, including a description of a multidimensional Markov chain, an algorithm for calculating stationary state probabilities, and other characteristics. Section 4 describes a new method for studying a generalized model of a multi-server queueing system based on a combination of machine learning and simulation methods. Finally, Section 5, using a new approach, presents the results of a numerical study of the crucial characteristics of the multi-server queueing system, including the loss probabilities of the customers and the time spent by customers of the given type in the system. Section 6 discusses results and concludes the paper.

2. Problem Statement

Let us consider a multi-server queueing system with N servers and a queue with capacity R. Customers of different types arrive according to a marked Markovian arrival process directed by the underlying irreducible continuous time Markov chain ν t , t 0 with state space { 0 , 1 , 2 , , W } . Process ν t stays in state ν during exponentialy distributed time with parameter λ ν , ν = 0 , W ¯ . After that the process moves to state ν and either generates a customer of type k, k { 1 , 2 , , K } with probability p k ( ν , ν ) , or moves without customer generation with probability p 0 ( ν , ν ) . Any possible loop transition should happen together with customer generation, i.e., p k ( ν , ν ) 0 , k { 1 , 2 , , K } , but p 0 ( ν , ν ) = 0 . Transition probabilities should meet the following requirement:
k = 0 K ν = 0 W p k ( ν , ν ) = 1 ,   ν , ν = 0 , W ¯ .
Thus, the M M A P process is defined by
  • W + 1 , number of states in the underlying Markov chain;
  • K, number of customer types;
  • λ ν , transition rates;
  • p k ( ν , ν ) , k = 0 , K ¯ , ν , ν = 0 , W ¯ , transition probabilities between states in the underlying Markov chain ν t .
All the information regarding M M A P process is conveniently stored in square matrices D k , k = 0 , K ¯ of order W + 1 :
( D k ) ν , ν = λ ν p k ( ν , ν ) ,     ν , ν = 0 , W ¯ , k = 1 , K ¯ , ( D 0 ) ν , ν = λ ν , ν = ν = 0 , W ¯ , λ ν p 0 ( ν , ν ) , ν ν , ν , ν = 0 , W ¯ .
Elements of matrices D k , k = 1 , K ¯ , are transitions rates of the process ν t , accompanied by generation of type k customers. Non-diagonal elements of matrix D 0 have a similar meaning, while diagonal elements hold the negated sum of state departure transition rates.
A natural requirement for the matrices D k , k = 1 , K ¯ , is that not all of them are zero. When this requirement is met, the matrix D 0 is non-degenerate and stable since its eigenvalues have a negative real part.
The matrices D k , k = 1 , K ¯ , can be defined by their matrix generating function D ( z ) = k = 0 K D k z k ,   | z | < 1 . Note that the value of this function at z = 1 (matrix D ( 1 ) ) is the infinitesimal generator of the underlying Markov chain ν t , t 0 . The stationary distribution of this chain, represented as a rowvector θ , is defined as a solution of the linear algebraic system θ D ( 1 ) = 0 ,   θ e = 1 . Here and below e is a column vector consisting of ones.
Arrival rate λ k of customers of type k and the total cumulative arrival rate λ of M M A P process are defined as
λ k = θ D k e , k = 1 , K ¯ λ = θ k = 1 K D k e .
Variance v k of inter-arrival intervals of k-type customers is calculated as
v ( k ) = 2 θ ( D 0 l = 1 , l k K D l ) 1 e λ k 1 λ k 2 ,   k = 1 , K ¯ .
Correlation coefficient c c o r ( k ) of lengths of two adjacent inter-arrival intervals of k-type customers is calculated by the formula
c c o r ( k ) = [ θ ( D 0 + l = 1 , l k K D l ) 1 e λ k D k ( D 0 + l = 1 , l k K D l ) 1 e 1 λ k 2 ] v k 1 ,   k = 1 , K ¯ .
More details about a M M A P can be found, for instance, in [15]. Note that stationary Poisson arrival process is a special case of M M A P with W = 0 , K = 1 , D 0 = λ and D 1 = λ .
In the general case, customers of different types differ in priorities and parameters of P H distribution of service time. These differences will be described in more detail below.
Let us consider that all servers are equal and operate independently. Service time of the k-type customer has P H (Phase Type) distribution with representation ( β k , S k ) . Here β k is a row vector of size M k , and S k is a square matrix of size M k . Thus, the service time is interpreted as the time during which an underlying Markov chain m t ( k ) , t 0 , with state space { 1 , , M k , M k + 1 } , will reach the only absorbing state M k + 1 . Transition rates of the chain m t ( k ) , t 0 , within the space of transient states { 1 , , M k } are defined by the sub-generator S k , and the transition rates to the absorbing state are defined by the vector S 0 ( k ) = S k e . Initial state of the process m t ( k ) , t 0 , at the time the service starts is selected according to the probability row vector β k . More information regarding PH distributions may be found, e.g., in [16,17].
We assume that customers of type k < k have higher relative priority than customers of type k. It means that all customers with higher priority are placed in the queue in front of customers with lower priority. Let an incoming customer of type k finds all servers busy and i = 1 , R 1 ¯ , customers waiting in the queue. With probability q i ( k ) this customer will join the queue and will be put ahead of all non-priority customers of types k = k + 1 , k + 2 , , K and after all priority customers of types k = 1 , 2 , , k . With probability 1 q i ( k ) , the new customer decides not to join the queue and leaves the system forever. If any new customer finds the queue fully occupied, it also leaves the system forever. To simplify notation, in the case of K = 2 types of customers, we will denote the probabilities of joining the queue of length i for priority customers of type k = 1 as q i q i ( 1 ) , and for non-priority customers of type k = 2 as f i q i ( 2 ) .
Our goal is to calculate the stationary distribution of the system, its performance characteristics and conduct a numerical experiment to measure performance, including the probability of customers losses and the system’s response time. We will use the analytic model, Monte Carlo method, and machine learning (ML) to calculate the system characteristics.

3. M M A P / P H / M / N Queueing System with Two Priority Classes

3.1. Markov Chain of the System States

Let at the time t,
  • i t be the number of customers in the queue, i t = 0 , R ¯ ;
  • k t be the number of high priority (type 1) customers in the queue, k t = 0 , i t ¯ ;
  • n t be the number of busy servers, n t = 0 , N ¯ ;
  • r t be the number of servers servicing high priority customers, r t = 0 , n t ¯ ;
  • n t ( m t ( 1 ) ) be the number of servers servicing high priority customers for which the underlying process is in state m t ( 1 ) , n t ( m t ( 1 ) ) = 0 , r t ¯ , m t ( 1 ) = 1 , M 1 ¯ ;
  • n ˜ t ( m t ( 2 ) ) be the number of servers servicing low priority (type 2) customers for which the underlying process is in state m t ( 2 ) , n ˜ t ( m t ( 2 ) ) = 0 , n t r t ¯ , m t ( 2 ) = 1 , M 2 ¯ ;
  • ν t be the state of the underlying process of M M A P , ν t = 0 , W ¯ .
Operation of the system is described by a regular irreducible Markov chain ξ t with continuous time
ξ t = { ( i t , k t , r t , n t , ν t , n t ( 1 ) , n t ( 2 ) , , n t ( M 1 ) , n ˜ t ( 1 ) , n ˜ t ( 2 ) , , n ˜ t ( M 2 ) ) ,   t 0 } ,
with the state space
Ω = { ( i , n , r , ν , n ( 1 ) , n ( 2 ) , , n ( M 1 ) , n ˜ ( 1 ) , n ˜ ( 2 ) , , n ˜ ( M 2 ) ) , i = 0 ,   n = 0 , N ¯ ,   r = 0 , n ¯ ,   ν = 0 , W ¯ ,   n ( m ) = 0 , r ¯ ,   m = 1 , M 1 ¯ ,   n ˜ ( m ˜ ) = 0 , n r ¯ ,   m ˜ = 1 , M 2 ¯ }  
{ ( i , k , n , r , ν , n ( 1 ) , n ( 2 ) , , n ( M 1 ) , n ˜ ( 1 ) , n ˜ ( 2 ) , , n ˜ ( M 2 ) ) ,
i = 1 , R ¯ ,   k = 0 , i ¯ ,   n = N ,   r = 0 , n ¯ ,   ν = 0 , W ¯ ,   n ( m ( 1 ) ) = 0 , r ¯ ,   m ( 1 ) = 1 , M 1 ¯ ,   n ˜ ( m ( 1 ) ) = 0 , N r ¯ , m ( 2 ) = 1 , M 2 ¯ ,   m ( 1 ) = 1 M 1 n ( m ( 1 ) ) = r ,   m ( 2 ) = 1 M 2 n ˜ ( m ( 2 ) ) = N r . }
The number of vectors in the state space for i = 0 is
K 0 = ( W + 1 ) n = 0 N r = 0 n C r + M 1 1 M 1 1 C n r + M 2 1 M 2 1 ,
and, for any fixed i = 1 , R ¯ , the number of vectors is
K = ( i + 1 ) ( W + 1 ) r = 0 N C r + M 1 1 M 1 1 C N r + M 2 1 M 2 1 .
Let us denote:
  • I (O) is an identity (zero) matrix of the appropriate dimension;
  • W ¯ = W + 1 ;
  • ⊗ and ⊕ are the symbols of the Kronecker product and sum of matrices, see [18];
  • C n l = n ! l ! ( n l ) ! ;
  • d r ( 1 ) = C r + M 1 1 M 1 1 ;
  • d r ( 2 ) = C r + M 2 1 M 2 1 ;
  • d i a g { a 1 , a 2 , , a n } is a block diagonal matrix in which the diagonal blocks are a i , i = 1 , n ¯ , and the remaining blocks are zero;
  • d i a g + { a 1 , a 2 , , a n } is a square over-diagonal block matrix in which the over-diagonal blocks are a i , i = 1 , n ¯ , and the remaining blocks are zero, i.e., this is a matrix of the form
    0 a 1 0 0 0 0 0 a 2 0 0 0 0 0 0 a n 0 0 0 0 0 ;
  • d i a g { a 1 , a 2 , , a n } is a square sub-diagonal block matrix in which the sub-diagonal blocks are a i , i = 1 , n ¯ , and the remaining blocks are zero, i.e., this is a matrix of the form
    0 0 0 0 0 a 1 0 0 0 0 0 a 2 0 0 0 0 0 0 a n 0 ;
  • q ¯ i = 1 q i , f ¯ i = 1 f i ;
  • n t ( 1 ) = { n t ( 1 ) , n t ( 2 ) , , n t ( M 1 ) } is a servicing process for customers of type 1 (high priority customers);
  • n t ( 2 ) = { n ˜ t ( 1 ) , , n ˜ t ( M 2 ) } is a servicing process for customers of type 2 (low priority customers).
With the last two notations, the Markov chain ξ t   , t 0 , can be written in a more compact form
ξ t = { ( i t , k t , r t , n t , ν t , n t ( 1 ) , n t ( 2 ) ) ,   t 0 } .
We arrange the states of the Markov chain ξ t ,   t 0 , so that the first four components { i t , k t , r t , ν t } are arranged in direct lexicographic order, and the states of each of the processes n t and n ˜ t are arranged in reverse lexicographic order. Reverse lexicographic ordering is required here to describe in what follows the transition rates of the processes n t and n ˜ t using the matrices P i ( · ) , A i ( · , · ) , and L i ( · , · ) .
Let us give a brief explanation of the probabilistic values of these matrices. For this, we introduce the matrices
S ˜ l = 0 O S 0 ( l ) S l , l = 1 , 2 .
Then:
  • L k ( n , S ˜ l ) is a matrix of dimension C n k + M l 1 M l 1 × C n k + M l 2 M l 1 , containing transition rates of the random process n t ( l ) , leading to service end at one of the n k servers, servicing customers of type l. Here k is the number of available servers, n is the total number of available servers and servers servicing type l customers.
  • P n ( β l ) is a matrix of dimension C n + M l 1 M l 1 × C n + M l M l 1 . It contains transition rates of the process n t ( l ) , leading to increase from n to n + 1 the number of servers servicing type l customers.
  • A n ( k , S ˜ l ) is a matrix of dimension C n + M l 1 M l 1 × C n + M l M l 1 . The matrix contains transition rates, which do not lead to the change of the number n of busy servers, servicing type l customers. Here n is the number of servers servicing customers of type l, k is the total number of available servers and servers servicing customers of type l.
In the following we assume L 0 ( 0 ) = A 0 ( · ) = P 1 ( · ) = 0 . The algorithm for calculating the matrices P i ( · ) ,   A i ( · , · ) and L i ( · , · ) follows from the results of V. Ramaswamy and D. Lucantoni published in [19,20]. This algorithm is described clearly step by step in [21]. We give the corresponding description in Appendix A.
Theorem 1.
The infinitesimal generator of the Markov chain ξ t has the following block structure:
Q = T Q 0 , 1 O O O Q 1 , 0 Q 1 , 1 Q 1 , 2 O O O Q 2 , 1 Q 2 , 2 O O O O O Q R 1 , R 1 Q R 1 , R O O O Q R , R 1 Q R , R ,
where non-zero blocks T ,   Q i , i are defined as:
1. 
T = ( T n , n ) n , n = 0 , N ¯ + Δ ( 0 ) is a tridiagonal block matrix, where
(a) 
T n , n , n = 0 , N 1 ¯ , is a square matrix of order W ¯ r = 0 n d r ( 1 ) d n r ( 2 )
T n , n = d i a g { D 0 A r ( N n + r , S 1 ) A n r ( ( N r , S 2 ) , r = 0 , n ¯ } , n = 0 , N 1 ¯ ,
(b) 
T N , N is a square matrix of order W ¯ r = 0 N d r ( 1 ) d N r ( 2 )
T N , N = d i a g { D ¯ A r ( r , S 1 ) A N r ( ( N r , S 2 ) , r = 0 , N ¯ } ,
where D ¯ = D 0 + q ¯ 0 D 1 + f ¯ 0 D 2
(c) 
T n , n 1 is a matrix of dimension W ¯ r = 0 n d r ( 1 ) d n r ( 2 ) × W ¯ r = 0 n 1 d r ( 1 ) d n r 1 ( 2 )
T n , n 1 = d i a g { I W ¯ d r ( 1 ) L N n ( N r , S ˜ 2 ) , r = 0 , n 1 ¯ } O W ¯ d n ( 1 ) × W ¯ r = 0 n 2 d r ( 1 ) d n r 1 ( 2 ) | I W ¯ L N n ( N , S ˜ 1 ) + d i a g { I W ¯ L N n ( N n + r , S ˜ 1 ) I d n r ( 2 ) r = 1 , n 1 ¯ } O W ¯ d n ( 1 ) × W ¯ r = 0 n 1 d r ( 1 ) d n r 1 ( 2 ) , n = 1 , N ¯ ,
(d) 
T n , n + 1 is matrix of dimension W ¯ r = 0 n d r ( 1 ) d n r ( 2 ) × W ¯ r = 0 n + 1 d r ( 1 ) d n r + 1 ( 2 )
T n , n + 1 = d i a g { D 2 I d r ( 1 ) P n r ( β 2 ) , r = 0 , n ¯ } | O W ¯ r = 0 n d r ( 1 ) d n r ( 2 ) × W ¯ d n + 1 ( 1 ) + O W ¯ r = 0 n 1 d r ( 1 ) d n r ( 2 ) × W ¯ r = 0 n + 1 d r ( 1 ) d n r + 1 ( 2 ) O W ¯ d n ( 1 ) × W ¯ r = 0 n d r ( 1 ) d n r + 1 ( 2 ) | D 1 P n ( β 1 ) + d i a g + { D 1 P r ( β 1 ) I d n r ( 2 ) , r = 0 , n 1 ¯ } | O W ¯ r = 0 n d r ( 1 ) d n r ( 2 ) × W ¯ d n + 1 ( 1 ) , n = 0 , N 1 ¯
2. 
Block Q 0 , 1 is a matrix of dimension W ¯ n = 0 N r = 0 n d r ( 1 ) d n r ( 2 ) × 2 W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) , :
Q 0 , 1 = O W ¯ n = 0 N 1 r = 0 n d r ( 1 ) d n r ( 2 ) × 2 W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) H 1 | H 2 ,
where square matrices H 1 , H 2 of order W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) are defined as:
H 1 = f 0 d i a g { D 2 I d r ( 1 ) d N r ( 2 ) , r = 0 , N ¯ } , H 2 = q 0 d i a g { D 1 I d r ( 1 ) d N r ( 2 ) , r = 0 , N ¯ } .
3. 
Block Q 1 , 0 is a matrix of dimension 2 W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) × W ¯ n = 0 N r = 0 n d r ( 1 ) d n r ( 2 ) :
Q 1 , 0 = O W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) × W ¯ n = 0 N 1 r = 0 n d r ( 1 ) d n r ( 2 ) F 1 O W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) × W ¯ n = 0 N 1 r = 0 n d r ( 1 ) d n r ( 2 ) F 2 ,
where square matrices F 1 , F 2 of order W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) are defined as:
F 1 = d i a g { I W ¯ d r ( 1 ) L 0 ( N r , S ˜ 2 ) P N r 1 ( β 2 ) , r = 0 , N 1 ¯ , O W ¯ d N ( 1 ) d 0 ( 2 ) } + d i a g { I W ¯ L 0 ( r , S ˜ 1 ) P N r ( β 2 ) , r = 1 , N ¯ } , F 2 = d i a g { O W ¯ d N ( 2 ) , I W ¯ L 0 ( r , S ˜ 1 ) P r 1 ( β 1 ) I d N r ( 2 ) , r = 1 , N ¯ } + d i a g + { I W ¯ P r ( β 1 ) L 0 ( N r , S ˜ 2 ) , r = 0 , N 1 ¯ } .
4. 
Block Q i , i 1 , i = 2 , R ¯ , of order ( i + 1 ) W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) × i W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) :
Q i , i 1 = F 1 O W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) × ( i 1 ) W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) I i F 2 , i = 2 , R ¯ .
5. 
Block Q i , i , i = 1 , R 1 ¯ , is a square matrix of order ( i + 1 ) W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) :
Q i , i = I i + 1 T N , N + Δ ( i ) , i = 1 , R 1 ¯ .
6. 
Block Q R , R is a square matrix of order ( R + 1 ) W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) :
Q R , R = I R + 1 T ^ N , N + Δ ( R ) ,
where matrix T ^ N , N is derived from matrix T N , N by replacing the Kronecker factors D ¯ with the factors D ( 1 ) .
7. 
Block Q i , i + 1 of dimension ( i + 1 ) W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) × ( i + 2 ) W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) :
Q i , i + 1 = I i + 1 d i a g { f i D 2 I d r ( 1 ) d N r ( 2 ) , r = 0 , N ¯ } | O ( i + 1 ) W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) × W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) + + I ^ i + 1 d i a g { q i D 1 I d r ( 1 ) d N r ( 2 ) , r = 0 , N ¯ } , i = 0 , R 1 ¯ ,
where I ^ i + 1 is a matrix of dimension ( i + 1 ) × ( i + 2 ) defined as
0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 .
Matrices Δ ( i ) , i = 0 , R ¯ are diagonal matrices, such that the equality Q e = 0 T holds.
Remark 1.
Let us explain in more details how to calculate matrices Δ i , i = 0 , R ¯ . Let i = 0 . Firstly, calculate the column vector T e + Q 0 , 1 e . Then the elements of this vector, taken with a minus sign, are the diagonal elements of the matrix Δ 0 . Similarly, to build the Δ i matrix for i = 1 , R ¯ , we need to calculate the column vector Q i , i 1 e + Q i , i e + Q i , i + 1 e . Then the elements of this vector, taken with a minus sign, are the diagonal elements of the matrix Δ i .

3.2. Stationary Distribution

Let p be the row vector of the stationary probability distribution of the states of the Markov chain. Then, this vector is defined as the only solution of the system of linear algebraic equations
p Q = 0 ,   p e = 1 .
If system (1) has large dimension. For this, we represent vector p as p = ( p 0 , p 1 , , p R ) , where vector p 0 has order W ¯ n = 0 N r = 0 n d r ( 1 ) d n r ( 2 ) , and vector p i has order ( i + 1 ) W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) , i = 1 , R ¯ .
Then the vectors p i ,   i = 0 , R ¯ , can be calculated by the algorithm, which consists of the following steps.
1.
Find the matrices G R 1 , G R 2 , , G 0 from the reverse recursion equation:
G i = Q i + 1 , i + 1 Q i + 1 , i + 2 G i + 1 1 Q i + 1 , i ,   i = R 2 , R 1 , , 0 ,
where
G R 1 = ( Q R , R ) 1 Q R , R 1 .
2.
Calculate Q ¯ i , i , Q ¯ i , i + 1 by the formulas
Q ¯ R , R = Q R , R , Q ¯ i , i = Q i , i + Q i , i + 1 G i ,   i = 0 , R 1 ¯ , Q ¯ i , i + 1 = Q i , i + 1 ,   i = 0 , R 1 ¯ .
3.
Find the matrices Φ i from the recurrence relations:
Φ 0 = I ,   Φ i = Φ i 1 Q ¯ i 1 , i Q ¯ i , i 1 ,   i = 1 , R ¯ .
4.
Calculate the vector p 0 as the only solution of the system of algebraic equations:
p 0 ( Q ¯ 0 , 0 ) = 0 ,
p 0 ( e + i = 1 R Φ i e ) = 1 .
5.
Calculate vectors p i using formulas:
p i = p 0 Φ i ,   i = 1 , R ¯ .
Remark 2.
When solving a system of linear algebraic Equations (2) and (3) it is necessary to know that system (2) has a rank equal to its dimension minus one. However, replacing one of the equations, for example, the first one, of this system by Equation (3), we get a system that has a unique solution. This modification must be done before solving the system.
Remark 3.
Generally speaking, in order to find the Markov chain stationary distribution, it is necessary to solve the system of linear algebraic Equations (1) or, writing by blocks,
j = m a x { i 1 , 0 } m i n { i + 1 , R } p i Q i , j = 0 ,   i = 0 , R ¯ ,   i = 0 R p i e = 1 .
This system has rank W ¯ n = 0 N r = 0 n d r ( 1 ) d n r ( 2 ) + i = 1 R ( i + 1 ) W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) and, for reasonably large values of R , N and dimensions of M M A P and P H , the rank of this system becomes so large that it is not possible to solve the system straightforward, for example, using an inverse matrix. Therefore, it seems appropriate to use the algorithm described above, in which the maximum block size used is ( R + 1 ) W ¯ r = 0 N d r ( 1 ) d N r ( 2 ) .
However, for small values of the parameters, system (1) or (4) can be used to check the solution obtained using the algorithm described above. In particular, this fact can be used when debugging the algorithm.

3.3. Performance Measures

As a result of the calculation of the stationary distribution of the system, a number of important stationary performance measures can be found. Let us discuss some of them.
  • Vector of probabilities that the queue is empty and n devices are occupied:
    p 0 ( n ) = p 0 U ( n ) ,
    where
    U ( n ) = O W ¯ l = 0 n 1 m = 0 l d m ( 1 ) d l m ( 2 ) × W ¯ r = 0 n d r ( 1 ) d n r ( 2 ) I W ¯ r = 0 n d r ( 1 ) d n r ( 2 ) O W ¯ l = n + 1 N m = 0 l d m ( 1 ) d l m ( 2 ) × W ¯ r = 0 n d r ( 1 ) d n r ( 2 ) ,   n = 0 , N ¯ .
  • The probability that the queue is empty, n servers are busy, and r of them are servicing high priority customers:
    p 0 ( n , r ) = p ( n ) u ( n , r ) , n = 0 , N ¯ , r = 0 , n ¯ ,
    where column vector u ( n , r ) is defined as
    u ( n , r ) = 0 W ¯ l = 0 r 1 d l ( 1 ) d n l ( 2 ) T e W ¯ d r ( 1 ) d n r ( 2 ) 0 W ¯ l = r + 1 n d l ( 1 ) d n l ( 2 ) T .
  • The probability that the queue is empty and n servers are busy:
    p 0 ( n ) = r = 0 n p 0 ( n , r ) ,   n = 0 , N ¯ .
  • The probability that there are i customers in the queue, of which k have high priority, and r high priority customers are being serviced:
    p i ( k , r ) = p i 0 k W ¯ n = 0 N d n ( 1 ) d N n ( 2 ) T u ( N , r ) 0 ( i k ) W ¯ n = 0 N d n ( 1 ) d N n ( 2 ) T ,   i = 1 , R ¯ ,   k = 0 , i ¯ ,   r = 0 , N ¯ .
  • The probability that there are i customers in the queue, of which k have high priority:
    p i ( k ) = r = 0 N p i ( k , r ) ,   i = 1 , R ¯ ,   k = 0 , i ¯ .
  • The probability that there are i customers in the queue:
    p i = p i e ,   i = 1 , R ¯ .
    The equality p i = k = 0 i p i ( k ) must hold.
  • The average number of customers in the system:
    N ¯ s y s t e m = n = 1 N n p 0 ( n ) + i = 1 R ( i + N ) p i .
  • The average number of high priority customers in the system:
    N ¯ s y s t e m ( 1 ) = n = 1 N r = 1 n r p 0 ( n , r ) + n = 1 N i = 1 R k = 1 i ( r + k ) p i ( k , r ) .
  • The average number of busy servers:
    N ¯ s e r v e r s = n = 1 N n p 0 ( n ) + N i = 1 R p i .
  • The average number of servers servicing high priority customers:
    N ¯ s e r v e r s ( 1 ) = n = 1 N r = 1 n r p 0 ( n , r ) + i = 1 R k = 0 i r = 1 N r p i ( k , r ) .
  • The average queue length:
    N ¯ q u e u e = i = 1 R i p i .
We implemented the algorithm for calculating the stationary distribution of the system states and performance metrics described above in Python 3 language. Numerical results are discussed in Section 5.

4. Performance Evaluation of Priority Queueing Systems with an Arbitrary Number of Customers Types

The analytical solution is applicable only for priority systems with two types of customers. For systems in general, it is almost impossible to construct a Markov chain generator, find a stationary distribution, and calculate all the necessary performance characteristics.
Using simulation for finding characteristics for a large dataset of input parameters records can take too long (tens or hundreds of hours). Therefore, to solve the problem formulated in the article, a new method has been developed based on a combination of machine learning (ML) and simulation methods.
The essence of the method is that based on the synthetic dataset, train a machine learning model to predict the characteristics of the priority system. The training dataset is generated by repeated execution of the simulation model on different random input parameters values. To train machine learning algorithms, we generated a dataset of 200,000 records.
This section firstly describes the simulation model. Since most ML algorithms require a fixed number of input parameters, we had to restrict the input parameters space and use a functional definition of some of the model parameters. Below, we discuss this approach, outline the ML algorithms used, and describe how the synthetic input dataset for model training was generated.

4.1. Performance Estimation with Monte Carlo Method

The discrete-event simulation model [22] allows estimation of the characteristics of the priority queueing system by simulating the events occurring in it: the arrival of new customers, service start and finish times. The time in the model changes in leaps and bounds at the start of event processing. During the execution of the model, various characteristics are calculated, e.g., queue length, customers delays, the total busy time of the servers. When the execution ends, the collected data is averaged to provide estimates of stationary values of the system characteristics.
The main limitation of this method is the need to simulate a massive number of events to obtain robust estimates. The number of events depends both on the model’s size (queue capacity, number of devices and priority classes, dimensions of underlying chains in M M A P and P H distributions) and on the stochastic characteristics of the random distributions. For instance, to obtain the results presented in this article, it was required to simulate an average of 5 million events for each set of input data.
The simulation model uses the same input parameters as the analytic model:
  • K is the number of customers types;
  • D k is a set of matrices defining the M M A P , k = 1 , K ¯ ;
  • P H k is a set of phase-type distributions of service time for customers of type k, specified with matrices S k and initial probability vectors β k , k = 1 , K ¯ ;
  • R is the queue capacity;
  • N is the number of servers;
  • p e is an array of size K × R , in which cell [ k , r ] contains the probability that the customer of type k joins the queue when its length is equal to r, r = 1 , R ¯ .
In order to validate the implementation of the Monte Carlo method, we used the results of the analytical model obtained for K = 2 . We discuss the validation results in Section 5.

4.2. Performance Estimation with Machine Learning (ML) Methods

The estimation of the characteristics of a priority system with the Monte Carlo method is relatively slow. As noted above, the computation of a simulation model with large input datasets takes much time.
In order to speed up the estimation of the characteristics, we decided to use machine learning methods. We concentrated on estimating average response time and packet loss probability for the given customer type. In general, the model can be trained to predict any characteristic obtained using the Monte Carlo method. Let us consider in more detail the application of ML algorithms.

4.2.1. Definition of ML Input Parameters

To estimate the priority queueing system performance we need to specify the number of customers types K, M M A P matrices D k , k = 1 , K ¯ , set of P H distributions for each customer type, number of servers N, queue capacity R and an array of customer joining probabilities p e , e = 1 , K × R ¯ . The machine learning algorithm cannot be constructed for an arbitrary M M A P and P H distributions since the algorithm must have a fixed number of input parameters. At the same time, there can be an arbitrary number of customer types and, correspondingly, an arbitrary number of matrices D k , S k and vectors β k . Moreover, M M A P and P H distributions matrices may have an arbitrary order. Therefore, we applied the following restrictions and assumptions to the problem to limit the number of input parameters.
  • We define M M A P with the number of types of customers K, coefficient of variation c a , skewness γ a , lag-1 autocorrelation l and arrival rates λ k , k = 1 , K ¯ . For these parameters, we firstly fit stationary P H distribution with matrix D 0 with arrival rate k = 1 K λ k using the three moments matching method proposed by Johnson and Taafe [23]. Then we use method proposed by Horvath et al. [24] to find M A P from this P H distribution and lag-1 autocorrelation l. Finally, we split the matrix D 1 of the found M A P into matrices D k , k = 1 , K ¯ , proportionally to the arrival rates λ k .
  • To avoid an arbitrary number of arrival rates λ k , k = 1 , K ¯ , we explicitly specify rates of the lowest and highest priority customers λ 1 and λ K only. To find intermediate rates, we specify an approximation function f, such that any arrival rate can be computed as λ k = f ( k , λ 1 , λ K ) . This function f along with boundary rates λ 1 and λ K are input parameters for the ML algorithm.
  • We define the phase-type distributed service times for customers of different types in the same way as we defined the M M A P by specifying coefficient of variation c s , skewness γ s and service rates μ k , k = 1 , K ¯ . To define service rates, we specify only boundary rates μ 1 and μ K for the highest and lowest priority customers, and the approximation function g such that the service rate of any intermediate customer type is μ k = g ( k , μ 1 , μ K ) . To fit P H distributions from these parameters, we use the moments matching method [23]. The main limitation here is that service time distributions of different types of customers have the same coefficient of variation and skewness and differ only in rate.
  • To slightly simplify the model, we assumed that the probability p k that the customer joins the queue when all servers are busy depends only on this customer type. Thus, the joining probability is assumed independent of the queue length. Then, we assumed that customers with the highest priority always join the queue ( p 1 1 ), while the joining probability for customers of other types depends on the type number k. This dependence is specified with a function h, such that p k = h ( k ) .
Taking into account the assumptions described above, it is possible to build a machine learning algorithm for a given class of problems, the input parameters of which are:
  • K, number of customers types;
  • N, number of servers;
  • c a , coefficient of variation of the arrival M M A P ;
  • γ a , skewness of the arrival M M A P ;
  • l, lag-1 autocorrelation of the arrival M M A P ;
  • λ 1 , arrival rate of the highest priority customers;
  • λ K , arrival rate of the lowest priority customers;
  • f a , approximation function of arrival rates, λ k = f a ( k , λ 1 , λ K ) , k = 1 , K ¯ ;
  • c s , coefficient of variation of service time P H distributions;
  • γ s , skewness of service time P H distributions;
  • μ K , service rate of the lowest priority customers;
  • μ 1 , service rate of the highest priority customers;
  • g s , approximation function of service rates, μ k = g s ( k , μ 1 , μ K ) , k = 1 , K ¯ ;
  • R, queue capacity;
  • h, approximation function of customer joining probability p k = h ( k ) , such that h ( 1 ) 1 and p k = h ( k ) [ 0 , 1 ] for any k = 1 , K ¯ .
Using these input parameters, we built ML models for the prediction of system response time and customers loss probability. In addition, we also built ML models for systems classification depending on the given threshold values of the response time and customer loss probability (e.g., the system is classified as “good” or “bad” depending on the predicted loss probability is below or above the threshold). These ML models use artificial neural networks, decision trees, and random forests.

4.2.2. Machine Learning Models

To study priority queueing system performance, we used ML methods to solve two types of problems: regression and classification.
  • In regression problems, we trained the models to predict the performance characteristics value, e.g., “what is the expected average system size for this input?”.
  • In classification problems, we used the ML models to predict whether the specific performance characteristic fits the given threshold, e.g., “will the system for this input provide priority customer loss probability less than 0.05?”.
We used four types of ML algorithms: decision trees [25], random forests [26], gradient boosting [27] and artificial neural networks (ANN). All of these algorithms were applied to both regression and classification problems.
Hyperparameters for decision trees, random forests, and gradient boosting are presented in Section 5. Let us discuss neural networks in more detail since their architecture for regression and classification problems is different.
Figure 1 shows the architecture of a neural network for regression problems of predicting response time and loss probability. We used a brute force algorithm to select optimal neural network parameters by varying the number of hidden layers from one to two and the number of neurons from 64 up to 256. The network has one hidden layer with 128 perceptrons. We used Adam’s algorithm [28] to optimize the stochastic gradient descent. Activation function on the hidden and output layers was ReLu [29]. To train the ANN, the dataset was split into subsets (batches) of 512 copies. The number of epochs for training was equal to 1000.
Figure 2 shows the neural network architecture for classification problems. We used brute force algorithm to select optimal neural network parameters. The network consists of an input layer with 26 inputs, two hidden layers with 128 perceptrons in each one, and an output layer. Each layer uses the ReLu activation function. As in ANN for regression problems, we used Adam’s algorithm to optimize gradient descent.

4.2.3. Generation of Synthetic Dataset for Machine Learning

The dataset is needed to train and test the ML model. We used the data obtained after repeated simulation model execution with different randomly generated input parameters to build this dataset. Let us discuss the synthetic input parameters generator in more detail.
All the numerical parameters are assumed to be uniformly distributed. For each of them we specify its minimum and maximum values.
To set the customers arrival rates λ k , we explicitly select random arrival rates of the highest and lowest priority customers λ 1 , λ K [ λ min , λ max ] , along with the approximation function f a , λ k = f a ( k , λ 1 , λ K ) . This approximation function is randomly selected from the predefined set of functions. The same approach is used for customers service rates and the probabilities of customers joining the queue.
Figure 3 shows the set of approximation functions used for arrival rates λ k and service rates μ k for customers types k = 1 , K ¯ calculation. This set includes:
  • F c ( n ) C , constant values;
  • F l ( n ) = y K y 1 K 1 ( n 1 ) + y 1 , linear approximation;
  • F p ( n ) = y K y 1 ( K 1 ) 2 ( n 1 ) 2 + y 1 , parabolic approximation;
  • F h ( n ) = K ( y 1 y K ) ( K 1 ) n + K y K y 1 K 1 , hyperbolic approximation;
  • F e ( n ) = y 1 y K y 1 n 1 K 1 , exponential approximation;
  • F l o g ( n ) = y K y 1 ln K ln n + y 1 , logarithmic approximation;
  • F g ( n ) = y 1 2 n , geometric progression.
In all functions, n is an integer and takes values from [ 1 , 2 , , K ] . To generate the probabilities of customers joining the queue, we used four functions:
  • H 1 ( n ) 1 , customers always join the queue if it has space;
  • H l ( n ) = n 1 K 1 + 1 , linear approximation;
  • H h ( n ) = 1 n , hyperbolic approximation;
  • H g ( n ) = 1 2 n 1 , geometric progression approximation.
Note that the accuracy of predictions obtained using ML methods depends on how representative is the training dataset. For example, suppose the system’s behavior on a particular set of input parameters differs significantly from everything observed in the training dataset. In that case, it will not be possible to obtain an accurate prediction at such an input. Because of this, we considered wide ranges for all input parameters, and the training sample was quite large (200,000 records). At the same time, it is crucial to avoid overfitting since the prediction accuracy also decreases.
The main limitation of our approach to describing input parameters is the use of the same coefficients of variation and skewness for service times and intervals between consumers of different types. It is easy to get around it, for example, using the same functional approach for setting the coefficients of variation and skewness that we used to set the arrival and service rates of intermediate types of customers. In this case, however, the input dimension will increase, and a larger dataset may need to be considered. In addition, more sophisticated and computationally expensive methods to M M A P fitting will be needed.

5. Numerical Results

To study the performance of the priority queueing system using the proposed methodology, we conducted a series of numerical experiments:
  • Firstly, we analyzed the analytic model complexity and used it to validate the simulation model based on Monte Carlo method.
  • Secondly, we generated a synthetic dataset for training and testing ML models.
  • Finally, we studied the accuracy of models predictions.
We compared customer loss probability, the average number of customers in the queue, and the average number of customers in the system during the simulation model validation. These metrics were computed for different values of queue capacity and servers number. All validations were passed, which showed that the simulation model is correct and can be safely used in the following experiments.
In the numerical experiments with ML models, we analyzed two characteristics of the priority systems: response time and loss probability of priority customers. In the scope of telecommunication networks, these characteristics are essential for verifying QoS compliance. However, our methodology allows studying any other characteristic, e.g., the average system size, number of high-priority customers, or number of busy servers. Furthermore, we investigated regression and classification problems using ML methods for both response time and loss probability.
The algorithm for computing stationary distribution of the system states that we described in Section 3 was implemented in Python language, as well as the simulation model interface. In addition, we used the C++ language to implement the core of the simulation model to improve performance. To connect Python interfaces and C++ core, we used Cython. Also, we used Jupyter Notebook to work with the dataset.
The source code of the project is available on GitLab: https://gitlab.com/lab69/priority-queues (accessed on 25 October 2021).

5.1. Complexity of the Analytical Model

Before moving on, we studied the bounds of size of the input, where results can be obtained with the analytical model. Since the number of customers in the analytical model is always equal to K = 2 , we varied the number of servers, the queue capacity, order of arrival M M A P , and P H service times.
The key metric that defines the problem complexity is the order of the infinitesimal generator since it defines a linear equation system that needs to be solved to obtain the characteristic values. Figure 4 shows the dependency between the system generator order and the number of states in M M A P or P H , queue capacity, and the number of servers. It can be seen that the generator complexity exponentially grows along with the order of M M A P and the number of servers. However, it linearly depends on the order of P H service time distributions and almost linearly on the queue capacity.
In general, for reasonably large input values, the generator is too big to be used to compute stationary states distribution and performance characteristics. For instance, Table 1 provides measurements of time required to build the generator matrix depending on the number of servers. The experiment was conducted on a computer with an Intel Core-i7 processor and 16 GB of RAM. Although this particular limitation can be circumvented by using a more efficient matrix representation. The problem remains since the dependence of the generator order on the number of servers is exponential.

5.2. Validation of the Simulation Model

We used the analytical model to validate the simulation model implementation on reasonably small input values, where an analytical solution could be obtained. In these validations, we varied the number of servers and queue capacity and used different M M A P flows and P H service time distributions. For example, Figure 5 shows the results of comparing customer’s loss probability, queue size, and the number of customers in the system.
All validations were passed and showed that the simulation model provides numerical results with high precision. The relative error in the experiment does not exceed 0.5 % . However, to reach high accuracy simulation model had to process about 1,000,000 customers for each input value, which required a reasonably large amount of time.
Simulation model validation was automated using the PyTest library. Each time the simulation model code changed, unit tests were executed to compare simulation and analytical results. This approach allows being sure that any change in the code does not break the model’s correctness.

5.3. Generation of the Dataset for Machine Learning Algorithms

To train and test ML models, we generated a large dataset with 200,000 random input vectors, as was described in Section 4. After that, the simulation model was used to get performance characteristics values for each input record in this dataset. Boundary values for all input parameters are shown in Table 2.
Note that the skewness did not have the minimum value. Instead, it was computed for the selected CV as described in [23].
Figure 6 shows the histograms of different input parameters over the generated dataset. Most of the parameters are distributed almost uniformly; the only exception is the queue capacity. We forced the generator to include more samples with big capacity for the systems with a large number of customers types.

5.4. Prediction of System Response Time

The first performance metric we studied using machine learning methods was the system response time, i.e., the time the customer spends in the system from arrival to the end of the service. Regression models were used to predict the exact response time value. The classification models answered whether the system response time for the given input is less than a given threshold.

5.4.1. Regression Problem

We used decision trees, random forests, gradient boosting, and neural networks in the regression problem for predicting the system response time. To select the optimal hyperparameters for each algorithm, we used the grid search method. The optimal decision metric for the trees algorithms was chosen among MSE and MAE, and the max tree depth varied from 4 to 20. The number of predictors, a parameter specific for random forest and gradient boosting, was chosen from an array [ 100 , 5000 ] with step 100. To estimate the accuracy of the algorithms, we used three metrics: the correlation coefficient, R2-coefficient, and the mean squared error. Table 3 shows the optimal hyperparameters for tree algorithms. The optimal metric for each tree algorithm was the mean squared error. The maximum tree depth was equal to 16 for the random forest algorithm.
Figure 7 shows the scatter diagrams for ML algorithms. The decision tree algorithm demonstrates the largest scatter and error; in some cases, the relative error reaches 20 % . Table 4 shows the metric values for regression models for system response time prediciton. The random forest algorithm and gradient boosting demonstrate similar results for all metrics. The best results for all metrics were obtained with the neural networks.
We analyzed the dependency between the system response time and the number of servers, service rate of high priority customers, and queue capacity to validate the models. In each case, the system response time was computed using the simulation model and each trained ML model.
In the first experiment, the number of servers varied from 1 to 10, while other parameters were fixed: K = 3 , c a = 5 , γ a = 50 , f a = F l (linear approximation of arrival rates), λ 1 = 4.0 , λ K = 5.0 , c s = 5 , γ s = 50 , g s = F l , μ 1 = 4.0 , μ K = 5.0 , R = 10 , h = 1 . Figure 8a shows the results. In this case, the random forest algorithm demonstrates the most accurate results, while the neural network prediction is the worst. The maximum error in random forest prediction arises for the system with a single server.
In the second experiment (see Figure 8b)) we varied the queue capacity from 0 up to 10 and set other parameters to K = 2 , c a = 5 , γ a = 50 , f a = F l , λ 1 = 2.0 , λ K = 1.0 , c s = 5 , γ s = 50 , g s = F l , μ 1 = 1.0 , μ K = 5.0 , N = 1 , h = 1 . In contrast to the previous experiment, the neural network gives here the highest accuracy, while the random forest has the greatest error.
In the third experiment (see Figure 8c) the service rate of the highest priority customers was varied from 0.01 to 0.3 , while the other parameters were fixed: K = 3 , N = 5 , c a = 5 , γ a = 50 , f a = F l , λ 1 = 1.0 , λ K = 1.0 , c s = 5 , γ s = 50 , g s = F l , μ 1 = 0.1 μ K = 1.0 , R = 1 , h = 1 . Random forest and gradient boosting has the highest accuracy, while the neural network gives the worst prediction, especially when the service rate is small.

5.4.2. Classification Problem

In many practical applications, the exact value of the system response time is not important. Instead, we may be interested in whether the response time is short enough. To answer this question, we trained several ML models to classify the priority queueing systems depending on the expected value of the response time. As a threshold, we assumed the response time equal one second, i.e., the system belongs to the first class if its response time is more than one second; otherwise, it belongs to the second class.
In addition to decision trees, random forests, gradient boosting and neural networks, we used logistic regression [30] as this is the simplest ML method applied to classification problems. Table 5 shows the results of the accuracy comparison.
The experiment result shows that gradient boosting and neural networks provide the most precise results. As expected, the logistic regression algorithm is less effective than any other algorithm being used [31,32].

5.5. Prediction of the Priority Customers Loss

The second metric we studied using ML methods was the probability of losing the customer with the highest priority. According to the assumptions in Section 4.2.1, the highest priority customer may be lost in the only case that the queue is full. As in the response time prediction, both regression and classification problems were considered.

5.5.1. Regression Problem

To solve the regression problem for predicting the loss probability, we used only two algorithms: a gradient boosting and neural network. Early experiments showed that the decision tree and random forest give an unacceptably high error. Therefore, we trained two models and compared the results.
Gradient boosting algorithm and neural network show similar results (see Table 6); their metrics are practically the same. Figure 9 demonstrates that the neural network has the same absolute error for all samples. As for gradient boosting, it provides a larger absolute error when samples values (that is loss probability) are close to zero.
To validate ML models for loss probability prediction we used the similar validation datasets as for response time validation. Figure 10a–c show the numerical results.

5.5.2. Classification Problem

The classification models define whether the probability of losing a priority customer is greater than 0.1 . We used logistic regression, tree algorithms, and neural network algorithms for classification problems. Results in Table 7 shows that the neural network provides the best precision.

5.6. Analysis of Elapsed Time

To use machine learning algorithms, they need to be trained, which takes a significant amount of time. For example, Table 8 shows the time it took to train on a dataset with 200,000 records of decision tree algorithms, random forests, gradient boosting, and artificial neural networks.
Neural network training takes about 1200 s for 1000 epochs. The batch size equals 8192, the average time for epoch is about 1 s.
Table 9 shows the typical time that is required for estimation of system response time by analytical model, Monte Carlo method, and trained ML algorithms. For M M A P and P H distributions of reasonably small size, it took about 35 s to compute response time using the analytic method. In the same case, the Monte-Carlo method is ten times more efficient than the analytics algorithm. It is worth noting that the complexity of the analytical model grows exponentially, so in general, the simulation model is the only way to estimate the performance characteristics of the systems of arbitrary size.
At the same time, the performance of ML algorithms is more than 10 5 times better than the simulation model. Thus, while we needed to spend a significant amount of time generating a synthetic dataset and training machine learning algorithms, this time is fully compensated by the gain from the trained algorithms if estimates need to be obtained a very large number of distinct input vectors.

6. Conclusions

In this paper, we investigated the multi-server priority queueing system with correlated arrival M M A P flow of arbitrary number K of types of customers and finite queue. The type of the customer defines its priority, service time distribution, and the probability that the customer will join the queue when all servers are busy. Such systems are practically not studied in the literature. We presented an analytical solution for the system with two types of customers, calculated stationary distribution of the system states, and main performance measures, including average system size, the average number of priority customers, customer loss probability, and the number of busy servers.
The analytical model has a very high computational complexity, exponentially dependent on the number of servers and order of M M A P . Thus, in the numerical experiment, we could compute the model characteristics for systems with only four servers, while adding one more server led to memory overrun. Another limitation of the analytical model is that it supports only two classes of customers. To overcome these limitations, we described a new methodology for the fast estimation of system characteristics using a combination of simulation modeling (based on the Monte Carlo method) and machine learning. We conducted numerical experiments, showing that the proposed methodology allows estimating characteristics with high precision, up to 96–98%. Furthermore, estimation on the given input with a trained ML model requires several orders of magnitude less time than the barebone Monte Carlo method. As for machine learning methods, random forest and gradient boosting showed similar results in regression and classification problems for priority packets response time and loss probabilities.
The proposed methodology provides means for using the priority queueing system model in complex optimization problems, appearing in the design and implementation of modern telecommunication networks, where the traffic is essentially heterogeneous.
We plan to improve the algorithm’s performance for queueing system characteristics computation by using more advanced numerical techniques and sparse matrices. This idea is based on the observation that the generators are block matrices with lots of zeros. While this improvement can not solve the problem of exponential growth of the state space, it may help expand the area where the precise solution may be found. We also plan to explore the possibilities of using machine learning methods to solve other problems of queuing theory that cannot be solved using traditional methods. Finally, we are also working on the development of methods for applying the proposed model to estimate the characteristics of real technical telecommunication systems. The results of these researches will be presented in future papers.

Author Contributions

Conceptualization, V.V. and V.K.; methodology, V.V., V.K. and A.L.; software, A.S. and A.L.; validation, A.S., A.L. and V.K.; formal analysis, V.K. and V.V.; investigation, V.K., V.V., A.L. and A.S.; resources, V.V.; data curation, V.K.; writing—original draft preparation, V.K., A.S., A.L. and V.V.; writing—review and editing, A.S., A.L. and V.V.; visualization, A.S. and A.L.; supervision, V.V. and A.L.; project administration, V.V. and A.L.; funding acquisition, V.V. All authors have read and agreed to the published version of the manuscript.

Funding

The reported study was funded by RFBR, project number 19-29-06043.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
MAPMarkovian Arrival Process
MMAPMarked Markovian Arrival Process
PHPhase Type distribution
MLMachine Learning
ANNArtificial Neural Network
MSEMean Squared Error
CVCoefficient of Variation

Appendix A. Calculation of Matrices Pi (·), Ai (·,·), and Li (·,·)

  • Calculate the matrices τ ( k ) ( S ) ,   k { 0 , , M 1 } , which are obtained by removing the first k rows and the first k columns from the matrix S.
  • Calculate the matrices T j = τ ( M 2 j ) ( S ) ,   j { 1 , , M 2 } .
  • Calculate the matrices L i ( w ) ( T j ) using the following recurrence formulas:
    L i ( 0 ) ( T j ) = ( N i ) t r j , 1 j ,   i { 0 , , N 1 } ,   j { 1 , , M 2 } , L i ( w ) ( T j ) = ( N i ) t r j w , 1 j I O O L N 1 ( w 1 ) ( T j ) ( N i 1 ) t r j w , 1 j I O O L N 2 ( w 1 ) ( T j ) O O O t r j w , 1 j I O O L i ( w 1 ) ( T j ) , w { 1 , , r j 2 } ,   i { 0 , , N 1 } ,   j { 1 , , M 2 } ,
    where t k , l j is the ( k , l ) -th element of T j and r j is the number of rows in T j .
  • Calculate the matrices U i ( w ) ( T j ) using the following recurrence formulas:
    U i ( 0 ) ( T j ) = t 1 , r j j ,   i { 1 , , N } ,   j { 1 , , M 2 } , U i ( w ) ( T j ) = t 1 , r j w j I U N ( w 1 ) ( T j ) O O O O t 1 , r j w j I U N 1 ( w 1 ) ( T j ) O O O O O t 1 , r j w j I U i ( w 1 ) ( T j ) , w { 1 , , r j 2 } ,   i { 1 , , N } ,   j { 1 , , M 2 } .
  • Calculate the matrices L i ( N , T j ) = L i ( r j 2 ) ( T j ) ,   i { 0 , , N 1 } , and U i ( N , T j ) = i U i ( r j 2 ) ( T j ) ,   i { 1 , , N } ,   j { 1 , , M 2 } .
  • Calculate the matrices A i ( w ) using the following recurrence formulas:
    A i ( 0 ) = 0 i S M 1 , M 0 0 0 S M , M 1 0 ( i 1 ) S M 1 , M 0 0 0 2 S M , M 1 0 0 0 0 0 0 0 S M 1 , M 0 0 0 i S M , M 1 0 , i { 1 , , N } , A i ( j ) = O i U N ( N , T j ) N O O O L N 1 ( N , T j ) A 1 ( j 1 ) ( i 1 ) U N 1 ( N , T j ) N 1 O O O L N 2 ( N , T j ) A 2 ( j 1 ) O O O O O A i 1 ( j 1 ) U N i + 1 ( N , T j ) N i + 1 O O O L N i ( N , T j ) A i ( j 1 ) , i { 1 , , N } ,   j { 1 , , M 2 } .
  • Calculate the A i ( N , S ) as A 0 ( N , S ) = O 1 × 1 ,   A i ( N , S ) = A i ( M 2 ) ,   i { 1 , , N } .
  • When calculating the matrices L i ( N , S ˜ ) , we go to step 3, where we ignore the matrices T j and instead consider one matrix S ˜ . We also replace M by M ˜ = M + 1 , since the order of the matrix S ˜ is one more than the dimension of the matrix S.
    The required matrices L i ( N , S ˜ ) are calculated as follows: L i ( N , S ˜ ) = L i ( M 1 ) ( S ˜ ) ,   i { 0 , , N 1 } ,   L N ( N , S ˜ ) = O 1 × 1 . Here, the superscript already means that M is the order of the original matrix S.
  • Calculate the matrices P i ( j ) of dimension ( i + 1 ) × ( i + 2 ) using the following recursive formulas:
    P i ( 0 ) = β M 1 β M 0 0 0 0 β M 1 β M 0 0 0 0 0 β M 1 β M ,   i { 1 , , N 1 } , P i ( j ) = β M j 1 z ( j ) 0 0 0 0 0 T β M j 1 I P 1 ( j 1 ) O O O 0 T O β M j 1 I P 2 ( j 1 ) O O 0 T O O O β M j 1 I P i ( j 1 ) , j { 1 , , M 2 } ,   i { 1 , , N 1 } ,
    where vectors z ( j ) = ( β M j , β M j + 1 , , β M ) ,   j { 1 , , M 2 } .
  • Calculate the matrices P i ( β ) as P 0 ( β ) = β ,   P i ( β ) = P i ( M 2 ) ,   i { 1 , , N 1 } .

References

  1. Awan, I.; Younas, M.; Naveed, W. Modelling QoS in IoT applications. In Proceedings of the 2014 International Conference on Network-Based Information Systems, NBiS 2014, Salerno, Italy, 10–12 September 2014; pp. 99–105. [Google Scholar] [CrossRef]
  2. Muralidharan, S.; Roy, A.; Saxena, N. MDP-IoT: MDP based interest forwarding for heterogeneous traffic in IoT-NDN environment. Future Gener. Comput. Syst. 2018, 79, 892–908. [Google Scholar] [CrossRef]
  3. Emara, M.; Elsawy, H.; Bauch, G. Prioritized Multistream Traffic in Uplink IoT Networks: Spatially Interacting Vacation Queues. IEEE Internet Things J. 2021, 8, 1477–1491. [Google Scholar] [CrossRef]
  4. Tachibana, T.; Furuichi, T.; Mineno, H. Implementing and evaluating priority control mechanism for heterogeneous remote monitoring IOT system. In Adjunct Proceedings of the 13th International Conference on Mobile and Ubiquitous Systems: Computing Networking and Services; ACM International Conference Proceeding Series; Association for Computing Machinery: New York, NY, USA, 2016; pp. 239–244. [Google Scholar] [CrossRef] [Green Version]
  5. McWherter, D.T.; Schroeder, B.; Ailamaki, A.; Harchol-Balter, M. Priority mechanisms for OLTP and transactional Web applications. In Proceedings of the 20th International Conference on Data Engineering, Boston, MA, USA, 2 April 2004; Volume 20, pp. 535–546. [Google Scholar] [CrossRef]
  6. He, Q.M.; Xie, J.; Zhao, X. Priority queue with customer upgrades. Nav. Res. Logist. 2012, 59, 362–375. [Google Scholar] [CrossRef] [Green Version]
  7. Akan, M.; Alagoz, O.; Ata, B.; Erenay, F.S.; Said, A. A broader view of designing the liver allocation system. Oper. Res. 2012, 60, 757–770. [Google Scholar] [CrossRef] [Green Version]
  8. Heyman, D.; Lucantoni, D. Modeling multiple ip traffic streams with rate limits. IEEE/ACM Trans. Netw. 2003, 11, 948–958. [Google Scholar] [CrossRef]
  9. Dudin, A.N.; Klimenok, V.I.; Vishnevsky, V.M. The Theory of Queuing Systems with Correlated Flows, 1st ed.; Springer Publishing Company, Incorporated: Berlin/Heidelberg, Germany, 2019. [Google Scholar]
  10. Horváth, G. Efficient analysis of the queue length moments of the MMAP/MAP/1 preemptive priority queue. Perform. Eval. 2012, 69, 684–700. [Google Scholar] [CrossRef] [Green Version]
  11. Klimenok, V.; Dudin, A.; Dudina, O.; Kochetkova, I. Queuing system with two types of customers and dynamic change of a priority. Mathematics 2020, 8, 824. [Google Scholar] [CrossRef]
  12. Dudin, S.; Dudina, O.; Samouylov, K.; Dudin, A. Improvement of the fairness of non-preemptive priorities in the transmission of heterogeneous traffic. Mathematics 2020, 8, 929. [Google Scholar] [CrossRef]
  13. Klimenok, V.; Dudin, A.; Vishnevsky, V. Priority multi-server queueing system with heterogeneous customers. Mathematics 2020, 8, 1501. [Google Scholar] [CrossRef]
  14. Vishnevsky, V.M.; Semenova, O.V. Using a machine learning for analysis of polling systems with correlated arrivals. In Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); 2021; pp. 338–348, Unpublished. [Google Scholar]
  15. He, Q.M. Queues with Marked Customers; Cambridge University Press: Cambridge, UK, 1996; Volume 28, pp. 567–587. [Google Scholar] [CrossRef] [Green Version]
  16. Neuts, M.F. Matrix-Geometric Solutions to Stochastic Models. In DGOR; Springer: Berlin/Heidelberg, Germany, 1984. [Google Scholar] [CrossRef]
  17. Bocharov, P.P.; D’Apice, C.; Pechinkin, A.V. Queueing Theory; DE GRUYTER: Berlin, Germany, 2003. [Google Scholar] [CrossRef]
  18. Graham, A. Kronecker Products and Matrix Calculus with Applications; Courier Dover Publications: Mineola, NY, USA, 2018. [Google Scholar]
  19. Ramaswami, V. Independent Markov Processes in Parallel. Commun. Stat. Stoch. Model. 1985, 1, 419–432. [Google Scholar] [CrossRef]
  20. Lucantoni, D.M. Algorithms for the Multi-Server Queue with Phase Type Service. Commun. Stat. Stoch. Model. 1985, 1, 393–417. [Google Scholar] [CrossRef]
  21. Dudina, O.; Kim, C.; Dudin, S. Retrial queuing system with Markovian arrival flow and phase-type service time distribution. Comput. Ind. Eng. 2013, 66, 360–373. [Google Scholar] [CrossRef]
  22. Law, A.M. Simulation Modeling and Analysis; Mc Graw Hill Education: New York, NY, USA, 2013. [Google Scholar]
  23. Johnson, M.A.; Taaffe, M.R. Matching moments to phase distributions: Mixtures of erlang distributions of common order. Commun. Stat. Stoch. Model. 1989, 5, 711–743. [Google Scholar] [CrossRef]
  24. Horvath, G.; Buchholz, P.; Telek, M. A MAP fitting approach with independent approximation of the inter-arrival time distribution and the lag correlation. In Proceedings of the Second International Conference on the Quantitative Evaluation of Systems (QEST’05), Turin, Italy, 19–22 September 2005; pp. 124–133. [Google Scholar] [CrossRef]
  25. Gordon, A.D.; Breiman, L.; Friedman, J.H.; Olshen, R.A.; Stone, C.J. Classification and Regression Trees. Biometrics 1984, 40, 874. [Google Scholar] [CrossRef] [Green Version]
  26. Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Green Version]
  27. Friedman, J.H. Stochastic gradient boosting. Comput. Stat. Data Anal. 2002, 38, 367–378. [Google Scholar] [CrossRef]
  28. Kingma, D.P.; Ba, J. Adam: A Method for Stochastic Optimization. 2014. Available online: http://xxx.lanl.gov/abs/1412.6980 (accessed on 23 July 2021).
  29. Sharma, S.; Sharma, S.; Athaiya, A. Activation Functions in Neural Networks. Int. J. Eng. Appl. Sci. Technol. 2020, 4, 310–316. [Google Scholar] [CrossRef]
  30. Cramer, J. The Origins of Logistic Regression. SSRN Electron. J. 2002. [Google Scholar] [CrossRef] [Green Version]
  31. Mitchell, T. Machine Learning; McGraw-Hill International Editions; McGraw-Hill: New York, NY, USA, 1997. [Google Scholar]
  32. Hastie, T.; Tibshirani, R.; Friedman, J. The Elements of Statistical Learning: Data Mining, Inference, and Prediction, 2nd ed.; Springer Series in Statistics; Springer: New York, NY, USA, 2009. [Google Scholar]
Figure 1. Neural network architecture for regression problems.
Figure 1. Neural network architecture for regression problems.
Mathematics 09 03236 g001
Figure 2. Neural network architecture for classification problems.
Figure 2. Neural network architecture for classification problems.
Mathematics 09 03236 g002
Figure 3. Approximation functions for arrival and service rates.
Figure 3. Approximation functions for arrival and service rates.
Mathematics 09 03236 g003
Figure 4. The dependence between the order of the generator matrix and various input parameters.
Figure 4. The dependence between the order of the generator matrix and various input parameters.
Mathematics 09 03236 g004
Figure 5. The results comparison of analytical and simulation models.
Figure 5. The results comparison of analytical and simulation models.
Mathematics 09 03236 g005
Figure 6. The distribution of input parameters in the ML dataset.
Figure 6. The distribution of input parameters in the ML dataset.
Mathematics 09 03236 g006
Figure 7. System response time scatter plots for regression algorithms.
Figure 7. System response time scatter plots for regression algorithms.
Mathematics 09 03236 g007
Figure 8. Validation of ML models in the regression problem for the system response time. (a) System response time depending on the number of servers. (b) System response time depending on the queue capacity. (c) System response time depending on service rate.
Figure 8. Validation of ML models in the regression problem for the system response time. (a) System response time depending on the number of servers. (b) System response time depending on the queue capacity. (c) System response time depending on service rate.
Mathematics 09 03236 g008
Figure 9. Scatter diagrams for high priority customer loss probability.
Figure 9. Scatter diagrams for high priority customer loss probability.
Mathematics 09 03236 g009
Figure 10. Validation of high priority customers loss probability. (a) Loss probability depending on the number of servers. (b) Loss probability depending on the service rate. (c) Loss probability depending on the queue capacity.
Figure 10. Validation of high priority customers loss probability. (a) Loss probability depending on the number of servers. (b) Loss probability depending on the service rate. (c) Loss probability depending on the queue capacity.
Mathematics 09 03236 g010
Table 1. Elapsed time to build the generator matrix.
Table 1. Elapsed time to build the generator matrix.
No. of ServersTime (s)
10.027
21.184
334.485
41155.581
5Not enough RAM
Table 2. Boundary values for dataset generator.
Table 2. Boundary values for dataset generator.
ParameterMin ValueMax Value
Number of customers types15
Number of servers110
Queue capacity010
Arrival rate0.110.0
CV of the arrival distribution0.110.0
Skewness of the arrival distribution-100.0
Service rate0.110.0
CV of the service time distribution0.110.0
Skewness of the service time distribution-100.0
Table 3. Hyperparameters for tree algorithms.
Table 3. Hyperparameters for tree algorithms.
AlgorithmMetricMax DepthNumber of Predictors
Decision treeMSE10-
Random forestMSE16500
Gradient boostingMSE121000
Table 4. Metric values for regression models for system response time.
Table 4. Metric values for regression models for system response time.
AlgorithmCorrelationR2MSE
Decision tree0.9440.8910.135
Random forest0.9800.9610.047
Gradient boosting0.9800.9610.047
Neural network0.9870.9730.031
Table 5. Comparison of various machine learning methods for the response time classification problem.
Table 5. Comparison of various machine learning methods for the response time classification problem.
AlgorithmPrecisionRecallF1 Score
Logistic regression0.930.900.92
Decision tree0.940.950.95
Random forest0.980.920.95
Gradient boosting0.980.960.97
Neural network0.960.960.96
Table 6. Metrics values for ML algorithms of high priority customers loss probability.
Table 6. Metrics values for ML algorithms of high priority customers loss probability.
AlgorithmCorrelationR2MSE
Gradient boosting0.9820.9640.003
Neural network0.9840.9660.003
Table 7. Comparison of ML algorithms for classiification priority systems by loss probability value.
Table 7. Comparison of ML algorithms for classiification priority systems by loss probability value.
AlgorithmPrecisionRecallF1 Score
Logistic regression0.860.850.86
Decision tree0.870.890.88
Random forest0.930.940.93
Gradient boosting0.950.950.95
Neural network0.970.980.97
Table 8. Learning time for regression ML models.
Table 8. Learning time for regression ML models.
ModelTime (s)
Decision tree 5 × 10 5
Random forest556
Gradient boosting1086
Neural network1201
Table 9. Time elapsed for prediction of response time.
Table 9. Time elapsed for prediction of response time.
AlgorithmTime (s)
Analytics35
Simulation model2
Decision tree 2 × 10 7
Random forest 6.8 × 10 5
Gradient boosting 1.6 × 10 5
Neural network 2.1 × 10 6
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Vishnevsky, V.; Klimenok, V.; Sokolov, A.; Larionov, A. Performance Evaluation of the Priority Multi-Server System MMAP/PH/M/N Using Machine Learning Methods. Mathematics 2021, 9, 3236. https://doi.org/10.3390/math9243236

AMA Style

Vishnevsky V, Klimenok V, Sokolov A, Larionov A. Performance Evaluation of the Priority Multi-Server System MMAP/PH/M/N Using Machine Learning Methods. Mathematics. 2021; 9(24):3236. https://doi.org/10.3390/math9243236

Chicago/Turabian Style

Vishnevsky, Vladimir, Valentina Klimenok, Alexander Sokolov, and Andrey Larionov. 2021. "Performance Evaluation of the Priority Multi-Server System MMAP/PH/M/N Using Machine Learning Methods" Mathematics 9, no. 24: 3236. https://doi.org/10.3390/math9243236

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop