# Improving Roadside Unit Deployment in Vehicular Networks by Exploiting Genetic Algorithms
## 5 Simulation Results
### Performance of the Genetic Algorithm Used by GARSUD  
We tested GARSUD for both the Madrid and Valencia layouts using different vehicle densities, representing diverse traffic flows in different time periods during a given day. Existing approaches are able to perform well considering one single vehicle density only; our proposal, GARSUD, is capable of finding a suitable RSU deployment strategy for a wide range of densities and map layouts. Figure 6 presents the evolutionary process, in terms of the fitness of the best and average individuals (representing possible deployments) using GARSUD in two different situations (i.e., deploying four RSUs and nine RSUs) and two different scenarios (i.e., Madrid and Valencia). The fitness function is related to the average warning notification time of the messages heading towards the RSUs, as expressed in Equation (1); however, the algorithm is designed for function maximization, and hence, the fitness function is inversely proportional to the measured warning notification time, which should present the lowest value possible. Notice that the main objective is to reduce the warning notification time, and a fitness value of 100 represents a warning notification time equal to 0 s.  
As shown in Figure 6, the genetic algorithm is able to guide the search process, obtaining improved solutions as generations advance by every iteration. The shape of the function is typical of this sort of algorithm: the first generations provide a steep improvement of the target function until the solutions start to converge towards the nearest maximum. However, there are some sudden improvements in the best value, as the mutation operator allows searching new areas of the solution space where new maximums can be found. Concerning the fitness values obtained, it is distinguishable how increasing the number of RSUs deployed improves the value of the target function of the solutions, especially in Madrid, as using  
Figure 6: Fitness evolution of the individuals in the populations using GARSUD. **(a)** Four RSUs in Madrid; **(b)** 9 RSUs in Madrid; **(c)** 4 RSUs in Valencia; **(d)** 9 RSUs in Valencia. more RSUs allows warning messages covering a broader area with fewer hops. It is also noticeable that the maximum fitness values are obtained in Madrid. This confirms that more time is required to inform the rest of the vehicles in Valencia since its map layout is more complex in terms of communication capabilities (i.e., the warning notification time is higher when compared to Madrid). A detailed view of the evolutionary process is presented in Figures 7 and 8. These figures depict the RSU locations provided by GARUD when deploying nine RSUs in Madrid and Valencia, respectively. To enhance the understanding of the evolutionary process, four intermediate locations selected during the first stages of the algorithm are presented (i.e., from Generation 0 to 20, from Generation 20 to 40, from Generation 40 to 60 and, finally, from Generation 60 to 80). Figure 7 shows the evolution of the algorithm when deploying nine RSUs in Madrid. The number of potential deployments grows drastically when more RSUs are considered; thus, more generations are needed until convergence (as previously evidenced by Figure 6). The search space is bigger, and the random nature of the process makes it possible to find new optima during further stages of the algorithm. As observed, the locations of several RSUs are modified during the first 60 generations, and after that, eight RSUs are placed in their final location; the remaining one is moved. Figure 7: Evolution of the deployment of nine RSUs in the Madrid scenario using GARUD. (a) After 20 generations; (b) after 40 generations; (c) after 60 generations; (d) after 80 generations. As depicted by Figure 8, when nine RSUs are available to be deployed in Valencia, we find a slightly different behavior trend compared to Madrid.