Flood-pedestrian simulator for modelling human response dynamics 1 during flood-induced evacuation : Hillsborough stadium case study

The flood-pedestrian simulator uses a parallel approach to couple a hydrodynamic model to a pedestrian model in a 7 single agent-based modelling (ABM) framework on Graphics Processing Units (GPU), allowing dynamic exchange and 8 processing of multiple agent information across the two models. The simulator is enhanced with more realistic human-body 9 characteristics and in-model behavioural rules. The new features are implemented in the pedestrian model to factor in ageand 10 gender-related walking speeds for the pedestrians in dry zones around the floodwater and to include a maximum excitement 11 condition. It is also adapted to use age-related moving speeds for pedestrians inside the floodwater, with either a walking 12 condition or a running condition. The walking and running conditions are applicable without and with an existing two-way 13 interaction condition that considers the effects of pedestrian congestion on the floodwater spreading. A new autonomous 14 change of direction condition is proposed to make pedestrian agents autonomous in way-finding decisions driven by their 15 individual perceptions of the flood risk or the dominant choice made by the others. The relevance of the newly added 16 characteristics and rules is demonstrated by applying the augmented simulator to reproduce a synthetic test case of a flood 17 evacuation in a shopping centre, to then contrast its outcomes against the version of the simulator that does not consider age 18 and gender in the agent characteristics. The enhanced simulator is demonstrated for a real-world case study of a mass 19 evacuation from the Hillsborough football stadium, showing usefulness for flood emergency evacuation planning in outdoor 20 spaces where destination choice and individual risk perception have great influence on the simulation outcomes. 21


