## 1 Introduction  
Population growth and urbanisation are amplifying the impacts of natural disasters and incidents. This poses a significant challenge for emergency teams, whose resources must be deployed in the least possible time to minimise casualties and losses [1, 2]; however, these emergency systems are unlikely to be able to meet incident requirements if they are not well designed and robust for largescale events [3]. Good planning and prediction of future needs, including new fire station locations, are essential to ensure universal coverage by the service, protection of people and property, and an equitable distribution of the workload among its servers [4, 5]. Fire service management in Spain depends on the regional governments. The Madrid Region is the autonomous region with the highest population density in Spain, with 84,453 per km\({}^{2}\)[6]. Although the number of fire stations (FS) in the Madrid Region increased from 14 in 1990 to 19 in 2014, in the same period the population grew from 1,952,428 (excluding the city of Madrid) to 3,364,377 in 2018 [7]--an increase of 72%--while the number of FS rose by only 15%, with an annual average of 17,991 incidents. With these population conditions and facilities, the Madrid Region's emergency system is more fragile than all other regions in Spain in terms of potential scenarios involving a high number of simultaneous incidents or largescale disasters that could collapse the system [1]. Within this framework, the Madrid Regional Government has decided to increase the number of fire stations to resolve the fragility of the emergency system, prevent its collapse, and maintain its reliability [8] (oral communication). These specific characteristics of the Madrid Region make it the most suitable region in Spain for developing this study. This study introduces the concept of the collapse index to ensure the reliability of the system and prevent it from reaching the limit of its capacity. This is a spatial measure, which in one year and for each pixel, integrates the maximum simultaneous time dedicated by two or more resources (vehicles) to one or more incidents of any type, as well as the maximum number of vehicles that have been deployed at the same time. A more detailed explanation of this index can be found in the Material and Methods section. The threshold in this index beyond which the system may collapse is determined from the number of resources in a geographic area, their location, the number of incidents, and the time the resources take to act. In this paper, we describe both \"incidents\" and \"disasters\" as \"incidents\", since this distinction is irrelevant in developing the methodology (Law 17/2015 of 9 July from the Spanish National Civil Protection system defines a disaster as a risk situation that collapses the society for a period and an incident as a local event that may produce high losses but never causes society to cease functioning). According to the analysis of the data from the Madrid Region, the emergency fire system is highly likely to collapse. This would occur when all vehicles are deployed to several incidents at the same time and new calls are received. This study addresses two key issues that previous studies in the literature do not tackle in depth: the problem of the reliability of fire services in areas with a sharp increase in incidents where the system may collapse and the issue of the homogeneous workload distribution of FS resources when the optimum location of new FS is calculated. The aim of this paper is to obtain the optimum locations of between one and five new FS according to the demands of the Madrid Region civil defence system in order to minimise the annual workload of the resources of a particular FS and avoid the collapse of the emergency fire system. The heuristic optimisation method of simulated annealing is applied. The main contributions of this paper include the following:  
1.