# An Intelligent Fuzzy-Based Routing Protocol for Vehicular Opportunistic Networks
## 3 System Model and Design of the Proposed Protocol
### Proposed Fuzzy-Based Routing Protocol
A fuzzy output value greater than 0.5 signifies a decision to forward the message to an encountered vehicle, while a value below 0.5 suggests that the target node is not a potential node which can deliver the message. This adaptive mechanism ensures efficient routing by prioritizing forwarding opportunities that maximize delivery potential and minimize resource consumption. Fuzzy logic, based on [PERSON]'s foundational principles of fuzzy sets, provides a robust framework for addressing the challenges of routing in opportunistic networks due to its ability to handle the uncertainty and vagueness inherent in these networks [43; 44; 45; 46; 47; 48]. Following linguistic reasoning, the input parameters and the output parameter are modeled as linguistic variables, each defined as follows:  
\[T(BO) = \{Low\;(L),\;Medium\;(M),\;High\;(H)\};\] \[T(AD) = \{Small\;(Sm),\;Medium\;(Me),\;Large\;(La)\};\] \[T(UC) = \{Few\;(Few),\;Moderate\;(Mo),\;Many\;(Mn)\};\] \[T(RD) = \{RD1,\;RD2,\;RD3,\;RD4,\;RD5\}.\]  
Figure 2: Scenario describing angle to destination parameter. The membership functions are defined as follows:  
\[\mu_{L}(BO) = g(BO;\,L_{0},\,L_{1},\,L_{\alpha_{1}},\,L_{\alpha_{m}});\] \[\mu_{M}(BO) = f(BO;\,M_{0},\,M_{\alpha_{1}},\,M_{\alpha_{m}});\] \[\mu_{H}(BO) = g(BO;\,H_{0},\,H_{1},\,H_{\alpha_{1}},\,H_{\alpha_{m}});\] \[\mu_{Sm}(AD) = g(AD;\,Sm_{0},\,Sm_{1},\,Sm_{\alpha_{1}},\,Sm_{\alpha_{m}});\] \[T(BO) = \{Low\;(L),\;Medium\;(M),\;High\;(H)\};\]0 \[T(BO) = \{Low\;(L),\;Medium\;(M),\;High\;(H)\};\]1 \[T(BO) = \{Low\;(L),\;Medium\;(M),\;High\;(H)\};\]2 \[T(BO) = \{Low\;(L),\;Medium\;(M),\;High\;(H)\};\]3 \[T(BO) = \{Low\;(L),\;Medium\;(M),\;High\;(H)\};\]4 \[T(BO) = \{Low\;(L),\;Medium\;(M),\;High\;(H)\};\]5 \[T(BO) = \{Low\;(L),\;Medium\;(M),\;High\;(H)\};\]6 \[T(BO) = \{Low\;(L),\;Medium\;(M),\;High\;(H)\};\]7 \[T(BO) = \{Low\;(L),\;Medium\;(M),\;High\;(H)\};\]8 \[T(BO) = \{Low\;(L),\;Medium\;(M),\;High\;(H)\};\]9  
The linguistic parameters and their term sets are recapped in \[T(AD) = \{Small\;(Sm),\;Medium\;(Me),\;Large\;(La)\};\]0 A graphical representation of the membership functions is given in \[T(AD) = \{Small\;(Sm),\;Medium\;(Me),\;Large\;(La)\};\]1 These membership functions, represented as triangular and trapezoidal shapes, are chosen for their simplicity and effectiveness in representing gradual transitions between states. Triangular and trapezoidal shapes are computationally efficient and align well with the imprecise nature of real-world vehicular environments, where parameter values often fluctuate dynamically. \begin{table}
\begin{tabular}{l l} \hline
**Parameters** & **Term Sets** \\ \hline Buffer Occupancy (BO) & Low (L), Medium (M), High (H) \\ Angle to the Destination (AD) & Small (Sm), Medium (Me), Large (La) \\ Number of Unique Connections (UC) & Few (Fw), Moderate (Mo), Many (Mn) \\ Routing Decision (RD) & RD1, RD2, RD3, RD4, RD5 \\ \hline \end{tabular}
\end{table} 
Table 2: FCRP parameters and their term sets. Figure 3: Scenario describing the number of unique connections parameter. Based on the linguistic description of input and output parameters, we then construct the fuzzy rule base (FRB), which considers all possible combinations of input parameters in the of _IF-THEN_ rules. The FRB forms a fuzzy set of dimensions equivalent to \(\mid T(x_{1})\mid\times\mid T(x_{2})\mid\times\cdots\times\mid T(x_{n})\mid\), where \(\mid T(x_{i})\mid\) is the number of terms on \(T(x_{i})\) and \(n\) is the number of input parameters. The FRB of the FCRP is shown in Table 3.  
Other design points include the choice of inference process methods, which play a critical role in the performance of the fuzzy system. Specifically, the Mamdani inference engine is employed due to its ability to handle linguistic variables effectively. The methods used along the inference process are: the AND operation (_min_ method) as the Fuzzy Operator, the _min_ method for the Implication step, _max_ as the Aggregation method, and the _Center of Gravity_ for the defuzzification process.