## 4 Gs-Eera
### Algorithm Procedure
Secondly, it chooses relay node based on multi-factors, which considers the residual energy, energy harvesting rate, distance and transmission delay. Thirdly, it also adopts void recovery and void avoidance methods to deal with the routing hole problem. Therefore, it alleviates the issues of packets loss, long transmission delay and energy wasting brought by routing holes. EHR considers the buffer constraint problem. However, it neglects the impact of energy state, collision of wireless channel and the routing hole problem. Therefore, EHR only slightly eases congestion, and it performs worse than GS-EERA in terms of energy consumption and end-to-end delay. SAGREH determines the candidate route based on distance, direction and residual energy, i.e., choosing a transmission path with the highest reliability. Hence, SAGREH achieves acceptable performance in energy consumption and packet delivery ratio. From Figure 10e, we see that the number of hop counts of GS-EERA is less than the other three routing algorithms. That is because GS-EERA makes use of the communication range judgement model to determine the candidate nodes, which ensures the optimal forward direction. Furthermore, it takes distance into account when selecting the relay node (Formula (27)), guaranteeing each hop as long as possible. SAGREH and EHPRP also comprehensively consider the direction and distance in the next hop selection. Nevertheless, these two algorithms do not control the direction and ignore the routing hole issue. Therefore, they have a relatively higher number of routing hops compared with GS-EERA. EHR performs poorly in average hop count as these two factors are not considered. From Figure 10b, we observe that EHR achieves the best performance in energy variance, since it always selects relay nodes with the highest energy level and maximum energy harvesting density. GS-EERA and EHPRP consider muti-factors including the residual energy and energy harvesting rate. As a result, these two algorithms obtain relatively worse performance than EHR in energy variance. SAGREH does not efficiently consider the impact of energy state on next hop selection. Thus, it performs poorly in energy variance. #### 5.3.2 The Impact of Initial Energy

In this simulation group, we set the number of nodes \(n=300\), simulation time \(T_{s}=600\) s, packets generation rate \(PGR=2\) packets/s, data buffer capacity \(B_{max}=40\) packets and the initial energy \(E_{0}\) varies in 5-15 J. Figure 11 shows the impact of \(E_{0}\) on average energy consumption, energy variance, average end-to-end delay, packet delivery ratio and average hop count. Figure 11: The impact of initial energy on (**a**) average energy consumption, (**b**) energy variance, (**c**) average end-to-end delay, (**d**) packet delivery ratio and (**e**) average hop count. Overall, as the initial energy \(E_{0}\) increases, the energy consumption and end-to-end delay decrease, and the packets delivery rate increases. With more \(E_{0}\), the nodes are easier to be in the active mode. Thus, the number of candidate nodes increases. As described in Section 5.3.1, the increasing of the number of candidate nodes increases can improve the performance of energy consumption, end-to-end delay and packet delivery ratio. The energy variance and average hop count are affected not only by the initial energy but also by the detailed routing strategy. As a result, these two metrics do not have clearly change rules. GS-EERA still achieves the optimum performance in average energy consumption, end-to-end delay, packet delivery ratio and hop count, and acceptable performance in energy variance. Take the average hop count as an example, GS-EERA is 20.38% less than EHPRP, 32.12% less than SAGREH, and 45.73% less than EHR, respectively. Since EHR emphasizes the energy state of selected nodes and considers buffer constraints to alleviate congestion problem, it has good performance in energy consumption, energy variance and end-to-end delay.