A Time-Non-Homogeneous Double-Ended Queue with Failures and Repairs and Its Continuous Approximation

: We consider a time-non-homogeneous double-ended queue subject to catastrophes and repairs. The catastrophes occur according to a non-homogeneous Poisson process and lead the system into a state of failure. Instantaneously, the system is put under repair, such that repair time is governed by a time-varying intensity function. We analyze the transient and the asymptotic behavior of the queueing system. Moreover, we derive a heavy-trafﬁc approximation that allows approximating the state of the systems by a time-non-homogeneous Wiener process subject to jumps to a spurious state (due to catastrophes) and random returns to the zero state (due to repairs). Special attention is devoted to the case of periodic catastrophe and repair intensity functions. The ﬁrst-passage-time problem through constant levels is also treated both for the queueing model and the approximating diffusion process. Finally, the goodness of the diffusive approximating procedure is discussed.


Introduction
Double-ended queues are often adopted as stochastic models for queueing systems characterized by two flows of agents, i.e., customers and servers/resources. When there are a customer and a server in the system, the match between the request and service occurs immediately, and then, both agents leave the system. As a consequence, there cannot be simultaneously customers and servers in the system. Namely, denoting by N(t) the state of the system at time t, it is assumed that N(t) = n, n ∈ N, if there are n customers waiting for available servers, whereas N(t) = −n, n ∈ N, if there are n servers waiting for new customers, and N(t) = 0, if the system is empty. Hence, typical models for N(t) are bilateral continuous-time Markov chains or similar stochastic processes.
Double-ended queueing systems can be applied to model numerous situations in real-world scenarios. A classical example is provided by taxi-passenger systems, where the role of customers and servers is played by passengers and taxis, respectively. We recall the first papers on this topic by Kashyap [1,2] and the subsequent contributions by Sharma and Nair [3], Tarabia [4] and Conolly et al. [5]. Other examples are provided by the dynamical allocation of live organs (servers) to candidates (customers) needing transplantation (cf. Elalouf et al. [6] and the references therein). Double-ended queues are suitable also to describe different streams arriving at a system (see Takahashi et al. [7]).
In this area, the interest is typically in the determination of the transient distribution and the asymptotic distribution of the system state, the busy period density, the waiting time density and related indices such as means and variances. The difficulties related to the resolution of the birth-death processes describing the length of the queue, in some cases, can be overcome by means of suitable transformations as those presented in Di Crescenzo et al. [8]. Such a transformation-based approach has been successfully exploited also for diffusion processes (see Di Crescenzo et al. [9]), this being of interest for the analysis of customary diffusion approximations of queue-length processes.
Attention is given often also to variants of the relevant stochastic processes that are adopted to describe more complex situations, such as bulk arrivals, truncated queues, the occurrence of disasters and repairs, and so on. In this respect, we recall the recent paper by Di Crescenzo et al. [10], which is centered on the analysis (i) of a continuous-time stochastic process describing the state of a double-ended queue subject to disasters and repairs and (ii) of the Wiener process with jumps arising as a heavy-traffic approximation to the previous model.
In many queueing models of manufacturing systems, it is assumed that the times to failure and the times to repair of each machine are exponentially distributed. However, exponential distributions do not always accurately represent distributions encountered in real manufacturing systems. Some of these models adopt the phase-type distributions for failure and repair times (see, for instance, Altiok [11][12][13] and Dallery [14]).
In this paper, we propose and analyze an extension of the queueing model treated in [10] to a time-non-homogeneous setting in which the intensities of arrivals, services, disasters and repairs are suitably time dependent. Similarly, we investigate the related heavy-traffic jump-diffusion approximation, as well. The key features of our analysis and the motivations of the proposed study are based mainly on the following issues: • Queueing systems subject to disasters are appropriate to model more realistic situations in which the number of customers is subject to an abrupt decrease by the effect of catastrophes occurring randomly in time and due to external causes. The literature on the area of stochastic systems evolving in the presence of catastrophes is very broad. We restrict ourselves to mentioning the papers by Economou and Fakinos [15,16], Kyriakidis and Dimitrakos [17], Krishna Kumar et al. [18], Di Crescenzo et al. [19], Zeifman and Korotysheva [20], Zeifman et al. [21] and Giorno et al. [22]. The analysis of some time-dependent queueing models with catastrophes has been performed in Di Crescenzo et al. [23] and, more recently, in Giorno et al. [24], with special attention to the M(t)/M(t)/1 and M(t)/M(t)/∞ queues.

