Predictive Agent-Based Crowd Model Design Using Decentralized Control Systems

As a complex system, crowd dynamics emerge bottom-up from the local interactions between pedestrians as component subsystems. This article proposes a predictive agent-based crowd simulation model to analyze the outcomes of emergency evacuation scenarios taking into account collisions between pedestrians, smoke, fire sprinklers, and exit indicators. The crowd model is based on a decentralized control system structure, where each pedestrian agent is governed through a deliberative-reactive control architecture. The simulation model for evacuation includes a routing-based control system for dynamic-guided evacuation. A design case illustrates the modeling process. Results show that the crowd simulation model based on agent autonomy and local interactions is able to generate higher level crowd dynamics through emergence.


I. INTRODUCTION
R ECENT developments in large city infrastructure have led to urban crowding. Emergency evacuation of buildings in case of fire became a challenging problem as it demands a short evacuation duration to ensure the safety of people's lives. Emergency evacuation of buildings requires fast and effective decision-making to be successful [1], while an adequate number of exits can help mitigate safety risks because smoke and crowded exit routes reduce pedestrian moving speed and may create panic and confusion.
The aim of this article is to design a predictive agent-based crowd simulation model to analyze the outcomes of emergency evacuation scenarios taking into account collisions between pedestrians, smoke, fire sprinklers, and exit indicators.
Understanding specific behavioral response under extreme situations can significantly affect an evacuation [2]. Agent-based models are a good candidate for crowd behavior forecasts because pedestrians can be simulated by individual agents [3].
Crowd behavior visualization is a complex multiagent modeling problem [4] and various techniques for crowd simulation have been proposed in the past 20 years [5].
There are three main categories of pedestrian simulation models based on the levels of detail [6]: Microscopic, mesoscopic, and macroscopic. Macroscopic models might be computationally efficient, but they rely on global knowledge, which is not available for the pedestrian evacuation problem [7]. Microscopic models consist of a large number of interacting agents with specific behaviors [8], [9]. Mesoscopic models are a reasonable compromise between detailed microscopic models and computationally efficient macroscopic models [6], [10]. In this article, we aim to track the movement of people, hence we propose a microscopic modeling approach.
The dynamics of a crowd [11] cannot simply be limited to the principles of mechanics and deterministic causality [12]. In fact, the heterogeneous behaviors of individuals and their social dynamics can have an important influence on the crowd dynamics and, in particular, on the strategy they use to reach a certain goal. As a complex system, the dynamics of a crowd emerge from local interactions between component systems (i.e., the human participants). Evacuation dynamics show special stress conditions, which propagate along the crowd through mechanical (with the environment, e.g., running into walls) and social interactions (e.g., observing the agitation of another person). Current approaches usually [7], [13], [14] reduce the individuals partaking in the crowd to particles without dynamics or decision-making capabilities. However, in a real-life situation, each participant makes individual decisions that are influenced by the environment, the other crowd participants, their own psychological and physiological responses, etc. This behavior requires modeling each participant with a certain level of autonomy and agency. To obtain this, we base our approach on agents and decentralized control principles [15]. In decentralized configurations [16], each subsystem (i.e., control loop) is sensitive and reacts only to local factors, either from the environment, or from other subsystems. The global behavior is obtained through local interactions or information in a given vicinity, reducing necessary resources in terms of communication and computation needs [17]. Individualizing the decision-making process for each agent, i.e., assigning personal attributes [18] observable in their behavior, brings the crowd model closer to the real-world structure: composed of autonomous systems with agency.
We employed this approach before in a preliminary study focused on building management [19], agent-based modeling (ABM) [20] applied to traffic control, and microscopic modeling of traffic participants [21], with good results.
The opportunity of modeling decentralized complex interactions using multiagent systems aligns with the concept of an agent as a system with agency [22]. Thus, we propose a crowd This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ modeling method as the result of three combined concepts: Microscopic crowd models, decentralized control, and agentbased simulation. The main contributions of the article are threefold: 1) crowd modeling based on agent autonomy and local interactions to create higher level crowd dynamics through emergence; 2) a model of crowd participants using a deliberativereactive agent architecture; and 3) introducing a routing-based control system for dynamic guided evacuation.
Article organization. Section II outlines the concept of the decentralized agent-based model for crowds during evacuation. Sections III and IV detail a design scenario for a particular floor plan and fire evacuation, for both the environment and the human agents. Section V shows simulation model results and discussion. Finally, Section VI concludes this article.