Introduction
Flooding can disturb local communities in and around urban hubs, putting people at risk (Flood and coastal erosion risk management policy statement, 2020). In the lead-up to, and during, urban flooding, a number of underlying factors play a key role in determining flood risk to people, including people's physical, social, and mental factors and flood-related factors, i.e. floodwater extent, depth, and velocity (Ramsbottom et al., 2006;Milanesi et al., 2015;Arrighi et al., 2017;Musolino et al., 2020;Moftakhari et al., 2018;Rufat et al., 2020;Hamilton et al., 2020;Bernardini et al., 2021). Understanding and quantifying how the interplay between peopleand flood-related factors affects the flood risk to people is a desired way forward (Aerts et al., 2018). In the context of flood risk management, there is a strategic need to develop methods and computational models to incorporate a combination of two or more of these factors (Priest, 2021). This is particularly required to make analysis of spatial and temporal changes in flood risk to people when they are directly exposed to floodwater, especially under immediate evacuation conditions (Bernardini et al., 2021). With the advances in computers, evacuation simulation models have been developed and calibrated to evaluate evacuation strategies according to the variability in the flood risk state of people. These models serve various purposes, such as finding the lowestrisk evacuation strategies by pinpointing bottlenecks, pathways, and safe areas and estimating the time required to evacuate people and the time window for issuing an early evacuation warning (Aboelata and Bowloes, 2008;Lumbroso et al., 2011;Dawson et al., 2011;Mas et al., 2015;Liu and Lim, Published by Copernicus Publications on behalf of the European Geosciences Union. 3176 M. Shirvani and G. Kesserwani: Flood-pedestrian simulator for modelling human response dynamics 2016; Bernardini et al., 2017;Zhu et al., 2019;Alonso Vicario et al., 2020).
Most of the existing evacuation models are built upon the soft agent-based modelling (ABM) paradigm for the representation of space-time distribution of a flooded population. ABM offers the flexibility needed to incorporate peoplerelated factors to study their associated interactive and collective responses, considered moving individuals, groups of individuals in a vehicle, and household units (Zhuo and Han, 2020;Aerts, 2020). ABM-based tools are usually calibrated with evacuation behavioural rules to achieve more informed predictions for flood adaptation planning and extraction of decision-relevant indicators related to the dynamics of people's responses (Aerts et al., 2018;McClymont et al., 2020;Zhu et al., 2019). To account for flood-related factors, a twodimensional hydrodynamic model is often used to feed information on the extent, depth, and velocity magnitude of the floodwater as inputs into ABM-based evacuation models, from which the interactions across and between the peopleand flood-related factors could be modelled (Dawson et al., 2011;Bernardini et al., 2017;Aerts, 2020). These interactions are organised to influence the evacuation behaviour of pedestrians, or agents, such as moving speed and stability states of people in and around the floodwater as they respond to an emergency warning while interacting with the features of an urban layout Bernardini et al., 2021). Depending on the purpose of the model design and the targeted scale of application, the representation of the interactions across and between the people-and flood-related factors seems to require different levels of sophistication for the agent characterisation and evacuation behavioural rules.
For macroscale evacuation modelling, ABM-based models were developed to simulate immediate crowd evacuation from a city, focusing on moving groups of individuals or household units using cars within a city road network to analyse response time of aware and unaware people to the immediate evacuation warning (Dawson et al., 2011;Mas et al., 2015;Liu and Lim, 2016;Zhu et al., 2019;Alonso Vicario et al., 2020). These simulation models only consider vehicular emergency evacuation, which makes them not suited to simulate the interactive and the collective responses of moving individuals, or pedestrians, in and around small hubs (< 0.5 km × 0.5 km in size), such as shopping centres or sports venues. For microscale evacuation modelling, where pedestrians need to be individually modelled, only a few ABM-based evacuation models were reported. One of these models is the Life Safety Model (https://lifesafetymodel.net/, last access: 10 January 2021) developed by BC Hydro and HR Wallingford, which allows analysis of evacuation patterns of pedestrians along streetscapes and crossings (Lumbroso and Di Mauro, 2008;Lumbroso and Davison, 2018). Another model is LifeSIM (http://www.hec.usace.army.mil/ software/hec-lifesim, last access: 10 January 2021), developed by the US Army Corps of Engineers, which is capable of simulating individuals' responses to an emergency warn-ing with the floodwater propagation, as they interact with the features of an urban layout, e.g. streetscapes and buildings (Aboelata and Bowles, 2008). These ABM-based evacuation simulation tools were developed to inform emergency plans for severe flood types, such as in the immediate aftermath of a dam break or a tsunami wave (e.g. Lumbroso et al., 2021). The focus of these tools is mainly on estimating the loss of life, pinpointing bottlenecks and high-risk areas, and assessing how flood warnings of an impending flash flood could reduce the number of casualties and injuries. For this type of risk analysis, individuals' microscopic decisions and actions are considered insignificant in influencing the overall simulation outcomes due to the scale and speed of floodwater flow. However, for the most common flood types in urban areas, e.g. surface water due to extreme rainfall, less attention has been given to model the microscopic responses, down to the scale of the moving individuals, in and around flooded urban hubs (Ramsbottom et al., 2006). In this context, Bernardini et al. (2021) imported outputs of a flood model into a commercially available evacuation modelling tool, called MassMotion, to analyse flood risk differences in microscale and macroscale modelling with and without including pedestrians' microscopic evacuation behaviour. They concluded that incorporating pedestrians' microscopic evacuation behaviour in microscale modelling could significantly influence the spatial and temporal changes in flood risk to people, i.e. up to 15 % in absolute terms, when compared to macroscale modelling. Their findings also suggest the need to further incorporate non-homogeneous characteristics of people in a more flexible microscale modelling framework, which may result in additional differences to the analysis of flood risk to people.
One first effort in designing an ABM-based evacuation simulator capable of capturing microscopic responses at a small urban scale was made by Bernardini et al. (2017). They developed FlooPEDS by incorporating the standard social force model for pedestrian dynamics (Helbing and Molnar, 1995), which was adapted to further model individuals' moving speed and stability states in floodwater. These states were implemented based on the experimental data and recommendations in Ishigaki et al. (2009), Chanson et al. (2014, and Matsuo et al. (2011), though individuals' wayfinding decisions were solely influenced by behavioural rules of the social force model. The coupling with the hydrodynamic model was used to receive information on the changes in the floodwater conditions within the urban environment. However, FlooPEDS was reported to adopt a serial approach, by running one of the social force model and hydrodynamic model at a time, and a number of simplifications to alleviate runtime and dynamic memory costs, i.e. using uniform floodwater conditions on coarse subdomains, limiting the number of pedestrians up to 300 with uniform characteristics and the simulation time to less than 600 s (Bernardini et al., 2017). Given its serial approach to the coupling, FlooPEDS is not ideally suited to incorporate the dynamic feedback from the moving pedestrians into the floodwater flow. Shirvani et al. (2021) developed a flood-pedestrian simulator by taking a parallel approach to achieve the dynamic coupling between the hydrodynamic model and the social force model, being both ABM-based and running from a single ABM framework, Flexible Large-scale Agent-based Modelling Environment for the GPU (FLAMEGPU). The floodpedestrian simulator on the FLAMEGPU framework benefits from the computational speed-up and high dynamic memory capacity of the graphics processing unit (GPU). The latter property allows it to employ as fine resolution and as large population size as needed with the hydrodynamic and pedestrian models, respectively (within the capacity of available GPU memory). This simulator is therefore supported with a two-way interaction condition to dynamically exchange agent information as it gets updated across both the social force model and the hydrodynamic model. The two-way interaction condition allows the capture of both the response of moving pedestrians to the floodwater and the back interaction of pedestrians' presence on the floodwater flow. Enabling the two-way interaction condition was found to significantly affect the model outcomes in and around congested areas: predict reduced flood risk for the pedestrians in low-to medium-risk areas and increased risk for those around highrisk areas . In Shirvani et al. (2020), the social force model of the same simulator was further augmented with empirical datasets and experimentally derived formulas to incorporate non-uniform body characteristics and more variable moving speed and stability states of pedestrian agents in floodwater. The simulator was found to predict significantly prolonged evacuation times and a higher number of at-risk pedestrians in low-to medium-risk areas in line with an increased sophistication in the pedestrian agent characteristics and behavioural rules , even without enabling the two-way interaction condition. In the latter version of the simulator, pedestrian agents were initialised to store body height and mass information, which were key human body factors considered to influence the determination of their stability states in the floodwater. Pedestrian agents were also assigned variable moving speeds that are solely based on the mechanics of the floodwater. Also, the latter version of the simulator was only applied to a synthetic test case, and it was limited to a simplified wayfinding decision rule for directing pedestrian agents to one fixed emergency exit destination (specified in advance). This means that the influence of the interplay between the two-way interaction condition and the pedestrian agent characteristics and rules on the simulation outcomes remained unexplored for real-world scenarios.
This paper presents new developments in the floodpedestrian simulator for incorporating a higher level of heterogeneity in pedestrian agent characterisation and more realistic behavioural rules than its previous version. The simulator is now augmented for real-world applications with new capabilities to account for age, gender, body height, and mass distribution of a subject population; age-and gender-related variable moving speeds of individuals in both dry and flooded zones based on realworld datasets and experimental information; and autonomous decision making of individuals in choosing one of multiple emergency exit destinations influenced by their personal perception of the risk from the floodwater or by the most popular destination selected by others.
These new developments are evaluated by analysing the associated changes induced in the simulated outcomes, by first contrasting them against the outcomes of the previous version of the simulator for a synthetic case study of a duringflood evacuation in a shopping centre and then through a new real-world case study of a mass evacuation from the Hillsborough football stadium in response to a flood emergency replicating the conditions of the November 2019 Sheffield floods. This study is one step forward in developing an evacuation simulation tool that intertwines an enhanced level of heterogeneity in agent characterisation and experimentally formulated behavioural rules for temporal and spatial microscopic flood risk analysis at the individual level. The datasets of the simulated case studies and a video supplement that visualises simulations in real time as well as the source code of the latest version of simulator on FLAMEGPU (Shirvani and Kesserwani, 2021a) including a detailed user guide are openly accessible (Shirvani and Kesserwani, 2021b;.

Overview of the flood-pedestrian simulator
The flood-pedestrian simulator dynamically couples a hydrodynamic model to a pedestrian model within the same ABM framework, FLAMEGPU ). The pedestrian model adopts a standard social force model that accounts for the dynamic interactions occurring between moving pedestrians in a built environment (Li et al., 2019;Jiang et al., 2020). The pedestrians are represented by continuous space agents, each of which autonomously move in space and over time. The movement pattern of each pedestrian agent is derived by forces for avoiding collisions with their neighbouring pedestrian agents and with the key features within the environment layout, such as boundaries of the walkable area, terrain blocks, and solid walls. The environment layout encodes force vector fields providing navigation to key destinations. These fields are stored within a grid of fixed discrete agents, forming a navigation map (Karmakharm et al., 2010). The navigation map is necessary for pedestrians' wayfinding decisions while they are directed to reach their key destinations.
The hydrodynamic model is formulated based on a non-sequential implementation of a finite-volume solver of the depth-averaged shallow water equations on a twodimensional grid on FLAMEGPU, which was validated previously in Shirvani et al. (2021). The hydrodynamic model was applied to another fixed grid of discrete agents, flood agents, which is coincident with the grid of navigation agents. A flood agent stores information of the terrain properties in terms of height (z) and Manning's roughness parameter (n M ) and the state of floodwater variables in terms of depth (h) and velocity components (u and v). The state of floodwater variables is updated over time at each simulation iteration using the hydrodynamic model that operates for all the flood agents at the same time. Each navigation agent is set to store the updated state of floodwater variables from the coincident flood agent and subsequently provide this information to the pedestrian agent(s) at their location. The recipient pedestrian agents use the flood information to change their states based on a self-evaluative assessment of two criteria: hazard rating (HR) quantity of floodwater and human body stability limits.
The HR quantity in pluvial or fluvial flooding with low probability of debris could be estimated as HR = (V +0.5)× h, where V stands for the velocity magnitude estimated as V = √ u 2 + v 2 (Ramsbottom et al., 2006;Kvočka et al., 2016). Depending on the categorisation of the HR by the UK Environment Agency (EA), pedestrian agents are set to autonomously flag themselves with one of the four flood risk states: "low" (0.0 < HR < 0.75), "medium" (0.75 < HR < 1.5), "high" (1.5 < HR < 2.5), and "highest" (2.5 < HR < 20). In a similar way, the pedestrian agents are assigned a stability state which is also indicative of their mobility or immobility inside the floodwater. The stability state of pedestrian agents is estimated based on two experimentally derived formulas reported in Xia et al. (2014). These formulas evaluate the incipient velocity limits (U c ) for toppling and/or sliding conditions of human subjects in the floodwater by weighing the body height and mass information of each pedestrian agent as well as the states of floodwater variables. Depending on the evaluated U c and the magnitude of the floodwater velocity (V ), the pedestrian agents are assigned one of four stability states: "stable condition" where they carry on moving or otherwise immobilised under "toppling-only condition", "sliding-only condition", or "toppling-and-sliding condition" (see Shirvani et al., 2020, for more information).
The simulator is also supported with a functionality to enable a "two-way interaction condition" to consider the effects that pedestrians' congestion would have on altering the floodwater hydrodynamics, which can be significant as shown in Arrighi et al. (2017) and Shirvani et al. (2021). Hence, this condition incorporates any local and temporal changes in the state of the floodwater variables in a flood agent as a result of increased accumulation of pedestrian agents over the navigation agent at its coincident location. By enabling this functionality, the navigation agent is set to count the number of pedestrian agents (N p ) that occupy its area at each time step. Then, the navigation agent uses N p to alter local energy loss by locally updating n M and passing it back to the coincident flood agent. The updated n M is applied as n updated M = n M +(N p ×n M ). The initial n M parameter is set to be equal to 0.01 s m −1/3 , representative of clear cement, and no more than 20 pedestrian agents are allowed to simultaneously occupy the area of a navigation agent, meaning that any local update in n M cannot exceed 0.2 s m −1/3 .

Age, gender, and body mass characterisation
Each pedestrian agent is set to hold information of age, gender, and body mass at the time of its generation. To randomly assign an age, gender, and body mass based on realistic distributions to each pedestrian, the UK national survey dataset (UK population by ethnicity, 2018) was used. As shown in Fig. 1, each pedestrian agent can have an age randomly selected from a range between 10 and 79 years old, and with a probability to keep the percentage of distribution of seven age groups. The excluded age groups, younger than 10 and older than 79 years old, make up 16 % of the UK population and represent children and the elderly. To compensate for their exclusion, the percentage distribution of the other age groups was increased by around 2.3 %. Each pedestrian agent is also generated with a random "male" or "female" gender, each with equal chance of selection.
Based on the age and gender of a pedestrian agent, its body mass, denoted by m p (kg), is evaluated using the following formula (Disabled World, 2017): where l p (m) stands for the body height of a pedestrian agent, which had already been incorporated within the previous version of the simulator . Here, the BMI (kg m −2 ) was randomly selected based on the ranges of age and gender listed in Table 1. For the age group between 10 and 17 years old, the BMI range was defined based on a standard for children (Prentice, 1998) and based on samples of men and women who participated in the laboratory experiments reported in Bernardini et al. (2020) for the other age groups.

Variable moving speeds
Each pedestrian agent is enabled to autonomously evaluate their variable moving speed according to their assigned age and gender and the dynamic changes in the state of floodwater flow at their location. This was achieved by introducing two new sets of behavioural rules for all the pedestrian agents, governing the motion of the pedestrian agent in dry zones (around the floodwater) and in flooded zones (inside the floodwater). To enable a pedestrian agent to discern between dry zone and flooded zone, it resorts to the state of the floodwater's depth accessible from the navigation agent at its specific location and time.
A pedestrian agent that identifies a zero depth of floodwater is automatically flagged to be in a dry zone. These pedestrian agents are set to operate based on a "dry-zone" moving speed rule under a walking condition. This rule assigns a randomly selected walking speed to a pedestrian agent from a set of predefined ranges that are classified according to different age and gender groups outlined in Table 2. The walking speed range of the 10 to 19 age group is defined according to the human's average walking speed and is the same for both male and female (Mohler et al., 2007;Toor et al., 2001). For pedestrian agents with 20 years of age and more, the range of their walking speed varies across different gender groups and is derived from an empirically identified standard proposed by Bohannon and Andrews (2011). As people are expected to move faster under evacuation conditions (Bernardini et al., 2020), pedestrian agents are applied an additional rule to increase their walking speed based on the "maximum excitement condition" identified in the experiments of Bernar- Table 2. Ranges of walking speeds for the pedestrian agents located in dry zones according to their age and gender (Toor et al., 2001;Mohler et al., 2007;Bohannon and Andrews, 2011 192 dini and Quagliarini (2020). This condition enables "male" pedestrian agents to increase their walking speed by 60 % and "female" agents to increase their walking speed by 76 %. The experimental findings of Lee et al. (2019) also suggest a faster maximum excitement condition for women, which may be associated with the fact that women have less tendency to be around floodwater compared to men (Becker et al., 2015;Hamilton et al., 2020). A pedestrian agent that identifies a non-zero depth of floodwater is automatically flagged to be in a flooded zone. These pedestrian agents are set to operate upon a "floodedzone" moving speed rule under either "walking" or "running" conditions. With this rule, each pedestrian is assigned a moving speed that is evaluated by an empirical formula extracted from the experiments in Bernardini et al. (2020). Denoting the moving speed of each individual by V p (m s −1 ), the formula reads where M is a function of specific force per unit width calculated by M = V 2 h g + h 2 g with h and V being the depth and the velocity magnitude of floodwater respectively, g is the gravitational constant, and a and b are age-related parameters defining each of the "walking" and "running" conditions, which are listed in Table 3. M is estimated at the navigation agent, where the pedestrian agent is present, from copies of h and V obtained from the flood agent at the coincident location. The validity of Eq. (2) is limited to subjects under the age of 68 and only applicable to floodwater depths between 0.2 and 0.7 m (Bernardini et al., 2020). In reality, floodwater depth can be outside these limits, and it may happen that an elderly person beyond 68 years of age is present in a flooded area. Therefore, extra rules were applied to extend the variety of moving speed of pedestrian agents in flooded zones beyond the aforementioned age and floodwater depth limits for Eq. (2).
-The moving speed of pedestrian agents with an age greater than 68 is evaluated by decreasing V p of the -Pedestrian agents encountering a depth of floodwater shallower than 0.2 m are set to maintain the dry-zone walking speed rule as they are not expected to experience significant interference from the floodwater on their walking speed (Lee et al., 2019).
-Pedestrian agents encountering floodwater greater than 0.7 m are given a moving speed informed by the stability limits reported in the UK's Flood Risks to People method (Ramsbottom et al., 2006). Namely, these pedestrian agents are only set to have a moving speed when velocity magnitude V is less than 1.5 m s −1 , or otherwise they remain immobile.

Autonomous change of direction condition
Each pedestrian agent is also featured with two extra rules to enable it to autonomously navigate into new pathways while moving within a flooded zone, where it encounters a nonzero floodwater depth from the navigation agent at its specific time and location. The first rule makes a pedestrian agent detect and choose another destination if the floodwater depth along its way becomes higher than a threshold of a floodwater depth to body height. The choice for the threshold is case-dependent, and exploring different thresholds may be necessary (Sect. 4.2.2) as an individual's flood risk perception is dependent on different factors, including past flooding experiences (Hamilton et., 2020;Abebe et al., 2020). This affects the modelling of decisions, i.e. when and where people enter the floodwater or make a move into another destination (Becker et al., 2015;Netzel et al., 2021). Applying this rule enables the pedestrian agents to make decisions on which pathway to take within an environment layout where there is no specific emergency exit at time of evacuation. The second rule applies to those pedestrian agents who remain undecided about selecting a pathway after a period of time (user-selected, Sect. 4.2.2). Such pedestrian agents are then set to detect the most popular destination chosen by the pedestrian agents within its surroundings. This rule is applied on the basis that group decisions have significant influence on the pathfinding decision of an individual in and around the floodwater (Becker et al., 2015;Lin et al., 2020).

Evaluation of the newly added characteristics and rules
The new characteristics and rules for pedestrian agents in the present version of the simulator were evaluated with a focus to assess their relevance for the analysis of pedestrian evacuation dynamics during a flood emergency (Sect. 3.3). Direct validation of agent-based models is a grand challenge as such models are aimed to study non-observable scenarios, where there are uncertainties associated with the emergent nature of behaviours and where validation datasets of such type are not available Zhuo and Han, 2020;Aerts, 2020). One alternative approach is a component-wise validation (Bert et al., 2014). This approach was used at the development stage of the dynamically coupled hydrodynamic and pedestrian models within the simulator .
To validate the relevance of in-model behavioural rules, one suitable strategy is to "take a previous model and add something" (TAPAS) (Polhill et al., 2010;Abebe et al., 2020). This strategy was previously applied by systematically increasing the level of sophistication of agent characteristics and rules and running the simulator progressively to identify their relevance by analysing the respective changes to the simulation outcomes . The TAPAS approach is also applied here to evaluate the new characteristics and rules added to the present version of the simulator, by setting it up and running it for the same test case used in Shirvani et al. (2020), Sect. 3.1, for five different configuration modes that are summarised in Table 4.