•
We include a repair mechanism in the queueing system under investigation, since it is essential to model instances when the (random) repair times are not negligible. We remark that the interest in this feature is increasing in the recent literature on queueing theory (see, for instance, Dimou and Economou [25]).

•
Heavy-traffic approximations are very often proposed in order to describe the queueing systems under proper limit conditions of the parameters involved. This allows one to come to more manageable formulas for the description of the queue content. Typically, a customary rescaling procedure allows one to approximate the queue length process by a diffusion process, as indicated in Giorno et al. [26]. Examples of diffusion models arising from heavy-traffic approximations of double-ended queues and of similar matching systems can be found in Liu et al. [27] and Büke and Chen [28], respectively. In the case of queueing systems subject to catastrophes, a customary approach leads to jump-diffusion approximating processes (see, for instance, Di Crescenzo et al. [29] and Dharmaraja et al. [30]).

Plan of the Paper
In Section 2, we consider a non-homogeneous double-ended queue, whose arrivals and departures occur with time-varying intensity functions λ(t) > 0 and µ(t) > 0, respectively. We discuss various features of such a model, including the first-passage time through a constant level.
In Section 3, we consider the non-homogeneous double-ended queue subject to disasters and repairs, both occurring with time-varying rates. Specifically, we assume that catastrophes occur according to a non-homogeneous Poisson process with intensity function ν(t) > 0. The effect of catastrophes moves the system into a spurious failure state, say F. The completion of a system's repair occurs with time-varying intensity function η(t) > 0. After any repair, the system starts afresh from the zero state. Our first aim is to determine the probability q(t|t 0 ) that the system at time t is in the failure state and the probability p 0,n (t|t 0 ) that the system at time t is in the state n ∈ Z (working state).
In Section 4, we study the asymptotic behavior of the state probabilities in two different cases: (i) when the rates λ(t), µ(t), ν(t), η(t) admit finite positive limits as t tends to infinity and (ii) when the double-ended queue is time-homogeneous, the catastrophe intensity function ν(t) and the repair intensity function η(t) being periodic functions with common period Q.
In Section 5, we consider a diffusion approximation, under a heavy-traffic regime, of the non-homogeneous double-ended queue discussed in Section 2. In this case, the approximating process is a time-non-homogeneous Wiener process. We discuss various results on this model, including a first-passage-time problem through a constant level.
In Section 6, we deal with the heavy-traffic jump-diffusion approximation for the discrete model with catastrophes and repairs. Various results shown for the basic diffusion process treated in the previous section are thus extended to the present case characterized by jumps. In both Sections 5 and 6, the goodness of the approximating procedure is discussed, as well.
In Section 7, we finally consider the asymptotic behavior of the densities in the same cases considered in Section 4. In conclusion, we perform some comparisons between the relevant quantities of the queueing system and of the approximating diffusion process under the heavy-traffic regime.

