Analysis and modelling of road traffic using SUMO to optimize the arrival time of emergency vehicles

: Traffic simulation tools are used by city planners and traffic professionals over the years for modelling and analysis of existing and future infrastructural or policy implementations. There are numerous studies on emergency vehicle (EV) prioritization in cities all over the world, but every area is unique and requires the data collection and simulation to be done separately. In this case, the focus area is the M¨orfelder Landstraße in Frankfurt am Main, Germany, one of the busiest streets in this city. The study illustrates demand modelling, simulation and evaluation of a traffic improvement strategy for EVs. Vehicular traffic such as passenger cars and trams are simulated microscopically. To perform accurate traffic simulation, input data quality assurance and cleansing of Master Data is required. Therefore, the data is adapted to reproduce the real-world scenario and transformed into the readable format for the simulation model. Vehicular demand is calibrated by traffic count data provided by the Frankfurt Traffic Department. To model road traffic and road network, origin destination matrices using the Gravity Mathematical Model and Open Street Maps are generated, respectively. This process is time-consuming and requires effort. However, this process is critical to get realistic results. In the next step, the road traffic is simulated using SUMO (Simulation of Urban mobility). Finally, EV relevant key performance indicators (KPIs): total trip time and total delay time are derived from simulations. The real-world scenario is compared with five alternative scenarios. The comparison of the KPIs revealed that the real-world scenario results in longer travel times compared to the EV-prioritization scenario. In the least case, the overall travel times for EV has decreased significantly and, as we know, in the case of EVs, even a few seconds saved could prove crucial for a person in need.


Introduction
In the 21st century, high rate of urbanisation and the advancement in the transport sector has led to an increase in urban vehicular mobility. This resulted in people opting for a comfortable and luxurious life. But on the other hand, it has also negatively impacted the quality of life by increasing the potential for traffic problems such as traffic congestion, accidents, environmental issues for example, increase in greenhouse gases, carbon emission, particulate matter etc. To combat these problems traffic improvement strategies such as car pool lanes, public transport bus lanes, dedicated space for cyclists and pedestrians, to name some, are adopted. Testing and implementation of such strategies require prior investigation and analysis. Without these studies, the implemented strategies or policies could be unreliable and might end up costing even more in terms of infrastructure, time and in some cases even human life. To have a theoretical evaluation and predict the outcome of these strategies, traffic simulation plays a vital role.
For traffic simulation to be implemented properly numerous elements are needed but the following are the most important ones [1]: • Network data such as roads, footpaths, tram routes • Additional traffic infrastructure such as traffic lights, induction loops • Traffic demand • Traffic constraints e.g. speed limits, construction sites, bus lanes.
It is time consuming and requires effort to prepare a traffic simulation model using these elements. Therefore, many simulation tools provide ready to use simulation models so that the user can directly test their traffic improvement strategies and saves time and effort required for simulation [2].
One of the main motive of traffic simulation is to evaluate different traffic improvement strategies. This study shows another traffic improvement strategy based on emergency vehicles. "An emergency vehicle is a vehicle that is used by emergency services to respond to an incident" [3]. Even a small reduction in the arrival time of EVs (fire brigade, ambulance or police) can save lives of the people who need immediate assistance. To tackle such situations EVs have special rights such as violating red lights when approaching a traffic light junction (TLJ) or traveling in the opposite direction to reduce the arrival time. But this approach is not a full proof approach to optimize the arrival time. As, there are times when EVs are stuck in a long queue of vehicles in front of the TLJ or are stuck in a traffic congestion where there is no way to overtake.
The main objective of the study is to simulate the road traffic of the Mörfelder Landstraße in the Sachsenhausen area, Frankfurt am Main, Germany, followed by studying and evaluating different scenarios to optimise the arrival time of emergency vehicle which could help in combating the aforementioned situations. This paper is structured as follows: Section 2 discusses in details about the master data, demand modelling and simulation process by elaborating on data pre-processing, network modification and traffic generation. Section 3 explains solution methodology, different case scenarios for EVs. Section 4 shows the result obtained from the case scenarios. Section 5 presents the conclusion and future work.

