## 6 Results and Analysis
### Impact of Network Parameters on Average Residual Energy  
Figure 6 exhibits the change of the average residual energy under the three attacks with altering \(e\). In the case of various \(e\), the maximum-degree and maximum-betweenness attacks decline rapidly in the later communication period. In addition, when \(e\) is 5, 10, and 20, respectively, the average residual energy of random attack is larger than that of maximum-degree attack for the whole communication process. In the condition that \(e\) is 5, 10, 15, 20 and 25, respectively, we can distinctly perceive that the average residual energy of random attack is bigger than that of maximum betweenness attack within the interval of [1,516], [1,512], [1,536], [1,665], and [1,494], respectively. If \(e\) is 5, 10, 15, and 20, respectively, the average residual energy of the maximum-degree attack is greater than the maximum-betweenness attack in the early stage but less than the maximum-betweenness attack in the later phase. However, in the case of \(e=25\), the average residual energy of the maximum-betweenness attack is consistently higher than that of the maximum-degree attack. Figure 5: Influences of varying \(N\) on invulnerability for different attacks. Figure 6: Relationships between differing \(e\) and average residual energy under distinct attacks. Figure 7 shows the variation characteristics of average residual energy under these three attacks with varied \(k\). Significantly, both the maximum degree and the maximum betweenness attacks lower sharply in the later phase for diverse \(k\). When \(k\) is set to 4000, 5000, and 6000, the average residual energy of random attacks is greater than the maximum-degree attack. Furthermore, if \(k\) equals 5000 and 6000, the average residual energy of maximum-betweenness attack will be higher than that of maximum-degree attack. Figure 8 displays the variation of average residual energy under the three attacks with differing \(r\). It can be evidently seen that the maximum-degree attack and the maximum-betweenness attack decline enormously with the growth in communication rounds. Meanwhile, in the situation that \(r\) is 1, 2, 3, and 5, respectively, it is discovered that when the number of communication rounds is in a specific interval, the average residual energy of random attack is smaller than that of maximum-betweenness attack. Moreover, other features worthy of our attention are as follows: when \(r\) is 3, 4, and 5, the average residual energy of random attack is bigger than the maximum-degree of attack; in the case of \(r=4\), the average residual energy of random attack is greater than the maximum-betweenness attack; when \(r\) is 1, 2, and 3, the average residual energy of maximum-betweenness attack is larger than the maximum-degree attack. Figure 9 illustrates the changes in average residual energy for the three attacks with different \(N\). The stability of average residual energy of maximum-degree and maximum-betweenness attacks is obviously worse than that of random attack with the increment of communication rounds. It should be noted that in the circumstance that \(N\) is 800 and 1000, the average residual energy of random attack is greater than that of maximum-degree attack. When \(N\) is 800, 1100, and 1200, the average residual energy of maximum-betweenness attack is more excellent than that of maximum-degree attack. In summary, under the condition of assorted network parameters, we can observe that the average residual energy of random attack reduces the slowest and that of maximum-degree attack declines the promptest. This result is consistent with the opinion that the power consumption provoked by maximum-degree and maximum-betweenness attacks is more remarkable than that of random attack. Therefore, in the case of the random attack, the advantages of the routing algorithm are higher than that of the maximum-degree and maximum-betweenness attacks, providing an effective solution to network energy balance.