## 4 Implementation and Deployment
### System Validation  
All mentioned software components of the system (CARF, MEC, EGC, OBUs) have been validated separately. At the time of writing this article, the validation of the whole prototype of the EMERGE system is underway. As the number of smart vehicles available to the system is still limited to a few units, a simulation module--SIM--has been introduced to simulate the operations performed by some vehicles in the fleet, to report in the simulation the position of real vehicles in the fleet, and to simulate other vehicles that are not part of the EMERGE system but influence the traffic on the roads of the areas. The SIM module exchanges data with all other modules via the broker in order to simulate the behavior of all vehicles in the fleet in following their routes to visit customers. The simulation was executed by running an instance of the SUMO tool, directly controlled by the SIM. When a reoptimization of the routes is necessary, the SIM receives all the new routes for the simulated vehicles and, consequently, runs the SUMO simulation. Under this setting, several experiments were conducted in the metropolitan area of the city of L'Aquila (Italy). The performance of the system was measured for a fleet of vehicles of varying size (between 3 and 20 units) with respect to several parameters (e.g., time for executing necessary routines and data collection, quality of computed routes with respect to optimization criteria, number of users' locations that were correctly visited in various scenarios). Preliminary results show that the execution time necessary for the CARF during the vehicle task planning phase varies from a few milliseconds to less than \(3.3\,\mathrm{s}\) when the number of users' locations to schedule ranges in the interval from 15 to 200 (see Figure 14 for data for a fleet of 15 vehicles). On top of the above, computed routes were observed to be satisfactory in terms of quality, with all prescribed user locations being successfully visited within the required time windows and with a reasonably low total makespan in all tested input instances. This is considered acceptable for the requirements of the EMERGE initiative. Similar times and quality of routes were observed in cases of reoptimization. Moreover, the execution times and the quality of routes were only marginally influenced by the number of vehicles forming the fleet until the fleet remained limited to a few tens of units. However, should the number of vehicles or users' locations increase, we expect that the quality of computed solutions might worsen, particularly when the routine offered by OR-Tools is forced to return the best solution that can be found within a limited interval of time. This is not surprising since the problem is NP-hard. Nonetheless, a more rigorous evaluation of the performance of the system is necessary and is currently being performed to consolidate preliminary empirical observations. Observe that, to compute the complete directed graph \(G\) with distances between customers' locations (as described in Section 4.2), an off-line implementation of [PERSON]'s algorithm is used. In Figure 15, we show the execution times taken to compute the shortest paths for all pairs of customers' locations. Execution times range from a few seconds to less than \(1.5\,\mathrm{min}\) when the number of users' locations to schedule ranges in the interval from 15 to 200. For a larger number of customers, execution times increase significantly, reaching values of around half an hour for 800 customers. However, this does not represent a bottleneck since this kind of computation is executed only once; hence, it does not affect the normal operating scenario of the system. Moreover, more refined techniques for solving all pairs of shortest-path problems are available in the literature and will be considered in future releases of the system. Figure 14: The execution time in seconds to compute a solution to the pickup and delivery multi-vehicle problem with time windows for a fleet of 15 vehicles.