# Agreement Technologies for Coordination in Smart Cities
## 3 Applications
### Distributed Coordination of Emergency Medical Service for Angioplasty Patients
#### 3.4.2 Simulation Experiments  
In this section, we describe settings, experiments, and results of the simulated emergency scenarios that demonstrate the efficiency of the coordination procedure and a significant reduction in the average patient delay. We tested the proposed approach for the coordination of EMS resources in angioplasty patients' assistance, focusing on the average patient delay time in the case of multiple pending patients. We compared the performance of our approach with the FCFS method, since it is applied by most of the medical emergency-coordination centres worldwide. To demonstrate the scalability of our solution and its potential application to small, medium, and large cities and regions, in the experiments, we varied the number of EMA ambulances from 5 to 100 (with increments of 5) and the number of angioplasty-capable hospitals from 2 to 50 (with increments of 2). The number of cardiology teams \(\mid C\mid\) in each experiment equals the number of hospitals \(\mid H\mid\). Thus, the number of setup configurations used, combining different numbers of ambulances and hospitals with cardiology teams, sums up to 500. For each configuration, we performed the simulation on three different instances of random EMS participants' positions, since we wanted to simulate a sufficiently general setting applicable to any urban area that does not represent any region in particular. The EMS participants were distributed across the environment, whose dimensions are 50 \(\times\) 50 km. In each instance, we modelled hospital positions and the initial positions of ambulances, out-of-hospital cardiology teams, and patients based on a continuous uniform distribution. Therefore, each configuration can be considered as a unique virtual city with its EMS system. Assuming that the EMS system is placed in a highly dense urban area, this kind of modelling of the positions of EMS participants represents a general enough real case, since the election of the hospital positions in urban areas is usually the result of a series of decisions developing over time with certain stochasticity, influenced by multiple political and demographical factors. In the simulations, ambulances were initially assigned to the base stations in the hospitals of the region of interest. Additionally, we assumed that after transferring a patient to the hospital, an ambulance is redirected to the base station, where it waits for the next patient assignment. Furthermore, we assumed that the hospitals have at their disposal a sufficient number of catheterisation laboratories, so that the only optimisation factor from the hospital point of view is the number of available cardiology teams. If there were more patients with the same urgency already assigned and waiting for treatment in the same hospital, they were put in a queue. The simulation of each instance was run over a temporal horizon, in which new patients are generated based on a certain appearance frequency. The EMS resources were dynamically coordinated from the appearance of a patient until the time s/he is assisted in hospital by a cardiology team. Each instance simulation was run over a total of 300 patients, whose appearance was distributed equally along the overall time horizon based on the following two predetermined frequency scenarios: low (1 new patient every 10 time periods) and high (1 new patient every 2 time periods). The period between two consecutive executions of the EMS coordination algorithm is considered here as the minimum time interval in which the assignment decisions are made; usually, this ranges from 1 to 15 min. In each period, the actual state of EMS resources and pending patients is detected, and the EMS coordination is performed such that the EMS resources are (re)assigned for all patients.