# Priority Multi-Server Queueing System with Heterogeneous Customers
## 6 Output Flow  
Quite often, service to customers is provided not by one set of servers but by the series of such sets. This implies the necessity to consider not a separate queueing system, but a tandem or a network of queues. In such a case, it is very important to investigate the output flow from each system. The output flow from the considered queueing system is characterized as follows.  
The output flow from the system under consideration is a \(MMAP\). The underlying process of this \(MMAP\) is the Markov chain \(\xi_{t}\) which describes the operation of the system, i.e.,  
\[\xi_{t}=\{n_{t},r_{t},\
u_{t},m_{t}^{(1,1)},m_{t}^{(2,1)},\ldots,m_{t}^{(r_{t},1)},m_{t}^{(1,2)},m_{t}^{(2,2)},\ldots,m_{t}^{(n_{t}-n,2)}\},\ t\geq 0.\]  
Let us enumerate the states of the chain \(\xi_{t}\) in the lexicographic order. Then the output flow is defined by the following theorem.  
Theorem 6.1: _The output flow from the system under study is a \(MMAP\) that is defined by the matrix \(D_{0}^{(output)}\), \(D_{1}^{(output)}\), \(D_{2}^{(output)}\), which are calculated by the formulas_  
\[D_{0}^{(output)}=\left(\begin{array}{cccccc}Q_{0,0}&Q_{0,1}&O&\ldots&O&O\\ O&Q_{1,1}&Q_{1,2}&\ldots&O&O\\ O&O&Q_{2,2}&\ldots&O&O\\ \vdots&\vdots&\vdots&\ddots&\vdots&\vdots\\ O&O&O&\ldots&Q_{N-1,N-1}&Q_{N-1,N}\\ O&O&O&\ldots&O&Q_{N,N}\\ \end{array}\right),\]  
_where the matrices \(Q_{n,n},n=\overline{0,N}\), \(Q_{n,n+1},n=\overline{0,N-1}\), are defined in Theorem 6.1,_  
\[D_{1}^{(output)}=diag^{-}\{\mathcal{S}_{0,1}^{(n)},\ n=\overline{1,N}\},\]  
_where_  
\[\mathcal{S}_{0,1}^{(n)}=\left(\begin{array}{cccccc}O&O&\ldots&O\\ I_{\tilde{W}}\otimes\mathcal{S}_{0}^{(1)}\otimes I_{M_{2}^{n-1}}&O&\ldots&O\\ O&I_{\tilde{W}}\otimes(\mathcal{S}_{0}^{(1)})^{\oplus 2}\otimes I_{M_{2}^{n-2}}&\ldots&O \\ \vdots&\vdots&\ddots&\vdots\\ O&O&\ldots&I_{\tilde{W}}\otimes(\mathcal{S}_{0}^{(1)})^{\oplus n}\\ \end{array}\right),\]  
\[D_{2}^{(output)}=diag^{-}\{\mathcal{S}_{0,2}^{(n)},\ n=\overline{1,N}\},\]  
_where_  
\[\mathcal{S}_{0,2}^{(n)}=\]\[\left(\begin{array}{ccccc}I_{\hat{W}}\otimes(\mathbf{S}_{0}^{(2)})^{\oplus n}&O& O&\ldots&O\\ O&I_{\hat{W}M_{1}}\otimes(\mathbf{S}_{0}^{(2)})^{\oplus n-1}&O&\ldots&O\\ O&O&I_{\hat{W}M_{1}^{2}}\otimes(\mathbf{S}_{0}^{(2)})^{\oplus n-2}&\ldots&O\\ \vdots&\vdots&\vdots&\ddots&\vdots\\ O&O&O&\ldots&I_{\hat{W}M_{1}^{n-1}}\otimes\mathbf{S}_{0}^{(2)}\\ O&O&O&\ldots&O\\ \end{array}\right).\]  
Proof.: The underlying process \(\xi_{t}\) of the output \(MMAP\) makes idle transitions when:  
(i) The underlying process \(v_{t}\) of the input \(MMAP\) makes transitions without a customer arrival or the phase of service processes \(m_{t}^{(k)},k=1,2\), changes in the set of transient states. If the number of busy servers is \(n\), the rates of corresponding transitions are described by the block \(Q_{n,n}\) of the matrix \(D_{0}^{(output)}\).  
(ii) The process \(v_{t}\) makes a transition accompanied by arrival a customer of type 1 or 2. If the number of busy servers is \(n\), the rates of corresponding transition are described by the block \(Q_{n,n+1}\) of the matrix \(D_{0}^{(output)}\).  
The underlying process \(\xi_{t}\) of the output \(MMAP\) makes transitions, which are accompanied by generation of type \(k\) customer, when one of servers servicing type \(k\) customer finishes the service, \(k=1,2\). If the number of servers servicing type \(k\) customer is \(n\), the rates of corresponding transitions are described by the block \(\mathcal{S}_{0,k}^{(n)}\) of the matrix \(D_{k}^{(output)},\ k=1,2\).  
Corollary 1: _The output rate of type-\(k\) customers is computed by_  
\[\mu_{k}=\mathbf{p}D_{k}^{(output)}\mathbf{e},\ k=1,2,\]  
_where \(\mathbf{p}\) is the solution of the Chapman-Kolmogorov equations derived above._  
The loss probability of type-\(k\) customers is computed by  
\[P_{loss,k}=1-\frac{\mu_{k}}{\lambda_{k}},\ k=1,2.\]  
The loss probability of type-2 customer loss due pushing out of service is computed by  
\[P_{loss,2}^{push}=P_{loss,2}-P_{loss,2}^{input}.\]