# An Intelligent Fuzzy-Based Routing Protocol for Vehicular Opportunistic Networks
## 3 System Model and Design of the Proposed Protocol
### Proposed Fuzzy-Based Routing Protocol  
Building on the challenges and system context outlined earlier, the FCRP evaluates specific input parameters to make efficient routing decisions in opportunistic networks. These input parameters include buffer occupancy (BO), angle to destination (AD), and the number of unique connections (UC) of the target nodes, with the routing decision (RD) as the output. Buffer Occupancy: BO refers to the percentage of a node's storage capacity currently utilized for holding messages. In opportunistic networks, buffer occupancy plays a crucial role in routing decisions. Nodes with high buffer occupancy can cause transmission bursts whenever they encounter new nodes, potentially overwhelming the link. Since contact durations between nodes are often very short, these bursts may prevent high-priority messages with a chance of reaching their destination from being transmitted. Conversely, nodes with low buffer occupancy have greater capacity to accept and forward messages, making them more suitable candidates for routing. By incorporating buffer occupancy as an input parameter, the FCRP ensures efficient resource utilization and reduces the likelihood of message loss due to bursts of traffic. Angle to Destination: The AD represents the directional alignment between a node's current trajectory and the location of the message's intended destination. In OppNets, this parameter helps estimate a node's potential to move closer to the destination, making it a critical factor in routing decisions. Nodes with smaller angles to the destination are more likely to contribute to effective message forwarding, as their movement aligns with the delivery objective. This concept is illustrated in Figure 2. The green vehicle, currently holding a message, evaluates all neighboring vehicles within its communication range, represented as the red, black, and blue vehicles in the figure. The figure depicts the angle formed between each vehicle's movement direction and the static destination, specifically \(\alpha_{1},\alpha_{2}\), and \(\alpha_{3}\) for the red, black, and blue vehicles, respectively. The angles to the destination of a vehicle \(i\), \(\alpha_{i}\), is the angle formed by the moving direction of the node \(i\) and the location of the destination. The direction is determined by the imaginary line that is formed by the current location of the node (location at time \(t\)) and by the previous location (location at time sample \(t-1\)). When a node has stopped, the position remains the same across two samples, resulting in a non-valid angle. The FCRP considers only the nodes that have a valid \(\alpha\) and less or equal to \(90^{\circ}\). The angles are then normalized to the values 0-1 where \(90^{\circ}\) corresponds to AD = 1 and are fuzzified based on the fuzzy membership functions, which are described in the next section. The number of unique connections: The UC parameter represents the count of distinct nodes a vehicle has within its given communication range. Figure 3 illustrates the concept of the UC using vehicles and their respective communication ranges, each color-coded to match the vehicles. The green vehicle, holding a message to disseminate, evaluates its neighboring vehicles within its communication range: the red, blue, and orange vehicles. The communication ranges of the blue and orange vehicles do not cover any additional unique vehicles that are not already within the communication range of the green vehicle. However, the red vehicle's communication range extends to the black vehicle, which is beyond the communication range of the green vehicle. This results in a number of unique connections of 0 for both the blue and orange vehicles and 1 for the red vehicle. This parameter captures the diversity and reach of a node's interactions in the network, serving as an indicator of its ability to propagate messages to different regions. Routing Decision: The output of the fuzzy system is the RD, which determines whether a message should be forwarded or not toward the encountered vehicles.