The Underlying Non-Homogeneous Double-Ended Queue
This section is devoted to the analysis of the basic time-non-homogeneous double-ended queue. Let { N(t), t ≥ t 0 }, with t 0 ≥ 0, be a continuous-time Markov chain describing the number of customers in a time-non-homogeneous double-ended queueing system, with state-space Z = {. . . , −1, 0, 1, . . .}. We assume that arrivals (upward jumps) and departures (downward jumps) at time t occur with intensity functions λ(t) > 0 and µ(t) > 0, respectively, where λ(t) and µ(t) are bounded and continuous functions for t ≥ t 0 , such that    For all j, n ∈ Z and t > t 0 ≥ 0, the transition probabilities p j,n (t|t 0 ) = P{ N(t) = n| N(t 0 ) = j} are solutions of the system of Kolmogorov forward equations: with the initial condition lim t↓t 0 p j,n (t|t 0 ) = δ j,n , where δ j,n is the Kronecker delta function. For t ≥ t 0 and 0 ≤ z ≤ 1, let: be the probability generating function of N(t). For any t ≥ t 0 , we denote the cumulative arrival and service intensity functions by: Due to (1), for t ≥ t 0 , the probability generating Function (2) is the solution of the partial differential equation: to be solved with the initial condition lim t↓t 0 G j (z, t|t 0 ) = z j . Hence, (2) can be expressed in terms of (3) as follows: Recalling that (cf. Abramowitz [31], p. 376, n. 9.6.33): where: denotes the modified Bessel function of first kind and by setting: in (5), from (4), one has: Hence, recalling (2), one obtains the transition probabilities: We remark that, since I n (z) = I −n (z) for n ∈ N, the following symmetry relation holds: Moreover, from (6), we recover the conditional mean and variance of N(t), for t ≥ t 0 and j ∈ Z: We point out that the transition probabilities given in (6) constitute the probability distribution of the difference of two independent non-homogeneous Poisson processes with intensities λ(t) and µ(t), respectively, originated at zero (cf. Irwin [32] or Skellam [33] for the homogeneous case).
Let us now consider the first-passage-time (FPT) of N(t) through the state n ∈ Z, starting from the initial state j ∈ Z. Such a random variable will be denoted as: where g j,n (t|t 0 ) is its probability density function (pdf). Special interest is given to T j,0 (t 0 ), which represents the busy period of the double-ended queue, with initial state N(t 0 ) = j. As is well-known, due to the Markov property, g j,n (t|t 0 ) satisfies the integral equation: Hereafter, we consider the special case in which the arrival and departure intensity functions are proportional.
then the transition probabilities (6) of the non-homogeneous double-ended queueing system N(t) can be expressed as: Hence, from the results given in Section 5 of Giorno et al. [24], we have: Furthermore, the FPT ultimate probability is given by:

The Queueing System with Catastrophes and Repairs
This section deals with the analysis of the queueing system with catastrophes and repairs. Let {N(t), t ≥ t 0 }, with t 0 ≥ 0, be a continuous-time Markov chain that describes the number of customers of a time-non-homogeneous double-ended queueing system subject to disasters and repairs.
where F denotes the failure state. We assume that the catastrophes occur according to a non-homogeneous Poisson process with intensity function ν(t). If a catastrophe occurs, then the system goes instantaneously into the failure state F, and further, the completion of a repair occurs according to the intensity function η(t) (cf. the diagram shown in Figure 2). We assume that the rates ν(t) and η(t) are positive, bounded and continuous functions for t ≥ t 0 , such that    For any n ∈ Z and t > t 0 ≥ 0, we set: Hence, p 0,n (t|t 0 ) is the transition probability from zero, at time t 0 , to state n, at time t, when the system is active (in this case, we say that the system is in the "on" state), whereas q(t|t 0 ) is the probability that the queueing system is in the state F (called the "failure" state) at time t starting from zero at time t 0 . The probabilities given in (12) are the solution of the forward Kolmogorov system of differential equations: to be solved with the following initial conditions, based on the Kronecker delta function: Conditions (16) imply that at initial time t 0 , the system is active and it starts from the zero state. In order to determine the transient probabilities of N(t), similarly as in (3), in the following, we denote the cumulative catastrophe and repair intensity functions by: respectively.

