# Enhancing QoS in Opportunistic Networks Through Direct Communication for Dynamic Routing Challenges
## 4 Simulation Environment and Results
### Simulation Results
Figure 6 illustrates the performance of the overhead ratio parameters of the proposed scheme compared to existing schemes. The proposed scheme demonstrates a lower overhead ratio compared to the HBRP and AEProplet algorithms. The overhead issue remains minimal when the number of nodes is relatively small, specifically within the range of 40 to 80 nodes. However, as the number of nodes increases from 80 to 160 the HBRP algorithm exhibits an exponential increase in the overhead ratio, while the AEProplet algorithm maintains a lower overhead ratio. In comparison to both existing schemes, the proposed scheme consistently shows a lower overhead ratio across all node ranges examined in this study. This performance can be attributed to the incorporation of line-of-sight (LoS)  
Figure 5: Number of dead nodes vs. number of nodes. based communication, which minimizes delays in next-hop selection. Furthermore, the proposed scheme also performs excellently as the message size increases. It enhances the average energy efficiency by nearly 4% compared to the existing HBRP and AEProplet algorithms. The proposed scheme and AEProplet exhibit a similar overhead ratio, as both approaches employ comparable context-aware routing strategies that limit redundant message forwarding. However, beyond a certain threshold, the proposed scheme leverages LoS communication, which effectively reduces retransmissions and buffer load. This results in a performance divergence, with the proposed scheme demonstrating superior overhead efficiency. Figure 6: Overhead ratio of proposed and existing algorithms. Figure 7: Average remaining energy vs. message size. Figure 7 illustrates the performance of the average energy of the nodes for both the proposed scheme and the existing scheme, comparing average energy consumption against message size. The proposed scheme mitigates the issue of node congestion in selecting the next hop, ultimately leading to lower energy consumption. In contrast, existing algorithms consistently identify the next hop to forward the message to its destination, which can introduce delays. During the next-hop selection process, nodes must retain messages in their buffers while continuing to search for the appropriate next hop for forwarding. This reliance on redundant message copies in existing algorithms results in higher energy consumption, ultimately leading to a decrease in the average energy of the nodes. Conversely, the proposed scheme effectively maintains average energy levels, thereby ensuring a lower number of dead nodes. Figure 8 illustrates the performance of the proposed scheme compared to existing schemes in terms of dead nodes versus message size changes. The existing schemes exhibit a higher occurrence of dead nodes as the message size increases, particularly within the range of 0 to 1.5 MB; meanwhile, the proposed scheme illustrates a lower number of dead nodes in the network. As the message size increases from a specific point, such as 1.5 MB, the proposed schemes show a rise in dead nodes, which could be attributed to higher message processing of the message, thereby increasing energy consumption.