## 3 Proposed Methodology
### Estimation of Link Delay
#### 3.3.1 Investigating the Factors Affecting Collision Probability to Formulate an Average
Note that the PTPDF value of a node is valid only for a given instance of time. Thus, in order to obtain the average collision probability, PTPDF at different time steps should be collected, and the average value across time steps should be computed. The average pending transmission packet distribution factor of the \(i\)th node (\(\overline{\mathcal{Q}_{i}}\)) is formulated as given in Equation (18):  
\[\overline{\mathcal{Q}_{i}}=\frac{\sum_{j=1}^{M}U_{ij}}{M} \tag{18}\]  
In Equation (18), \(M\) is the total number of time steps, and \(U_{ij}\) is the pending transmission factor of node \(i\) at the \(j\)th time step, which has a value as shown in Equation (19):  
\[U_{ij}=\left\{ \begin{array}{ll}1;&if\ node\ i\ transmission\ queue\ is\ not\ empty\ at\ j^{th}timestep\\ 0;&otherwise\end{array} \right. \tag{19}\]Note that the \(U_{ij}\) value is one even if multiple packets reside in a queue, since only one packet will contribute to contention (collision) at a given time. The average PTPDF of the network (\(\overline{\mathcal{Q}}\)) can be computed as shown in Equation (20):  
\[\overline{\mathcal{Q}}=\frac{\sum_{i=1}^{N}\overline{\mathcal{Q}}_{i}}{N} \tag{20}\]  
In Equation (20), \(i\) is the node index, and \(N\) is the total number of nodes. Consider the example given in Figure 9, which explains how \(\overline{\mathcal{Q}}\) affects collision probability. Note that, for the networks given in Figure 9, the entropy and total number of initial packets (3) in the network are the same for both networks. In the low average PTPDF network instance depicted in Figure (a)a, even though there are two packets in the queue of node C at time t = 0, only one packet contributes to contention. The average packet collision probability is lower in the low average PTPDF network and higher in the high average PTPDF network, as the transmission packets are more distributed among nodes in the network given in Figure (b)b. This explains the effect of PTPDF on collision probability. Furthermore, in this paper, the network link entropy of each type of link (\(H_{WL},H_{WI}\)) and the normalized pending transmission packet distribution factor (\(\overline{\mathcal{Q}}\)) are combined, and further knowledge is generated regarding the network contention as a knowledge composition step for selecting the mode of the hybrid routing algorithm in the SDVN architecture. We define the average collision probability (\(\overline{\rho}\)) as the product of normalized link entropy and the average PTPDF. However, as there are two types of links in vehicular networks, the average collision probability for each type of link should be computed separately. Thus, we compose the knowledge to retrieve each of the normalized collision probability parameters, as given in Equations (21) and (22), using the knowledge of network entropy of link type and normalized pending transmission packet distribution, which were generated using the raw data collected. Thus, the average collision probability for wireless links (\(\overline{\rho_{WI}}\)) can be computed as given in Equation (21):  
\[\overline{\rho_{WL}}=H_{WL}\times\overline{\mathcal{Q}} \tag{21}\]  
Thus, the average collision probability for wired links (\(\overline{\rho_{WI}}\)) can be computed as given in Equation (22):  
\[\overline{\rho_{WI}}=H_{WI}\times\overline{\mathcal{Q}} \tag{22}\]  
Figure 9: Network instances having different PTPDF values, demonstrating different collision probabilities. (**a**) Network with low PTPDF having low collision probability, (**b**) Network with high PTPDF having high collision probability.