# Enhancing QoS in Opportunistic Networks Through Direct Communication for Dynamic Routing Challenges
## 3 Proposed Methodology  
In this section, we will explain the protocol and scenario considered for the proposed scheme. To fully understand the required modifications in the history-based routing protocol (HBRP) and AEProplet protocol, we will first discuss the workings of these algorithms in detail. Table 1 illustrates all the variables and their description utilized in this study. Figure 1 illustrates a typical OppNetwork environment with realistic factors while forwarding the data from source to destination. These protocols are designed based on the following assumptions: (i) the mobility pattern of the nodes in the network mirrors that of human movement, (ii) the nodes engage in cooperative communication, avoiding interaction with malicious nodes, and (iii) the communication region is divided into cells, with each cell assigned a unique identifier. The rationale for using cell numbers is that, when maintaining information about a node's visit history or its home location in a history table, these cell numbers are utilized in place of geographic coordinates. The operation of these protocols consists of three stages: first, the initialization of the home location; second, the generation of messages and updating of the home location; and third, the selection of the next hop for data forwarding. In this paper, we focus primarily on the challenge of next-hop selection. To begin, it is important to understand how existing protocols handle the selection of the next hop. Figure 1 illustrates the scenario considered for the HBRO and AEProplet routing protocols. In this figure, the source node is represented by a blue-filled circle, while the destination node is depicted as a green-filled circle. The predicted location of node \(N_{2}\) is indicated by a light green circle, and the neighboring node is shown as a pink circle. A red dotted line connects the source and destination nodes, representing a line-of-sight (LoS) link. Additionally, the blue line indicates the perpendicular distance from the neighbor node to the LoS line. An angle \(\theta\) is measured between the LoS line and the predicted location of node \(N_{2}\). The primary objective of both HBRP and AEProplet is to identify the optimal neighbor node to serve as the next hop for forwarding data from the source to the destination in an opportunistic manner. \begin{table}
\begin{tabular}{c c} \hline
**Variable** & **Description** \\ \hline \(U_{i}\) & Utility function \\ \hline \(\omega(k)\) & Node characteristic vector \\ \hline \(v_{i}(k)\) & \(i\)th vehicle with \(k\)th characteristics \\ \hline \(\psi\) & Node stability \\ \hline \(\delta\) & Perpendicular distance \\ \hline \(\theta\) & Angle between the LoS and perpendicular location of node \\ \hline \(N\) & Node \\ \hline SDL & Source-to-destination line \\ \hline \end{tabular}
\end{table} 
Table 1: Variables with their definitions utilized in this study. The selection of the next hop comprises three parameters: (i) the node's movement stability, (ii) the node's direction prediction, and (iii) the neighbor node distance from the LoS line between the source and destination (this distance is measured perpendicularly). The node's stability (\(\psi\)) is related to the history table, which contains two parameters, namely the time and location of the node. Based on time and location information, the node by itself can calculate the average speed attained by it during the transition from one location to another. This provides insight into whether a node is stable or not in its movement. A high average speed shows the unstable movement of the node, while a low average speed shows that the node's movement is stable. For node movement direction (\(\theta\)), a Markov predictor can be applied, which can predict the next direction by analyzing the previous visit's pattern [20; 21]. Finally, the perpendicular distance (\(\delta\)) of the neighbor node from the source-to-destination line (SDL) is measured; this provides the closeness of a neighbor node to the SDL.