A. Concept
The aim of the model is to ascertain the behavior of the crowd during evacuation as it emerges from the individual autonomous behaviors of the entities comprising the crowd. The approach we take is a bottom-up design using agents to model each person and using the principles of decentralized control systems (DCSs) to generate high-level behaviors of the crowd based on local interactions. The modeling concept we present here generates an agent-based simulation model (ABSM).
In this article, we design a predictive ABSM: Known agents are placed in a known environment and allowed to interact with the purpose of analysing their emergent behavior. As opposed to the illustrative case (the demonstrative experiment), in a predictive model, the ABSM overall outcome patterns are not known a priori (the generative experiment) [23].
The ABSM elementary agent is a persistent entity characterized by at least one definable state [24]. Through interaction, this entity can cause changes in the environment or in the states of other agents. The model itself is the set of agents, their interaction rules, and their environment.
Consider a single pedestrian agent with state-space dynamics described by x k+1 = f (k, x k , w k ) and y k = g(k, x k , w k ), where x is the vector describing the complete internal state of the agent, w is the vector of environment inputs, y is the vector of output variables, while f and g are update laws, all dependent on discrete time step k. In a group, the agent interacts with other agents. Let r be the set of local interaction rules in a radius Δ. Agent i in a network of n agents is where the set y i−Δ , . . ., y i+Δ contains the actions (outputs) of other agents in radius Δ affecting agent i as inputs. The dimensions of Δ are dependent on the agent sensing elements. Direct interactions happen inside the areas delimited by Δ, while indirect interactions propagate via overlapping vicinities. The problem of constructing an agent-based model resumes, besides modeling the individual dynamics f i and g i , to designing the set of local interactions r i so that patterns emerge, observable through the outputs of the agents. Rules are often at least partly known a priori in illustrative models, whereas this article deals with a type of predictive ABM without immediately obvious interaction outcomes. In the case of systems with simple interactions, e.g., in flocking or herding, the rules r i are the same for all agents and easy to design, but not suitable for humans [5], who possess reasoning capabilities. Panicked people make decisions based on uncontrolled personal interests, social, and cultural constraints, leading to social disfigurement (e.g., following the decisions of others). In an agent network, collective panic is an emergent behavior resulting from the individual internal decision-making process and the interaction rules in a certain locally observable vicinity.
Thus, we propose equipping each agent ( Fig. 1) with its own controller. Instead of attempting to model the interaction rules from the perspective of the observer, we model the internal decision-making of the agent via the controller. This approach sustains the agency of subsystems as crowd participants and allows their interactions to emerge organically from the local autonomous decisions of each individual agent. The feedback structure allows the agent to generate continuous decisions based on changes in its vicinity of radius Δ, either environmental w i , or from other agents {y i−Δ , . . ., y i+Δ }.
For an agent described by the internal dynamics let the controller for each agent with state z i , inputs y i , w i , y i−Δ , . . ., y i+Δ , and output u i , be described by then, the closed-loop agent with controller becomes The agent behavior is described by nonlinear functions φ i and γ i . In the case of emergency evacuation, the environmental inputs w i model the presence of obstacles, for instance, walls or smoke inhalation, and provide signals from the evacuation systems, such as alarms and indicators. The output y i reflects the trajectory of the agent through the environment. Issues of stability are not formally relevant here, as the simulation model must reveal these situations as the crowd develops and moves during evacuation. In terms of observable actions, the agent trajectories are graphically displayed for analysis.
The network of agents with controllers is what is known as a DCS. In this particular case, the DCS is noncooperative, meaning that each agent has its objective locally and independently defined. For an individual in a crowd, this objective is to reach an exit as fast as possible.

B. Pedestrian Agent Controller Structure
For humans moving through a physical space, a deliberativereactive structure [25] for the controller is suitable. The reactive component deals with path following through the building space, including collision avoidance [26], while the deliberative component performs motion planning (calculates point-based trajectories) and responds to environmental stimuli such as smoke and alarms. Fig. 2 shows the structure of the motion control architecture. Here, the movement between two points on the computed trajectory is adjusted through the subsumption module S to locally avoid unexpected obstacles. Other behaviors are modeled similarly; for instance, pushing through a crowd adds the generated collisions with other agents, which require recovery to the trajectory.