Transient Probabilities
We first determine the probability that the system is under repair at time t. By solving Equation (13) with the second of the initial conditions (16), recalling (17), one obtains the probability that the process N(t) is in the state F ("failure" state) at time t, starting from zero at time t 0 : The transient analysis of the process N(t) can be performed by relating the transient probabilities to those of the same process in the absence of catastrophes. Indeed, by conditioning on the time of the last catastrophe of N(t) before t, the probabilities p 0,n (t|t 0 ) can be expressed in terms of p 0,n (t|t 0 ) as follows, for n ∈ Z and t ≥ t 0 (cf. [10,15,16]): We note that the first term on the right-hand side of (19) expresses the probability that process N(t) occupies state n at time t and that no catastrophes occurred in [0, t]. Similarly, the second term gives the probability that process N(t) occupies state n at time t and that at least one catastrophe (with successive repair) occurred in [0, t], i.e., -starting from zero at time t 0 , at least a catastrophe and the subsequent repair occur before t; let τ ∈ (0, t) be the instant at which the last repair occurs, so that a transition entering in the zero state occurs at time τ with intensity η(τ); -no catastrophe occurs in the interval (τ, t); then the system, starting from the zero state at time τ, reaches the state n at time t.
Note that Equation (19) is the suitable extension of (2.7) of [10], which refers to the case of constant rates. Furthermore, we remark that from (18) and (19), one obtains: Making use of (6) and (18) in (19), for t ≥ t 0 and n ∈ Z, one has the following expression for the transition probabilities of N(t): Let us now introduce the r-th conditional moment of N(t), for r ∈ N: From (19), it is not hard to see that the moments (21) can be expressed in terms of the conditional moments M r (t|t 0 ) := E[ N r (t)| N(t 0 ) = 0] as follows, for r ∈ N and t ≥ t 0 : Hence, by virtue of (7), from (22), the conditional mean and second order moment of N(t) can be evaluated based on the knowledge of the relevant intensity functions.
The integrand on the right-hand side of Equation (25) refers to the sample-paths of N(t) that start from zero at time t 0 , then reach the state zero at time τ ∈ (t 0 , t) and, finally, go from zero at time τ to n at time t for the first time, without the occurrence of catastrophes in (τ, t).

Asymptotic Probabilities
In this section, we analyze the asymptotic behavior of the probabilities q(t|t 0 ) and p j,n (t|t 0 ) of the process N(t) in two different cases: (i) the intensity functions λ(t), µ(t), ν(t) and η(t) admit finite positive limits as t → +∞, (ii) the intensity functions λ(t) and µ(t) are constant, whereas the rates ν(t) and η(t) are periodic functions with common period Q.

Asymptotically-Constant Intensity Functions
In the following theorem, we determine the steady-state probabilities and the asymptotic failure probability of the process N(t) when the intensity functions λ(t), µ(t), ν(t) and η(t) admit finite positive limits as t tends to +∞.
with λ, µ, ν, η positive constants, then the steady-state probabilities and the asymptotic failure probability of the process N(t) are: Furthermore, the asymptotic conditional mean, second order moment and variance are: Proof. The steady-state probabilities and the asymptotic failure probability of N(t) can be obtained by taking the limit as t → +∞ in Equations (13)- (15), and then solving the corresponding balance equations. From (21), making use of (29) and (30), the asymptotic conditional mean and variance (31) immediately follow.

