2. Materials and Methods
Consider a queuing system of
N identical devices with no input buffer.
Figure 1 illustrates the system’s structure.
The arrival of primary users into the system is presumed to be characterized by the , which is determined by the fundamental Markov chain () with a finite state space .
The jump rates of this inside its state space are delineated by the square matrices and . The entries of the matrix denote the jump rates associated with user arrivals. The off-diagonal entries of the matrix represent the jump rates between states in the absence of user arrivals. The diagonal entries of the matrix are negative. Their modules ascertain the rate of departure from the respective state. The summation of the matrices constitutes the generator of the
The mean user arrival rate is calculated using the equation , where represents a row vector of steady-state probabilities of the This vector constitutes the only possible solution to the system In this context, denotes a row vector of suitable dimensions filled with zeros, while represents a column vector of sufficient size composed entirely of ones.
For more information about the
, see, e.g., [
25,
26,
27,
28,
29]. When the results of users’ arrival observations (sample or time-stamps) in a real-world system are available, various statistical methods are applicable to solve the problem of constructing the matrices
and
which characterize the
that is a good model of the given real arrival process, see, e.g., references [
30,
31,
32,
33,
34].
An arriving primary user is admitted for processing only under fulfillment of a certain condition (acceptance rule) that is described briefly below. If this condition is fulfilled, the primary user starts processing. If this condition does not hold true, the user is rejected and permanently abandons the system.
After processing, a primary user leaves the system with a probability of and the complementary probability indicates that the user becomes a repeating user. This means that the user visits a virtual place referred to as the orbit.
The orbit has a limitless capacity. Each repeating user tries to re-enter the processing independently of other users remaining in the orbit. The intervals between attempts possess a random duration. At any given time, if the quantity of users in the orbit is then the overall rate of repeated attempts is This means that the probability of a retrial attempt generation in any interval of an infinitesimal length is equal to The attempt is considered successful if at least one device is idle. The user occupies a random idle device and initiates processing. In the case of an unsuccessful attempt, meaning all devices are occupied, the retrying user abandons the system with the probability , whereas with the complementary probability it remains in the orbit.
Upon exiting the processing facility, any repeating user either leaves the system permanently with the probability or joins the orbit again with the complementary probability.
The primary user acceptance rule mentioned above is as follows: the decision to admit or reject a primary user is dependent on the quantity of repeating users present in the orbit at the arrival moment, as well as on the quantity of occupied devices, and is determined by the parameters below.
Let K be an integer number such that The parameter K determines the maximum quantity of devices that can be reserved exclusively for processing of repeating users. The value means that the system has no device reservation. The value corresponds to a system where the access of the primary users can be completely blocked.
Let some integer values (thresholds)
also be fixed such that
If the quantity of repeating users in the orbit belongs to the interval , then devices are reserved for processing of repeating users only. If, at the primary user arrival moment, the quantity of users in the orbit belongs to the interval and there are less than idle devices, the arriving user is rejected. If not, it is admitted into the system and starts processing.
The processing time of a primary and retrying user by any device has a phase-type distribution with the irreducible presentations
and
respectively. This distribution is specified by the
for the primary users and by the
for the retrying users. The process
has the set
of transient states and an absorbing state
The mean processing duration for a primary user is denoted as
The mean processing time for a retrying user is determined as
For comprehensive information regarding the phase-type distribution, see [
35,
36,
37,
38]. The statistical methods for constructing the irreducible presentation of the phase-type distribution of service times are similar to the above-cited methods for fitting the real-world arrival processes to the
Users remaining in the orbit may abandon the orbit and the system due to impatience after a duration that follows an exponential distribution with the parameter
We proceed to analyze the given mathematical model.
3. Results
To greatly facilitate the investigation, we employ the concept of the generalized phase-type distribution, as referenced in [
39,
40]. Rather than separately analyzing the processing processes for each user type (we refer to the primary user as a type-1 and the repeating user as a type-2 user), we posit that the processing time for an arbitrary user at a device follows a generalized
(
) distribution characterized by the parameters
, where the vectors
and
, along with the sub-generator
S, are determined by specific formulas:
The processing duration is governed by the fundamental process with the state space , where .
The initial state of the process
at the start of processing is dictated by the probability vector
, depending on whether processing is initiated by a type-
l user. The jump rates into the absorbing state, signifying processing completion at one of the occupied devices, are denoted by the entries of the column vector
The usage of the
allows us to substantially simplify the process of determining the dynamics of the system and, consequently, facilitate the study of the
that characterizes the system’s behavior. This continuous-time chain is represented as
where
is the quantity of users in the orbit, ;
is the quantity of occupied devices, ;
is the state of the fundamental process of the ;
is the quantity of devices on the l-th phase of processing, , ,
at time
The is regular and irreducible.
It is worth noting that, besides the idea to use the
for a compact uniform description of simultaneous processing of users of two types, which was generated in [
39,
40], here we also use the idea of describing simultaneous processing of many homogeneous users not via tracking the processing phase in each occupied device but via monitoring the number of devices currently providing processing at all existing phases, which was proposed and used in [
41,
42]. The advantages of such monitoring are discussed in [
43].
We list the states of the in direct lexicographic order of the components and in reverse lexicographic order of the components . We call the set of states of the chain that possesses the value i of the component as leveli of the . The level i consists of sub-levels
We designate the infinitesimal generator of this chain as Q. The matrix Q encompasses the jump rates of the during an infinitesimally small interval. This matrix includes the blocks
Theorem 1. The infinitesimal generator Q of the has a block tridiagonal structurewhere its nonzero blocks are determined as follows: The diagonal blocks have a block tridiagonal structure with nonzero blocks: The updiagonal blocks have only nonzero subdiagonal blocks , determined as The subdiagonal blocks have nonzero updiagonal blocks , given by
Here,
⊗
and ⊕
are the symbols of the Kronecker product and sum of matrices; see, for example, [44,45].I denotes the identity matrix, while O represents the zero matrix, with its dimensions specified by a subscript when required.
The matrices and are computed by means of the algorithms for matrices of the same designation presented in [46]. Proof. Theorem 1 is proven by taking into account the presented description of providing processing to the primary and the repeating users and the following probabilistic meaning of the matrices and
Let us denote the vector stochastic process Given that n users receive processing in the system:
- -
The matrix describes jump rates of the process during the epoch of a primary user processing completion;
- -
The matrix describes jump rates of the process during the epoch of a repeating user processing completion;
- -
The matrix describes jump rates of the process without processing completion in any occupied device;
- -
The matrix determines jump probabilities of the process during the epoch of the start of a primary user processing;
- -
The matrix determines jump probabilities of the process during the epoch of a repeating user processing beginning;
- -
The negative diagonal entries of have absolute values that determine the exit rates of the process from its states.
The proof of the form of the blocks of the generator Q and their sub-blocks is implemented via the careful analysis of all possible transitions of the during the infinitesimally small time interval and the use of the formula of total probability. The operations of the Kronecker product and sum of the matrices are very helpful for defining the simultaneous transitions of several independent one-dimensional continuous-time Markov processes.
Since during an infinitesimal time interval users may enter the orbit and depart it singly, the matrices are zero matrices for all such that The matrices consist of the blocks of the jump rates of the from the sub-level to the sub-level
The matrices have a block tridiagonal structure because the jump from the sub-level to the sub-level for is not possible because no more than one user can start or finish processing during an interval of infinitesimal length.
The diagonal entries of the diagonal blocks are negative; their absolute values represent the exit rates of the from the corresponding states. The events leading to a state change are as follows:
- (1)
The fundamental process changes its states except in the case when this process transits from one state to the same state with a primary user arrival, and it is rejected. In this case, the exit from the state does not occur. Up to the sign, the rates of these events are determined by the diagonal entries of the matrix
- (2)
A user departs the orbit in the case of a successful attempt (and it starts processing), an unsuccessful attempt when all devices are occupied (and it abandons the system permanently), or due to impatience. The corresponding jump rates, up to the sing, are represented by the diagonal entries of the matrices , .
- (3)
The processing process departs from its present state (jump rates are specified by the matrix ).
The non-diagonal entries of the diagonal blocks in the matrices are non-negative. These entries represent Markov chain jump rates that keep the values of components i and n constant. These jumps can occur if the following occur:
- (1)
The fundamental process makes a jump without the arrival of a primary user or changes its state with the arrival of a primary user that is not admitted to the system and abandons it because the acceptance rule is not fulfilled. The rates of such events are given by the corresponding non-diagonal entries of the matrix
- (2)
The processing process makes a jump without processing completion in any occupied device. The rates of such events are specified by the entries of the matrix .
For the matrices , the blocks determine the rates of the event that causes the quantity of occupied devices to rise by one, assuming that the quantity of users in the orbit remains unchanged. It occurs only if a primary user arrives, is admitted by the system (the acceptance rule is fulfilled), and starts processing. The corresponding rates are determined by the matrices
The blocks of the matrices determine the rates of the event that leads to the reduction in the quantity of occupied devices by one, assuming that the quantity of users in the orbit remains unchanged. Such an event can happen if processing completes in one of the occupied devices and a processed user abandons the system forever after processing. The matrices and determine the corresponding rates if the processed user is primary and repeating, respectively.
Therefore, we obtain the form of the blocks
The blocks determine the rate of jumps that lead to a rise in the quantity of users in the orbit by one. They consist only of the nonzero subdiagonal blocks , because this event is only possible in the case of a reduction in the quantity of occupied devices. The quantity of users in the orbit rises by one only when a user joins the orbit again after processing. The corresponding rates are determined by the matrices and in the case of a primary and repeating user, respectively.
The blocks determine the rate of jumps that lead to a reduction in the quantity of users in the orbit by one. This event can lead to the following:
- (1)
A rise in the quantity of occupied devices in the system (a user from the orbit makes a successful attempt and starts processing). So, the blocks contain the subdiagonal blocks which are given by the matrices
- (2)
Not changing the quantity of occupied devices in the system (a user from the orbit makes an unsuccessful attempt when all devices are occupied and abandons the system permanently or abandons the system due to impatience). Thus, the blocks include the diagonal blocks which are determined by the matrices
□
The important part of investigating any
with an infinite state space is the derivation of the condition of steady-state regime existence. Firstly, let us consider the case when repeating users are impatient or non-persistent. It means that at least one of the parameters,
or
q, is greater than zero. In this scenario, the considered
is ergodic for any set of system parameters. The proof of this statement evidently follows from the results of the paper [
47]. The intuition behind this statement is obvious. If the retrying customers are impatient (
) or non-persistent (
then the rate of the flow of the retrying customers that terminate their stay in the system without entering service tends to infinity when the number of retrying customers infinitely increases. This implies the impossibility of the overload of the system.
Let us now consider the case
and
i.e., retrying customers are absolutely patient and persistent. In this case, the ergodicity of the considered
does not directly follow from [
47]. Derivation of the ergodicity condition is based on the results for asymptotically quasi-Toeplitz
s (
s) obtained in [
48].
To use these results, we have to prove that the considered
belongs to the class of
s. Thus, we have to prove the existence of the following matrices:
where
is the diagonal matrix with the diagonal entries of the matrix
It can be verified that for
these matrices exist and have the following form:
where
Here, the matrix is the diagonal matrix with the diagonal entries of the matrix
Thus, the belongs to the class of s.
The sufficient ergodicity condition for an
with a block tridiagonal form of the generator has the form
where
is the only solution of the system
if the matrix
is irreducible. In the case of the
the matrix
is reducible. As it follows from Theorem 6 in [
48], the ergodicity condition for the
takes the following form:
where
is the solution of the system
where the matrix
X is determined by
and
Let us represent the vector
in the form
By substituting the vector
in this form into system (2) and using the mixed product rule, see [
44], after performing some algebra we determine that
It can be verified by direct substitution that the solution of (3) is the vector
, where
c is a positive constant,
is the vector of steady-state probabilities of the
, and
is the only solution of the following system:
The vector gives the steady-state distribution of the quantity of devices at each phase of processing, conditioned on the fact that all N devices are permanently occupied and only type-2 users are admitted for processing. Since the processing of type-1 users is not performed under this condition, the vector has the form where is the steady-state distribution of the quantity of devices at the last phases of processing, and
Inequality (1) can be rewritten in the form
By substituting the vector
in the form
in this inequality, using the mixed product rule, and after performing some algebra, we determine that the ergodicity condition takes the form
The vector is stochastic and the nonzero matrix has only non-negative entries, and at least one of its entries is positive. Therefore, equality (5) holds true if
Thus, we have proved the following assertion:
Theorem 2. The is ergodic if the parameters , and γ are not equal to zero at the same time.
It deserves mentioning that ergodicity or non-ergodicity of the system does not depend on the arrival, service, and retrial rate and is defined only by the values of the parameters , and The system is non-ergodic only if the user cannot depart from it due to impatience, non-persistence, or after service completion. In such a situation, the retrying users never depart from the system, and it never becomes empty.
Further, we assume that the ergodicity condition holds true.
Let us now briefly outline the methods for computation of the steady-state distribution of the
This distribution is determined by the steady-state probabilities determined as the limits
Let us denote by the row vector composed from the steady-state probabilities of the states that belong to the level i and by the row vectors composed from the steady-state probabilities of the states that belong to the sub-level It is clear that
The vectors
satisfy the system of equations
Due to the infinite nature of this system and the absence of a block quasi-Toeplitz structure in the matrix
Q, the
does not fall within the category of Quasi-Birth-and-Death processes, as detailed in [
35], which have been extensively examined by M. Neuts. Consequently, resolving this system presents significant challenges. Frequently, in the literature, it is dealt with by some kind of system truncation.
Since the
falls into the category of asymptotically quasi-Toeplitz Markov chains, system (6) can be resolved utilizing the numerically stable techniques for such chains outlined in, for example, [
28,
49]. The high stability of the algorithms presented in [
28,
49] is guaranteed by the avoidance of the use of the subtraction operation during their implementation.
Once obtaining the vectors we can determine the values for various performance metrics of the considered queueing system.
The mean quantity of users residing in the orbit at an arbitrary instant is calculated as
The mean quantity of processing type-
l users at an arbitrary instant is calculated as
where
and the matrices
are calculated following the same method as the matrices
The mean quantity of occupied devices at an arbitrary instant is calculated as
The mean total quantity of users in the system (in the orbit and devices) is calculated as
The mean rate of the output flow of successfully processed primary users is calculated as
The mean rate of the output flow of successfully processed repeating users is calculated as
The mean rate of the output flow of successfully processed users is calculated as
The mean rate of users who join the orbit is calculated as
The probability that an arbitrary repeating attempt is successful is calculated as
The mean quantity of reserved devices is calculated as
The loss probability of a primary user upon arrival is calculated as
The loss probability of a repeating (secondary) user due to impatience is calculated as
The loss probability of a repeating user due to non-persistence (departure due to the absence of idle devices) is calculated as
The loss probability of a repeating user is calculated as
The loss probability of an arbitrary user is calculated as
The last formula presents two separate methods for calculating the probability This offers a mechanism for validating the precision of the computation of the steady-state distribution of system states and the values of the performance metrics of the system.
Now, we briefly present the results of two numerical experiments.
Experiment 1. In this numerical experiment, we aim to demonstrate the influence of the choice of the thresholds that determine the device reservation policy on the main performance characteristics of the system and show that the optimal choice of these thresholds allows us to improve the system revenue.
We suggest that the arrival process of primary users is characterized by the
delineated by the matrices
This choice of the matrices and is explained by the frequent appearance of similar matrices as a result of fitting the correlated arrival processes during implementation in the past in some applied projects not directly related to the system under study in this paper. Some characteristics of this process are as follows: the mean arrival rate , the coefficient of correlation of successive inter-arrival times , and the coefficient of variation of inter-arrival times
The processing time of a primary user has a distribution determined by the vector and the matrix . This distribution is exponential, with the mean processing time equal to 2.
The probability that a primary user leaves the system after the processing is equal to 0.4.
The retrial rate is the probability q that a repeating user abandons the system in the case of an unsuccessful attempt is equal to 0.7; and the impatience rate of repeating users is equal to 0.002.
The processing time of a repeating user has a distribution determined by the vector and the matrix . This distribution is also exponential, with the mean processing time equal to 1. The probability that a repeating user leaves the system after the processing is equal to 0.1.
We assume that the total quantity of devices is equal to , and up to devices can be reserved for processing only repeating users. To achieve the formulated aim, let us vary the threshold over the interval with step 1, and the threshold over the interval also with step 1.
Figure 2 illustrates the relation of the mean rate
of users who join the orbit and the thresholds
and
.
Figure 3 illustrates the relation of the probability
that an arbitrary repeating attempt is successful and the thresholds
and
.
Figure 4 illustrates the relation of the mean quantity
of reserved devices and the thresholds
and
.
One can see from
Figure 2 that the mean rate
of users who join the orbit non-monotonically depends on the thresholds
and
. The maximal value of
is equal to 2.103581 and achieved when
and
From
Figure 3 and
Figure 4, one can conclude that the probability of a successful retrial attempt and the mean quantity of occupied devices essentially reduce with a rise in the quantities
and
. These dependencies are rather evident intuitively; our results allow us to estimate them quantitatively.
Figure 5,
Figure 6,
Figure 7,
Figure 8 and
Figure 9 illustrate the relation of the loss probability
of a primary user, the total loss probability
of a repeating user, the loss probability
of a repeating user due to impatience, the loss probability
of a repeating user due to non-persistence, and the loss probability
of an arbitrary user and the thresholds
and
.
It is seen from
Figure 5 that the loss probability of primary users
sharply reduces with the rise in the thresholds
and
, since the growth in
and
leads to a reduction in the mean quantity of reserved devices; thus, more devices are available for primary users. At the same time, as seen from
Figure 6, the rise in
and
leads to a rise in the loss probability of repeating users
. From
Figure 7 and
Figure 8 we can conclude that the main reason for repeating user loss in this example is non-persistence, especially for large values of
and
. The total loss probability
behaves as
, since in this numerical example the main reason for user loss is the rejection of primary users upon arrival.
Suppose that the quality of the system’s performance can be assessed based on the following cost criterion:
where
and
are the system’s revenue obtained via processing of each primary and repeating user, respectively, and
and
are the charges paid by the system for primary and repeating user loss, respectively.
Here, we suggest the following values of the cost coefficients: , , and .
Figure 10 illustrates the relation of the cost criterion
E and the thresholds
and
As one can see from
Figure 10, the optimal value of the cost criterion
E is equal to 4.897. This value is achieved if the threshold
is equal to 8 and the threshold
Thus, the system’s manager should reserve no devices if the quantity of users in the orbit is less than 8, should reserve one device if the quantity of users in the orbit is in the interval [8,14), and should reserve two devices otherwise. Note that the optimal device reservation can bring economic profit compared to processing provisioning without device reservation. For example, if we fix
and
i.e., start reserving devices as late as possible (in the conditions of this example), the value
will be equal to 4.40968, which is less than the optimal value.
The computations are performed on a PC with an Intel Core i7-8700 CPU, 16 GB RAM, and Wolfram Mathematica 13.2. The computation time is 289 s for 435 pairs or about 0.66 s for one pair.
Note that running time under the use of the algorithms for the computation of the stationary probabilities of the states of the asymptotically quasi-Toeplitz Markov chains is difficult to predict in advance. It significantly depends on the load of the system, correlation, and variation in inter-arrival times. Higher load, positive coefficient of correlation, and a large value of the coefficient of variation lead to a larger number of non-negligible probabilities of the system states. In turn, this implies the increase in computation time.
Experiment 2. In the previous experiment, we assumed an exponential processing time distribution for primary and repeating users. Now, let us investigate how the dependence of the main performance characteristics changes if we consider, instead of the exponential processing time distribution, the processing time distribution with the same mean processing rate but a high coefficient of variation.
To this end, let us assume that the processing time of primary users has a distribution determined by the matrix and the vector and that the processing time of repeating users has a distribution determined by the matrix and the vector These processing times have the same mean values, 0.5 and 1, correspondingly, as in Experiment 1, but a high coefficient of variation (not 1 as in Experiment 1).
Figure 11,
Figure 12 and
Figure 13 illustrate the relations of the loss probability
of a primary user, the total loss probability
of a repeating user, and the loss probability
of an arbitrary user with the thresholds
and
in this case of high coefficients of variation of processing times.
Comparing
Figure 11,
Figure 12,
Figure 13 and
Figure 14 with
Figure 5,
Figure 6,
Figure 9, and
Figure 10, correspondingly, we can conclude that the high variation in the processing time has a positive impact on the main performance characteristics of the system. However, this impact is not very essential. The shape of dependencies of
, and
is the same as in Experiment 1; the slight difference is only in quantities.
Figure 14 illustrates the cost criterion
E on the thresholds
and
in the case of high coefficients of variation of processing times.
As one can see from
Figure 14, the optimal value of the cost criterion
E is equal to 5.3608. This value is achieved when the threshold
is equal to 7 and the threshold
It is worth noting that the optimal values of the thresholds
and
are different from the corresponding values, 8 and 14, respectively, in the above considered case of the exponential distribution of processing times. Therefore, approximation of the processing time distribution by the exponential one, generally speaking, leads to the bias in evaluation of the optimal strategy’s thresholds.
The computation time in the considered case of the distribution is 6593 s for 435 pairs or about 15.15 s for one pair. Thus, due to the smaller size of the blocks of the generator, the simplifying assumption about the exponential processing time distributions allows us to significantly reduce computation time. This is especially significant when the quantity K of devices available for reservation is substantial and it is necessary to determine the optimal values of the thresholds However, if the precision of evaluation of the performance characteristics values is most important, the distribution, which fits the value of the variance in processing times, should be used. It is worth noting that our numerical experience shows that basically, reservation of even a small (1–3) quantity of devices allows us to significantly raise the system’s revenue.