## 4 Algorithm Description
### The Network Operation Process  
The network operation flow chart is shown in Figure 4.  
According to the above discussions, the proposed method is presented in Algorithm 1. Figure 4: The flow chart of the network operation. ```
Result: dynamically update routing table;
1: Using GAF clustering algorithm to divide nodes into different clusters
2:# Step 1: choose the nodes communicating with the train
3: calculate the residual link lifetime of all nodes in the cluster \(RLL=\frac{-B+\sqrt{B^{2}-4 AC}}{2A}\)
4: select the node in the cluster with the longest remaining link lifetime
5:# Step 2: static configuration
6: using improved AODV algorithm for route discovery
7:for static configuration do
8: the selected nodes in step 1 as the source nodes
9: source node sends the RREQ message with link cost
10: current node receives the RREQ packet and observes the flag bit
11:for there is no path to the destination node do
12: extract the link cost value and accumulates it with the current cost value
13: store it again in the RREQ packet
14:if current node is the destination node then
15: extract the carrying information of several RREQ packets
16: calculate the minimum routing cost value \(C(P)=\sum\limits_{i=1}^{L-1}C([D_{i},D_{i+1}])\)
17: reply to the RREP message along the corresponding link
18: establish a reverse path
19: end
20:end
21:if there is a path to the destination node do
22: directly write existing paths to the routing table
23:end
24:end
```  
Complete the configuration of the routing table
25:# Step 3: dynamic addressing
26: Each cluster head dynamically monitors the packet loss rate of each link in the path
27:for the packet loss rate of a certain link is higher than the threshold do
28: obtain new paths by using Scheme 1-6
29: calculate end-to-end delay and loss rate
30: normalization \(T\_delay^{\prime}(i)=\frac{T\_delay(i)-\min(T\_delay)}{\max(T\_delay(i)-T \_delay(i)}\)
31: normalization \(loserate^{\prime}(i)=\frac{loserate(i)-\min(locerate)}{\max(loserate)-loserate(i)}\)
32: select a new path with the lowest weight as the update path
33:if service 1 is being transmitted then
34: calculate \(weight\_1(i)=0.5*loserate^{\prime}(i)+0.5*T\_delay^{\prime}(i)\)
35: choose a new path with the lowest weight as the update path
36:end
37:if service 2 is being transmitted then
38: calculate \(weight\_2(i)=0.7*loserate^{\prime}(i)+0.3*T\_delay^{\prime}(i)\)
39: choose a new path with the lowest weight as the update path
40:end
41:if service 3 is being transmitted then
42: calculate \(weight\_3(i)=0.3*loserate^{\prime}(i)+0.7*T\_delay^{\prime}(i)\)
43: choose a new path with the lowest weight as the update path
44:end
45:end ```
Update the routing table
```

**Algorithm 1**A dynamic addressing hybrid routing mechanism based on static configuration (DASC)

## 5 Simulation and Analysis

Compared to the AODV protocol, this paper uses MATLAB to simulate the proposed routing algorithm and analyzes the routing discovery overhead, residual link lifetime, packet delivery rate, end-to-end delay, and network throughput. The simulation network topology in this paper is shown in Figure 1, and the simulation parameters are shown in Table 3. The network runs for 100 rounds. The simulation compares the AODV routing protocol with the dynamic addressing hybrid routing mechanism based on the static configuration proposed in the third part of this article. ### Improved AODV

#### 5.1.1 Routing Discovery Overhead

This article uses an improved AODV route discovery algorithm. As shown in Figure 5, the simulation results of train location and route discovery overhead are described. For the route discovery part of traditional AODV routing protocols, starting from the source node, each node in the scenario must send RREQ packets to its neighboring nodes. The effective RREQ packets are sent to all nodes adjacent to the node but not adjacent to the previous hop node until a minimum-hop path to the destination node is found.