The Analysis , Optimization , and Simulation of a Two-Stage Tandem Queueing Model with Hyperexponential Service Time at Second Stage

The aim of this paper is to analyze a tandem queueing model with two stages. The arrivals to the first stage are Poisson stream and the service time at this stage is exponential. There is no waiting room at first stage. The service time is hyperexponential and no waiting is allowed at second stage. The transition probabilities and loss probabilities of this model are obtained. In addition, the loss probability at second stage is optimized. Performance measures and the variance of the numbers of customers of this tandem queueing model are found. It is seen that the numbers of customers in first stage and second stage are dependent. Finally we have simulated this queueing model. For different values of parameters, exact values, simulated values, and optimal values of obtained performance measures of this model are numerically shown in tables and graphs.


Introduction
Queueing systems and modeling of these systems have many uses in production lines, service facilities, telecommunication, computer sciences, transportation, and so forth.The main interest in queueing modeling is that it allows us to process mathematical analysis.Hence the analysis gives us the ability to obtain important properties such as measures of performances of considered models.There follows then optimization of these measures.One of important study areas in Queueing Theory is the tandem queues.Many various important studies are done on tandem queues.Niu gave an upper bound for the stationary expected delay at second server for a sequence of two queues in tandem [1].Some moment results for certain tandem and multipleserver queues are studied by Wolfson [2].Ohno and Ichiki discussed the use of modified policy iteration algorithms to find the optimal control for the service rate for a tandem queueing system in [3].Analysis for the steady state of a two-stage tandem queueing with single server is given by [4].Scheduling service time in tandem queues is studied in [5].Ziedins showed that, for some simple service time distributions with support on two points, the throughput can be calculated exactly and that it is always optimal to allocate the capacity as uniformly as possible, even when blocking occurs, in [6].The moments in tandem queues are widely studied in [7].A study, on control of a single-server tandem queueing system, is given by [8].Knessel and Tier considered a diffusion model for two tandem queues with general renewal input [9].Marin and Bulo studied explicit solutions for queues with hypoexponential service time and they gave applications to product form analysis in [10].The queues with phase-type distributions are widely investigated by [11].Throughout maximization for tandem lines is studied by [12].Recently, performance analysis of tandem queues with small buffers is studied [13] and a paper on a tandem queueing model with parallel phases is given by [14] in which a numerical example is performed.In this paper we analyze a tandem queueing model in which the second stage has hyperexponential distribution.The arrivals to the first stage of the queue are Poisson-distributed and the service time at this stage has exponential distribution.There is no waiting room at first stage of the queue.The service time is hyperexponentially distributed and no waiting is allowed 2 Mathematical Problems in Engineering at second stage of the queue.The transition probabilities and loss probabilities of this model are obtained.The loss probability at second stage is optimized.The measures of performances are obtained.We also show that the numbers of customers in first and second stages are dependent.Furthermore this queueing model is simulated.For different values of parameters, exact values, simulated values, and optimal values of obtained performance measures of this model are numerically shown in tables and graphs.In simulation, it is seen that the simulation results tend to exact results after 10000 iteration steps.This queueing model is an extended model of the one studied in [14].Choosing  1 =  2 = 1/2 and  1 =  2 gives the model given in [14].

The Definition of Model
A new tandem queueing discipline is investigated in which the customers arrive to system with  parameter Poisson stream.In the first stage, there is a single server with exponential distributed service time having rate .No waiting is allowed in front of this single server.Hence the first loss occurs.The service time at second stage is hyperexponentially distributed.After completing service in first stage, the customers proceed to second stage.At second stage, the customers choose the first server or second server with probabilities  1 and  2 = 1 −  1 , respectively.The service time parameters of servers at second stage are  1 and  2 .After having service at first stage if any of two servers in second stage is busy then the customers leave the system.In this case second loss occurs.Now we give a formal mathematical definition of this queueing discipline as below.

Difference Equations of the 3D Markov Chain.
We have the difference equations of this Markov chain as given in

Transition Probabilities
By solving the equation system above, we have the transition probabilities as follows: . (5)

The Dependence of Number of Customers at First and Second Stages.
Considering the first stage, in /// queue if we take  = 1, then are obtained in [15].Where  0 is the probability that the system is idle and  1 is the probability the system is busy.Because there is a probability of loss at first stage, the customers can not arrive to second stage with  rate.Therefore the transition probabilities at second stage are found with  effective = (/( + )) rate.Then, In this manner, for example, since  100 ̸ =  1 ⋅  00 , the transition probability is written as As a result, the numbers of customers at first and second stages are dependent on each other.

Loss Probabilities.
There are two loss probabilities in this model.Now we go on by calculating these probabilities: (a) Let  (1)   denote the loss probability at first stage.Then, It is easy to see that this probability depends on  and  parameters only.Hence the loss probability at first stage is independent of the parameters  1 and  2 of second stage.
(b) Let  (2)   denote the loss probability at second stage.This probability is showed as follows.
To be loss at second stage, the second stage must be busy under condition that the first stage is busy.Considering this, the following events are defined: 1 is the event that first stage is busy. 2 is the event that second stage is busy.Consider where  1 =  100 +  101 +  110 .
The following theorem on optimization of  (2)   is given.

The Mean Number of Customers in the System.
If we denote the number of customers in the system by , then we calculate the mean number of customers as follows: Var 4.3.Mean Waiting Time in the System.Let  be the waiting time in the system.Using total expectation in [16], we have where  is the event of the loss at first stage.So, and the conditional expectations are written as It follows then that Now the mean waiting time of a customer in the system is calculated as given in ) . (22)

The Simulation of the Model
In this section we give the simulation of the queueing model which we analyze.The mean waiting time in the system and the loss probabilities are obtained by performing some number of iterations  = 1000, 5000, 10000, 20000 and the simulation results are given together with exact values in tables.Furthermore, it is seen that the simulation results tend to exact values.The exact and simulation values of  (2)   in Tables 1, 2, 3, and 4 are given in Figure 1.Also the exact values of  (2)   are the initial values of this figure.

Iterations number
Simulation result Exact result  (1)     (2)    ()  (1)     In this figure, we see that as the number of iterations increases, the simulation values of  (2)   converge to its exact values.Furthermore under condition  1 =  2 ,  (2)   has its minimum value when  1 =  2 and it seen in Figure 1, as is shown in Table 4.

Conclusions
A two-stage tandem queueing model is analyzed.The transition probabilities and loss probabilities are given and a theorem is given for the minimization of the loss probability at second stage.This queueing model is simulated for 1000, 5000, 10000, and 20000 iteration steps.The obtained simulation results are compared to exact results and it is shown in Tables 1, 2, 3, and 4 and Figure 1 that the simulation results are close to exacts results.Exact values and simulation results given in Tables 3 and 4 numerically satisfy Theorem 1.These results are also shown in Figure 1.
For further studies on this queueing model, this model can be extended by adding some servers, increasing Table 1 Table 2 Table 3 Table 4 Exact (n) L Figure 1: The exact and simulation values of  (2)   .
the capacities of the servers, and letting queues in front of the servers.