# SROR: A Secure and Reliable Opportunistic Routing for VANETs
## 6 Simulation Results
### Comparison with Benchmarks
#### 6.4.1 Impact of Vehicle Density  
Figure 9 shows the simulation results where vehicle density ranges from 10 to 50, and the percentage of malicious vehicles \(\sigma\) is fixed at 10%.  
Figure 8: Effect of \(\varepsilon\) on reward. (**a**) Average reward. (**b**) Cumulative rewards.  
Figure 7: Average reward and cumulative rewards for the OneCycleLR policy. (**a**) Average reward. (**b**) Cumulative rewards.  
As Figure 9a shows, as the vehicle density increases, the PDR increases rapidly. This is due to the fact that the network becomes more connected when vehicle density increases. However, note that the PDR of them rises at different speeds with the increase of vehicle density. When vehicle density is low, the PDR of SROR and PROR are more than that of SPEA. However, when vehicle density is high, such as 60, the PDR of SPEA is the highest. This phenomenon can be explained as follows: (1) both the PROR and SROR algorithms belong to opportunistic routing. The network is sparse when vehicle density is low. They give full flexibility in selecting the next-hop relay in the sparse network. (2) The SPEA algorithm belongs to geographic routing, and it takes position of nodes into consideration in route discovery. Geographic routing is not suitable to sparse network. In addition, the PDR of QL-TRT algorithm is the lowest. The explanation for this is that QL-TRT only focuses on detecting attacks. The relative velocity and connectivity probability are not taken into consideration in the selection of relay nodes.  
Figure 9b compares the EED of SPEA, QL-TRT, PROR, and SROR algorithms. It is observed that the EED of QL-TRT is the highest. The QL-TRT algorithm belongs to secure routing, and its goal is to detect the BHA and GHA, while the proposed SROR algorithm outperforms than SPEA, QL-TRT, and PROR in term of EED. For example, the EED of SROR is about 0.20, and the EEDs of SPEA, QL-TRT, and PROR are 0.34 s, 0.58 s, and 0.339 s, respectively, when vehicle density is 60.  
Figure 9c depicts the attack success ratio of the SPEA, QL-TRT, PROR, and SROR algorithms. As shown in Figure 9c, the ASR of SPEA is similar with that of PROR, and the ASR of SROR is similar with that of QL-TRT. In addition, the ASR of SPEA and PROR algorithms are much larger than that of QL-TRT and SROR algorithms. This is due to the fact that SPEA and PROR algorithms did not taken the malicious nodes into consideration, and they did nothing to prevent the attackers from forwarding packet, resulting in the increase of the number of packets dropped by the attackers.  
Figure 9: Comparison of the performance under different vehicle densities. (**a**) Packet delivery ratio. (**b**) End-to-end delay. (**c**) Attack success ratio.  
In conclusion, Table 5 lists the average results of each protocol where vehicle density ranges from 10 to 50, and \(\sigma=10\%\). As known from Table 5, the average PDR of the proposed SROR is 0.82, outperforming QL-TRT, PROR, and SPEA. Additionally, the proposed SROR's EED and ASR are the lowest among four protocols. These results show that our methodology can improve the PDR, reduce the EED, and lower the ASR.