Master Data, Demand Modelling and Simulation
The data flow diagram based on Gane-Sarson methodology is shown in Figure 1. Master Data consists of the road network (supplemented with additional infrastructure and traffic constraints) and the aggregated vehicle count for 24 hours. The vehicular counts are provided in the form of shape file for the geographical location of the Sachsenhausen area in Frankfurt am Main and the road network is imported from Open Street Map [4].
A methodology named as Gravity Model [5] is used for calculating Origin Destination Matrices (ODMs). It is based on the principle of gravitation theory of Newtonian physics. With reference to the traffic planning, the Gravity Model theory states in [5] that: "the number of trips between two Traffic Assignment Zones (TAZ) will be directly proportional to the number of productions in the production zone and attractions in the attraction zone. In addition, the number of interchanges will be inversely proportional to the spatial separation between the zones." Mathematically, the Gravity Model is defined as [5]: with T ij : number of trips from zone i to zone j, P i : number of trips produced by zone i, A j : number of trips attracted by zone j, F ij : friction factor relating the spatial separation between zone i and zone j, K ij : optional trip-distribution adjustment factor for interchanges between zone i and zone j, n: the number of zones.
The initial values of P i and A j are considered from the vehicular counts provided in the form of a shape file. The friction factor and trip distribution adjustment factor are not considered in this study as the only available data is traffic counts. Therefore, equation mentioned below is used for calculating the trip distribution: Before applying this methodology, there are two assumptions made regarding the road network: First, the number of cars occupying the parking space and freeing the parking space are equal as in reality the difference is negligible compared to the normal traffic. Therefore it is not taken into consideration. The second assumption is that there is no generation or elimination of cars within the TAZ (conservative network). Additionally, the total number of cars generated at the entry points of the TAZ should be equal to the total number of cars eliminated at the destination points of the TAZ. This is known as "the closing condition at the edge" [6], also shown in equation 3: with P i : number of trips produced by zone i, A j : number of trips attracted by zone j, n: the number of zones [6].
If this closing condition is not met, which is shown in equation 3 then the balancing process is performed using equations 4 and 5. This process is adopted from [5] and is divided into two steps. Firstly, the balancing factor is calculated using equation 4. Secondly, the number of trips attracted by each zone is multiplied by this balancing factor calculated in step 1 to attain balanced number of trips attracted by each zones, shown in equation 5 and this leads to the fulfillment of equation 3: with F actor: balancing factor, P i : number of trips produced by zone i, A j : number of trips attracted by zone j and with A ′ j : balanced number of trips attracted by zone j. Once the closing condition is met, the trip distribution matrix is generated using equation 2. The matrix balancing approach [6], [5] is carried out to ensure that the expected number of trips produced is equal to the calculated number of trips produced for all the zones. Similarly, the expected number of trips attracted is equal to the calculated number of trips attracted for all the zones. This is shown in equation 6 and 7. This is an iterative process, and it iterates until the calculated production and attraction is equal to the expected production and attraction i.e. F actor Aj and F actor P i converges to 1. This process is implemented using a python script: with Given Aj : expected number of trips attracted by zone j, T otal Aj : calculated number of trips attracted by zone j, Given P i : expected number of trips produced by zone i, T otal P i : calculated number of trips produced by zone i and with D ij : trip interchange calculated for each entry/exit zone.
Due to the numerical reasons, equation 6 and 7 do not converges to 1. To solve this issue, a heuristic approach is used where the study area is divided into 3 parts. This leads to the creation of 3 constant ODM. Hence section based demand modelling is performed. The study area for demand modelling is Mörfelder Landstraße. This stretch is around 3.3 km long, also highlighted in the Figure 2. A total of 21 entry/exit zones are present in the study area marked in red in Figure 2.
The calculated constant ODMs consist of aggregated count for 24 hours. Then the distribution of the counts over the period of 24 hours is done with the help of induction loop data. This data contains counts from June 2020 till March 2021 and each of this count is split with the time interval of 15 minutes starting from 00:00 until 23:57. With the combination of induction loop data and SUMO functionalities such as od2trips and duarouter, time dependent ODMs based route files are created. This acts as the input to SUMO to simulate the road traffic. In addition to the simulation of passenger cars, trams are also modelled with safety traffic lights at the tram stops. They are simulated using public transport model provided by SUMO. The frequency for the trams are set to every 10 minutes.

