# Research on Routing Algorithm of Construction Robot Cluster Enhanced Ad Hoc Network
## 3 ACER Routing Algorithm
### Routing with Converged Routing Path Quality Metrics  
When performing route discovery, there may be multiple paths. If the minimum hop count path is selected by simply comparing the path hop count hop, the average length of the routing path is often too long [33]. When neighboring nodes on the routing path are at the boundary of the maximum communication distance, subtle movement of nodes may lead to link breakage between nodes, so relying solely on hop count as routing path selection is likely to lead to the selection of paths with poor link quality, frequent initiation of route discovery, and degradation of network performance.  
In evaluating the stability of the network routing path, when the nodes have sufficient energy, and the relative distance between nodes is less or much less than the communication distance, it indicates that the routing path has excellent stability, and the network topology is firmly connected. Therefore, a path quality evaluation metric \(Q_{1}\) between adjacent nodes and a multi-hop routing path quality evaluation metric \(Q_{2}\) was introduced to constrain the routing path selection mechanism and optimize the network connectivity. The path quality evaluation metric \(Q_{1}\) uses the relative distance between neighboring nodes to represent the stability of data transmission between neighboring nodes; the multi-hop routing path quality evaluation metric \(Q_{2}\) incorporates the number of routing path hops and node energy to characterize the link stability. The stability of a routing link largely determines the effectiveness of the communication network. When using the routing path quality evaluation metric Q to quantify the stability of a routing link, its value is between 0 and 1, and a larger value is more helpful for network connectivity. In this paper, the link that better ensures stable data transmission between nodes is selected according to its value.  
The routing path quality evaluation metric \(Q_{1}\) determined by the relative distance is shown in Equation (10):  
\[Q_{1}=\begin{cases}1&,0\leq d\leq\frac{R}{10}\\ \frac{1}{10}\times\left(ln{\left(\frac{R}{100\times d}\right)^{2}}+10\right)&,\frac{R}{10}<d\leq R\\ 0&,d>R\end{cases} \tag{10}\]  
where \(R\) denotes the node communication distance and d denotes the inter-node distance. The routing path quality evaluation metric \(Q_{2}\) determined by the number of path routing hops, node energy, and load is shown in Equation (11):  
\[Q_{2}=\frac{1}{hop_{ij}}\times\frac{E_{i}-E_{u}}{E_{0}-E_{u}}\times\frac{C_{i} }{C_{0}} \tag{11}\]  
where \(hop_{ij}\) denotes the number of hops of the routing path from node \(i\) to node \(j\), \(E_{i}\) denotes the current remaining energy of node \(i\), \(E_{0}\) denotes the maximum energy of node, and \(E_{u}\) denotes the energy threshold of the node. When the remaining energy of the node is below this threshold, the node exits route discovery, i.e., the node is invalidated, where the energy threshold \(E_{u}\) is defined as the energy required by the node to send one packet to a one-hop neighbor node, \(C_{i}\) denotes the current amount of data cached by the node, and \(C_{0}\) denotes the cache capacity.  
In Equation (10), the smaller the relative distance between two nodes, the larger the routing path quality evaluation index \(Q_{1}\), indicating that the routing path has better stability and more vital network connectivity, and when the relative distance \(d\) between nodes is greater than the node communication distance \(R\), a direct link cannot be established between two nodes and the stability is expressed as 0. In Equation (11), a larger \(Q_{2}\) indicates that the source node has a better ability to complete data transmission, described explicitly as fewer hops between nodes, less energy consumption, and a more balanced residual energy and congestion level of nodes, indicating that the current link has better stability and reliability and better network connectivity.