## 4 Implementation and Deployment
### Software Modules and Prototyping
In particular, the main purpose for which researchers/practitioners use SUMO is to investigate and analyze traffic flow dynamics, test new algorithms, and develop intelligent transportation systems. Specifically, the tool provides a virtual environment for experimenting with different strategies before implementing them in the real world. SUMO enables users to simulate the movement of vehicles, pedestrians, and other entities within a virtual urban environment. The simulation takes into account factors such as vehicle speed, acceleration, deceleration, and interactions with other road users. Users can model and define the road network, including intersections, traffic lights, and other infrastructure elements. This allows for the accurate representation of complex urban traffic scenarios. The tool supports the modeling of various traffic control systems, including traffic signals, priority rules, and right-of-way policies. This makes it suitable for studying the impact of different traffic management strategies on the overall system performance. Moreover, it allows users to create and define specific traffic scenarios, considering factors like traffic density, road types, and user behaviors. This flexibility is essential for conductingexperiments and evaluating the performance of transportation systems under different conditions. The software supports various file formats, making it compatible and interoperable with other simulation tools and data sources. This makes SUMO suited for integration into larger transportation modeling frameworks. After preprocessing, the CARF instantiates the model of the optimization problem on graphs, as shown in Figure 12, according to the input data (see Figure 13), and then exploits a routine offered by OR-Tools to find a solution to the obtained instance of the problem. The output is a sequence of users' locations for each vehicle. To transform each sequence into a route, a subroutine is called on a dataset representing the road map to find the shortest path for each pair of consecutive users' locations in the sequence. The concatenation of all the shortest paths for a given vehicle forms the route that the vehicle has to follow. The subroutine to find the shortest paths implements a customization of the well-known [PERSON]'s algorithm. Finally, the routes are transmitted, properly encoded, to the OBUs of the vehicles, where they are displayed by means of an HCI (Human-Computer Interface), along with the positions of the users and of other vehicles in the fleet. Clearly, the CARF module (in the cloud), the SUMO tool (on MEC), and the HCIs (in the vehicles) have to exchange data. At the service level, this coordination is implemented by a _broker system_ consisting of modules running on all the computers in the EMERGE system. The broker system provides channels to which other running software modules can subscribe to push or read messages. Then, there are channels to share the positions of the vehicles in the fleet, to manage customer sequences, to send routes, and so on. During the regular operational scenario, as highlighted at the beginning of this section, the EMERGE system collects data via V2X (terrestrial and/or satellite links) from the vehicles and sends it via the broker system to all the affected parts. In particular, EGC stores data about the users' locations visited by vehicles in the fleet. If available, the system aggregates data about the traffic provided by third parties. Collected data are processed by a module that executes estimation/AI algorithms to detect congestion events on road segments of the assigned routes. The details of these algorithms are omitted since they are out of the scope of this paper; we refer the reader to [53; 54; 55] for relevant examples. When such an event is detected, an alert message is sent to EGC via the broker system. EGC, as described above, evaluates whether a reoptimization of the routes is necessary.