# VANET Clustering Based Routing Protocol Suitable for Deserts
## 6 Simulation and Results  
### Simulation Setups and Configurations  
We implemented a simulation to demonstrate the velocity, equipment, location and movement direction of the vehicles. The purpose behind the simulation is to evaluate the CHE process. The simulation firstly assumes a number of vehicles randomly moving in a specific area and uses the C4.5 algorithm to classify them according to the direction. The C4.5 algorithm classifies the vehicles into four groups according to their directions. Then, for any group moving in the same direction, the simulation performs the clustering process and consequently calculates the CH. The vehicles in one cluster have different values of velocity, location and equipment. We assumed that the velocity and location of all vehicles are normally distributed. For the simulation purposes, we suppose that the number of vehicle type \(V_{ms}\), \(V_{s}\), \(V_{m}\) is 5%, 10%, 15%, respectively. In the simulation, we used \(w_{1}=0.5\), \(w_{2}=0.3\) and \(w_{3}=0.2\). The main parameters used for this simulation are listed in Table 2.  
The simulation was executed several times with different numbers of vehicles to calculate the different values of the priority factors. In the first part of the simulation, the priority factors _versus_ the ID numbers of the vehicles are plotted based on the different values.  
Since the elected CH plays a major role during the routing process, we used the same scenario to evaluate the proposed routing algorithm. The system uses IEEE802.11p technology specifications during the simulation. We evaluated CBVRP by comparing it to the AODV, CBRP and DSR routing protocols [12; 13]. DSR is selected because of its dynamic characteristics, and CBRP is selected with the aim to compare the CBVRP with one that has the same clustering properties, while the AODV protocol is chosen, because it has the on-demand property. Besides, these protocols are also considered as the latest VANET routing protocols.  
The performance of the CBVRP is evaluated against AODV, DSR and CBRP in terms of cluster structure reconstructions _versus_ time, packet delivery ratio (PDR), average end-to-end delay (AD) and routing cost. The PDR is defined as the percentage of packets that is successfully received by the destination nodes to the packets sent by source nodes and can be calculated according to Equation (29).  
\[PDR=\frac{1}{m}\sum_{i=1}^{m}\frac{Rx_{i}}{Sx_{i}} \tag{29}\]  
where \(m\) here is the total number of connections, \(R_{x}\) is the total number of successfully received packets for one node, \(S_{x}\) is the total number of packets that have been sent to the same node and \(i\) is an index value representing the ID of the designated connection. \(AD\) is defined as the average time between a packet being sent and being received and can be calculated according to Equation (30).  
\[AD=\frac{1}{Rx_{i}}\sum_{j=1}^{Rx_{j}}(tr_{j}-ts_{j}) \tag{30}\]  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameter** & **Value** & **Parameter** & **Value** \\ \hline Network area & 5000 \(\times\) 5000 m & Data rate b/s & 512 kb/s \\ \hline Vehicle coverage distance (\(L\)) & 1000 m & Time-To-Live (TTL) (k) & 8 \\ \hline Velocity range & 0 to 120 km/h & \(r_{max}\) & 4 \\ \hline Total number of vehicles (N) & 20 to 200 & \(t_{r}\) & 8 s \\ \hline Max number of vehicles per cluster (\(N_{max}\)) & 5 to 20 & Simulation time & 480 s \\ \hline \hline \end{tabular}
\end{table}
Table 2: Parameter values of the simulation.  
where \(j\) here is a packet identifier, \(tr_{j}\) is the time at which a packet \(j\) is received and \(ts_{j}\) is the time at which a packet \(j\) is sent [26].