C. Scenario and Technologies
In what follows, we perform the design of an ABSM for crowd evacuation inside a building in case of fire using the described concept. For the fire suppression and alarm system, and for evacuation guidance, we design the so-called static agents [19] in closed loop, which, from the point-of-view of the crowd, are part of the environment.
All agents are implemented in JADE (JAVA Agent Development Framework) [27], an agent-oriented programming software platform. Interagent communication is message-based, using FIPA specifications [27]. For ABSM visualization, we use jMonkeyEngine [28], an open-source 3-D graphic engine.

A. Environment Structure and Floor Plan
The environment in this scenario is three-dimensional. The positions of static (environmental artifacts) and mobile agents (humans) are tracked in a three-coordinate system XY Z, relative to the origin point O = (0, 0, 0).
The floor plan includes different spaces: 14 work rooms with areas ranging from 14 to 33 m 2 , a conference room of 55 m 2 , two restrooms, two storage (one houses electrical equipment), and a reception of 33 m 2 . These are connected through four halls with lengths between 13 and 18 m. The plan has two exits: One through the reception hall, and one situated in the diagonally opposite corner of the plan [29]. Fig. 3 shows the Sketchup [30] 3-D model of the floor plan.
In the simulated environment, each room is an object defined by a set of variables: An identification number, four points representing the spatial coordinates of the four corners, the presence or absence of fire, the smoke amount and increase rate, the states of the alarms and fire extinguishers. When generating the room, alarms are placed in the center of the room, while fire origins are randomly situated.
The protection control system is part of the environment. Its purpose is to respond to fire events with two controllers: One for fire suppression and one for evacuation guidance. In buildings, this system works alongside HVAC and other internal structural control systems. Compliance with safety standards dictates the design criteria [31], taking into account the time until the level of smoke affects visibility for people; critical times for the active protection system, such as fire detection time, time required to activate the fire suppression system, time required to extinguish the fire; duration of occupant evacuation; and heat release rate.
We model the protection system components as static agents (with fixed positions within the environment) in closed loops composed of sensor, actuator, and controller agents, forming cooperative structures with control objectives [32].

