Abstract:
Our research explores how data-driven digital tools can optimize emergency response times using geospatial analysis and computational simulation methods. Focusing on Kadikoy district in Istanbul, we simulated ambulance routes from stations to emergencies to emergency rooms, using distance as a proxy for response time.
Our study analyzed two scenarios: i) the current infrastructure; ii) identifying statistically optimal solutions to relocate the two existing ambulance stations. Using Grasshopper with tools like WallaceiX, Urbano, and Shortest Walk, alongside Python for data visualization, we generated color-coded maps, route visualizations, and statistical analyses to pinpoint ways for improvement.
This work demonstrates the power of AI-driven optimization, simulation, and computational tools in supporting knowledge-intensive tasks in urban planning. The methodology used in this case study can be applied to other cities to evaluate emergency response infrastructure. Future efforts will focus on incorporating traffic data and extending simulations to larger urban areas for broader applicability.
Keywords: Artificial Intelligence, Computational Intelligence, Emergency Response Planning, Evolutionary Algorithm
1. Background
Emergency response planning is an important part of urban planning. Planners must consider and decide how many resources to allocate to emergency preparedness, how many personnel to employ, and where to place emergency response infrastructure to ensure effective and rapid response times.

This planning requires input from many stakeholders and is typically done at the municipal level. Our research seeks to investigate how data driven planning tools can help stakeholders make more informed decisions about emergency response planning and preparedness. More specifically, we sought to investigate the use of generative optimization algorithms to situate emergency response infrastructure, and create a generally applicable evaluation methodology.
In our investigation, we used geospatial data to analyse emergency response times in the Kadikoy district and surrounding neighborhoods in Istanbul, Turkiye. Specifically, we wanted to measure how far ambulances have to travel from their ambulance station, to a digitally simulated emergency, and then onwards to an emergency room, measured in meters. The total distance the ambulance must travel is then used as a proxy for emergency response time; thus, the further the ambulance must travel, the slower the response time, and vice versa.
To begin, we conducted an analysis of the base scenario which reflects the current situation. Focusing on the ambulance stations, since they would be easier to relocate than hospitals, we conducted an investigation to determine how the current resources could be reallocated to optimize emergency response times, and we applied a multi-objective generative optimization algorithm to determine the best locations for the alternate ambulance stations.
Data Sources:
- Street network: OSMNX Python library.
- Emergency room locations: Internet search.
- Ambulance station locations: Municipal records.
Tools:
- Grasshopper with Urbano, Shortest Walk, and Wallacei plugins.
- Python (Matplotlib) for data visualization.
At this point, it is important to note that incorporating traffic into our simulations was outside the scope of our research, and therefore we simplified our investigation to exclude traffic data.
2. Modelling the Base Scenario
To begin, we conducted an analysis of the current base scenario. That is, we analyzed the response times using the current configuration of fire stations and emergency rooms in the Kadıköy district.
2.1 Methodology
To conduct our analysis, we plotted a grid of points in Kadıköy. The grid points are 500mx500m apart and are used to digitally represent the location of an emergency. Then for each ‘emergency’, we plotted the route from both ambulance stations to each emergency, and the route from each emergency to both emergency rooms, and then selected the shortest route to and from both for each emergency. This created the shortest path for each of the 105 digitally simulated emergencies.

2.2 Data Visualization
We color coded the grid of points to represent the total distance an ambulance must travel from the ambulance station, to the emergency, and then onwards to an emergency room at a hospital. Hospitals are represented by purple pins, while ambulance stations are represented by pink pins. The locations with the shortest distance travelled are colored green, while the locations with the longest distances to travel are red.
We also plotted the routes the ambulances must travel to reach their destinations. Where multiple routes overlap, we created thicker lines that are proportional to the number of simulated routes that overlap. For instance, if Street A has only one ambulance route on it, and Street B has 4 ambulance routes on it, then Street B will be shown as four times thicker than Street A.
2.3 Results and Analysis:
Based on the visualizations, we can come to several conclusions. First of all, the Eastern portion of the city is relatively underserved to first responders and would likely benefit from an additional ambulance or fire station located in the east end.
Second of all, we can see which routes are more frequently used by emergency responders. This data can be useful to city planners and administrators as it indicates which streets are more critical for first responders and more necessary to ensure that they are safe and clear to navigate. That is, these critical routes require a greater amount of maintenance to ensure that they are navigable, and cities should avoid disturbances on these streets, such as demonstrations, festivals, or parties.


