## 5 Simulation and Analysis
### Statistical Analysis of the Mobility Models  
RWP was initially present in OPNET. We implemented EGM and ST in OPNET ourselves. For RD and GM, we imported them from BonnMotion [43] and used them in OPNET protocol simulations. Table 2 shows a recap of the mobility models' statistics according to the metrics discussed in Subsection 4.1. All of the metrics are shown in Table 2, except for coverage, which is shown in Figure 6. Note that the numbers presented are the averages over 30 independent runs. The 95% confidence intervals are presented in the form of \"\(\pm\)error\" near each average value. These statistics are obtained by means of a C\(++\) Network Analyzer program that we had written specifically for that purpose. The program creates statistics from dynamic and static network simulations of NS-2 and OPNET using the Boost Graph Library [44]. The program also uses MATLAB, GraphViz and Excel to help visualize, organize and interpret the statistics as needed. In terms of network diameter, we can see that RWP has the lowest and RD has the highest, closely followed by ST. Therefore, it is expected that, overall, routing protocols will perform better under RWP compared to the others and worse under RD and ST. As we already know, a mobility model that creates a low diameter will improve routing performance and minimize interference. \begin{table}
\begin{tabular}{l l} \hline
**Parameter** & **Value** \\ \hline Number of simulated nodes & 30 \\ Area length & 2000 m \\ Area width & 4000 m \\ Wireless transmission range & 1000 m \\ Packet size & 1024 bits \\ Send rate of traffic & 5 pkts/s \\ Speed & 50 to 60 m/s \\ Pause time at simulation & 0 s \\ Simulation time & 1800 s \\ \hline \end{tabular}
\end{table} 
Table 1: Simulation parameters. \begin{table}
\begin{tabular}{l l l l l l} \hline
**Metric** & **RWP** & **EGM** & **ST** & **RD** & **GM** \\ \hline Network diameter & 5.0 \(\pm\) 0.4 & 5.5 \(\pm\) 0.4 & 5.8 \(\pm\) 0.5 & 6.0 \(\pm\) 0.5 & 5.5 \(\pm\) 0.3 \\ (hops and meters) & 3777 \(\pm\) 226 m & 4146 \(\pm\) 206 m & 4374 \(\pm\) 403 m & 4455 \(\pm\) 269 m & 4159 \(\pm\) 203 m \\ \hline Number of components & 1.05 \(\pm\) 0.03 & 1.10 \(\pm\) 0.03 & 1.09 \(\pm\) 0.03 & 1.13 \(\pm\) 0.02 & 1.09 \(\pm\) 0.03 \\ \hline Clustering coefficient & 3.4 \(\pm\) 0.2 & 2.7 \(\pm\) 0.2 & 2.3 \(\pm\) 0.2 & 2.3 \(\pm\) 0.2 & 2.6 \(\pm\) 0.1 \\ \hline Number of neighborsIn terms of the number of components, once again, RWP shows the least and RD shows the largest. These are averages over many simulation runs and over a long period of simulation time (1800 s). What we learn from here is that overall RD causes the network to be partitioned more often than all of the other mobility models, especially RWP, which causes the least partitioning. Therefore, we should expect a performance under RD that is distinctively lower than that under RWP. The clustering coefficient is distinctively higher, once again, with RWP. When a node presents a high clustering coefficient, this means that its neighbors have many radio links with each other. A route can, with high probability, pass through its neighbors without a path length increase. Therefore, we should expect the routing protocols to perform better with RWP and less with RD and ST. The average number of neighbors is the lowest under RD and ST and highest under RWP. The second highest average number of neighbors is observed under EGM. This should also lead to better protocol performance under RWP; for the higher the number of neighbors, the higher probability of finding a route. Moreover, we observe that the average path length actually follows the reverse classification of the average number of neighbors. This can be explained by the fact that having more neighbors per node increases the chances of neighbors of my neighbors being also my neighbors; which therefore saves one hop right there and reduces the hop-measured path length. These two statistics (number of neighbors and path length) are expected to reflect on the average end-to-end delay with the routing protocols.