Overview of the flood evacuation in a shopping centre test case
This test case was explored with the previous version of the flood-pedestrian simulator . It is reconsidered to assess the relevance of the new characteristics and rules added to the pedestrian agents within the present version of the simulator. The test case considers a hypothetical 332 × 332 m 2 shopping centre that includes stores along its west and east sides, corridors, and seven entrance-exit doors to the open space area (Fig. 2). The total walkable area of the shopping centre, including the open area and the corridors, is equal to 70 350.8 m 2 , and 1000 pedestrian agents are generated to randomly occupy this space before the floodwater starts to propagate. The floodwater propagation was assumed to breach  from the southern side along a 100 m opening (Fig. 2). When the floodwater starts to propagate, no more pedestrian agents are generated and the remaining ones are set to autonomously move to the emergency exit located at the northern side (Fig. 2), which is the only door open during the evacuation process.
The flooding inflow was generated based on an inflow hydrograph of a discharge, Q (m 3 s −1 ), propagating over a duration of 7.5 min and peaking to 160 m 3 s −1 at 3.75 min (Fig. 3). The hydrograph was produced based on the Norwich inundation case study and because it results in a range for the HR that is inclusive of all the ranges based on the EA categorisation, i.e. HR < 7 . De- ploying a hydrograph with shorter duration or a bigger peak would lead to significantly bigger HR, which is indicative of potential loss of life or injury where a person can take very limited actions to carry on moving to the emergency exit (hence is outside the scope of this study). When the floodwater starts to propagate over the walkable area, simulation time (t) of 0 min, the pedestrian agents start the evacuation and the simulation terminates when all the pedestrian agents have evacuated the walkable area.