Periodic Catastrophe and Repair Intensity Functions
Let us assume that the arrival and departure intensity functions are constant, whereas the catastrophe intensity function ν(t) and the repair intensity function η(t) are periodic, such that ν(t + kQ) = ν(t) and η(t + kQ) = η(t) for all k ∈ N, t ≥ t 0 , for a given constant period Q > 0. We denote by: the average catastrophe and repair rates over the period Q. Since ν(t) and η(t) are periodic functions, from (17), we have, for t ≥ t 0 : Let us now investigate the asymptotic distribution for the process N(t), which can be defined as follows, for t ≥ t 0 : Theorem 3. For the queueing system with catastrophes and repairs, having constant arrival rates λ(t) = λ > 0 and departure rates µ(t) = µ > 0, with ν(t) and η(t) continuous, positive and periodic functions, with period Q, for t ≥ t 0 , one has: Furthermore, an alternative expression for the failure asymptotic probability is: with ν * and η * given in (32).
Under the assumptions of Theorem 3, by virtue of the periodicity of ν(t) and η(t), from (35)-(37), one has that p * 0,n (t) and q * (t) are periodic functions with period Q. From (21), making use of (35), the asymptotic conditional moments are expressed as: and q * (t) given in (36) or (37). Example 1. Assume that N(t) has constant arrival rates λ(t) = λ > 0 and departure rates µ(t) = µ > 0. Furthermore, let the periodic catastrophe and repair intensity functions be given by: with a > 0, b > 0, ν > πa/Q and η > πb/Q. Clearly, from (32) and (44), we have that the averages of ν(t) and η(t) in the period Q are equal to ν and η, respectively. In Figures 3-5, the relevant parameters are taken as: On the left of Figure 3, the catastrophe intensity function ν(t) (black curve) is plotted with its average ν = 0.5 (black dashed line). The repair intensity function η(t) (red curve) is plotted, as well, with its average η = 0.6 (red dashed line). On the right of Figure 3, the failure probability q(t|0), given in (18), is plotted and is compared with the asymptotic failure probability q * = ν/(ν + η) = 0.454545. The latter is obtained by considering constant intensity functions ν(t) = ν and η(t) = η. As proved in Theorem 3, q(t|0) admits an asymptotic periodic behavior, which is highlighted on the right of Figure 3. Instead, in Figure 4, we plot the probability p 0 (t|0) (magenta curve), on the left. Moreover, on the right of Figure 4, we show the probabilities p −1 (t|0) (blue curve) and p 1 (t|0) (red curve), given in (23). The dashed lines indicate the steady-state probabilities p * 0 = 0.364447 (magenta dashed line), p * −1 = 0.0470761 (blue dashed line) and p * 1 = 0.0941522 (red dashed line), obtained by considering constant intensity functions ν(t) = ν and η(t) = η. As shown in Figure 4, the probabilities admit an asymptotic periodic behavior, with period Q = 1. Finally, in Figure 5, the mean M 1 (t|0) and the variance Var(t|0) of the process N(t), obtained via (24), are plotted and compared with the asymptotic values (dashed lines) M * 1 = 0.2 and V * = 0.64, given in (31).  show that the relevant quantities reflect the periodic nature of the rates and illustrate the limiting behavior as t grows.
( | ) Figure 3. On the left: the periodic catastrophe intensity function (black curve) and repair intensity function (red curve), with their averages (dashed lines). On the right: the failure probability q(t|t 0 ), given in (18), and the limit q * (dashed line), given in (29). The parameters are specified in Example 1.  Figure 4. On the left: p 0 (t|0) and steady-state probability p * 0 (dashed line). On the right: p −1 (t|0) (blue curve) and p 1 (t|0) (red curve), with steady-state probabilities p * −1 and p * 1 (dashed lines), given in (30). The parameters are specified in Example 1.

