## 3 Mathematical Model  
Queuing network is a generalization of a multiphase queuing system. It is the union of a finite number \(S\in N\) of QS (hereinafter referred to as nodes), in which requests move from one node to another in accordance with the routing matrix \(P\)[12; 13]. We deal with open QN. It means that requests come from an external source. Then, if it is considered as an additional node with index 0, a route of a request is determined by a stochastic matrix \(P=\|P_{ij}\|\). Here, \(P_{0j}\) is the probability of an arriving request from the source to the \(j\)-th node; \(P_{j0}\) is the probability of a request leaving from the QS after servicing at the \(j\)-th node; \(P_{ij}\) is the probability of request transition from node \(i\) to node \(j\) (\(i,j=\overline{1,S}\)). It is obvious that \(\sum_{j=0}^{S}P_{ij}=1\) (\(i=\overline{0,S}\)), \(P_{00}=0\). Each node of QS is characterized by four parameters. In accordance with [PERSON]'s notation [12; 13], they take the form \(A/B/m/n\). Here, \(A\) describes the distribution of durations between each arrival to the queue, \(B\) is the distribution of service times for requests, \(m\) is the number of servers at the node and \(n\) is the buffer size. If the parameters of the arriving flow are unknown, then in the first position (symbol \(A\)) we put the symbol \"*\". Next, it is assumed that at each node, requests are selected from the queue according to FIFO (First in, first out). To design the mathematical model of the railway station, let us first describe the arriving flow and then consider the nodes of QN. The arriving train flow consists of flows of even and odd directions, the parameters of which may differ significantly. The train should be considered as a group of requests since the cars are serviced independently. To describe such a flow, we use _BMAP_[42], which allows us to combine several incoming flows with different characteristics into a single structure. _BMAP_ is a generalization of the group Poisson process, allowing the change in the intensity of the arrival of request groups, but keeping the basic Markov structure. We have a Markov chain \(v_{t}\) with continuous time and state space {0,1,...,W}. The intensity of arrival request groups \(\lambda_{v}\) depends on the state number of the Markov chain \(v_{t}\). The residence time in each state is exponentially distributed with parameter \(\lambda_{v}\). With probability \(p_{k}(v,v)\) the chain can go to state \(vt\). This generates a group of random size \(k\geq 0\). The normalization condition is satisfied:  
\[\sum_{k=0}^{\infty}\sum_{v=0}^{W}p_{k}(v,vt)=1.\]  
The transitions intensities are written in matrix form:  
\[(D_{0})_{v,v}=-\lambda_{v},\ \ v=\overline{0,W}\,(D_{0})_{v,vt}=\lambda_{v}p_{0} (v,vt),\ \ v=\overline{0,W},(D_{k})_{v,vt}=\lambda_{v}p_{k}(v,vt),\ \ v,vt=\overline{0,W},\ \ k\geq 1 \tag{1}\]  
According to the subject model described in the previous section, the railway station includes four subsystems (\(S=4\)). Each of them is represented in the form of QS, the numerical parameters of which are determined by the characteristics of a particular system in the next section. Node 1 is <<Arrival>>, Node 2 is <<Accumulation>>, Node 3 is <<Loading>>, and Node 4 is <<Departure>>. The requests arrive only to Node 1. The acceptance policy is complete rejection. It means that if there is not enough space for at least one request from the group, then the whole group is rejected. Then the requests transit through the system in accordance with the scheme shown in Figure 1. The routing matrix has the following form:  
\[P_{1}=\left( \begin{array}{ccccc}0&1&0&0&0\\ 0&0&1&0&0\\ 0&0&0&0.5&0.5\\ 0&0.5&0&0&0.5\\ 1&0&0&0&0\end{array} \right)\]If there is no free place in the queue of Nodes 2-4 for accepting the request from the previous Node, then the previous Node is temporarily blocked. The routing matrix \(P_{1}\) shows that the probabilities of transferring a request from Node 2 to Nodes 3 and 4 are the same and equal to 0.5, as well as from Node 3 to Nodes 1 and 4.