Solution Methodology
There are many studies carried out to optimize the arrival time of EVs such as optimization in routing and dispatching of EV which can led to faster routes for EV [7], ranking of alternatives for emergency routing [8]. However, behaviour of pedestrians, especially children is unpredictable, and even though SUMO can be used to model such patterns, but in the real world it does not function exactly in the simulation. In the case of re-routing an EV, the algorithm prioritizes the shortest route which is free of traffic. But the shortest route could include residential areas that consist of more foot traffic as compared to main streets. Thus, the preferred approach in this study is EV prioritization approach using V2X (Vehicle to Infrastructure) communication with TLJ. This approach is adopted from [9], [10], [11]. The basic approach is that as soon as the EV arrives at TLJ, traffic light is switched to green for the direction of EV trip and prioritizes the EV [9], [10], [11].
The following steps are performed for the EV prioritization application which is also known as the WALABI approach[9]: • EV sends CAMs (Cooperative Awareness Messages) and route information • Road side unit informs Traffic Management Center (TMC) • TMC sets traffic lights on the route of the EV: green for the EV and red for all other traffic participants • After the EV has passed the intersection normal operation continues.
For the aforementioned EV prioritization approach, the question arises what should be the optimal distance between an EV and the traffic light so that the traffic light should turn green. The study [10] shows that the EV is usually within the range of 300 meters from the TLJ and when EV enters this range, the traffic light is turned to green and when EV passes the TLJ the traffic light switches back to normal. Therefore 300 meters is considered as a threshold distance value for scenario 2 which is discussed in section 3.3.
There is a negative consequence of having this predefined value that is for the other vehicles who are waiting in front of the red signal. If the red phase on the traffic light increases then traffic congestion on the other side may also increase leading to more chaos and more time to diffuse the traffic congestion. Therefore to solve this issue, instead of taking a predefined value, it is calculated dynamically (dynamically calculating threshold distance). This threshold distance is calculated using the speed of the EV and the number of vehicles waiting in front of TLJ shown in equation (8) and (9). This approach is adopted from the study in [9]: with T f ree : time which is needed to let the EV pass the traffic light, N waiting : number of vehicles waiting in front of TLJ, t saf ety : safety time which is 3 seconds, t B : time required for one vehicle to pass the intersection which is 1.8 sec and with d: distance of the EV to the intersection, V EV : speed of the EV.

Emergency Vehicle Prioritization Study Area
The highlighted path shown in the Figure 3 is the route of EVs whose behaviour is evaluated in the simulations. The route length is approximately 1.5 km consisting of 3 major and 2 minor junctions of the Mörfelder Landstraße which are mentioned in Table  1.

Case Sceanrio
For each of the three scenarios which are considered for studying the behaviour for EVs, there are two cases considered. One is the usual traffic condition and other is the closed lane based on the assumption that only one lane stays available and all others are closed due to construction/incident reasons or by prioritizing these lanes for non car traffic. Hence making up a total of six scenarios.  In this study area, around 60% of the street has more than 1 lane. Figure 4 shows the setup of closed lanes where edges highlighted in red colour signifies that lanes are closed. To generate traffic in a realistic manner, induction loop data is used. This data of induction loops is cleaned, averaged out and normalised over the total number of cars which resulted in creation of traffic flow distribution over the course of the day. It is shown in Figure 5. The X axis represents the time of timeslice [hh:mm] and the Y axis represents the average rate normalised for the overall traffic per day. The maximum averaged, measured count per 3 minutes is observed around 8 am, which is 30 cars. It can be seen in the Figure 5 that the congestion in the morning from 7:00 am until 10:30 is the most on the street of the Mörfelder Landstraße and therefore that is the time range selected for testing the EV. A total of 10 EVs are run between this time range and their trip time and delay time are compared.

