# A Reliable Low-Latency Multipath Routing Algorithm for Urban Rail Transit Ad Hoc Networks
## 3 The Improved Multipath Routing Algorithm
### RLLMR Algorithm  
According to the above discussions, the proposed scheme is presented in Algorithm 1. ``` Result: Update routing table;
1: Initialize the routing table of network nodes
2:# Step 1: static routing configuration
3: Generate a virtual node to send RREQ
4:for intermediate node received RREQ do
5:for without received the same RREQ-ID && new RREQ-ID > old RREQ-ID do
6: record the IP of the source node in the reverse routing table
7: send RREQ
8:end
9:end
10:for destination node received RREQ do
11:for destination node receives i RREQ-ID do
12: add tag i to RREP
13: reply to RREP along the reverse path
14:end
15:end
16:for intermediate node received RREP do
17: reply to RREP along the reverse path
18: record the forward path in the static routing table
19:end
20: remove virtual nodes, there are a total of N static paths in the network
21:# Step 2: route selection
22:for mobile node sends data to destination node do
23:for mobile nodes for routing discovery do
24: send RREQ
25: receive RREP
26: record the discovered available paths x (x <= N)
27: Get \(hc_{i}\), y (from MAC layer), \(\lambda\), \(\mu\)
28:end
29: Find type of data sent q
30: Get \(\tau_{q}\), packet length \(L\)
31: Calculate \(\lceil M_{\min}\rceil=\frac{\alpha}{\tau_{q}}\sum\limits_{\max\{hc_{i}\}} \left(\frac{l}{B}+\frac{\lambda}{(\mu-\lambda)\mu}\right)\), Get \(M\)
32:for estimating link cost do
33: Calculate \(LS_{i}(hc_{i},y)=\alpha*hc_{i}+\beta*\frac{1}{y}\)
34:end
35:for M > 0 do
36: mark the available path with the minimum link cost as valid
37:\(M-1\)
38:end
39:end
40:end Update mobile node routing table;
41:# Step 3: local routing repair
42: divide the network area into several areas according to R, mark cell 1.2... n
43:for intermediate node has detected a link failure reaching the next hop do
44: Get current node location information, A(\(x_{1}\), \(y_{1}\), \(z_{1}\))
45: Get next hop location information, B(\(x_{2}\), \(y_{2}\), \(z_{2}\))
46:for node A and B are located in the same cell, n do
47: mark the original path as a fault in the routing table
## 4 Performance Analysis of the Proposed Routing Algorithm

### Simulation Environment Parameters

In this section, the main focus is on verifying the impact of the multipath selection algorithm and route repair scheme on the latency and reliability for urban rail transit vehicle-to-ground communication services. At first, the simulation is performed regarding the urban rail transit ad hoc network topology, which distributes trackside nodes in the network and makes the mobile nodes gradually approach the station sink nodes along a straight line, and then the proposed adaptive multipath routing algorithm (AMS) and local routing maintenance (LRM) scheme are compared with the traditional AODV [17] and AOMDV routing protocols. The simulation parameters are given in Table 3.

### Analysis of Simulation Results

#### 4.2.1 Latency Results

The route discovery latency is the total time consumed by the source node in sending RREQ messages to find an available path to the destination node. The route discovery process of traditional AODV and AOMDV is compared with the route discovery process using a static configuration scheme, and the route discovery delay results are shown in the following figure. As shown in Figure 6, with the increase in the arrival rate, this means that, in unit time, the number of packets sent increases, which leads to a more congested network, and the route discovery latency increases exponentially. However, the route discovery latency \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Network size & 1500 m \(\times\) 10 m \(\times\) 8 m \\ Communication range & 250 m \\ Carrier frequency & 2.4 GHz \\ Maximum speed & 120 km/h \\ No. 1 and No. 2 Data packet sizes & 512 bit \\ No. 3 Data packet sizes & 2048 bit \\ Transmit Power & 30 dBm \\ Receiver Sensitivity & –70 dBm \\ (Tx/Rx) Antenna Gain & 5 dBi \\ Mobile node start location & 0 m \\ Station start location & 1500 m \\ \hline \hline \end{tabular}
\end{table}