Diffusion Approximation of the Double-Ended Queueing System
With reference to the time-non-homogeneous double-ended queueing system discussed in Section 2, hereafter, we consider a heavy-traffic diffusion approximation of the queue-length process. This is finalized to obtain a more manageable description of the queueing system under a heavy-traffic regime. To this purpose, we shall adopt a suitable scaling procedure based on a scaling parameter ε. We first rename the intensity functions related to the double-ended process N(t), by setting: Here, functions λ(t), µ(t) and ω 2 (t) are positive, bounded and continuous for t ≥ t 0 and satisfy the conditions the constant ε in the right-hand sides of (45) is positive and plays a relevant role in the following approximating procedure.
Let us consider the Markov process { N ε (t), t ≥ t 0 }, having state-space {0, ±ε, ±2ε, . . .}. Namely, it is defined as N ε (t) = N(t), provided that the intensity functions are modified as in (45). By a customary scaling procedure similar to that adopted in [10,30], under suitable limit conditions and for ε ↓ 0, the scaled process N ε (t) converges weakly to a diffusion process { X(t), t ≥ t 0 } having state-space R and transition probability density function (pdf): Indeed, with reference to System (1), substituting p j,n (t|t 0 ) with f (nε, t|jε, t 0 )ε in the Chapman-Kolmogorov forward differential-difference equation for N ε (t), we have: After setting x = nε and x 0 = jε, expanding f as Taylor series and taking the limit as ε ↓ 0, we obtain the following partial differential equation: The associated initial condition is is the Dirac delta-function. We remark that, due to (45), the limit ε ↓ 0 leads to a heavy-traffic condition about the rates λ(t) and µ(t) of process N(t). Hence, X(t) is a time-non-homogeneous Wiener process with drift λ(t) − µ(t) and infinitesimal variance ω 2 (t), with initial state x 0 at time t 0 . For t ≥ t 0 and s ∈ R, let: be the characteristic function of X(t). Due to (46), the characteristic function (47) is the solution of the partial differential equation: to be solved with the initial condition lim t↓t 0 H(s, t|x 0 , t 0 ) = e isx 0 . Hence, for t ≥ t 0 , one has: where we have set: Clearly, (48) is a normal characteristic function, so that the solution of (46) is the Gaussian pdf: Then, the conditional mean and variance are: Let us now consider a first-passage-time problem for X(t). We denote by T x 0 ,x (t 0 ) the random variable describing the FPT of X(t) trough state x ∈ R, starting from x 0 at time t 0 , with x 0 = x. In analogy to (8), the Markov property yields: where g(x, t|x 0 , t 0 ) is the pdf of T x 0 ,x (t 0 ). Hereafter, we deal with a special case, in which the functions λ(t), µ(t) and ω 2 (t) are proportional.

Goodness of the Approximating Procedure
Thanks to the above heavy-traffic approximation, the state of the time-non-homogeneous double-ended queue N(t) has been approximated by the non-homogeneous Wiener process X(t), with the transition pdf given in (50).
A first confirmation of the goodness of the approximating procedure can be obtained by the comparing mean and variance of N(t) with those of X(t)/ε, for λ(t) and µ(t) chosen as in (45). Recalling (7) and (51), the means satisfy the following identity, for all ε > 0: Moreover, for the variances, we have: so that for ε close to zero, one has: The discussion of the goodness of the heavy-traffic approximation involves also the probability distributions. Let us denote by p (ε) j,n (t) the transition probabilities of the process N(t), for λ(t) and µ(t) given in (45), and for n = x/ε, j = x 0 /ε. The following theorem holds.
Finally, the goodness of the heavy-traffic approximation is confirmed by the approximation: which is a consequence of Equation (55) and is valid for ε close to zero.

Diffusion Approximation of the Double-Ended Queueing System with Catastrophes and Repairs
In this section, we consider a heavy-traffic approximation of the time-non-homogeneous double-ended queueing system subject to disasters and repairs, discussed in Section 3. The continuous approximation of the discrete model leads to a jump-diffusion process and is similar to the scaling procedure employed in Section 5. The relevant difference is that the state-space of the process N(t) presents also a spurious state F.
Let us now consider the continuous-time Markov process {N ε (t), t ≥ t 0 }, having state-space {F, 0, ±ε, ±2ε, . . .}. Under suitable limit conditions, as ε ↓ 0, the scaled process N ε (t) converges weakly to a jump-diffusion process {X(t), t ≥ t 0 } having state-space {F} ∪ R. The limiting procedure is analogous to that used in Buonocore et al. [34], which involves spurious states, as well. As in the previous section, for the approximating procedure, we first assume that the rates λ(t) and µ(t) are modified as in (45). Hence, the limit ε ↓ 0 leads to a heavy-traffic condition about such intensity functions. Instead, the catastrophe rate ν(t) and the repair rate η(t) are not affected by the scaling procedure.
We note that X(t) describes the motion of a particle, which starts at the origin at time t 0 and then behaves as a non-homogeneous Wiener process, with drift λ(t) − µ(t) and infinitesimal variance ω 2 (t), until a catastrophe occurs. We remark that the catastrophes arrive according to a time-non-homogeneous Poisson process with intensity function ν(t). As soon as a catastrophe occurs, the process enters into the failure state F and remains therein for a random time (corresponding to the repair time) that ends according to the time-dependent intensity function η(t). Clearly, catastrophes are not allowed during a repair period. The effect of a repair is the instantaneous transition of the process X(t) to the state zero. After that, the motion is subject again to diffusion and proceeds as before. We recall that ν(t) and η(t) are positive, bounded and continuous functions for t ≥ t 0 , such that In the following theorem, we discuss the special case when the functions λ(t) − µ(t) and ω 2 (t) are constant.
Proof. It proceeds similarly to the proof of Theorem 1.