Results
This section explains the simulation results obtained for case scenarios discussed above. A total of 10 EVs (ambulances) are run.  tively. The KPIs that have been considered are the total trip time (time required for the vehicle to finish the trip) and total delay time (time for which the vehicle travels below the ideal speed). For EVs, the speed is set 50% above the speed limit of the edge specified by the attribute "speed factor" which is defined as 1.5 while configuring the EV in SUMO. This is adopted from the study [12]. In some simulations when a tram stops, the subsequent red traffic light led to a delay since the EV is not able to overtake the tram. This is also reflected in total delay time in Table 3 for e.g. ambulance with ID 6 Ambulance. For scenarios 2 and 3 the average trip time is 153 and 162 seconds respectively and average delay time is 82 and 91 seconds respectively.   Table 4 and 5 show the comparison of total trip time and total delay time for each of the EVs (Closed Lane), where "EV with No-Priority (Closed Lane)" scenario acts as the baseline reference for calculating the impact. For scenario 4, the trip time varies between 242 and 469 seconds. The average for scenario 4 is 344 seconds and empirical variance is 70.2 which is 20% of the average. The variances of the scenarios 4, 5 and 6 are almost the same as scenarios 1, 2 and 3 which is (20±3%). The reasons for the variances are the same like in section 4.1 but the occurrences of these special events happened in different time intervals. This is also reflected in total delay time in Table 5 for e.g. ambulance with ID 2 Ambulance. For scenarios 5 and 6 the average trip time is 183 and 191 seconds respectively and the average delay time is 112 and 117 seconds respectively.

Threshold Distance
In Scenario 2 and 5, the threshold distance is constant i.e. 300 meters. In contrast for scenario 3 and 6, the threshold distance is calculated using equation 8 and 9. Table 6 and 7 show this distance for all major junctions. The variance of these distances is due to the change in the number of vehicles waiting in front of the TLJs and the speed of the ambulance when entering the study area. The velocity used in these equations are derived from initial calculated speed of the ambulances after entering the study area. It ranges between 36 and 55 km/h. Table 8 shows the average impact for EVs under "Normal Traffic" condition where the number in parenthesis gives the average of the absolute impact and the percentage gives the average of the relative impact compared to the baseline reference. The scenario "EV with No-Priority" is the baseline reference. Table 9 shows the average impact for EVs with "Closed Lane" condition. Here, the scenario "EV with No-Priority (Closed Lane)/Scenario 4" is the baseline instead of "EV with No-Priority/Scenario 1". Moreover, Table 10 "Baseline Comparison" shows the average increment in the travel time and delay time when the lanes are closed.

Conclusion
The optimization process used in this study involved data pre-processing. This includes improvement of master data quality which required network modelling and the creation of ODMs to make the models as realistic as possible. During the process of importing networks from OSM, the imported network contained a lot of errors due to the misalignment with reality such as errors in simple road links (lanes wrongly connected), classification of lanes etc. Therefore, network corrections were done using SUMO (SUMO's editing tool NETEDIT). ODMs were created by leveraging tools such as Python and Excel. These processes were time consuming but at the same time it was important for the execution of the models.
The simulation results in Table 8 and 9 show that the implementation of EV prioritization techniques results in a significant improvement of the KPI values. For "Normal Traffic" condition, the average trip time and delay time is dropped by 51% and 49%, 66% and 63% respectively. For the "Closed Lane" condition, increases in travel time and delay time was anticipated but the impact is lower than expected. The reason maybe that only 33% of the overall multi lanes were reduced to one lane. However, the average trip time and delay time is also dropped by 47% and 45%, 59% and 57% respectively. The maximum impact were seen on the scenarios where the tram stops ahead of the ambulance and the subsequent traffic light is switched to green. The model where threshold distance is calculated dynamically is not as good as expected. The reason is that the calculated distance is mostly lower than 300 meters for all major junctions which reduces the optimization of the travel time of the ambulances. Nevertheless, in all cases the travel time was reduced with the intervention into the traffic infrastructure. Therefore, it can be concluded that through the EV prioritization approaches using V2X communication, EVs can save precious seconds which could be the difference between life and death for a person in need.

Future Work
In future work, the impact of the length of the closed lanes on the arrival times of the EV should be investigated. Another interesting addition to the simulation would be to include foot traffic (pedestrians), buses and cyclists. The current model is used to study only one EV at a given instant during the simulation. Therefore, further studies could be implemented to handle multiple EVs at the same time. As SUMO is a continuously improving software and thus, for this model, there is still scope of improvement for lane changing functionalities e.g. overtake using the opposite lane. The traffic light control plans used in the study are edited as per demand model. Further work can be carried out to incorporate real world traffic control plans that could lead to even more accurate depiction of the real-world scenario. Since "Dynamic Priority" scenario calculates the threshold distance often less than 300m, delivering the results in the section 4, the parameters in the "Dynamic Priority" strategy needs to be optimized. Finally, this simulation needs to be redone with higher, post pandemic traffic rates.