# A Multi-Agent System for the Dynamic Emplacement of Electric Vehicle Charging Stations
## 5 Experimental Results  
In this section, we present a series of experiments in which we analyze the behavior of the genetic algorithm that the Emplacement Optimizer Agent uses in order to find out the best parameters for our scenario. However, the entire MAS platform was used for the experiments carried out. Moreover, prior to the execution of the proposed experiments, unit tests were carried out on the entire system. These tests allowed us to validate that the system performed as expected. Our genetic algorithm is implemented using the _deap_ (url[[https://github.com/DEAP/deap](https://github.com/DEAP/deap)]([https://github.com/DEAP/deap](https://github.com/DEAP/deap))) library of _Python_. For our experiments, the Pol Agent considers a set of 103 points of interest of the city of Valencia. We assume a maximum of five chargers per PoI. Hence, depending on the final result of the genetic algorithm, for each PoI, a number of chargers between 0 and 5 will be installed. The graph of Figure 6 represents the evolution of the fitness function of the genetic algorithm with different initial populations from 0 to 200 generations. Each line is the mean of five different executions with the same corresponding parameter. The results of Figure 6 show that the more individuals in the initial population, the higher the maximum value of fitness, as it would be expected. This is caused by the fact that with more individuals it is easier to have high fitness values reached by the big population which may be rich genetically. Nevertheless, when the initial population is 1500 or more, there is no significant difference when the algorithm reaches more than 50 generations. The reason behind this is that a near-optimal solution is found if there is enough diversity in the population. Hence, there is no need for using a bigger initial population that does not contribute to finding better solutions. Therefore, it seems that in this particular scenario, an initial population of 2000 would be enough, while values of 3000 and 4000 may be considered if computation time is not a problem. We also tested different crossover techniques of the genetic algorithm. Specifically, we tested the single point technique in which a single crossover point is selected and all data of the parents is swapped from that point; the two points technique, where two points of the chromosomes are selected and everything between these two points is swapped between the parents; and the cross uniform technique, that uses a fixed mixing ratio between the two parents and parents' genes are swapped instead of segments of genes. Figure 7 represents the value of fitness (the mean value of five executions) for each of the aforementioned crossover techniques with initial populations of 2000 individuals and 100 generations. The cross uniform technique has the best results in our scenario, followed by the two points technique. The reason for the better performance of the cross uniform technique is that it produces new individuals  
Figure 6: Evolution of maximum fitness values for different initial populations. by mixing the parents at a gene level, which generates a richer population genetically. The lower performance of single point and two points techniques is caused by the crossover at segment level of genes instead of gene by gene, which yields in a lower rate of mixing of parents through different generations and greater difficulty in varying the population. Figure 8 presents the computation time in seconds (all the tests were conducted on a single machine with an Intel Core i7-3770 CPU at 3.40 GHz and 8 GB RAM) for different initial populations of the genetic algorithm for 100 and 200 generations in our scenario. Each bar is calculated with the mean of five different executions of the genetic algorithm with the specified parameters. The computation time increases linearly with the population and generations. In this way, the computation times for 200 generations are approximately the double of the computation times for 100 generations.