# Energy-Efficient Opportunistic Routing Algorithm for Post-Disaster Mine Internet of Things Networks
## 4 Proposed DEOR Algorithm
### Recovery Mechanism  
In this section, we describe in detail a recovery mechanism in the proposed DEOR algorithm. The collapse of loose coal in mines after disasters and the depletion of node energy are common phenomena that can increase the probability of void nodes being selected as relay nodes [39]. However, although the above methods reduce the probability of selecting void nodes, they cannot completely avoid the problem of void routing. According to Figure 2, we assume that the routing node \(n_{j}\) of the current sender \(n_{i}\) is an invalid node; the routing recovery process of void nodes in the post-disaster MIoT network is shown in Figure 6. By adopting the proposed recovery mechanism, the current void node \(n_{j}\) can  
Figure 5: Schematic diagram of relay node selection from source \(n_{1}\) to the sink. quickly find the optimal relay recovery node \(n_{k}\) on the reverse routing path towards the sink, thereby bypassing the void area and improving the packet delivery rate of post-disaster network data transmission. In Figure 6, if the relay node \(n_{j}\) of the sender \(n_{i}\) is a void node, no neighbors in the upward path to the sink can forward packets, i.e., the candidate forwarder set \(C_{\text{up}}(j)\) obtained according to Algorithm 1 is empty. Here, we denote the set of neighbor nodes of the void node \(n_{j}\) as \(N_{j}\), and its subset of neighbors \(N(d_{j})\) in the downward path can be defined as  
\[N(d_{j})=\left\{n_{k}\in N_{j}\subseteq N\mid d_{k,\text{sink}}-d_{j,\text{sink }}\geq 0\right\} \tag{20}\]  
where \(n_{k}\) is the neighbor of void node \(n_{j}\) and \(d_{j,\text{sink}}=\sqrt{\left(x_{j}-x_{\text{sink}}\right)^{2}+\left(y_{j}-y_{ \text{sink}}\right)^{2}}\) represents the Euclidean distance from \(n_{j}\) to the sink. Similar to Formula (8), in order to ensure load balancing and energy conservation in the post-disaster network, nodes with higher residual energy should be selected. Hence, the subset \(N(\varepsilon_{j})\) of \(n_{j}\)'s neighbors that satisfy energy constraints is denoted as  
\[N(\varepsilon_{j})=\left\{\left\{n_{k},n_{l}\right\}\in N_{j}\subseteq N| \varepsilon_{k}\geq\frac{1}{2}\frac{\sum_{l}\varepsilon_{l}}{\left(m_{j} \right)}\right\} \tag{21}\]  
Combining Formula (20) and Formula (21), the candidate recovery node set \(C_{\text{down}}(j)\) of void node \(n_{j}\) can be defined as  
\[C_{\text{down}}(j)=N(d_{j})\cap N(\varepsilon_{j}) \tag{22}\]  
Unlike the routing method described in Section 4.2, when an invalid node \(n_{j}\) selects a recovery relay node in a downward path to the sink, it will consume more energy to forward packets to nodes at greater distances. Therefore, the neighbor node with a smaller transmission distance difference from the void node should be selected as the recovery relay node. Consequently, in the recovery mechanism, Formulas (15) and (19) should be rewritten as  
\[\widetilde{d}_{j,k}=\frac{e^{-(\overline{d}_{j,k})^{n_{j}d}}}{\sum_{k=0}^{c_{ j}}e^{-(\overline{d}_{j,k})^{n_{j}d}}} \tag{23}\]  
\[\overline{Q}_{j,k}=\frac{\widetilde{Q}_{j,k}}{\sum_{l=0}^{c_{j}}\widetilde{Q }_{j,l}}=\frac{e^{((\overline{\varepsilon}_{j,k})^{n_{k}d}-(\overline{ \varepsilon}_{j,k})^{n_{j}d}}-(\overline{d}_{j,k})^{n_{j}d})}{\sum_{k=0}^{c_{ j}}e^{((\overline{\varepsilon}_{j,l})^{n_{k}d}-(\overline{\varepsilon}_{j,l})^{n_{ j}d}})} \tag{24}\]  
where \(c_{j}\) is the number of candidate forwarders of void node \(n_{j}\). Once the void node forwards packets to a normal routing node, it exits the recovery mechanism and continues to route packets to the sink, as described in Sections 4.1 and 4.2. In the recovery mechanism, nodes will record the ID of the previous hop node, and these  
Figure 6: Schematic diagram of routing recovery mechanism from void node \(n_{j}\) to relay node \(n_{k}\). nodes will not be repeatedly selected when selecting the recovery relay node, thus avoiding routing loops.