Simulation runs
The simulator was executed at a resolution of 2.59 m × 2.59 m for each of the grids of navigation and flood agents. The time step was taken to be the minimum between the adaptive time step of the hydrodynamic model and the 1.0 s time step of the pedestrian model (a visualisation of a simulation run can be found in the video supplement in . In each run, the simulator is set to record the information stored in the flood agents and the pedestrian agents at each time step. Recorded outputs from a simulation run include the positions of the pedestrian agents, their flood risk states (HR-related) and/or their stability states (including toppling-only, toppling-and-sliding, and sliding-only 1 conditions). As the motion of each pedestrian agent is governed by a stochastic (space-time) process, series of 10 and 20 simulation runs were conducted to average out a plausible outcome for each of the configuration modes. The plausibility of the average outputs from both series of runs is evaluated, by estimating the margin of error (MOE) assuming confidence levels ranging between 90 % and 99.9 %. The following formula is used to evaluate the MOE: where Z score is the critical value, which is equal to 1.65, 1.96, 2.17, 2.58, and 3.29 for confidence levels of 90 %, 95 %, 97 %, 99 %, and 99.9 %, respectively (Hazra, 2017); σ is the standard deviation from the sample of outputs of , with x i representing the number of pedestrians with a particular HR-related flood risk or stability state extracted from the recorded outputs, and x is the averaged value. Table 5 lists the maximum MOE evaluated for the different confidence levels, with respect to the average number of pedestrian agents under different HR-related flood risk and stability states for configuration Mode 0 to Mode 4.
For n = 10, there is a considerable increase in the maximum MOE with Mode 1 to Mode 4 compared to Mode 0. This is particularly seen for the number of pedestrian agents in low-and medium-flood-risk states (HR < 0.75 and 0.75 < HR < 1.5, respectively) and with toppling-only and topplingand-sliding stability states. This suggests that the more sophisticated the pedestrian agent characteristics and rules, the more discrepancies that would appear in the simulator's outcomes. The maximum MOE identified suggests a deviation of around ±15 from the averaged outcomes. However, when the sample size is increased to n = 20, the maximum margin of error does not exceed ±10 for all the modes and confidence levels. Therefore, the simulation results analysed next are averaged out from a sample of 20 simulation runs, subject to ±10 maximum MOE for a population of 1000 pedestrians in the flooded walkable area, which corresponds to a variance of 1 %. Figure 4 shows the trends in the number of evacuating pedestrians with different HR-related flood risk states predicted by the simulator after 20 runs using all the configuration modes (Table 4). Figure 4a represents how the number of pedestrians with a low-flood-risk state (HR < 0.75) change dur-ing 20 min of flood time. Figure 4a (left) includes the trends predicted after enabling the walking condition for the agerelated moving speeds (Mode 1) versus those predicted by further enabling the two-way interaction condition (Mode 2). In Mode 1, the trend is in good agreement with the baseline predictions (Mode 0, with non-age-related moving speeds) at flooding times when there are fewer than 100 pedestrians in the walkable area with a low-flood-risk state, from 3.5 to 7 min. A considerable difference among the predictions starts to appear when more than 150 pedestrians are present, around 2.5 and 8.5 min. This difference seems to impact the overall trend, suggesting a 6 min longer duration with a higher number of pedestrians being predicted to be under this flood risk state, from 8 to 18 min. In Mode 2, compared to Mode 1, the number of evacuating pedestrians is seen to reduce further at flooding times involving more than 150 pedestrians, around 2.5 and 10 min. This is expected as crowding of pedestrians in low-risk floodwaters would disperse the floodwater dynamics, which in turn help pedestrians evacuating ahead to pick up a faster moving speed . This does not seem to influence the collective moving speed of pedestrians, for example by generating additional congestions (as shown later in Fig. 6), as the overall trends with Mode 1 and Mode 2 are very close. Figure 4a (right) contrasts the trends predicted after activating the running condition for the age-related moving speeds (Mode 3) to those predicted by also enabling the two-way interaction condition (Mode 4). In Mode 3 and Mode 4, the trends show a considerably faster moving speed of pedestrians (than with Mode 1 and Mode 2), significantly reducing the duration when pedestrians fall under a low-risk state, suggesting outputs that are close to the baseline predictions (Mode 0). With Mode 3, discrepancies (compared with Mode 0) only occur between 2.5 and 3.5 min and after 8 min of flooding, when there are more than 150 pedestrians moving under the running condition. In Mode 4, with further enabling the twoway interaction condition, the trends remain close to those predicted under Mode 3, except at 2.5 min flooding time that involves more than 200 pedestrians under a low-flood-risk state. This suggests that activating the two-way interaction condition with the running condition may only temporarily influence the pedestrians' collective moving speed, namely when more than 200 pedestrians are caught under a lowflood-risk state. Overall, there is a major difference in the collective moving speeds of pedestrians when age-related walking vs. running speeds are deployed, leading to prolonged vs. shortened evacuation times compared to the baseline predictions (Mode 0), respectively. Also, using the two-way interaction condition seems to be a sensible choice for simulating mass pedestrian evacuations in low-risk floodwater. Figure 4b shows how the number of pedestrians with a medium-flood-risk state (0.75 < HR < 1.5) changes during 20 min of flood time. With Mode 1 (Fig. 4b, left), compared to Mode 0, a lower number of pedestrians is predicted until 6 min, just before the number of pedestrians under this  Shirvani et al., 2020); Mode 1 or Mode 2 (age-related walking condition for the moving speeds without or with the two-way interaction condition); and Mode 3 or Mode 4 (age-related running condition for the moving speeds without or with the two-way interaction condition). Analysis is presented in panels (a)-(d), each considering a different flood risk state. Table 5. Maximum margin of error (MOE) for the average number of pedestrian agents with different HR-related flood risk or stability states that are extracted from the recorded outputs of all the configuration modes (Table 4) and across different confidence levels ranging from 90 % to 99.9 %. Different ranges of the evaluated maximum MOE are highlighted with different colour shades: green, orange, and red to indicate MOE ≤ ±5, 6 ≤ MOE ≤ 9, and MOE ≥ 10, respectively. flood risk state reaches 300. This suggests that pedestrians could pick up faster moving speeds during the first 6 min of flooding, allowing them to escape medium-risk floodwaters earlier. After 6 min, the trend with Mode 1 is fairly similar to the one with Mode 0, suggesting more influence of mediumrisk floodwaters on the collective moving speed of pedestrians irrespective of their age and gender. This difference is also marginal in the trends predicted by the simulator with Mode 2 that further activates the two-way interaction condition. However, like the trends seen for the low-flood-risk state (Fig. 4a, left), the pedestrians under a medium-floodrisk state exhibit a slightly faster moving speed when their number is over 300. Again, this could be related to more dispersions in floodwater dynamics due to large crowding, al-lowing the pedestrians located ahead to maintain faster moving speeds. By instead using the age-related running condition under Mode 3 (Fig. 4b, right), the trend observed is pretty similar to that with Mode 0, with slight differences appearing after 6 min of flooding. Further enabling the twoway interaction condition (Mode 4) induces more reduction in the predicted number of pedestrians during the time of the flood when the crowding is at its peak, between 6 and 8 min (Fig. 4b, right). Also, the collective moving speed of pedestrians under either Mode 3 or Mode 4 is predicted to be similar to those under Mode 1 and Mode 2 for the pedestrians in a medium-flood-risk state. Hence, running the simulator with configuration Mode 1 to Mode 4 does not seem to make a major difference in the trends for the pedestrians with  Shirvani et al., 2020); Mode 1 or Mode 2 (age-related walking condition for the moving speeds without or with the two-way interaction condition); and Mode 3 and Mode 4 (age-related running condition for the moving speeds without or with the two-way interaction condition). Panels (a) and (b) include the stability states with a toppling-only condition and a toppling-and-sliding condition, respectively, when immobilised in floodwater. a medium-flood-risk state, all predicting considerably fewer numbers evacuating during early flood times before crowding occurs (compared to Mode 0). Figure 4c shows how the number of pedestrians with a high-flood-risk state (1.5 < HR < 2.5) changes during 20 min of flood time. For pedestrians with this flood risk category, running the simulator with Mode 1 to Mode 4 leads to major differences in the trends compared to those predicted under Mode 0. With Mode 1 to Mode 4, only a handful of pedestrians are predicted to have a high-flood-risk state, from 3 to 5 min of the flooding, in contrast to what the simulator's prediction with Mode 0 suggests: up to 140 pedestrians within a time window of 4 min. Hence, using the age-related moving speed, under either the walking condition or the running condition, seems to make a difference in the predicted trends in the number of pedestrians with a high-flood-risk state. The impact of the two-way interaction condition on the trends of such pedestrians can be detected by analysing the difference between the predictions made under Mode 1 and Mode 2, for the age-related walking condition (Fig. 4c,  left), and between Mode 3 and Mode 4, for the age-related running condition (Fig. 4c, right). As can be seen, only a slightly higher number of pedestrians with a high-flood-risk state is predicted when the two-way interaction condition is also enabled, suggesting that it does not lead to major differences. Figure 4d shows how the number of pedestrians with a highest-flood-risk state (2.5 < HR < 20) changes during 20 min of flood time. In this case, with Mode 1 to Mode 4, the simulator predicts only one or two pedestrians that could fall into this flood risk state around similar flood times predicted under Mode 0, which predicts a couple more pedestrians under this flood risk state. This implies that using the agerelated moving speeds can potentially predict fewer pedestrians that would be in the highest-flood-risk state. The trends predicted by the simulator using Mode 1 and Mode 3 are similar, indicating that using any of the running or walking conditions would lead to similar outcomes to inform on evacuating pedestrians with the highest-flood-risk state. These conditions combined with the two-way interaction condition (Mode 2 and Mode 4) lead to a slightly higher number of pedestrians with this flood risk state, as these pedestrians would be more affected by the local changes induced in the local floodwater dynamics from those pedestrians with a lowrisk state crowding ahead. Hence, either Mode 2 or More 4 seems to be a sensible configuration for the simulator to plan evacuation case studies involving more severe flooding scenarios. Figure 5 shows the trends in the number of evacuating pedestrians with different stability states averaged from the simulator predictions after 20 runs for all the configuration modes (Table 4). Pedestrians seem to be under either the toppling-only condition (Fig. 5a) or the toppling-andsliding condition (Fig. 5b), with no pedestrians spotted under a sliding-only condition. The trends predicted with the simulator under Mode 1 to Mode 4 lead to a similar timing as the baseline prediction under Mode 0, when pedestrians potentially had toppling-only and toppling-and-sliding states: they show that these stability states could be detected from 2 to 8 min and from 2 to 6 min, respectively. These flood times are found to contain a large number of pedestrians with lowto medium-risk states ( Fig. 4a and b), suggesting that the majority of pedestrians within these flood risk states could be in toppling-only and toppling-and-sliding stability states. By also contrasting the outputs obtained from simulations under configuration Mode 1 and Mode 3, a very similar trend could be observed for the pedestrians with toppling-only (Fig. 5a) and toppling-and-sliding (Fig. 5b) stability states. This is also observed for the results with the simulator under Mode 2 and Mode 4, suggesting that age-related moving speeds lead to similar information on the stability states when the pedestrians have a low-to-medium-flood-risk state regardless of whether the two-way interaction condition is activated or not. Contrasting the trends without (Mode 1 and Mode 3) and with the two-way interaction condition (Mode 2 and Mode 4) shows notable reductions in the number of pedestrians at 6 min (Fig. 5a) and 4.6 min (Fig. 5b), during which large crowds (> 200 pedestrians) were caught with medium risk states (see Fig. 4b). This observation suggests that running the simulator with age-related moving speeds with the twoway interaction condition (Mode 2 or Mode 4) is a sensible choice to study the stability state of large crowds in floodwater imposing low to medium risks to pedestrians. The evacuation patterns of pedestrians are analysed next through comparing their spatial distribution at 6 min of flood time across all the simulation modes, where the highest number of pedestrians are predicted to be in a medium-flood-risk state and the largest discrepancy in the number of pedestrians with a toppling-only condition is observed (see Figs. 4b and 5a). Figure 6 compares the spatial distributions of the evacuating pedestrians over the flood HR map at a flood time of 6 min, obtained from simulator runs under Mode 1 to Mode 4. In each of the sub-plots, the framed 50 × 50 m 2 before the emergency exit includes the number of pedestrians in that area, where the congestion of pedestrians is assessed for the different modes. With all the modes, the simulator predicted a dominance of medium-risk floodwaters (0.75 < HR < 1.5) over the walkable area, causing the majority of the pedestrians to fall into a toppling-only condition (purple dots) and a minority to have a stable condition (green dots) in front of the emergency exit and from the left side of the crowd. By contrasting the spatial distribution of pedestrians obtained from Mode 1 and Mode 2 (upper pan-els), there seems to be a considerable increase in the number of pedestrians with a stable condition when the two-way interaction condition is enabled with the walking condition (Mode 2). The same pattern is observed with Mode 3 and Mode 4 (lower panels), but this is accompanied by a shift in the position of pedestrians towards the front, as expected for the running condition. On the other hand, by contrasting the number of pedestrians in the small square obtained from Mode 1 and Mode 3 (left panels), it can be observed that enabling the running condition results in a decrease in the congestion of pedestrians in front of the emergency exit. The opposite pattern is observed when enabling the two-way interaction condition in Mode 2 and Mode 4, showing an increase in the congestion of pedestrians under a running condition compared to the walking condition. Hence, using the two-way interaction condition with the simulator may be useful to more realistically evaluate bottlenecking impacts of an evacuation process.