B. Smoke Model
Several factors such as smoke spread and temperature influence the evacuation process. The speed of people walking [33] or the choice of exit are affected by the presence of smoke. The smoke mass conservation equation based on the McCaffrey correction [34] and adjusted for fire suppression iṡ with initial condition M (0) = 0, where M is the smoke in the room, andṁ s is the smoke generation rate. The smoke density is ρ s = ρ a (T a /T s ), where T a is the ambient temperature, T s is the smoke temperature, and ρ a is the ambient air density. For a continuous region fire, experimental data [34] shows thaṫ m s /Q = 0.011(Z/Q 2 5 ) 0.566 for 0 ≤ Z/Q 2 5 < 0.08, where Z is the height of the smoke layer, and Q is the heat release rate [35]: Q = ατ 2 (τ time). Coefficient α depends on the nature of the material feeding the fire, with hysteretic behavior for increasing and decreasing fire intensity [36].
Noting k 1 = 0.011(Z/Q  O spread for simulation is Coefficients q 0 , q 1 , and m 1 are updated based on k 1 , k 2 , and the sampling time.

C. Protection Control System
The aim of the fire suppression and alarm control system is to reduce damage caused by fire, while the guidance controller aids the evacuation of occupants. A well-designed fire suppression system has sprinklers with high efficiency, especially in the early stages [37]. The control system components are sensing agents, acting agents, and two controller agents. Fig. 4 shows the control system structure, where y S contains air parameters, y V the image of the room, and y O human occupants; y Q is the measured smoke quantity, y L is the fire location, and y H is the number of occupants; u A is the alarm command, u S is the sprinkler command, and u R is the routing computation trigger command; m A is the result of alarm execution (sound or light); m S is the result of sprinkler activation; and m R is the result of route indicator activation.
Sensing agents emulate the functioning of sensors. Their role is to ascertain the presence of fire and the amount of smoke, and to convert this environmental data into information for the controller. Conventional smoke detectors, such as ionization and optical detectors, might not respond efficiently for safe evacuation [38] due to the time it takes for particles to reach the sensitive elements. Video detectors are a fairly recent technique that exploits the visual features of fire, such as color, texture, geometry, pulsation, and movement [38]. The sensing agents in this article are composed of video detectors for fire location and smoke detectors for smoke amount.
Sensing agent operation is illustrated in Algorithm 1. Each sensor is identified by an identification number (IDN) corresponding to their room. Sensor operation is twofold: A triggered-based behavior that transmits the fire location (in the XY Z coordinate system) only in case of fire detection (to avoid overloading the controller communication queue), and a continuous behavior that transmits smoke amount information for as long as smoke is detected in the room.
The occupant monitor is an environment artifact and acts as a sensing unit counting the occupants of each room.
The fire suppression and alarm controller agent monitors changes in sensor information and computes commands for the acting agents. The controller objective is to maintain the state of the environment as without fire/smoke. The controller has two operation modes: Manual (open loop) and auto (closed loop). In manual mode, commands are set by a human operator through the input interface, for diagnostic procedures. In auto mode, the commands are generated such that fire suppression and alarm activation happen in the shortest time possible.
Auto-mode operation is illustrated in Algorithm 2. Fire presence triggers the fire location retrieval from the sensor IDN. Information on smoke amount is continuously received from the fire-reporting sensors, based on which alarm and sprinkler commands are triggered. Both types are ON/OFF, with activation thresholds set by the human operator. Activation commands are sent to all alarm agents and only to the sprinkler agent in the affected room. Deactivation happens when the building has been evacuated and no smoke or fire remains.
Acting agents emulate the actuators of the fire suppression and alarm control system. The two types, sprinklers and alarms, have similar operation (Algorithm 3). Acting agents have their own IDNs, used for the conversation with the controller. In the graphical interface of the simulation engine, the alarms emit a light signal and become visible as red elements when active, positioned in the center of the room they serve. Sprinkler activation is visible in the graphical interface as a burst of blue particles.

D. Guidance Control
Safe evacuation of humans is a complex and nonlinear process involving several factors such as the architectural features of the building, the evolution of the fire, and the behavior of the people in the building, leading to major difficulties in understanding and streamlining the evacuation process. The prevalence of larger structures, which have increased room sizes, functional diversity, burning materials, high electrical loads, etc., requires adequate solutions [39].
In this article, we design a guidance control system that computes the shortest and safest routes in case of emergency based on fire location and displays them using a series of visual indicators. Each route begins in each room on the floor plan and ends in one of the exits.
Route indicators are light emitters (e.g., LED) embedded in the floor. In real-world implementations, these indicators would be directional strips and in the simulated world of the model, the human agents perceive them as such, thus knowing the routing direction. For computational reasons, however, the graphical interface only displays the visibility graph (i.e., the minimal amount of indicator-nodes for which there are no obstacles between neighboring nodes), creating the effect of dotted lines. Each route is a succession of indicator-nodes on a directed graph. Each node can display one of two colors, blue or green, associated with each of the two exits. The command received from the guidance controller assigns each node to a route by changing their color to either blue or green. When the indicators are deactivated, they are not visible on the graphical interface. Fig. 5(a) shows the visibility graph for a fire drill.
The guidance controller agent computes the shortest and safest evacuation routes based on fire and exit locations. Route safety is determined using a case-based algorithm, within which shortest paths are obtained using Dijkstra's algorithm, weighted to favor routes with less smoke. Route computation is triggered by an incoming request from the fire suppression and alarm controller, which can be either for a drill or when a fire event occurs. For each room on the floor plan (associated in the visibility graph with an end node that is not an exit), the guidance controller computes a route to the nearest exit, which is then transmitted to the route indicators. The indicator deactivation command is triggered when the guidance controller itself receives a deactivation request.
Algorithm 4 illustrates the case-based route computation. The safety graph is generated in case of fire by eliminating the B R C nodes closest to the fire, and subsequently the edges passing through the fire location. The main cases are as follows: Fire drill with no constraints [ Fig. 5(a)], both exits accessible, and one exit blocked. In this implementation, we assume only one fire location is active, and thus end nodes near fire compute their routes on the visibility graph [ Fig. 5(b)]. Intersection nodes near fire must use the safety graph with themselves as origin points [ Fig. 5(c) shows two opposing routes, each guiding away from the fire]. All other nodes compute the closest routes to all accessible exits on the safety graph, but in the case of two exits, the route farthest from the fire is chosen [ Fig. 5(d)]. The case in which no valid routes can be found is of special importance, since it showcases a fault in floor plan design from which, in certain contexts, safe evacuation is not possible.

IV. MODELING THE CROWD
The crowd model aligns with the approach presented in Section II; in what follows, we present the design of the human agent as crowd participant. The user interface allows setting the number of human agents, while their initial placement on the floor plan is randomized. Agent diversity is ensured by probability-based decisions and internal state updates, thus obtaining behaviors of people who walk faster or slower, have different responses to smoke inhalation, knowledge of exit positions, or levels of spatial orientation within the floor plan. Some, under the stress of evacuation, make decisions to rush to the exit farthest from them. For the rigid body physics behavior in the simulated jMonkeyEngine environment [40], we use Bullet Physics [41], a library providing physics simulation (forward and inverse dynamics and kinematics, collision detection) for games, robotics, etc.

A. Internal Dynamics and State Updates
The human agent is represented by an entity (Fig. 6) that, in the graphic engine, can display physical properties akin to real life. Human agents move at different speeds, can collide with other agents or with the walls, and can inhale smoke. The behavior associated with these processes is the one described by (2) The world model or knowledge base of the agent contains the location of exits and the visibility graph (world map).
The internal state of the agent is updated based on previous states and inputs. Smoke inhalation affects the life status and movement speed, alarms trigger the evacuation behavior, while the controller updates the movement direction.
State update: Inhaled smoke. Smoke causes asphyxiation, serious injuries to the upper airways, and chemical irritation due to ash and toxic gases [42]. The inhaled smoke state variable m i is based on the smoke quantity M j in room j, smoke density ρ s , distance to fire δ i , and the approximation of the smoke plume of volume M j /ρ s as it lowers from the ceiling where ρ i is a diversity parameter, while k 3 < 0 and k 4 > 0 are dependent on breathing rate. For R k pl = 3M k j / (2πρ s ) 1/3 , the ceiling radius of the smoke spread, and the term δ k i /R k pl < 1 models the relative position of the agent inside the smoke plume at time k. Quantity ν i decreases farther from the fire, while its rate of decrease lowers as the plume becomes larger.
State update: Direction and current position. In the XY Z space, XOZ is the floor plane on which an agent moves, while its position on the OY axis is fixed. The current position of the agent is updated as it moves. Within the virtual space, each agent has its own coordinate system X i O i Z i (Fig. 6) State update: Speed. The agent moves at different speeds in an emergency situation [43]. Without disturbances (smoke, active alarm, obstacles, etc.) on the floor plane XOZ, the agent moves between two points in a straight line with a base walking speed ws i ∈ [0.8, 1] (m/s), but switches to a running speed rs i ∈ [1.1, 1.4] (m/s) when alarms are active, and to ss i ∈ [0.3, 0.7] (m/s) when walking through areas with smoke. The triggering of the evacuation behavior considers the human reaction time to the alarms (pre-evacuation procedures). Real-world reaction times are difficult to measure during real fires [44], [45] and experimental studies found that people might ignore fire alarms if they are subjected to too many drills [46]. In this article, we consider the pedestrian agents to be rational, i.e., to not act against their own goals, thus we choose a randomized interval of 0-20 (s) as delay in reacting to the fire alarm [44], [47]. During evacuation, the agent speed s i is adjusted based on environmental context, such as quantity of inhaled smoke. Algorithm 5 illustrates the speed calculation, where ω is an adjustable parameter modeling how strongly the inhalation of smoke affects the agent, while inhale_smoke(m i , dist(a i , fire_location)) implements the smoke inhalation state update described in (7).
Smoke inhalation continues to affect the agent speed even after leaving the area with smoke present.
State update: Life status. The status of the agent as alive, safely evacuated, or dead is stored in this life status variable, updated based on whether or not the agent has reached an exit, has spent too much time in the area affected by fire, or has inhaled too much smoke (m i k larger than a preset tolerance). Stampede crushing and trampling happens during active fire evacuation bottlenecks or when parts of the crowd are moving in different directions [48]. We model this effect using crowd density and the accumulated effect of collisions. We choose a stampede density of 10 (agents/m 2 ) tuned from [48], [49] to account for the slim homogeneous agent shapes and lack of leg movement while walking in the graphic engine. The number of high-speed collisions (relative to maximum agent speed [50], [51]) at which we consider that the agent was crushed or trampled (life status changes to dead) is 10, based on maximum stampede density [48] and the mechanisms of traumatic asphyxia [52]. We consider the status of critically injured agents that would die in the hospital as dead and count them as such.
Output y i = [ d i s i ] T is sent to the graphic engine as a parameter independent of the number of visualization fps (frames/second), which determines the agent movement in the direction given by d i and with speed s i in m/s.

B. Motion Planner: Deliberative Controller Component
During regular operation, the agent moves randomly, with self-generated directions and speeds. Changes in alarm states (sensory inputs) trigger the evacuation behavior. During drills or emergencies, the agent moves between points of the visibility graph, on paths generated by the deliberative component of its control systems and adjusted by the reactive component.
The route of an agent through the XOZ plane is formed of nodes over the visibility graph. At each time step, the agent selects a target node t i from the graph toward which it moves. When the guidance system is not active, the agent makes a choice for an exit and generates its evacuation route accordingly. The routes marked by active guidance indicators overwrite the self-generated paths. Algorithm 6 shows the deliberative casebased motion planner with route generation based on Dijkstra's algorithm. However, pedestrians might panic and they might not be familiar with the layout of the building; therefore, agents do not always choose the optimal path to the exit. A probabilitybased operation get_accuracy(a i ) models this choice, where accuracy is a user-defined parameter. In a real-world scenario, the decision to choose one exit over another is based on the distance to the exit, familiarity, and the emergency exit being perceived as open or closed [53]. The probability of misjudgment in a semipanic situation is up to 40% for residents without disabilities and up to 50% for persons with low stamina [54]. All these factors affect accuracy, which can be very low for some pedestrians or high for others. The agent is evacuated when a specified distance between it and an end node in the visibility graph is met, i.e., when the agent reaches one of the exits, it leaves the building.
The movement between nodes is governed by the position controller of the reactive component through functions gen_direction(a i , t i ) that generates a new walking direction, and reached(a i , t i ) that checks if the current target node has been reached. The next_node(p i ) function identifies the next node on the graph closest to the exit, which then becomes the new target node t i ; this way, even if the local interactions with other pedestrians cause significant positions deviations, the agent avoids returning to a previous position on the graph. The C other abbreviations in Algorithm 6 are as follows: gen_dest generates the next target node, path_avail checks if there is a path available for agent a i , ind indicator, get_path returns the path to the closest exit based on agent a i position and exit indicator color, is_empty(p i ) checks if there are still nodes in the path, target_reached(p i ) is a flag set when the agent reaches a node t i in the path, and distance(a i , t i ) computes the distance to the target node. The get_shortest(p i , p j ) function returns the shortest of paths p i and p j , while the get_longest(p i , p j ) returns the longest path. The random_path(a i ) function returns the shortest path between current agent a i and a random exit, but not necessarily the closest one.

C. Reactive Component
The reactive component of the motion control architecture for the pedestrian agent is formed of a position controller subsumed with an obstacle avoidance behavior. Since the floor plan in this particular scenario does not include furniture, we focus on the other humans as obstacles. In this case, the behavior we implement is one of collision avoidance.
The position controller governs the movement in a specified direction d i with a specified speed s i . For a trip without obstacles or collisions, the controller computes the direction d i based on the agent current position (x o , z o ) i and the position of the next node it needs to reach. In areas with high occupant density, some agents push through the crowd in their desire to reach the exit quickly, colliding with agents that move at lower speeds. When an unavoidable collision sends the agent off its straight path, the position controller updates the direction d i based on the new agent position (Fig. 2) toward the next node in the visibility graph (the agent does not turn around if it has passed a node in the specified exit direction, i.e., the position setpoint is always positive, as generated by next_node(p i ) in Algorithm 6). The position controller ensures that the agent travels the distance to target via a proportional law, integrated with the graphic engine and sufficient for position control [55].
Collision avoidance. During evacuation, agent interactions are represented by collisions. These are disturbances that the agent attempts to avoid. Algorithm 7 shows the collision avoidance behavior. When another agent is detected on the direct path of agent a i (or close enough that a i cannot continue forward without collision), within radius β, a new direction is computed relative to the current agent direction d i toward the target (Fig. 7). Once no other agent is interposed between a i and its target, the position controller takes over. The general direction of the agent is maintained: The new direction is c v until the obstacle is cleared, followed by the recovered direction either toward the initial target d ri (Fig. 7), or toward the next node in the graph if the initial target has been surpassed. Collision avoidance with walls and fixed door frames is similarly implemented. This behavior accounts for cases in which, while avoiding one agent, a different collision happens, which is expected as part of crowd dynamics under stress conditions. Perception is limited because attention is a finite resource, and therefore human agents rushing toward an exit will not be able to deliberately plan their path among other pedestrians in the crowd. Thus, the reactive nature of this behavior allows us to emulate the inattentional blindness of weaving through a crowd while influenced by emergency anxiety and panic modes, i.e., making decisions on direction under pressure [56]- [59].

V. RESULTS AND DISCUSSION
To analyze the resulting emergent crowd behavior and to validate the ABSM, we simulated various scenarios. In what follows, evacuated ped. (pedestrians) is the number of agents that safely reach the exit; total collisions is the sum of all collisions between human agents and with the walls. First, we perform the overall crowd assessment during evacuation procedures, in scenarios with 142 total human agents. Second, we present a suite of patterns emerging from agent interactions.

A. Overall Assessment
Fire drill. The impact of the closest exit estimation accuracy for pedestrians is presented in Table I and Fig. 8(a): Drills with enabled indicators take, on average, up to 38.8% less time, with 77.2% more collisions (including soft bumps with pedestrians or walls). The case with 100% closest exit estimation accuracy is ideal, in which every human agent does not panic and knows exactly which exit is closest to their current position when the alarm starts. Table I and Fig. 8(b) show that this case is comparable with the one when the exit indicators are enabled, illustrating the usefulness of the guidance controller.
Active fire. Three scenarios are analyzed with fire present in the building: Guidance indicators enabled with 6 s delay, and disabled with various accuracy. Table I and Fig. 8(c) show that enabling the indicators results in much shorter total evacuation times (up to 40%) and significantly less collisions (up to 77.4%). Fig. 8(d) shows a single case with fire in the upper corridor, in which the density of pedestrians is 200% higher without indicators, and while the smoke production is mitigated by the   fire suppression system, this scenario shows that the likelihood of victims is higher without guidance. Fig. 9 shows the effect of the fire location on the route computation by the guidance controller. If the fire location is blocking one of the exits [ Fig. 9(a)], the safe routes predominantly point toward the other exit, and most evacuation routes are longer. When the fire is nonexit blocking [ Fig. 9(b)], the two sets of routes are balanced in length.
Crowd reaction time. In psychology, reaction time (RT) is the system equivalent of response time: The duration between the appearance of an exogen stimulus and the occurrence of a specific response to that stimulus [60]. RT is usually measured and modeled as an ex-Gaussian probability density function (PDF) [61], in which the probability of occurrence of the expected response is plotted against the response times. We introduce crowd reaction time (CRT): The duration between the activation of alarms and the finalized evacuation. We ran 1000 simulations for each of four scenarios (Fig. 10): Indicators enabled or disabled (25% accuracy for inefficient decisions in panic mode), with or without human agent reaction delay. The total evacuation times are comparable, even though the overall crowd response has ∼4 s larger delay in the delayed reaction case [ Fig. 10(a) and (b)]. Fig. 10(c) and (d) shows the probability of occurrence for the specified total evacuation times, fitted against Gaussian and ex-Gaussian PDFs (μ normal distribution mean, σ standard deviation, K exponential shape parameter). The total evacuation  times are more consistent in the case with randomized human agent reaction delay. We found that when pedestrians react to alarms at different times, there is less crowding around the exit areas and in the hallways.
In all cases, the CRT distribution is an ex-Gaussian PDF, mirroring for the crowd the RT observations for individuals. This shows that the crowd behaves as an organic whole: An emergent, complex system-of-systems.
This interesting result aligns with crowd psychology concepts, furthering ABSM-driven studies of crowd behavior.

B. Emergent Crowd Behaviors
Bottleneck formation. A likely scenario is when building occupants do not have information on the location of the fire ( Fig. 11). At alarm activation, pedestrians use the fire drill routes, rushing toward the closest exit. If the fire blocks their path, a bottleneck forms, leading to agents pushing against each other. Identifying areas with bottleneck risks is a useful feature for testing and validating the evacuation safety of floor plans during the design stage.
Cluster formations can be observed for various crowd sizes, showing the scaling property of the ABSM as a complex system. Fig. 12 shows frames with 80, 142, and 284 pedestrian agents in the model. These patterns emerge naturally due to collisions, different speeds, and common goals.
Effect of the guidance controller on the crowd dynamics. The guidance controller enables pedestrians to easily find the nearest exit [ Fig. 13(a)], thus offering external knowledge to incorporate into their own reasoning process. Otherwise, pedestrians estimate the nearest exit, resulting in the formation of collision points. Here, we consider accuracy = 25% to analyze the case of 3 in 4 people choosing wrong, e.g., no drills in the building or no evacuation maps provided. With guidance [ Fig. 13(a)], pedestrians move in the same direction, whereas without it, two groups form, each aiming toward a far exit [ Fig. 13(b)]. These two crowd subsets intersect along the same hallway, creating bottlenecks for each other.   Effect of the pedestrian agent movement speed. In this set of scenarios, we consider three cases, in which the crowd is formed of agents with a) nominal base speed as in algorithm 5; b) 40% base speed increase; and c) 40% decrease. Simulations show that increasing or decreasing the base speed of the agents (Fig. 14) does not influence the number of collisions between pedestrians, but the higher the agents speed, the faster the building is completely evacuated.
There is, however, an observable change in crowd cohesion. In the case with slower movement [ Fig. 15(a)], emulating a calmer advance toward the exits, there are less clusters of smaller size. With the increase in speed [ Fig. 15(b)], emulating running, we observe bottleneck formation and larger clusters. The bottleneck highlighted in Fig. 15(b) occurred at T = 15 s and the evacuation rate slowed down after this point in time. Fig. 14 shows the bottleneck impact on the evacuation rate.
Analysis against the crowd models is discussed in [5] (pp. 11-13). Our approach simulates crowd dynamics: Lane formation, crossing flows, faster-is-slower, blocking, stop-and-go waves, vortices and turbulence, and obtains psycho-social behaviors through emergence. Our deliberative-reactive pedestrian architecture allows for psychological and health characteristics to be modeled. Unlike macroscopic models aimed at simulating the crowd from a top-down perspective, our design obtains behaviors at crowd level in a bottom-up manner. Regarding group dynamics, our approach is able to illustrate group formation, group cohesion, and group-individual interaction.
The computational efficiency of our ABSM implementation is good: Although the jMonkey engine requires graphical processing resources, it is adaptable to parallel computation. This feature leverages the JADE scaling ability by distributing the workload across multiple networked hosts, e.g., for computationally intensive simulations of larger, multistory buildings. We compared our results with [62] (p. 23, Table I, Columns 1 and 2), using the same type of GPU, Nvidia GeForce GTX 1060. We obtained on average 120.7 fps compared to 125 fps in [62], for a) 254 agents in our model (including pedestrians with deliberative-reactive architecture, static agents, and the two controller agents); and b) 250 particle-based pedestrian agents in [62]. In our case, as opposed to [62], the model also includes the building itself (walls and rooms), rendering for fire and sprinklers, control and collision logic, smoke computation with discrete differential equations, and the interaction between pedestrians and smoke.
The overall result of our predictive agent-based design using DCSs is a crowd model with realistic behaviors during fire evacuation. The design is scalable to crowds of different sizes and allows for more human-specific behaviors to be integrated in the controllers of the pedestrian agents, in either the deliberative or reactive component.
Supplementary video material demonstrating the ABSM and crowd dynamics during guided evacuation is provided.

VI. CONCLUSION
Crowd simulation could greatly benefit from the inclusion of social dynamics and the duality of the deliberative-reactive human reasoning model. In this article, we answer this issue by proposing an agent-based crowd modeling technique using DCSs. As a complex system, the crowd dynamics are obtained through bottom-up autonomous interactions, while the simulation model adheres to the principles of the generative experiment.
To illustrate this approach, we presented a design scenario for fire drills and evacuation on an office building floor, for which we also designed a fire suppression control system and a guidance controller. Results show that the crowd model based on agent autonomy and local interactions is able to generate higher level crowd dynamics through emergence.
Further work is focused on enriching the pedestrian deliberative component with a reasoning engine modeling rules of social interaction. Placing the crowd in other scenarios, for instance, travel across urban spaces, venue ingress, etc., is also of great interest, in a collaborative interdisciplinary setting.