# Improving Roadside Unit Deployment in Vehicular Networks by Exploiting Genetic Algorithms
## 4 Simulation Environment  
We present the simulation environment that we have setup to assess the feasibility and performance of our proposal. We have used simulation, as an alternative to a real implementation, since deploying and testing crowded vehicular networks is not feasible due to several factors such as the scalability of the number of vehicles involved and the respective costs. Regarding the map layout to simulate, we selected two real map layouts--the city of Madrid and the city of Valencia, located in Spain--as the target locations to simulate the RSU deployments. They are quite different since Madrid presents a regular scenario with large streets where the wireless signal can be easily propagated (see Figure 4a), while Valencia represents a more complex layout (see Figure 5a). Therefore, we test our proposed approach GARSUD within highly diverse scenarios. \begin{table}
\begin{tabular}{l c} \hline Representation & Integer strings [1. \#Roadside Units] \\ Re-combination & 1-point crossover \\ Re-combination probability & 95\% \\ Mutation probability & \(1\,\text{gene}/\text{individual (avg.)}\) \\ Parent selection & Tournament \(k=2\) \\ Survival selection & Steady-state \\ Generational Gap & 50\% \\ Population size & 8 \\ Initialization & Random \\ Termination condition & 80 generations \\ Number of executions & 5 \\ \hline \end{tabular}
\end{table} 
Table 1: Parameters used in our genetic algorithm approach. Figure 4: Scenario 1: City of Madrid, Spain. (**a**) Street map layout; (**b**) Krauss model: vehicular density for each street; (**c**) downtown model: vehicular density for each street in the downtown (square box). The reason behind using two different layouts is to confirm the potential of GARSUD, i.e., that our approach provides suitable solutions for different roadmap layout complexities, as RSU deployment is a challenging task, particularly for maps with a complex layout in terms of vehicular communications, e.g., those with short streets irregularly arranged, very frequent in old European cities. The mobility of vehicles simulated, at a macroscopic level (i.e., global motion constraints such as streets, roads, junctions and traffic lights), was obtained with the CityMob for Roadmaps (C4R) (v. 2, University of Zaragoza, Teruel, SPA, 2017) (C4R is freely available at [[http://www.grc.upv.es/software/](http://www.grc.upv.es/software/)]([http://www.grc.upv.es/software/](http://www.grc.upv.es/software/))), which is a realistic traffic generator software based on SUMO (v. 0.11.1, the German Aerospace Center, Cologne, GER, 2017) [27]. Regarding the mobility at the microscopic level (i.e., movements of each vehicle and its behavior with respect to others), it has been modeled using two different mobility patterns. The RSU deployment policy should be suitable for different traffic distributions. Hence, we simulated two different mobility conditions: (i) the Krauss model, considering traffic lights, multi-lane behavior [28] and that vehicles are uniformly distributed along the map (see Figures 4b and 5b); and (ii) the downtown model [29], which additionally considers that urban areas present diverse vehicle densities, i.e., vehicles may not be uniformly distributed and there are points of interest that may attract the vehicles (see Figures 4c and 5b). The methodology used shows that our approach provides suitable RSU deployments regardless of the special characteristics of the traffic distribution in the map. Figure 5: Scenario 2: City of Valencia, Spain. (**a**) Street map layout; (**b**) Krauss model: vehicular density for each street; (**c**) Downtown model: vehicular density for each street in the downtown (square box). To run simulations, we have used the ns-2 simulator [30] (v. 33, University of Southern California, Los Angeles, CA, USA, 2008), including the IEEE 802.11p [31] standard so as to closely simulate the Wireless Access in Vehicular Environments (WAVE) standard.