We extracted the list of emergency response distances from grasshopper and produced a boxplot and histogram that shows the distribution of response distances from this base scenario. These charts will be more relevant in the next sections, but they still provide an overview of the statistical distribution.
3. Where to Relocate the Existing Stations?
TOur scenario imagines that the city of Istanbul wants to relocate the two existing stations in Kadikoy to optimize ambulance response times. We focused on ambulance stations as the cost and logistical complexity of relocating a hospital would be prohibitively high.
3.1 Methodology
To determine the optimal locations for the relocated ambulance stations, we chose to use an evolutionary multi-objective generative optimization algorithm. Specifically, we used the WallaceiX plugin for Grasshopper.
Wallacei generates and evaluates multiple simulations based on input parameters to identify optimal solutions measured by fitness values. For this case study, the algorithm tests various ambulance station locations, assesses their response times, and iteratively refines the solutions through successive simulations until a defined endpoint is reached.
To this end, we constructed two variable position points in Grasshopper that represent the locations of the new ambulance stations, and appended these points to a list of ambulance stations. The latitude and longitude coordinates were used as the input parameters. We created scripts in Grasshopper to find the mean, median, maximum, and standard deviation of response times, and set these results as the fitness values.
We ran 1600 simulations of possible locations. For each simulation we calculated the mean, median, maximum, and standard deviation of response times. Based on the results, the algorithm produced 163 pareto optimal sites for the relocated ambulance stations.
3.2 Data Visualization
Figure 4 showing the 163 Pareto optimal solutions for Scenario 1. Hospitals are shown as purple pins and ambulance stations are shown in pink pins. The Base Scenario locations for the ambulance stations are shown as thin pink circles. Each simulation produced two outputs: one in the Western part of Kadikoy, and the other in the Eastern side. Each pair is represented with the same color.
We then created a Parallel Coordinate Plot to evaluate the fitness value tradeoffs between each Pareto solution. We identified 16 options that performed better than the Base Scenario in every metric (mean, median, maximum, and standard deviation).
Figure 5 shows the parallel coordinate plot for the 163 Pareto optimal solutions for Scenario 1. The Base Scenario is represented by the black line. There are 16 options that have better response times according to every statistical metric that we measured.
The 16 superior options are represented below as red points, which shows the clear formation of two clusters. The centroids of the two clusters are shown as green points.
Figure 6 shows the Pareto solutions that performed better than the base scenario in red. The cluster centroids are shown in green.
We then constructed a histogram that compares the emergency response distances of the base scenario to the cluster centroids identified above.
Figure 7 compares the emergency response distances in meters of the base scenario to the cluster centroids identified by the evolutionary algorithm. The median, 75th percentile, 90th percentile, and maximum values are called out by dashed lines in blue and yellow respectively.
Finally, we constructed a map of Kadikoy using the cluster centroids simulating emergency responses, using a similar methodology as Figure 1.
Figure 8 showing the relocated ambulance station analysis of Kadikoy. Locations with long response distances are shown in red, medium distances are yellow, and short distances are shown in green. Hospitals are shown as purple pins and ambulance stations are shown in pink pins. The thickness of the blue lines indicate how frequently ambulances traverse that route.
3.3 Results and Analysis:
The data visualizations tell us several critical pieces of information:
- The base scenario performs well on median and mean when compared to the Pareto optimal solutions (parallel coordinate plot, figure 5)
- The relocated stations do not improve much on median value (histogram, figure 7). The median response time was reduced by only 1.3%.
- However, the base scenario performs poorly in the lower quantiles
- The relocated stations improve a lot on 90th percentile performance and maximum response distance (histogram, figure 7). The 90th percentile response distance was reduced by 13.1% while the maximum response distance was reduced by 19.9%.
- In figure 8, there are not any red points, and there are fewer orange and yellow points. This means that the extremely slow response distances have been eliminated by repositioning the ambulance stations.
The relocated stations decrease the lower quantile response distances, which would result in a more equitable distribution of public resources.
As well, figure 8 shows which routes would be highly traversed by ambulances if the stations are relocated. This simulation would be helpful for planners when they identify potential locations for ambulance locations. This allows them to compare critical routes with local ground knowledge to see if it creates dependencies on unsuitable routes. For instance, if certain roads are identified as critical for ambulance navigation, but in reality they are too narrow, are often congested or are otherwise impassable, planners can eliminate the ambulance station location options from consideration. This process can also be performed by eliminating unsuitable routes from the street map network before running the evolutionary algorithm simulation.
4. Conclusion and Discussion
If the city of Istanbul implements the relocation of their ambulance station, it is unlikely that they would measurably decrease their mean or median response times. However, our data suggests that they would significantly reduce the 90th percentile and maximum response times. In practice, this means that slow response times become less slow. This change would materially improve the equitability of resource distribution among citizens living in Kadikoy. Equitable resource allocation is a critical aspect of designing fair, just and resilient cities.
Ultimately, Istanbul must weigh the benefits of relocating ambulance stations against the cost of such a move. It is clear that this decision must be made by humans, as AI is incapable of making such a value laden decision with direct consequences on the well being of human beings. All AI can do is provide the data for stakeholders to make better decisions.
The methodology applied in this case study can be scaled to be applied to larger areas of Istanbul, or even on the scale of entire cities and metropolitan areas. However, certain computational limitations are explored in the next section with suggestions for future research to enhance technical performance.
This case study also demonstrates the value of computational simulations in the field of emergency response and urban planning. Simulation is particularly good at creating a uniform data set that makes data manipulation and comparison simple and straightforward. Furthermore, it provides an analytical toolbox when there is a paucity of real world, openly accessible data to analyze, as in the case of Kadikoy.
However, simulations present a fundamental problem in a field where accuracy and precision are paramount, such as emergency planning. Simulation can only provide an approximation of emergency response times, as evidenced by the fact that we used emergency response distance as a proxy for time. Ideally, planners can use real world data alongside machine learning models that are able to accurately predict emergency response times to optimize resource allocation. However, in the event that this data is not available, planners should at least use simulations that incorporate dynamic traffic information to more accurately reflect real world truth.
Moreover, the lack of real world data does not capture other dimensions of emergency response planning, such as the rate of emergency occurrence or population density in different areas of the city. For instance, a densely utilized industrial area with dangerous work environments would likely have greater need for fast emergency response times than a sparsely populated residential area. Further research should be conducted in this area to examine how this type of information can be incorporated into digital simulations.
4.1 Further Research Directions
We identified two promising directions to expand our research further:
The first path is to improve the efficiency of the computational models. The shortest walk calculation is heavy, and running a large number of simulations for the optimization algorithm is computationally taxing. This limits the number of simulations and complexity of simulations that can be performed on a standard computer. Further work is necessary to see if there are any effective strategies to reduce computational load to scale the methodology beyond one district of Istanbul without losing the high quality of data produced. The computational load ultimately limited the scale of the simulations to the Kadikoy district of Istanbul. A more efficient method would allow researchers to run simulations on the scale of the entire city of Istanbul.
The second direction is to incorporate traffic data into the analysis. The incorporation of traffic information was outside the scope of this research because the dynamic and variable nature of vehicular traffic introduced a level of complexity that your authors were unable to handle effectively. However, traffic would be a critical factor in real world response times and therefore would necessarily be incorporated into a more robust real world application.
References
OpenStreetMap Network for Kadıköy Istanbul
OpenStreetMap contributors. “Kadıköy, Istanbul.” OpenStreetMap, www.openstreetmap.org. Accessed 19 Dec. 2024.
Istanbul Fire Brigade Stations
Istanbul Fire Brigade. “Our Stations.” Istanbul Fire Brigade, Istanbul Metropolitan Municipality, itfaiye.ibb.gov.tr/en/our-stations.html. Accessed 19 Dec. 2024.
WallaceiX Grasshopper Plugin
Roudsari, Mostapha Sadeghipour, et al. WallaceiX: Multi-Objective Evolutionary Optimization Plugin for Grasshopper. WallaceiX Development Team, www.wallacei.com. Accessed 19 Dec. 2024.
Urbano Grasshopper Plugin
Urbano Development Team. Urbano: Grasshopper Plugin for Urban Analysis and Design. Modelur, www.modelur.com/urbano. Accessed 19 Dec. 2024.
Shortest Walk Grasshopper Plugin
Shortest Walk Development Team. Shortest Walk: Grasshopper Plugin for Pathfinding. Shortest Walk Plugin, shortestwalk.com. Accessed 19 Dec. 2024.