Analysis of flood risks to people
In terms of total evacuation time for the 1000 pedestrians, averaged results after 20 runs show that it takes 13.8 min with Mode 0, 18 min with Mode 1, 18.1 min with Mode 2, 12.5 min with Mode 3, and 12.3 min with Mode 4 to allow all the pedestrians to leave the walkable area. Contrasting the predicted times reinforces previous findings from Fig. 4: compared to Mode 0, the age-related walking speeds, either with or without the two-way interaction condition (Mode 1 and Mode 2, respectively), lead to slower evacuation speed predictions that become faster under the running condition.
Next, the simulator will be applied to analyse a scenario of mass evacuation of pedestrians during a pluvial flood, leading to low-to medium-risk floodwaters in an urban neighbourhood. Supported by the analysis in Sect. 3.2 and 3.3, the simulator's configuration will be based on Mode 2 to produce conservative estimations of the evacuation time for planning and decision making.
4 Real-world case study

Background and scenario description
The case study consists of a site located outside of the main entrance of Hillsborough football stadium in Sheffield. The location of the site is framed with a dark red square in Fig. 7, including an area of 16 384 m 2 that is adjacent to the eastern side of the stadium, where the main entrances are located (yellow line, Fig. 7). The stadium entrances are opened to a T junction that constitutes the walkable area whose boundaries are indicated by solid red lines. This area includes the main roads, main stadium entrances, and pedestrian pathways to usual destinations to the south, east, and north. These destinations, shown with the green lines in Fig. 7, are the most likely choices for a spectator leaving the stadium.
The stadium can accommodate up to 39 732 spectators with an average attendance rate of 24 000 per home Figure 6. Spatial distribution of pedestrian agents, represented by coloured dots, predicted by the simulator under Mode 1 to Mode 4 at 6 min after flooding. The grey colour represents the floodwater extent based on the flood HR quantity, and the square before the emergency exit represents an area of 50 × 50 m 2 with a number printed alongside it representing the number of pedestrians in that area.
football match in normal weather conditions (Sheffield Wednesday, available at https://www.footballwebpages.co. uk/sheffield-wednesday, last access: 21 January 2021). This site would therefore encompass a large number of spectators before or after a match, even in the aftermath of a flood as, for example, observed during the 2007 summer floods (The Sheffield Guide by DeeJayOne, 2007;Environment Agency, 2007). The event suggests that rainfall runoff would cause floodwaters to spread from the east and north to accumulate in front of the main stadium entrances, where it could submerge walking pathways, parking lots, and the stadium pitch (Bring on the sub, 2007). Worries of a similar event were expressed during the November 2019 floods driven by continuous 7 d rainfall of 63.8 mm over the city of Sheffield (Pugh, 2019), which led to cancellation of a football match as the flood defence protecting the stadium from River Don was about to be overtopped by the floodwater. The event, if it happened during the football match, could put many in and around the stadium at high risk.
This site, being both adjacent to River Don and located down the hills where rainwater runoff accumulates, has been flagged to be prone to future pluvial or fluvial flood types according to the EA's flood information service that is available online at https://flood-warning-information.service.gov. uk/long-term-flood-risk (last access: 21 January 2021). This service provides flood maps for identifying long-term risks in Figure 7. The study site (red square) including the walkable area (red area within the red square) people normally use to go to their different destinations located on the south, east, and north sides of the walkable area (green lines) after they leave the stadium from the main entrances (yellow line), © Google. parts of UK towns based on a "low", "medium", and "high" annual probability of occurrence. By entering the Hillsborough stadium postcode, S6 1SW, the flood maps showing the approximate ranges of the expected floodwater depth and velocity magnitude for the study site (Fig. 7) were obtained, as shown in the screenshots in Fig. 8. The floodwater depth map associated with a high annual probability (Fig. 8a, left panel) represents the least extreme scenario, where the range for the floodwater depth is likely to vary between 0.3 and 0.9 m to potentially cover the northern branch of the walkable area with velocity magnitudes greater than 0.25 m s −1 . For a medium annual probability of occurrence (Fig. 8a, middle panel), the flooding extent could widen to potentially obstruct both northern and eastern branches, with the range of floodwater depths reaching beyond 0.9 m and a much wider extent for velocity magnitudes greater than 0.25 m s −1 mostly along the eastern branch (Fig. 8b, middle panel). For a low annual probability of occurrence (Fig. 8a, right panel), an even wider flood extent would be expected up to almost submerging the entire walkable area with a dominance of floodwater deeper than 0.9 m along the northern branch and velocities higher than 0.25 m s −1 on the north, east, and the sides of the southern branch. Even in the most optimistic flooding scenario, at least the northern branch near the stadium's entrance would be affected, where an evacuating spectator during a flood has to wade through floodwaters at a depth that is between 0.3 and 0.9 m and velocities higher than 0.25 m s −1 . Therefore, investigating the dynamics of how people respond in a during-flood evacuation is of paramount importance for the selected study site.
To do so, it was assumed that the site in Fig. 7 is hit by a flood during a football match where the spectators are caught unaware of the rainfall accumulation around the stadium, similar to the event that could have happened in 2019. As discussed before, the floodwater is likely to accumulate from the north and east sides to move downhill towards the main entrance of the stadium. Once the floodwater has reached the stadium's main entrances, an emergency evacuation alarm is issued, urging people to start evacuating immediately. The spectators are then put into queues inside the stadium to be evacuated towards the walkable area. The evacuating spectators gradually enter the walkable area where they come in direct contact with flooded areas along their ways to any of the south, east, or north destinations. In this scenario, a population of 4080 spectators was assumed, which is lower than normal due to the severe weather condition and flood warnings issued prior to the event. This population is around 20 % of the spectators expected and represents the relative number of people who would ignore the warnings and attend the match (Fielding et al., 2007).
For this case study, a dispatch measure was introduced to the simulator to release the evacuees into the walkable area during the flooding. The dispatch measure limits the influx rate to person per second per width unit to comply with guidance methods for controlling the density of large crowds outside the stadiums for safe evacuation (Minegishi and Takeichi, 2018;Still, 2019). For a gate that is around 4 m wide, four pedestrians per second are dispatched from the stadium to the walkable area. Using the simulator with this dispatch rate limits the overall number of pedestrians that would be present in the walkable area at a time. Therefore, running the simulator to analyse the evacuation of a larger number of spectators is expected to lead to similar risk trends based on pedestrians' different HR-related flood risk and stability states, which would only be prolonged over a larger evacuation time.
The flood-pedestrian simulator is applied to analyse how the number of pedestrians with different HR-related flood risk and stability states changes under this scenario with a further focus on modelling their preference for the destination choice during the flood evacuation, by activating the "autonomous change of direction" condition (Sect. 2.2.3).

Hydrodynamic model set-up
The hydrodynamic model was set up to run on a grid of 128 × 128 flood agents. The grid of flood agents (equally for the grid of navigation agents) was set to store the terrain features of the study site, loaded from a digital elevation model (DEM) at 1 m resolution, which is available online Figure 8. Screenshots of EA's flood risk maps of the study site showing the extent of flooding from surface water with "low", "medium", and "high" annual flooding probabilities featuring different floodwater ranges of (a) depth and (b) velocity. These screenshots were retrieved from https://flood-warning-information.service.gov.uk/long-term-flood-risk (last access: 21 January 2021) (credit: © Crown and database rights under Open Government Licence v3.0). from the UK's Department for Environment Food & Rural Affairs (DEFRA) lidar survey at https://environment.data. gov.uk (last access: 15 January 2021). To the best of the authors' knowledge, there is no record of any observed hydrograph sampled at a gauge point located at the selected study site. Therefore, the flooding flow was generated by formulating an inflow hydrograph based on the November 2019 rainfall volume (Fig. 9). The hydrograph was set to replicate a total runoff volume accumulation of 1045.3 m 3 based on a 0.0638 m rainfall over the entire 16 384 m 2 site. This volume was estimated using the direct runoff method: rainfall volume (m 3 ) is equal to rainfall height (m) times area (m 2 ). The hydrograph was generated as where Q t (m 3 s −1 ) is the inflow discharge propagating along the northeast boundary intersecting the eastern branch; Q peak (m 2 s −1 ) = 0.29 is the peak discharge, which was calculated by distributing the runoff volume (1045.3 m 3 ) per Figure 10. Outputs of the simulator generated after and during 10 min of a single hydrodynamic run without pedestrian consideration plotted in terms of (a) floodwater depth map and temporal changes in the average floodwater in terms of (b) depth and (c) velocity.
second over an hour of flooding; Q initial (m 3 s −1 ) is the initial discharge, taken as 0 m 3 s −1 ; t (min) is the simulation time varying between 0 and 10 min; β = 10 is a constant to soften the shape of the hydrograph; and t peak (min) = 5 is the time of peak discharge. This choice, for t peak , considers the peak discharge has been reached halfway during the flooding to cause the propagating floodwater to reach to the main stadium entrances by 10 min, leading to triggering the evacuation alarm.
To ensure that the resulting ranges of floodwater depth and velocity magnitude generated by the hydrograph in Fig. 9 fit the expected ranges of floodwater depth and velocity reported by the EA, a run was conducted without pedestrian consideration. Figure 10a shows the map of the predicted floodwater depth after 10 min of flooding, while Fig. 10b and c include the time series of the mean floodwater depth (h) and velocity magnitude (V ) in the lead-up to 10 min, respectively. From the floodwater depth map, it can be seen that the spatial distribution of floodwater depth varies between 0.3 and 0.9 m inside the walkable area at the time when pedestrians start to evacuate. By this time, Fig. 10b and c suggest that the mean floodwater depth is at its deepest level of 0.5 m and the velocity magnitude reduces to 1.5 m s −1 . In addition to confirming that the generated hydrograph leads to a realistic flood event in line with the EA's expectations, these results indicate that a pedestrian evacuating into the floodwaters shown in Fig. 10a would be under a low-to mediumflood-risk state with an HR value estimated around 1 (can be extracted by the end of the time series in Fig. 10b and c).

Pedestrian model set-up
The pedestrian model was also set up for a grid of 128 × 128 navigation agents encoding the topographic features of the site into the navigation map as well as the boundaries, location of entrances, and destinations about which the pedestrian agents receive information. The pedestrian model was set to gradually generate 4080 pedestrian agents with a rate of four pedestrian agents per second starting at simulation time t = 0 min. Once a pedestrian agent is generated, it is assigned a random (initial) destination between the south, east, or north ( Fig. 7) with an equal probability of selection.
As the case study consists of an outdoor urban environment with multiple destination choices, the pedestrian agents are set to dynamically alter their initially assigned destination by activating the "autonomous change of direction" condition (Sect. 2.2.3). This condition allows pedestrian agents to auto-select new pathways after analysing the state of the floodwater variables received from the navigation agent at their current location. As explained in Sect. 2.2.3, this condition requires specifying a threshold of floodwater depth to body height beyond which a pedestrian agent considers shifting their walking direction and looking for a new destination within 100 s. After this period, if the pedestrian agent remains undecided, it is set to pick the destination selected by the majority of its neighbouring pedestrian agents, on the basis that it was influenced by the choice of others around (Sect. 2.2.3).
For the "autonomous change of direction" condition, three thresholds of floodwater depth to the body height (Fig. 11) were selected, informed by the experiments in Dias et al. (2021). This was done to account for the uncertainty associated with individuals' different risk perception. The "20 % threshold" was defined to represent people with high risk perception, such as those who previously experienced a critical flooding incident and decide not to enter floodwater with a depth that is more than 20 % of their body height. This threshold is estimated based on the ratio of the dominant minimum value for the depth of floodwater that can occur over the walkable area (0.3 m) to the height of the shortest pedestrian agent available (1.4 m). With this threshold, the likelihood of the entire population to be in a condition to change their direction is ensured. The "40 % threshold" was defined to represent people with low risk perception, such as those who have not yet experienced a flood incident and decide to enter a floodwater with a depth that is even more than 40 % of their body height. This threshold is estimated based on the ratio of the dominant maximum depth of floodwater (0.9 m) to Figure 11. Thresholds of floodwater depth to body height that are specified for pedestrian agents to accommodate uncertainty associated with different risk perception of people in the real-world case study.
the height of the tallest population of pedestrian agents available (2.1 m). This threshold enables the entire population to have the freedom to keep moving even within the deepest floodwater in the walkable area (0.9 m). The "30 % threshold" accounts for an average risk perception, such as those who previously experienced a minor to moderate flooding incident. Pedestrians with average-risk perception would decide to enter floodwater up to their knees, which constitutes 30 % of the human body height (Teichtahl et al., 2012).
The characteristics of pedestrian agents were adapted to consider the age, gender, and height distribution of football fans in the UK. Therefore, the randomised age distribution reported in Sect. 2.2.1 was increased by 5 %, 8 %, and 4 % for the age groups of 30 to 39, 40 to 49, and 50 to 59 to replicate the higher attendance of these age groups to live sports events in England (Lange, 2020). Also, the randomised gender distribution was changed to 67 % males and 33 % females based on a survey on the gender distribution of football fans in the UK (Statista Research Department, 2016). In terms of body height, the pedestrian agents were based on the same UK body height distribution used previously .

Simulation runs
A series of 20 simulation runs was performed under configuration Mode 2 for each of the 20 %, 30 %, and 40 % thresholds for the "autonomous change of direction" condition (visualisation of a simulation can be found in the video supplement in . Each run was set to start at t = −10 min to allow the floodwater to propagate for 10 min so that the evacuation process starts at t = 0 min. Outputs averaged from each series of simulations included spatial and temporal information, at each time step, about the pedestrian agents as they evacuate (t > 0 min). The averaged outputs in- Table 6. Maximum margin of error (MOE) for the average number of pedestrian agents with different HR-related flood risk or stability states that are extracted from the recorded outputs throughout the simulations for each 20 %, 30 %, and 40 % threshold. Different ranges of the evaluated maximum MOE are highlighted with different colour shades: green, orange, and red to indicate MOE ≤ ±5, 6 ≤ MOE ≤ 9, and MOE ≥ 10, respectively. clude the position, HR-related flood risk state, stability state (with a toppling-only condition, toppling-and-sliding condition and sliding-only condition), and the choice for the destination selected by the pedestrian agents during the evacuation process. Considering the stochastic uncertainties associated with the motion of the pedestrian agents, the plausibility of the averaged outputs from the 20 runs was evaluated. The evaluation was based on the MOE, using Eq. (3), for the 99.9 % confidence level only, informed by the results of the analysis in Sect. 3.2. Table 6 shows the maximum MOEs found for the number of pedestrians predicted to be in the considered HR-related flood risk and the stability states, obtained from the 20 runs using each of the 20 %, 30 %, and 40 % thresholds. It can be seen that the maximum MOE increases as the risk perception level decreases, suggesting a notable increase in the uncertainty after the incorporation of the risk perception component into the modelling of pedestrian behaviours.
Next, the averaged outputs are analysed for each of the 20 %, 30 %, and 40 % thresholds, considering the popularity of the destination selected by the pedestrian agents (among south, east, and north) together with their HR-related flood risk and stability states. Figure 12 shows the trends in total number of evacuating pedestrians in the walkable area, plotted according to the pedestrians' choices among the south, east, and north destinations, obtained from simulations with the 20 %, 30 %, and 40 % thresholds. All the simulated trends show a decrease in the total number of pedestrians after 25 min of flooding. This suggests that 25 min would be required for the 4080 pedestrians to vacate the stadium and that the choice for the threshold does not have any effect on the collective evacuation time.

Analysis of the results
The simulated trends obtained with the 20 % threshold are shown in Fig. 12a, suggesting that most of the pedestrians evacuated the walkable area within almost 40 min. The ma- jority of the evacuating pedestrians start favouring the south destination after 2.5 min, indicating that after this time pedestrians encounter floodwater depth beyond 20 % of their body height, which seems to be extending over the eastern and northern branches. After 2.5 min, the south destination remained the most popular destination, selected by more than 55 % of the pedestrians, whereas the east and north destinations were less popular, selected by 25 % and 20 % of the pedestrians, respectively.
With the simulated trends obtained with the 30 % threshold (Fig. 12b), a longer evacuation time is predicted for the majority of the evacuating pedestrians. Now it takes about 52 min for most of the pedestrians to leave the walkable area, and the popularity of the east and north destinations increased, with slightly more evacuating pedestrians preferring them, about 27 % and 23 %, respectively. This suggests that 5 % more of the pedestrians considered changing their destination to the north where the floodwater depth can only reach up to their knee height. Still, as with the 20 % threshold, the south destination was the most popular and started to be favoured after 5 min by 50 % of the pedestrians.
With the simulated trends obtained with the 40 % threshold (Fig. 12c), a significant change in the favoured destination is observed alongside a relatively more prolonged evacuation time. Now, it takes about 57 min for most of the pedestrians to evacuate the walkable area and the popularity of the south destination decreased significantly, compared to the predicted trends obtained with the lower thresholds. Here, the south destination was only picked by 25 % of the pedestrians, and the north destination was preferred instead (by around 50 % of the pedestrians) since the beginning of the evacuation. As for the east destination, it remained equally popular as with the trends obtained with the lower thresholds and was selected by around 25 % of the evacuating pedestrians.
The simulated trends in Fig. 12 imply that the south destination would be preferred by people who are less likely to enter floodwater with a depth beyond their knee height and that the north destination would be preferred by those willing to enter the deeper floodwater. The results also suggest longer evacuation times when people are willing to enter the floodwater at a depth beyond their knee height.
The trends for HR-related flood risk states and stability states averaged from simulations for each of the 20 %, 30 %, and 40 % thresholds are shown in Fig. 13. Figure 13 (left) includes the HR-related flood risk states as well as the total number of evacuating pedestrians in the walkable area. As the threshold increases, the total number of pedestrians in the walkable area is seen to increase, leading to prolonged evacuation times. This observation is aligned with the trends in Fig. 12, suggesting that the evacuation process would be delayed as more evacuating pedestrians enter the deeper floodwater where their moving speed reduces. The number of pedestrians in dry zones remains constant, despite the choice for the threshold. This may be expected as these pedestrians represent those who initially decided to go to the south destination (one-third of the pedestrians) and did not, therefore, find a need to alter their destination during the process given the dominance of dry areas over the southern branch (see Fig. 10a). For the three thresholds, the majority of the evacuating pedestrians were found to keep a low-flood-risk state (HR < 0.75). Up to around 70 and 240 evacuating pedestrians reached a medium-flood-risk state (0.75 < HR < 1.5) with the 30 % and 40 % thresholds, respectively, and no pedestrians were predicted to have the latter flood risk state with the 20 % threshold. Up to only five pedestrians were detected at a high-flood-risk state (HR > 1.5), namely from those who entered the floodwater at a depth beyond 40 % of their body height.
The number of evacuating pedestrians that could have a stability state with a toppling-only or toppling-and-sliding conditions is shown in Fig. 13 (right). For the 20 % threshold, very few pedestrians were found to have these stability states, up to only three. Findings in Shirvani et al. (2020) suggest that these could be pedestrians with a low-flood-risk state (HR < 0.75) with a toppling-only condition or with a medium-flood-risk state (0.75 < HR < 1.5) with a topplingand-sliding condition. The number of pedestrians with these stability states increased with the threshold of 30 %, which is expected given the increased number of pedestrians under low-to medium-flood-risk states evacuating over a longer period. Up to 40 and 20 more pedestrians were found in toppling-only and toppling-and-sliding conditions, respectively. With the 40 % threshold, 25 more pedestrians were found to be in a toppling-and-sliding condition, and up to 100 more were found to be in a toppling-only condition. The significant increase in the number of pedestrians with a topping-only condition is expected with the 40 % threshold, for which more pedestrians would be entering the floodwater where its depth is beyond their knee height.
The analysis of the HR-related flood risk and stability states suggests that the majority of people evacuating the stadium would take an evacuation route that is either dry or keeps them under a low-flood-risk state (HR < 0.75) with a toppling-only condition during the evacuation. Fewer people would enter deeper floodwaters and, when they do, they are expected to be in a medium-flood-risk state (0.75 < HR < 1.5) where they can have a toppling-and-sliding condition. Figure 14 shows the 2D spatial distribution of the evacuating pedestrians over the HR flood map at 25 min when pedestrian presence in the walkable area is at its highest as soon as everyone vacates the stadium. The pedestrians are represented by dots, with different colours representing their stability state based on the predictions made with the 20 %, 30 %, and 40 % thresholds. The evacuation patterns in Fig. 14, though, retrieve the observations made before (through Figs. 12 and 13) and demonstrate the simulator's further ability to inform on the potential locations where the evacuating pedestrians are expected to be immobilised by the floodwater. With the 20 % threshold (Fig. 14a), most of the pedestrians remained mobile in the floodwater (stable condition) and preferred the south destination where low flood HR dominates. From the remaining pedestrians, who preferred the east or north destinations, a handful were at risk of immobilisation (toppling-only or toppling-and-sliding conditions). These stability states are observed to occur particularly within northern and eastern branches where the flood HR varied from the upper low range to the medium range. The spatial distributions predicted with the 30 % threshold (Fig. 14b) also suggest a preference for the south destination by most of the pedestrians and that many more pedestrians would be expected to be immobilised by the floodwater within the eastern and northern branches. There, at least a dozen would have a stability state with a toppling-and-sliding condition caused by the relatively higher number of pedestri- ans who kept moving to the north and east destinations. With the 40 % threshold (Fig. 14c), most of the pedestrians were still found to remain mobile in floodwater (stable condition) despite the fact that the (riskiest) north destination was the dominant choice. However, the spatial distributions predicted with this threshold point to a major increase in the number of immobilised pedestrians within the aforementioned vicinities.
The analysis in Fig. 14 suggests that people who avoid entering a floodwater depth beyond their knee height are most likely to select the south destination, where their condition remains stable to keep evacuating with minimum risk of immobilisation. Those with a tendency to enter deeper floodwaters would go to the east or north destinations, towards which the majority would still be able to evacuate, but at a slower pace delayed by the risk of facing immobilisation as they move forward to their selected destination. Overall, the predictions produced by the simulator (Figs. 12 to 14) seem useful in planning evacuation in outdoor spaces where the behaviour of pedestrians could be influenced by their autonomous decision making on the safest destination driven by their personal risk perception of the local floodwater and body height.

Summary, discussions, and limitations
The flood-pedestrian simulator was augmented to incorporate an enhanced level of heterogeneity in the pedestrian agent characterisation and realistic in-model rules governing their response to the floodwater. Pedestrians can now be characterised by age, gender, and body mass attributes based on real-world datasets. The present simulator was also supported by a set of empirically based age-and genderrelated moving speeds driving the motion of pedestrian agents around and inside the floodwater and with a maxi-mum excitement condition to accelerate the walking speed of pedestrian agents around the floodwater. The moving speed could also be intertwined with a two-way interaction condition to model the influence of pedestrian congestion on flowing floodwater, and vice versa. A new autonomous change of direction condition was proposed to model the wayfinding decisions of pedestrian agents based on their individual perception of the flood risk in relation to the local changes in floodwater dynamics or the choice of others. The added features have enabled application of the simulator for outdoor spaces including multiple potential destinations for the pedestrians to detect during a flood evacuation.
The relevance of the added features was evaluated for a test case of a flood-induced evacuation in a shopping centre, which consists of an indoor space and was previously investigated for a basic version of the simulator with simpler pedestrian agent characterisation and behavioural rules. The evaluation procedure was based on systematically activating any of the added walking or running moving speeds with or without the two-way interaction condition in the simulator and then analysing the changes induced in the simulation outcomes with reference to the baseline results. The analysis contrasted temporal and spatial changes in the number of pedestrians in relation to their HR-related flood risk and stability states, indicating major differences to the baseline results. The differences in the predicted number of pedestrians seems to vary considerably, up to hundreds, depending on the density of the crowd as the flood risk becomes low to medium. Also, the analysis suggests longer evacuation times with the walking condition, but using the running condition has led to close evacuation times compared to baseline results.
The utility of the simulator, with the new autonomous change of direction condition, was then demonstrated over a real-world case study of evacuation of spectators from Sheffield's Hillsborough football stadium into a T junction outdoor space leading to three ends towards the south, east, and north destinations. The simulator was set up to replicate historical extents and depths of the floodwater that would inundate this study site. The autonomous change of direction condition was applied based on three thresholds of a floodwater depth compared to body height: 20 % threshold, 30 % threshold, and 40 % threshold, representative of a high, medium, and low level of people's risk perception, respectively. The simulation outputs suggest that when people exhibit high to medium risk perception by avoiding zones with floodwater depth beyond their knee height, the majority change direction to go to the south destination that has the highest portion of dry zones. Conversely, when people exhibit a low risk perception and enter floodwaters higher than their knee height, the majority would take the shallowest pathway leading to the north destination. As the risk perception level decreased, the simulation output showed an increase in the number of people in a medium-risk state with an immobilised condition and longer evacuation time. The investigations of the real-world case study demonstrate that the flood-pedestrian simulator can be used to analyse the dynamics of people's responses in and around the floodwater as part of the flood risk analysis; thus, it is a useful tool for planning evacuation of crowds in flood emergencies in small and potentially congested urban areas.
However, the flood-pedestrian simulator has a number of considerations and limitations that are worth mentioning. Firstly, the simulator requires the accessibility to a graphical processing unit (GPU) card, and the generation of input files requires special .xml translation specific to FLAMEGPU and using the FGPUGridNavPlanEditor toolkit, which is also made available online at https://github.com/RSE-Sheffield/ FGPUGridNavPlanEditor (last access: 18 December 2020). Secondly, the simulator can provide a live visualisation showing hydrodynamic and pedestrian information changing in real time, when run on Windows using the console mode . Thirdly, in terms of pedestrian characteristics, the simulator does not incorporate the uncertainties associated with social and psychological characteristics of people, e.g. flood tourism, as well as their floating and sinking conditions. Lastly, but not least, the assumptions and thresholds used to implement the two-way interaction condition and the autonomous change of direction condition are both lacking any existing empirical evidence base supported by dedicated laboratory experiments.
Code availability. The flood-pedestrian simulator is accessible from the Zenodo open-access repository at https://doi.org/10.5281/zenodo.4564288 (Shirvani and Kesserwani, 2021a), with a link to the GitHub source codes of the latest release, including a detailed "run guide" and input files to enable the users to run the flooded shopping centre and the Hillsborough stadium evacuation test cases on their own machine. The previous version of the simulator is also available on DAFNI, available at https://dafni.ac.uk/project/flood-people-simulator/  where it can be run from a user-friendly graphical interface and supported by a run guide.
Video supplement. Demo videos of the test cases are available online in the TIB AV-Portal at https://doi.org/10.5446/51547 (Shirvani, 2021).
Author contributions. MS contributed to developing the simulator, design of the test cases, running simulations, obtaining outputs, and figure preparation. GK proposed the research approach and supervised the development, testing, scenario configurations, and analysis of the outputs and obtained the research grant. MS and GK prepared the manuscript. All authors read and approved the final paper.
Competing interests. The authors declare that they have no conflict of interest.
Disclaimer. Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Acknowledgements. This work is part of the SEAMLESS-WAVE project (https://www.seamlesswave.com, last access: 6 February 2021). The authors wish to thank Paul Richmond and the Research Software Engineering (https://rse.shef.ac.uk/, last access: 6 February 2021) group for providing technical support during the implementation of the flood-pedestrian simulator on FLAMEGPU.
Financial support. This research has been supported by the UK Engineering and Physical Sciences Research Council (grant no. EP/R007349/1).
Review statement. This paper was edited by Lindsay Beevers and reviewed by Maurizio Mazzoleni and two anonymous referees.