Goodness of the Approximating Procedure
Let us now analyze the goodness of the heavy-traffic approximation considered above. The time-non-homogeneous process describing the state of the double-ended queueing system with catastrophes and repairs has been approximated by the diffusion process X(t), whose transition pdf is given in (63).
First of all, we compare the mean, second order moment and variance of N(t) with those of X(t)/ε, when λ(t) and µ(t) are chosen as in (45). By virtue of (53) and (54), one has: Hence, recalling (22) and (66), one has: so that the variances satisfy the following relation, for ε close to zero: Furthermore, we denote by p (ε) j,n (t) the transition probabilities of the process N(t), when n = x/ε and the intensity functions λ(t) and µ(t) are given in (45). The following theorem holds.

Periodic Intensity Functions
Let us assume that the functions λ(t), µ(t) and ω 2 (t) are constant and that the catastrophe intensity function ν(t) and the repair intensity function η(t) are periodic, so that ν(t + kQ) = ν(t) and η(t + kQ) = η(t) for k ∈ N and t ≥ t 0 . The average catastrophe and repair rates in the period Q are defined in (32). The asymptotic distribution of the process X(t) is described by the following functions, for t ≥ t 0 , Note that the asymptotic failure probability q * (t) is given in (36) or, alternatively, in (37). Moreover, the asymptotic density f * (x, t) is determined in the following theorem. Theorem 8. Consider the stochastic process X(t) and assume λ(t) − µ(t) = λ − µ and ω 2 (t) = ω 2 , and that the intensities ν(t) and η(t) are continuous, positive and periodic functions with period Q. Then, one has: Proof. It proceeds similarly to the proof of Theorem 3, by starting from Equation (67).
By virtue of the periodicity of ν(t) and η(t), from (76), one has that f * (x, t) is a periodic function with period Q. From (65), making use of (76), the asymptotic conditional moments are: where M r (t|0) = E[ X(t) r | X(0) = 0] and where q * (t) is given in (36) or in (37).
The following illustrative example concludes the section.

Conclusions
We analyzed a continuous-time stochastic process that describes the state of a double-ended queue subject to disasters and repairs. The system is time-non-homogeneous, since arrivals, services, disasters and repairs are governed by time-varying intensity functions. This model is a suitable generalization of the queueing system investigated in [10]. Indeed, the previous model is characterized by constant rates of arrivals, services, catastrophes and repairs. However, motivated by the need to describe more realistic situations in which the system evolution reflects daily or seasonal fluctuations, in this paper, we investigated the case where all such rates are time-dependent. Whereas in the previous model, the approach involved the Laplace transforms, in the present case, the analysis cannot be based on such a method, but rather on a direct analysis of the relevant equations. Our analysis involved also the heavy-traffic approximation of the system, which leads to a time-non-homogeneous diffusion process useful to describe the queue-length dynamics via more manageable formulas. Future developments of the present investigation will be centered on the inclusion of multiple types of customers and more general forms of catastrophe/repair mechanisms.
Author Contributions: All the authors contributed equally to this work.