Full text
Developments in the Built Environment 18 (2024) 100461 Available online 20 May 2024 2666-1659/© 2024 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/). Real-time RSET prediction across three types of geometries and simulation training dataset: A comparative study of machine learning models Ondˇ rej Uhlík a , * , Petra Okˇ rinov´ a a , Artem Tokarevskikh b , Tom´ aˇ s Apeltauer a , Jiˇ rí Apeltauer a a Faculty of Civil Engineering, Brno University of Technology, Brno, Czech Republic b Faculty of Information Technology, Czech Technical University in Prague, Prague, Czech Republic ARTICLE INFO Keywords: Evacuation modeling Machine learning Required safe egress time Agent-based models ABSTRACT Agent-based evacuation models provide useful data of the evacuation process, but they are not primarily designed for use during an emergency. The paper aims to test predicting RSET using a surrogate ML model trained on a simulation dataset with 60 samples. A total of 9 machine learning algorithms were tested on 3 simple geometries: bottleneck, stairway and walkway. A set of 7 spatial features was used to train the surrogate models. The results showed a relatively good ability of Artificial Neural Network to learn in scenarios involving bottlenecks and stairways, with an R 2 : 0.99 on the testing dataset. In the walkway scenario, all models experienced a significant drop in performance, with Gradient Boost performing the best (R 2 : 0.92). The paper demonstrated ability to generalize effectively in bottleneck-type tasks with training on a relatively small dataset containing spatial parameters obtainable in real-time from camera systems. 1. Introduction Agent-based evacuation microscopic models (ABEM) are commonly used for testing what-if scenarios of fire or other emergencies, and for optimizing the evacuation process or modifying buildings for more efficient evacuation. One of the basic safety indicators is the Required Safe Evacuation Time (RSET) (Cooper, 1983). It is clear that the evacuation process can be largely influenced by the immediate conditions of the building, particularly the number of occupants, their location within the building, and their other characteristics, such as walking speed distribution. These conditions can result in RSET variability on the order of minutes, based on capacity and complexity of given scenario. Simulations of evacuation models can quantify RSET for a specific combination of input parameters representing those conditions for a given scenario. If it were necessary to capture all the variability of these input parameters for every possible situation, the number of simulations would be unbearable. Such a procedure would be very demanding in terms of computational time and data storage capacity. Advances in machine learning (ML) have made it possible to largely overcome this problem. In the context of predicting the evacuation of occupants, surrogate evacuation model (SEM) based on ML algorithms can offer an efficient alternative to detailed microscopic simulations, especially concerning computationally demanding scenarios such as large public spaces or buildings with intricate architecture. This can be achieved by training a SEM on a dataset of historical real-world data or artificial simulations that can replicate the outputs of an ABEM by predicting RSET with a specified error. The most common emergencies in buildings are fires. CFD fire models allow for the calculation of ASET (Available Safe Egress Time) (Cooper, 1983), which is the threshold time for which a safe environment prevails in a building in terms of temperature and the propagation of combustion products. Immediate RSET prediction based on current conditions allows for a given fire scenario to evaluate the evacuation process and take appropriate measures in case RSET >ASET (inform security forces, reinforce critical areas with personnel, etc.). The diagram in Fig. 1 shows the overall process from scenario definition to real-time decision-making using the SEM. In this paper, the authors compare the performance of 9 SEMs in terms of the accuracy of predicting RSET on three basic scenarios – a) egress through a narrow bottleneck, b) bidirectional movement in a corridor, c) egress from the stadium stairs. In each of these scenarios, different types of phenomena can be expected based on knowledge of the pedestrian dynamics - in a bidirectional corridor, occupants are exposed to collisions, naturally leading to the formation of queues; movement on the stadium stairs is characterized by changes in walking * Corresponding author. E-mail addresses: [email protected] (O. Uhlík), [email protected] (P. Okˇ rinov´ a), [email protected] (A. Tokarevskikh), [email protected] (T. Apeltauer), [email protected] (J. Apeltauer). Contents lists available at ScienceDirect Developments in the Built Environment journal homepage: www.sciencedirect.com/journal/developments-in-the-built-environment https://doi.org/10.1016/j.dibe.2024.100461 Received 8 November 2023; Received in revised form 19 April 2024; Accepted 12 May 2024
Developments in the Built Environment 18 (2024) 100461 2 speed and high densities; the bottleneck is specific mainly due to its output flow and high densities. The training set for each SEM consists of simulations created in the evacuation model Pathfinder and is composed of 7 input spatial features based on the occupancy and geometry of the object. The features were chosen with the condition of their potential for direct detection and computation using computer vision methods. The evacuation model of each scenario was calibrated based on publicly available experimental data and validated based on RSET. For the purposes of training and comparing SEMs, the following algorithms were selected: Linear Regression, Polynomial regression, K-Nearest Neighbor, Random Forest, Gradient Boost, Extreme Gradient Boost, Support Vector Regression, Gaussian Processes, and feedforward Artificial Neural Network. All SEMs were trained based on the loss function MAE. This metric was also used for testing due to its frequent use and easy interpretability (except for Linear and Polynomial Regression which uses Least Squares Method). The goal was to determine whether certain SEMs can generalize with sufficient accuracy regardless of the scenario type. 2. State of the art The following subchapters describe the achieved insights in the field of evacuation modeling, the use of machine learning methods in crowd safety, and the introduction of surrogate machine learning models to replace simulations. 2.1. Microscopic evacuation modeling Microscopic evacuation modeling represents a key tool for the simulation and analysis of various phenomena during evacuation process (RSET, density, velocity, etc.). These models provides valuable insights for understanding evacuation dynamics and also crowd dynamics and optimizing real-world situations. The first computerized evacuation models began to emerge in the 1970s (Bazjanac and Conway, 1977). Since then, dozens of models have been continuously developed and improved (Lovreglio et al., 2020). Microscopic evacuation models can be used for evacuation analysis in various emergencies such as fires (Ronchi and Nilsson, 2013), (Wang et al., 2021), terrorist attacks (Cao et al., 2022), (Liu, 2018), (Ding et al., 2021), chemical spills (Mizuta et al., 2020), or crowd management in public spaces (Crociani et al., 2016). The most advanced models include ABEMs (Cheng et al., 2018), (Ren et al., 2009), (Shi et al., 2009), cellular automata (Yuan and Tan, 2007), (Li et al., 2019), (Hu et al., 2018), (Burstedde et al., 2001), social force models (Helbing and Moln´ ar, 1995), (Chen et al., 2018). These models not only help predict the behavior and responses of people (crowds) but also serve as a tool for optimizing security measures and planning effective security strategies (Bayram, 2016), (Rend´ on Rozo et al., 2019), (Luh et al., 2012). Some evacuation models are based on the concept of steering behavior. The concept was initially introduced by C. Reynolds (Yuan and Tan, 2007) and later expanded upon in the work of H. B. Amor (Li et al., 2019). The steering mode aims to provide a representation of natural occupant movement, taking into account their behavioral characteristics. Berseth focus on the automated parameter fitting for steering algorithms, with the former investigating the effect of these parameters on algorithm performance and the latter proposing a statistical framework and methodology for characterizing this influence (Berseth et al., 2014), (Berseth et al., 2013). A range of studies have explored the parameter estimation and comparative evaluation of crowd simulations. Wolinski introduced a framework for fair comparisons of simulation algorithms, using real-world data and automatic parameter estimation (Wolinski et al., 2014). Lerner roposed a data-driven approach to evaluating individual behaviors within a simulated crowd, using video footage to generate a database of state-action examples (Lerner et al., 2009). Bianco focused on predicting future crowd motion, presenting a model for estimating future behaviors and a new error measure for comparing crowds based on local density (Dal Bianco et al., 2017). These studies collectively highlight the complexity and importance of parameter estimation and comparative evaluation in crowd simulations. 2.2. Utilization of machine learning in crowd safety In terms of further application of ML in the field of pedestrian Fig. 1. Diagram of the use of the SEM in relation to the CFD fire model. O. Uhlík et al.
Developments in the Built Environment 18 (2024) 100461 3 dynamics, Tordeux dealt with the prediction of walking speed and average distances of agents to their nearest neighbors based on data from real experiments (Tordeux et al., 2019). The intensity of pedestrian traffic on sidewalks using Artificial Neural Network (ANN) was predicted by Das (Das et al., 2015). Chen developed a questionnaire based on which he predicted pre-evacuation time using a random forest classifier (Chen et al., 2019). Zhao deployed the random forest method to model pre-evacuation time based on 11 independent features. He used data from 5 unannounced evacuation drills (Zhao et al., 2020). Ebrahimi used the random forest method to predict the need for an evacuation announcement in railway accidents (Ebrahimi et al., 2023). The prediction of the need for an evacuation announcement was also addressed by Phark using ANN and Naive Bayes methods (Phark et al., 2018). Katzilieris dealt with identifying key factors in individuals’ decision whether to evacuate or not using logistic regression and random forest. He obtained empirical data in the form of a questionnaire (Katzilieris et al., 2022). Liu used the Support Vector Machine method (SVM) to predict pre-evacuation time based on 13 input features obtained in the form of a questionnaire implemented after a fire in Hong Kong (Liu and Lo, 2011). Pedestrian trajectory prediction is also a widely addressed topic (Duives et al., 2019), (Goldhammer et al., 2014), (Asahara et al., 2011), (Yi et al., 2016), (Zamboni et al., 2022), (Lee et al., 2017), (Alahi et al., 2016), as well as anomaly detection (Chaker et al., 2017), (Marsden et al., 2016). In terms of predicting crowd behavior during evacuation, the Mustapha et al. uses ML to predict crowd events based on smartphone accelerometer data and a combination of 1D convolutional neural network (CNN) and SVM methods (Mustapha et al., 2020). A comprehensive investigation into the use of ML models in predicting crowd behavior during evacuations was presented by Bahamid (Bahamid and Mohd Ibrahim, 2022). G¨ odel presented a new method for calibrating microscopic models of occupants’ movement using Bayesian inference (G¨ odel et al., 2022). Zhang et al. used a convolutional neural network (CNN) to obtain a finite number of occupants in a crowd in a specific area. The input data was in the form of an image where occupants were detected based on their head size and their number - the output was a map of local densities (Zhang et al., 2016). In their work, Yuks et al. improved the behavior of agents in a person movement model using ML, specifically using ANN and genetic algorithms. These have been used to improve agent behavior in the simulation environment, such as effective locomotion, obstacle avoidance, movement towards visible targets, and communication with each other (Yuksel, 2018). Wang used ML methods to study the dynamics of pedestrian movement during emergency evacuations. They found that the distance to the exit and the actions of surrounding evacuees were the most significant factors influencing movement patterns (Wang et al., 2019). Naser advocates for the utilization of artificial intelligence (AI) in fire engineering and sciences, particularly in the study of fire behavior and the assessment of the fire performance of materials and structures. The review presents various ML techniques and AI and provides guidance on preparing databases and conducting fire analysis tailored to AI. The document also emphasizes the need for a shift in traditional curricula to include AI principles and identifies potential concerns and challenges in this field (Naser, 2021). A range of studies have explored the development of indoor AR navigation and emergency evacuation systems, all of which are based on machine learning and IoT technologies. Yoo proposed a system that uses machine learning for user location estimation and optimal escape path derivation, and an IoT-enabled ad hoc network for data delivery (Yoo and Choi, 2022). Nam focused on an AR-based evacuation route guidance system using a conventional CNN and CCTV image processing (Nam et al., 2019). Zualkernan presented an IoT-based system that tracks fire location and building occupants, and directs them to safe exits using BLE beacons and smart exit signs (Zualkernan et al., 2019). Duru investigated indoor positioning technologies, including UWB, accelerometer, and Wi-Fi, for emergency detection and remote navigation. These studies collectively highlight the potential of machine learning and IoT in enhancing indoor AR navigation and emergency evacuation systems (Duru and Karas, 2019). Sohn propose innovative approaches to long-term crowd flow prediction. Same author then introduces Fourier Isovists, a new input representation, and GeoInteractNet (GINet), a model that couples a multi-scale attention network with a convolutional encoder-decoder network. These advancements significantly improve the accuracy of long-term crowd flow prediction (Sohn et al., 2022). Same athor builds on this work by introducing CAGE, a representation that encodes crowd scenarios, and a modified SegNet architecture for instant long-term crowd flow prediction. Both papers demonstrate the ability of their approaches to capture real crowd movement and generalize to new environments (Sohn et al., 2020). Feng also contributes to this field by proposing DeepSTN+, a context-aware spatial-temporal neural network that models long-range spatial dependency and improves crowd flow prediction accuracy (Feng et al., 2022). Karamouzas (Karamouzas et al., 2018)addresses the challenge of predicting crowd behavior in open spaces, a problem that has been largely overlooked in previous research. The technique is particularly valuable in forecasting future crowd distribution, a task that has practical applications in various scenarios. The method leverages the power of crowds to identify relevant data for input, a strategy that has been shown to yield superior predictions in other contexts (Brynjolfsson et al., 2016). These innovative approaches have the potential to significantly increase public safety and security in congested spaces. 2.3. Utilization of surrogate models in evacuation modeling The use of SEM to replace agent-based simulations has been addressed in very few publications. The possibility of using SM to replace agent-based simulations was tested by Angione (Angione et al., 2022) on the agent-based social care delivery model ‘Linked Lives’. The results demonstrated the potential possibility of deploying a ML model as an SM, with the highest accuracy achieved by an ANN. However, each agent-based model uses different computational mechanisms and parameters, so it is advisable to test each complex agent-based model carefully and separately in terms of its potential replacement by an SM. The prediction of the outputs of the Pathfinder agent-based evacuation model was addressed by Deng using Gradient Boost, Extreme Gradient Boost, and Light Gradient Boost models (Deng et al., 2022). Other algorithms were not tested. Guo (Guo and Zhang, 2022) presented a system that includes the prediction of RSET, density, and cost of possible renovation of the object. Only a random forest algorithm was used for prediction. RSET prediction based on Anylogic evacuation simulator simulations was also addressed by Li’s ANN classifier (Li et al., 2023). 3. Materials and methods One of the main objectives of this paper is to investigate the possibility of replacing ABEM simulation with an SEM that can estimate mean RSET based on predefined features obtainable in real-time. A flowchart of the procedure is shown in Fig. 2. The diagram is divided into 3 parts - simulation of occupants movement and data preprocessing (green section), cross-validation and evaluation of SEMs (blue section), and optimization of hyperparameters of individual SEMs (red section). The RSET prediction is based on the actual spatio-temporal occupancy data of the facility, which defines the size and structure of the training set. It can only use known geometric data about the object (e.g., location of agents and exits) and occupancy data obtained by computer vision models(e.g., YOLO (Jiang et al., 2022) and trajectory detection algorithms (e.g., DeepSort (Wojke et al., 2017)), making its implementation universal and independent of building type or specific facility procedures. Feature preprocessing analyzed the correlation between features to keep only the necessary number of features for subsequent training. O. Uhlík et al.
Developments in the Built Environment 18 (2024) 100461 4 3.1. Supervised machine learning algorithms A total of 9 ML algorithms capable of solving regression problems are tested in this paper. The aim was to select generally established algorithms. The following subsections describe the different algorithms, starting from the simplest linear and polynomial regression described in 3.1.1 and 3.1.2. The standard methods used for their relatively high level of accuracy are ensemble methods based on decision trees, which are described in subsections 3.1.4-3.1.6. Ensemble learning is based on the principle of training a large number of weaker models and combining their predictions to obtain a more accurate meta-model. Other algorithms tested include K-Nearest Neighbor (subsec. 3.1.3), Support Vector Regression (subsec. 3.1.8), Gaussian Process (subsec. 3.1.7), and Artificial Neural Network (subsec. 3.1.9). 3.1.1. Linear Regression Linear regression (LIN) uses the least squares method to approximate the data by a plane in n-dimensional space. The method is very fast and easy to implement, but its disadvantage is the assumption of a linear relationship between the independent and dependent features. The method does not contain any hyperparameters that can be optimized (Rawlings et al., 1998). 3.1.2. Polynomial Regression The polynomial regression method (POLY) approximates the data by a polynomial in n-dimensional space, with the degree of the polynomial subject to hyperparameter tuning. The method has the advantage of accounting for potential nonlinearity of the data and, similar to linear regression, has a high learning rate and ease of implementation (Rawlings et al., 1998). 3.1.3. K-nearest Neighbor Regression The k-Nearest Neighbor (KNN) algorithm predicts the values of the dependent feature based on the arithmetic average of a specified number of k nearest neighbors in the training set, with key parameters including a fixed number of k neighbors and the algorithm that determines the nearest neighbors, such as Ball tree or KD tree (Rawlings et al., 1998). 3.1.4. Random forest Random Forest Regressor (RF) uses bootstrapping, where each tree is trained on a sample of the training data with replacement, thus reducing the resulting variance and avoiding significant overfitting. It is an ensemble method using the principle of bagging, i.e., training a large number of regressors (decision trees) simultaneously and then averaging their results, with each tree trained on a set of randomly selected features (Rawlings et al., 1998). Fig. 2. Diagram of SEM development with nested cross-validation procedure. Both simulation and SEMs training were performed on hardware: Intel®Xeon® Gold 6248R 2xCPU 3 GHz (64 cores), RAM: 512 GB, GPU: 2xNVIDIA GeForce RTX 2080 SUPER, 8GB. (For interpretation of the references to colour in this figure legend, the reader is referred to the Web version of this article.) O. Uhlík et al.
Developments in the Built Environment 18 (2024) 100461 5 3.1.5. Gradient Boosting Gradient Boosting Regressor (GB) is another ensemble algorithm that, unlike RF, uses the boosting principle in which individual weaker models build on each other and each data sample has its own weight, with “re-weighting” performed in each iteration where misclassified samples gain higher weight and those correctly classified lose weight so that subsequent models will focus more on samples misclassified by previous models, usually achieving more accurate results than RF (Rawlings et al., 1998). 3.1.6. Extreme Gradient Boosting Extreme Gradient Boosting Regressor (XGB) is a modification of the GB algorithm that uses a greater degree of L1 and L2 regularization (Chen and Guestrin, 2016), penalizing the loss function as model complexity increases to prevent significant model overfitting, with its speed of learning making it suitable for very large datasets. 3.1.7. Gaussian Process A stochastic Gaussian Process method (GP) uses a function called a kernel to examine the distribution of functions with the goal of selecting the one that best approximates the data. The comparison of functions is based on a covariance matrix, with the mean of the probability distribution representing the function and covariance matrix that best generalizes the data. The method has the advantage of a probabilistic approach that allows for the calculation of confidence intervals and the possibility of using newly defined kernels (Rasmussen et al., 2004). 3.1.8. Support Vector Regression Support Vector Regression (SVR) searches the multivariate space for a hyperplane that best approximates the data. The advantage of the method is its ability to account for nonlinearity of the data without high computational complexity, which would be necessary in a conventional approach of transforming data into n-dimensions and then determining the hyperplane. To avoid this transformation, a kernel trick is used, which employs a kernel function that allows working in the original number of dimensions while accounting for nonlinearity (Wang, 2005). The most commonly used kernel functions include polynomial and RBF functions, also known as Gaussian kernels, both of which will be tested within this paper. 3.1.9. Artificial Neural Network ANN in the form of Multilayer Perceptron is a basic feed forward ANN algorithm composed of an input layer, any number of hidden layers, and an output layer, with each layer working with a certain number of neurons. The weights of each neuron are trained iteratively by a backpropagation algorithm to minimize the loss function (Murtagh, 1991), using L2 regularization. Disadvantages of ANN algorithms include high time requirements for parameter tuning and problematic interpretation of the model’s influence on each feature’s predictions. 3.2. Scenario settings For comparison, three scenarios based on three different geometries were selected - bidirectional movement on a plane, movement on stairs, movement through a narrow bottleneck. The scenarios were chosen to represent basic situations and phenomena that occur during building evacuations. In general, it can be said that the evacuation of entire buildings will be composed precisely of a combination of these individual scenarios, possibly with others not listed here (e.g., elevator evacuation, movement on escalators, etc.). For calibration and validation of the evacuation models, 3 open experimental datasets corresponding to the selected scenarios were selected. The datasets consisted of the detected trajectories of the participants. Experiments a corresponding evacuation models are shown at Fig. 3. In the experiments conducted within the scope of this article for the calibration of SEMs, no pre-evacuation time was introduced, and therefore it was not further considered. 3.2.1. Bottleneck The evacuation model of unidirectional flow of occupants from a room was constructed based on experimental data from 2013 (Adrian et al., 2018). The experiment was conducted with students at the University of Navarra in Spain and is depicted alongside the corresponding evacuation model in Fig. 3. It concerns a room measuring 4.5 ×6 m with one exit of 0.5 m width. The walking speed was calibrated based on trajectories using a normal distribution with parameters – min: 1.02 m/s, max: 1.92 m/s, μ : 1.37 m/s, σ : 0.31 m/s. Measurements were conducted in a corridor connected to the bottleneck so that the mean walking speed of individuals was not burdened by congestion. The room occupancy in the experiment was 42 occupants. 3.2.2. Walkway This is a model of bidirectional flow of occupants on a sidewalk. In the experiment (Feliciani et al.), individuals were positioned on a prepared grid, so their positions in the simulation accurately replicate their positions in the experiment. Measurements were conducted on a section Fig. 3. Sample experiments within selected scenarios and corresponding evacuation models intended for calibration (bottleneck scenario - left, walkway scenario - center, stairway scenario - right). O. Uhlík et al.
Developments in the Built Environment 18 (2024) 100461 6 measuring 10 ×3 m in the central part of the sidewalk. The data is from 2015 and was collected at the University of Tokyo. 3.2.3. Stairway This dataset was obtained as part of an evacuation experiment conducted at the Esprit Arena stadium in Düsseldorf in 2009. Each participant was assigned a seat (Li et al., 2019). The movement occurred on a staircase downwards. In the scenario, there are 128 occupants. The staircase has a riser of 0.135 m, a tread of 0.265 m (slope 27◦). The width of the staircase is 1.2 m. 3.3. Simulations For simulation, the Pathfinder tool with the inverse steering behavior mode was used. It assumes that each individual determines their trajectory towards the goal and continuously reassesses it based on subsequent events and stimuli, resulting in the selection of alternative routes and adjustments of occupant trajectories considering other occupants and geometry at each time step of the simulation, while the occupant continually monitors the originally planned path. The movement of an occupant is a combination of route-following mechanisms and collision prediction with surrounding individuals, primarily based on the study by J. Fruina (Hu et al., 2018). This mode was used for calibration and simulation of each modeled scenario. Based on calibrated evacuation models, a dataset of simulations was subsequently created for each scenario. The trajectories of individuals from the calibrated model simulations, upon which the training sets were based, are depicted in Fig. 4 alongside real-world experimental data. To achieve RSETs in simulations that approximate real experiments, parameters such as Collision Response Time (CRT) were calibrated in Pathfinder. This refers to the time an occupant has to assess critical distance to avoid physical collision with another occupant. Another parameter was Acceleration Time (AT), which is the duration during which an occupant’s speed linearly increases while decelerating until the maximum speed is reached. The last parameter was the allowed distance between occupants (PD). This parameter can also be determined by the maximum allowed density. In the BOTTLENECK scenario, these parameters were set as follows: CRT =1.5 s, AT =0.1 s, and PD =7 occupants/m2. In the WALKWAY scenario, only the CRT parameter was changed to a value of 0.1 s compared to the BOTTLENECK scenario. In the STAIRWAY scenario, the combination of parameters was as follows: CRT =1.5 s, AT =0.8 s, PD =0.08 m. Validation of simulations using RSET is provided in Table 1. For each scenario, 5 combinations of the number of occupants and 3 distributions of normal speed distributions were set, with a standard deviation of 0.2 m/s and means of 0.8 m/s, 1.2 m/s, and 1.6 m/s. In consideration of the distribution of occupants in the building, which can play a crucial role during evacuation, 4 variants of distribution were established, with 3 of them considering clustered individuals and 1 considering random distribution with a higher number of individuals. The principle is illustrated in the bottleneck scenario in Fig. 5. Different distribution options may, for instance, involve occupancy of different floors inside a building or other functional units. In the training set, the distribution is accounted for by the mean distance of occupants to the exit (see subsection 3.4). Therefore, the total number of simulations for each scenario was 1200. The stochasticity of the evacuation models needs to be affected by a larger number of simulation runs, with stochastic parameters varied within a given distribution for each simulation run. The number of simulation runs was determined by Ronchi’s method of convergence of 2 parameters calculated from the evacuation curves of each simulation run: total evacuation time (TET conv ), standard deviation of total evacuation time (SD conv ), relative Euclidean distance (ERD conv ), Euclidean projection coefficient (EPC conv ), and secant cosine (SC conv ), with the method and individual indices described in detail in reference (Ronchi et al., 2014). For the analysis, the bottleneck scenario was chosen and 30 simulations with 80 agents were performed. Based on the results shown in Fig. 6, 20 simulation runs were found to be sufficient. This number of runs was used for every scenario. The maximum numbers of occupants in the respective scenarios are listed in Table 2. The numbers of occupants were chosen with regard to the capacity of the given geometry. Fig. 4. Trajectories from real experiments data and their corresponding trajectories in ABEM simulation. Table 1 Validation of ABEM for each scenario using RSET. Scenario RSET - real world data [s] RSET - simulation [s] Absolute Error [s] BOTTLENECK 31.28 34.9 (±2.4) 3.62 WALKWAY 17.22 19 (±0.8) 1.78 STAIRWAY 123.9 124.7 (±5.2) 0.8 O. Uhlík et al.
Developments in the Built Environment 18 (2024) 100461 7 3.4. Feature preprocessing The dependent feature chosen was the mean value of the required safe egress time (RSET mean ) calculated from a set of 20 simulations. The main criteria for selecting independent features are: a) correlation with RSET mean , b) empirically verifiable variability within possible conditions, c) determination in the order of seconds during an emergency, and d) possibility of calibration in established ABEMs. Based on these criteria, a total of 7 independent features were selected. Let us have in R3 the vector x →k=[xk,yk,zk]representing the coordinates of the k-th exit and the vector y →j=[xj,yj,zj]representing the coordinates of the j-th occupant. The expression x →k−y →j= (xk−xj)2+(yk−yj)2+(zk−zj)2 √then describes the Euclidean norm that calculates the distance of each occupant to each exit. The definition of each feature is described in the following bullets: •Number of occupants (N): This is the total number of occupants detected in the object. The number of occupants is undoubtedly correlated with RSET avg , especially in scenarios where congestion occurs and RSET avg is not only determined by the pre-evacuation time of the slowest occupant. •Minimum distance to exit (ExD min ): First, the Euclidean distance of each occupants to the exit was calculated, regardless of surrounding agents or geometry. From this data, the 5th percentile was subsequently determined, followed by averaging across 20 simulations (see Eq. (1)). ExDmin =1 S∑ S i=1 percentil(x →k−y →j,0.05)(1) •Mean distance to exit (ExD mean ): The average Euclidean distance of the initial position of all occupants to the exits, averaged over the set of simulations. The parameter is intended to account for the distribution of agents in geometry (e.g., in different rooms, floors, sectors, etc.). Subsequently, a mean value is calculated for E exits, N and S simulation runs performed and is described in Eq. (2). ExDmean =1 S⋅N⋅E∑ S i=1∑ N j=1∑ E k=1x →k−y →j(2) •Maximum distance to exit (ExD max ): A parameter that specifies the probalistic maximum distance from an occupant’s starting position to an exit measured within a set of simulations (see Eq. (3)). The motivation for introducing this parameter is to capture potential outliers representing agents that are very far from exits. The evacuation time of these agents can theoretically be equal to RSET and the ExD mean parameter does not capture these extremes very well. At the same time, combining parameters ExD mean and ExD max is advantageous in cases where the mean distance of occupants to an exit is constant but occupants in geometry are located in different parts of an object for different scenarios, which has a significant effect on RSET. First, the Euclidean distance of each occupants to the exit was calculated, regardless of surrounding agents or geometry. From this data, the 95th percentile was subsequently determined, followed by averaging across 20 simulations. ExDmax =1 S∑ S i=1 percentil(x →k−y →j,0.95)(3) •Minimum distance between occupants (OccD min ): A parameter that takes into account occupant density in their initial position. It is the average of Euclidean distances between each occupant and its nearest neighbor (see Eq. (4)). Fig. 5. An example of 4 possibilities for the distribution of individuals in the model for the BOTTLENECK scenario. Fig. 6. Convergence plot for 30 simulations with individual indices and threshold set to 10 % for RSET sd, conv and 1 % for RSET mean, conv . Table 2 Maximum number of occupants for each scenario and displacement type in ABEM. Scenario Displacement Maximum occupants count Bottleneck Cluster 30 Random 80 Corridor Cluster 30 Random 100 Stairway Cluster 60 Random 200 O. Uhlík et al.
Developments in the Built Environment 18 (2024) 100461 8 OccDmin =1 S∑ S i=1 percentil (y →−y →j,0.05)(4) •Mean distance between occupants (OccD mean ): A parameter that takes into account occupant density in their initial position. It is the average of Euclidean distances between each agent and its nearest neighbor (see Eq. (5)). OccDmean =1 S⋅N∑ S i=1∑ N j=1x →k−y →j(5) •Mean walking speed (V mean ): Mean walking speed of occupants where v j denotes maximum walking speed of j-th occupant (see Eq. (6)). This parameter can be obtained by computing it from trajectories based on anonymized occupant tracking (e.g., using YOLO and DeepSort algorithms (Jiang et al., 2022), (Wojke et al., 2017)). Vmean =1 N∑ N j=1 vj(6) 3.4.1. Correlation analysis For the basic analysis of relationships between features, a correlation matrix with Pearson’s coefficient (PC) were constructed (see Fig. 1). The figure shows a positive correlation between RSET mean and features N, ExD mean , ExD max , and OccD mean . In contrast, a negative correlation is seen in the relationship of RSET mean with ExD min , V mean , and OccD min . There is a fairly strong correlation between features ExD min, ExD mean and ExD max , introducing potential multicollinearity into the model that may have negative effects on accuracy and interpretation of each feature’s Fig. 7. Correlation matrices for each scenario with Pearson coefficient. O. Uhlík et al.
Developments in the Built Environment 18 (2024) 100461 9 effects on model results. Both features carry partly the same information but their differences are described in subsection 3.4 and will therefore be retained in the training set. According to the data in Fig. 7, as expected, there is a significant positive correlation between N and RSET mean for scenarios involving congestion (BOTTLENECK and STAIRWAY). Conversely, in the WALKWAY scenario, the walking speed of individuals exhibits the most pronounced correlation with RSETmean among all variables (PC: 0.81). In the case of OccD min feature, a negative correlation is evident in the BOTTLENECK scenario, indicating that as the distance between occupants increases (low density), RSET decreases. This is particularly evident in simulations with randomly distributed individuals, where congestion does not occur at low occupant counts, and evacuation is relatively fast due to lower density. In contrast, in the STAIRWAY scenario, at low density, individuals slow down on the stairway, leading to congestion formation to a greater extent than in the BOTTLENECK scenario, despite the relatively low number of occupants. As the distance to the exit increases, both the number of occupants in the dataset (PC: 0.61) and RSET mean (−0.25) decrease. The number of occupants and their walking speed play pivotal roles here, as at low average distances to the exit and higher occupant counts, collisions, necessary decelerations, and the lane formation occur more frequently. These factors extend the RSET duration. For instance, when occupants are clustered furthest from the exit, with a minimum count of 6, combined with high walking speed distribution, RSET remains very low despite the occupants’ high average distance to the exit. In Table 3, the aforementioned correlation coefficients of individual features with RSETmean are summarized. The goal of deploying models is not statistical inference or tests, but the ability of the models to generalize to new data. For this reason, standard statistical assumptions of each model (data normality, homoscedasticity, etc.) will not be assessed. 3.4.2. Normalization The min-max scaling estimator was fit to the training set of both datasets, with the entire dataset subsequently rescaled using the estimator (see Eq. (7)). The aim of fitting the scaling estimator only on training data is to avoid the phenomenon of data leakage, i.e., information leakage from the test set to the training set. xscaled =x−xmin xmax −xmin (7) 3.5. Nested Cross-Validation The nested cross-validation technique was used to compare the individual SEMs. This technique uses 5-Fold cross-validation (Bates et al., 2023) to split the dataset into training and testing to compare the individual models (outer CV), followed by another 5-fold validation to split the training data into training and validation to find the optimal architecture for each model – hyperparameter tuning (inner CV). As mentioned earlier, the simulation dataset for each scenario consists of 1200 simulations, with each variant of input parameters simulated 20 times using the Monte Carlo method. Thus, there are 60 unique combinations of input parameters. For each combination, 20 simulations were averaged, resulting in a training dataset for SEMs comprising exactly these 60 samples. After implementing the mentioned 5-fold cross-validation, the training set consisted of 48 samples, and the testing set of 12. Consequently, it’s ultimately a relatively small dataset, which could impact the performance of individual SEMs. For each SEM, a set of variations of individual hyperparameters was selected, within which an optimal set was sought through tuning. For these purposes, 300 iterations of random search of best hyperparameter combinations were carried out. All SEMs were trained within the scikitlearn library (Pedregosa et al., 2011). The coefficient of determination R 2 (Eq. (8)) was used for SEMs comparison and mean absolute error MAE (Eq. (9)) was used as a loss function to evaluate the SEMs. Both of these metrics are commonly used in regression tasks. R2=1−∑ n i=1 (yi−yi)2 ∑ n i=1 (yi−yi)2(8) MAE =∑ n i=1 |yi−yi| n(9) The training process for each SEM was carried out in 20 repetitions to account for the randomness incorporated in the double cross-validation, enabling the results to be statistically processed. Mean values and standard deviations of R 2 are presented in the results. The contribution of each input feature to the prediction of RSET was investigated by calculating Shapley values (Eq. (10)) based on cooperative game theory (Shapley, 1953). The aim of the analysis is to determine the relative influence of each input feature on the predictions of the SEM model compared to the other input features. Table 3 RSET mean correlation with input features for each scenario. Table 4 Nested cross validation results with R 2 metric for each scenario and SEM. SEM BOTTLENECK WALKWAY STAIRWAY Train/Test Train/Test Train/Test GP 0.97 (±0.02)/0.93 (±0.06) 0.93 (±0.08)/0.70 (±0.19) 0.98 (±0.02)/0.93 (±0.07) SVR 0.97 (±0.01)/0.96 (±0.03) 0.97 (±0.01)/0.86 (±0.10) 0.98 (±0.01)/0.91 (±0.11) ANN 1.00 (±0.00)/0.99 (±0.01) 0.99 (±0.01)/0.84 (±0.16) 1.00 (±0.00)/0.99 (±0.01) LIN 0.96 (±0.00)/0.92 (±0.03) 0.82 (±0.02)/0.70 (±0.20) 0.96 (±0.00)/0.91 (±0.1) KNN 0.93 (±0.03)/0.67 (±0.36) 0.93 (±0.03)/0.74 (±0.20) 0.91 (±0.04)/0.61 (±0.50) POLY 1.00 (±0.00)/0.84 (±0.42) 0.83 (±0.25)/-9.34 (±16) 0.96 (±0.00)/0.85 (±0.29) GB 1.00 (±0.00)/0.93 (±0.09) 1.00 (±0.00)/0.92 (±0.06) 1.00 (±0.00)/0.88 (±0.15) XGB 1.00 (±0.00)/0.93 (±0.07) 1.00 (±0.01)/0.90 (±0.07) 1.00 (±0.01)/0.88 (±0.14) RF 0.97 (±0.02)/0.83 (±0.12) 0.98 (±0.01)/0.88 (±0.09) 0.97 (±0.02)/0.74 (±0.24) O. Uhlík et al.