# Modeling of a Coal Transshipment Complex Based on a Queuing Network
## 3 Mathematical Model
### Mathematical Description of the Incoming Car Traffic  
The mines, the terminal, and the railway infrastructure are managed by different organizations, causing inconsistency in the operation of these systems. Additionally, train schedules are frequently disrupted due to the significant transportation distances and the impact of unforeseen factors [37; 39]. The Poisson process is an effective tool for describing the arrival of trains at stations, taking into account possible deviations from the schedule [42]. The receiving yard receives trains of several categories that have different routes. The number of cars depends on the train category. At the same time, coal cars are unloaded at Daltransugol JSC separately. Therefore, the train should be considered as a group of service \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**No** & \(\mathbf{t_{1}}\) & \(\mathbf{t_{2}}\) & **Deadweight** & **No** & \(\mathbf{t_{1}}\) & \(\mathbf{t_{2}}\) & **Deadweight** \\ \hline
1 & 26 & - & 76,620 & 14 & 48 & 51 & 75,680 \\
2 & 34 & 34 & 75,200 & 15 & 136 & 52 & 91,443 \\
3 & 46 & 86 & 81,200 & 16 & 72 & 30 & 75,772 \\
4 & 86 & 99 & 75,400 & 17 & 98 & 111 & 170,000 \\
5 & 56 & 57 & 99,050 & 18 & 51 & 264 & 79,252 \\
6 & 44 & 97 & 91,440 & 19 & 41 & 10 & 73,729 \\
7 & 67 & 33 & 170,000 & 20 & 87 & 125 & 72,495 \\
8 & 81 & 48 & 73,600 & 21 & 69 & 36 & 174,766 \\
9 & 38 & 14 & 72,500 & 22 & 33 & 45 & 75,765 \\
10 & 43 & 60 & 174,766 & 23 & 28 & 84 & 74,577 \\
11 & 75 & 20 & 75,320 & 24 & 43 & 34 & 93,237 \\
12 & 29 & 108 & 76,100 & 25 & 49 & 32 & 173,541 \\
13 & 68 & 32 & 174,766 & 26 & 67 & 176 & 75,318 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Statistics on arrivals and departures of carriers at Daltransugol JSC. requests. To describe such an incoming car flow, we apply a generalization of the Poisson process: batch marked Markovian arrival process (BMMAP). It allows one to describe several group flows within the same model. The flows can have different car types and distributions of request groups. BMMAP is defined by a Markov chain with continuous time and state space {1,..., \(W\)} [43]. The intensity of arrival request groups \(\lambda_{x},\;w=\overline{1,W}\) depends on the state number of the Markov chain. The residence time in each state is exponentially distributed. With probability \(p(r;w),\;r,w=\overline{1,W}\), the chain can go to state \(w\), while probability \(g_{r}(k)\) generates a group of random size \(k\geq 0\), and, with probability \(p_{r}^{(l)}\), the requests in the group have the type \(l\geq 1\). The normalization condition is satisfied: \(\sum\limits_{l=1}^{\infty}\sum\limits_{k=0}^{\infty}\sum\limits_{w=w}^{w}p(r; w)g_{r}(k)p_{r}^{(l)}=1\). It is convenient to collect all this information in matrices \(D_{0},D_{k}^{(l)}\), which are set according to the formulas  
\[ \begin{split}&(D_{0})_{r,r}=-\lambda_{r},(D_{0})_{r,w}=\lambda_{r}p( r;w)g_{r}(0),\\ &(D_{k}^{(l)})_{r,w}=\lambda_{r}p(r;w)g_{r}(k)p_{r}^{(l)},\;r,w= \overline{1,W},\;\;k\geq 1,\;l\geq 1.\end{split}  \tag{1}\]  
Model of incoming car flow in the form of BMMAP. By request, we mean 70 tons of coal--the average car capacity--and the train is a group of requests. Freight trains leave the system immediately after stopping at Toki station. Therefore, the distribution of the car numbers does not affect the simulation results. This fact allows us to assume that it corresponds to the distribution of the length of coal trains (see Table 1). Both coal (and freight) and passenger trains arrive at Toki station, so the control Markov chain has two states {1, 2}. The first state corresponds to the arrival of a freight train, and the second to a passenger train. After being serviced at the station, trains follow two routes: coal trains move further inside the system, and the rest leave it. To describe them, we use two types of requests: \(l=1\), \(2\), respectively. The probability of arrival of either a coal or freight train is equal to \(p(2;1)=14/16=0.875\). For a passenger train, \(p(1;2)=2/16=0.125\).