# Routing Selection Algorithm for Mobile Ad Hoc Networks Based on Neighbor Node Density
## 5 Simulations and Results
### Result
#### 5.2.2 Environment 2  
According to the previous experimental results, it was demonstrated that CND-AODV performs best when the threshold value \"z\" is set to 1.645. Therefore, in this section of the experiment, the CND-AODV protocol will have its \"z\" threshold parameter set to 1.645. Scenario 1: Scenario with varying numbers of nodes, the experiment consists of varying the number of nodes from 25 to 275, with node movement speeds randomly set between 0 and 5 m/s, simulating normal walking and cycling scenarios for data transmission. Figure 14: Packet delivery ratio performance of CND-AODV with different threshold values (\(z\)). Figure 13: Throughput performance of CND-AODV with different threshold values (\(z\)). As shown in Figures 16 and 17, it can be observed that as the number of nodes increases from 25 to 275, the throughput and packet delivery ratio of three routing methods, including AODV, ND-AODV, and the proposed CND-AODV, all exhibit a gradual decrease. However, CND-AODV shows the smallest decline in performance. As depicted in Figure 18, regarding the delay, with the continuous increase in the number of nodes, the network delay for three protocols demonstrates an upward trend. Nonetheless, it is evident that CND-AODV significantly outperforms AODV and ND-AODV in terms of transmission delay. In summary, in scenarios with a larger number of nodes, CND-AODV exhibits notable improvements in both throughput and network delay. Scenario 2: This involves simulation experiments with different node counts using a z-threshold of 1.645. Under uniform distribution conditions, the network performance of AODV, ND-AODV, and CND-AODV is compared. The specific distribution is illustrated in Figure 9, and the performance of CND-AODV under uniform distribution is analyzed by comparing the throughput, packet delivery rate, and delay. Figure 16: Relationship between throughput and number of nodes for different protocols under random distribution. Figure 15: Delay performance of CND-AODV with different threshold values (\(z\)). In the scenario of uniform node distribution, as the node count increases from 25 to 275, it can be observed from Figures 19 and 20 that both the throughput and packet delivery rate exhibit a decreasing trend. However, the performance of ND-AODV and CND-AODV surpasses that of AODV, and this advantage becomes more pronounced with the increase in node count, with CND-AODV slightly outperforming ND-AODV. As depicted in Figure 21, the delay increases with the growing number of nodes for all three protocols, but ND-AODV and CND-AODV show a slower growth rate, with CND-AODV slightly outperforming ND-AODV. Therefore, under uniform distribution conditions, it can be concluded that the performance of CND-AODV is slightly superior to ND-AODV and significantly better than AODV. Figure 17: Relationship between packet delivery ratio and number of nodes for different protocols under random distribution. Figure 18: Relationship between delay and number of nodes for different protocols under random distribution. Scenario 3: Scenario with varying speeds of nodes; in this experiment, the node movement speeds are randomly set to 3 m/s, 25 m/s, and 50 m/s, corresponding to pedestrian, vehicular, and high-speed highway vehicular scenarios, respectively. The number of nodes is fixed at 200 for data transmission. Figure 19: Relationship between throughput and number of nodes for different protocols under uniform distribution. Figure 20: Relationship between packet delivery ratio and number of nodes for different protocols under uniform distribution. As shown in Figures 22-24, we can observe that our proposed algorithm CND-AODV exhibits a gradual decline in throughput and packet delivery ratio as the node movement speed increases. However, it still slightly outperforms ND-AODV and AODV. As the node movement speed increases, the average delay of CND-AODV also shows an increasing trend, but it remains lower than those of AODV and ND-AODV.