#### Abstract

This paper focuses on designing a tool for guiding a group of people out of a public building when they are faced with dangerous situations that require immediate evacuation. Despite architectural attempts to produce safe floor plans and exit door placements, people will still commit to fatal route decisions. Since they have access to global views, we believe supervisory people in the control room can use our simulation tools to determine the best courses of action for people. Accordingly, supervisors can guide people to safety. In this paper, we combine Coulomb’s electrical law, graph theory, and convex and centroid concepts to demonstrate a computer-generated evacuation scenario that divides the environment into different safe boundaries around the locations of each exit door in order to guide people through exit doors safely and in the most expedient time frame. Our mechanism continually updates the safe boundaries at each moment based on the latest location of individuals who are present inside the environment. Guiding people toward exit doors depends on the momentary situations in the environment, which in turn rely on the specifications of each exit door. Our mechanism rapidly adapts to changes in the environment in terms of moving agents and changes in the environmental layout that might be caused by explosions or falling walls.

#### 1. Introduction

The gathering of a group of people at the same location and time is called a crowd. People who form the crowd often share a common activity. In order to study crowd evacuation, we need to have clear understanding of all their relevant attributes. Determining crowd dynamics based on their psychological identifications is one of the many ways that is broadly explored by previous researches. Crowd dispersion is unpredictable. There are many studies conducted that explore crowd behavior from different perspectives. One of the major crowd behaviors with psychological underpinnings is identified as *deindividuation*, which is the situation where antinormative individual behavior is exhibited in groups in which individuals are not seen as separate individuals. Simply put, deindividuation is blending in a group such that the individual decision making ceases to be observed separately. *Submergence* is largely acknowledged as the root of contemporary theories of deindividuation, [1]. Numerous studies have explored relationships between deindividuation and behavioral changes [1–6]. It is important to understand how individuals conceive themselves in the crowd since once being a member of a crowd they no longer act independently but behave in concert with others. There is a distinction between public self-awareness, which has to do with the individual’s concerns about how others evaluate them and private self-awareness, which approximates to the concept of objective self-awareness and has to do with monitoring the extent to which ones behavior matches ones internal standards [7–9]. It is generally assumed that when an emergency occurs, occupants panic and exit by the nearest doors. According to Canada’s NRC scientist Guylene Proulx, the activities and the interactions among the occupants in a building before the occurrence of an emergency are relevant to understand the notion of panic and may not lead to hysterical or irrational behaviors as stated in the definition and supported by some authors. In contrary, people behave in a rational way. For example, people who come together will also tend to leave together. Therefore, family members will try to be together before making the decision to exit [10–12]. Some people, depending on their role (e.g.,: owner, employees etc.) may decide first to leave the building, but at some points, go back trying to retrieve items left behind, such as documents, money, people in danger, and so forth. The irrationality of their actions is often evident in a retrospective view. However, at the time of the action, it was conceived to be perfectly rational. Evacuees are assumed to be rational, so after realizing that they need to escape, they should make decisions leading them to exit as fast as possible [13]. Environments in an emergency situation are dynamic. Since in such situations the evacuees do not have enough time to become familiar with the new environment, plans should be made quickly. According to the information gathered, people have to select the exit that can guarantee them the greatest opportunity to escape from the threat as fast as possible to decide which persons can be helpful to fulfill that goal, [14]. Exit selection has a great influence in the outcome of an evacuation. How people choose exits is a complex process. Generally, they make their decision based on their familiarity with the exit and its visibility, [15]. Among methods for exit selection are cellular automata models. A few (e.g., [16, 17]) consider the variety in the environment (i.e., exit width and obstacles) to have an impact in the exit dynamics of evacuees. According to personality trait theory [10, 11, 18–20], these models demonstrate the influence of evacuees’ personalities (i.e., shy, aggressive, collaborative) in the outcome of evacuation. A shy person would rarely take decisions but he would act as a “follower,” an aggressive person would exhibit “selfish behavior,” and a collaborative person would try to cooperate with others to come out with a suitable solution for all Agent-based models [21]. In these models, evacuees act as “rational” agents whose objectives are to find the best set of actions that will maximize their profit toward the exit doors relying on the partners that will guarantee them to reach safe places in a minimum of time. Finally, the choice of an exit will depend on the interaction between evacuees and their environment. An evacuee will preselect a route based on his knowledge of the environment, and that initial route may change depending on his estimation of queuing time, traveling time to that particular exit, and sometimes because of group decisions [22]. An evacuation crowd consists of individuals that interact with each other [11]. Occupants have to escape from the danger as quickly as possible, and by doing so they may have to collaborate with others. Evacuees are assumed to be rational. They pursue their own interest [23]. An evacuee will tend to cooperate with another one if he estimates that he can have a good payoff (maximum chance of being safe), or in contrary, will avoid cooperating or associating with another one if his safety is decreased. They might have to be collaborative with others or try to develop skills (e.g., exploring and visual memory). The urgency theory is used to explain some behaviors of occupants, for instance blockage at exit doors, stampede, or trampling [24]. Three factors are essential to understand the concept of urgency [25](1) the nature of the emergency,(2)the consequence of not exiting quickly,(3)the time available to exit.

For example, a seriously injured person will try to reach a group to get him out as fast as possible, so that he can receive medical attention. At that time, his level of urgency is higher than a person who is safe [26]. Regardless of crowd specifications, we need to consider a model for the study crowds. Understanding human crowds by previous modeling is conducted in computer graphics, robotics, traffic engineering, and social sciences. A survey of recent research can be found in [27]. By and large, simulations of crowds are either macroscopic by modeling environmental parameters that affect a group of agents simultaneously, or microscopic by modeling interaction rules for each agent. A mesolevel modeling is offered in [28, 29], where movement fields are composed of external inputs that influence agents combined by their own local reasoning. Inclusion of diverse agents and their diverse capacities provides a diverse set of reactions in the environment. For example, [30] proposed an approach based on the motion dynamics whereas [31, 32] report on investigations of psychological nature. The work in [33] presented an approach based on the sociological factors, while [34–36], approaches are based on cognitive and behavioral models. The model in [37] is based on the situation-guided control, however, [38], used a particle-based system to simulate human behaviors. Each agent is regarded as a particle, augmented with a state and a feedback function to control its behavior and all agents’ behaviors that constituted the whole system performance. The work in [39–41] focused on emergency evacuation conditions of a crowd and abstracted the model by observing real crowds in his work. Helbing’s group adopted a particle system to study the crowd behavior in emergency situations based on social psychology and dynamics [42]. Adriana et al., [43] extended the idea with additional aspects of individual characteristics and relational behaviors to clarify evacuation. In order to accurately replicate evacuation strategies in a crowd, we need a model, which is able to accurately reflect the crowd behavior especially in emergency situations. As an earlier method to prediction emergency movement, which was developed based on fire emergency egress, BFIRES-II is paintable, [44]. ASET [45] and EVACNET+ [46] are other methods that presented as the earliest methods. Because of its importance, evacuation modeling is subject to introduced increasingly by different researchers. [47], indicated, such methods are increasingly growing based on a comparison of his past and present surveys, [48]. In terms of highlighting advantages and disadvantages of different evacuation methods, researchers started to study on them [49]. In this paper, we demonstrate a strategy to repeatedly divide the environment to distinctly safe boundaries around each exit door. Boundaries are subject to change based on the location of each agent at any moment using a crowd evacuation model. In order to develop our strategy, we will not to only focus on crowd specifications and movements of individuals, but also the physical specifications of the environment. In order to make more accurate decisions for controlling the crowd, we use sensors and detectors to identify and locate individuals and exit door locations on a continual basis. These data will be useful for timely decision making processes. Having such a strategy is useful in terms of helping the supervisory security agents in the control room to guide people through each exit door in the shortest possible times, while reducing mistakes during events that the evacuation environment is obscured from full view. This will be the case when there are explosions, smoke, or other hazards blocking visibility of security personnel. We will focus on the relationships between locations of exit doors and agent movements in the environment to develop our strategy accordingly. Pedestrian motion can produce a *social force*, [50] that exerts an invisible force of repulsion upon nearby fellow pedestrians. This is very similar to our charged particle model of human movement force. While Helbing’s model of force accounts for force as a result of directions of force, ours is omnidirectional [50].

#### 2. Related Work

Anyone living in a populated, gregarious world has experienced the effects of crowds. Crowds exert an invisible force on individuals. Directly, movements of an individual’s crowd neighbors will physically propel the individual in the direction of crowd’s general moving trajectory. Indirectly, in order to maintain personal space, the person will experience social forces to accommodate for the crowd movement [51].

Derived from safety concerns in indoor spaces, there is a force to evacuate that people toward exit openings. This has best been modeled in terms of a game among members of a crowd [52]. Game theoretic modeling and analysis as well as an extensively validated fire evacuation simulator are reported from a Finish research center [52]. There have been attempts to learn human movement from animal behaviors. Argentine ants have been studied as test organisms to explore their natural evacuation processes in response to fire. It was observed that any movement in response to citronella does not necessarily follow a simple set of rules. As citronella was repellent to ants, they showed negative taxis, moving away from the stimulus towards the exit. This is similar to what one can expect when a crowd of people is running away from a source of danger (e.g., a fire) towards a safe place [53]. This demonstrated how such empirical data from non-human organisms such as ants can overcome the shortage of human panic data for model calibration and validation, something which has intrigued researchers for decades. Experiments with ants were used to model the consideration of both attractive and repulsive forces under panic condition to maintain the coherence of collective dynamics. Ant models are in the class of microscopic models where individual behaviors are modeled. However, people are not like homogeneous, interchangeable, nonrational, noncognitive entities. We must incorporate human factors into microscopic models in [54]. Navigation fields were introduced in order to direct virtual crowds using goal-directed navigation functions. Macroscopic behavior is generated by microscopic modeling methods [29].

A force-enabled version of the floor field pedestrian is presented in [54], where a building is treated as an information system through which people move. Using Henein’s model through communication agents update and maintain multiple perspectives of their environment.

Recently, there has been an increasing interest in pedestrian traffic [55]. For instance, a method for determining density using Voronoi cells is found in [56]. A Survey of mathematical modeling techniques for traffic flow and crowd models are also available [57]. Common methodological approaches for crowd evacuation are reviewed in [58]. Macroscopic models are computationally less expensive because they consider fewer detailed interactions among people and with their environment. Instead, mathematical models are used to describe crowd movements as liquid flows [59–61].

#### 3. The Main Attributes for the Environment

Generally, based on its usage, each environment will consist of many different groups of objects; such as obstacles (i.e., a row of chairs or trash cans), the agents, and the exit doors. Agents can be any type of living beings, such as pets or humans. In this paper, we assume only human agents in the environment. The two most important attributes in the environment for us are the agents (i.e., simulating individuals) and exit doors (i.e., evacuations points). These attributes affect each other and are used to determine safe boundaries. In this paper, we considered each environment generally having one or more convex zones corresponding to the map. Each of the convex zones is composed of a collection of *α* zones, which are the spheres belonging to each exit doors, with *β* zones and *θ* angles for each. Each convex zone must have at least a single exit door inside. If there were no exit doors available for a convex zone, we have to merge it with its adjacent convex zone, which has at least one exit door.

#### 4. The Main Attributes for Exit Doors

We considered two general attributes for each exit door that are zones and boundaries. We assumed three different zones for each exit door. The first zone is the area nearest to the exit door we call zone, determined by each exit door’s width. Figure 1 shows two exit doors of different width and their proportionally sized zones. This zone is always the same in size and never changes during the movement of each agent. The only way that zone could change would be if it is completely blocked or the door width was partially blocked (for instance, by some obstacle that might be a fallen agent, or debris in the environment). In such cases, due to the change in width of the exit door, the zone will change. Each environment may contain several zones, one for each exit door.

The second zone is called zone (see Figure 1). is the area that is bound by the walls and each contains a single zone. Areas between several zones are divided into the same number of zones. The third attribute is the angle, which is the largest angle that contains a corresponding zone within each quadrant. Boundaries separate zones. The angle varies based on the locations of agents in each moment. For example, the angle can be reduced if the number of people around a certain exit door increases. Figure 1 shows an environment consisting of three exit doors with corresponding zones and angles.

#### 5. A Synopsis of Electrostatic Fields

##### 5.1. Charge

A property of matter that prepares an object so as to participate in electrical forces is called *charge*. This is so it can be distinguished from the common usage of this term, which is used indiscriminately for anything electrical. There are three different statuses of charge available that are negative, positive, and no charge. Two or more objects which have a same type of charge will exert a force of repulsion on each other when they are relatively close.

A charged particle has a corresponding force-per-charge-of-would-be-victim vector to at each point in the region of space around it. *A vector field* is the infinite set of force-per-charge-of-would-be-victim vectors. All charged particles in the region of space with the force-per-charge-of-would-be-victim vector field will have a force exerted upon them by the force-per-charge-of-would-be-victim field. The force-per-charge-of-would-be-victim field is also called the *electric field*. The charged particle forming the electric field is the *source charge*. Two objects that have excess opposite charges, one positively charged and the other negatively charged, attract each other when they are relatively near each other. The so-called source charge creates an electric field which exerts a force on the so called victim charge. For this paper, we primarily focus on net effects that each charged particle exerts a force on other charged particles. This is at the core of Coulomb’s Law. The force is called the Coulomb force; that is, the electrostatic force. The charge is one of source or victim that establishes a perspective. By analogy, this is similar to identifying an object whose motion or equilibrium is explored using Newton’s second Law of motion as shown by (1):

The Coulomb’s Law can apply completely in case of having only two charges in our environment without need to considering electric fields affects, while in case of having more than two charges in our environment, we have to consider about to applying the electric fields as well. In the environment, each single charge is affected by all other charges. Since forces from all other charges on a specific charge are linear, we can apply superposition on each particular charge. Based on superposition, if we assume charge with the vector electric field and charge with vector electric field , the resulting equivalent vector electric field between vector electric field and would be the vector sum of and as it shown by (2) [62]:

Because two different types of charge cancel each other, for simplicity and also to discuss the total amount of charge of an object, we label them using negative “−” and positive “+” signs. There are other kinds of naming different charges. For instance, Benjamin Franklin defined the label “A” as the negative charge and “B” as the positive charge. If an object does not have any charge, or in the other hand if there is an equivalent amount of both types of charges available for an object, it is referred to as electrically neutral.

##### 5.2. Coulomb’s Law

Coulomb’s Law is a physics law that expresses the electrostatic interaction among the charged objects. It remained for French physicist Charles Augustin de Coulomb in 1783 and electromagnetism theory developed based on its concepts. Henry Cavendish discovered, but not published, the relation between the distance and charge prior to Coulomb’s work. Also, the relation of the electric force with distance had been proposed previously by Joseph Priestley [63].

Coulomb’s law indicates the magnitude of the electrostatics force of interaction that is available between two point charges is directly proportional to the scalar multiplication of the magnitudes of charges and inversely proportional to the square of the distances between them.

The scalar form of Coulomb’s Law indicates an expression for the magnitude and sign of the electrostatic force between two idealized point charges, with a small size compared to their separation. For instance, if we assumed having two point charges and , the force acting simultaneously among them is given by the following equation: where the separation is distance and is proportionality constant. The signs of the charges indicate the type of force between them. In other words, repulsive behavior indicates having a positive force and attractive behavior shows having a negative force between the charges.

Based on the vector form, the force in the equation represents a vector force that is acting on either point charge, so directed as to push it away from the other point charge. The right side of the equation requires a coefficient multiplier for a unit vector pointing in one of two opposite directions. For example, from to if the force is acting on ; the charges may have either sign and the sign of their product determines the ultimate direction of that force. The force of pushing/pulling away the charges from/towards each other (based on their signs) is directly proportional to the product of the charges and inversely proportional to the square of the distance between them. The square of the distance shows force field due to an isolated point charge is uniform in all directions and is weakened with distance as much as the area of a sphere centered on the point charge expands with its radius. The law of superposition allows this law to be extended to include any number of point charges, to derive the force on any one point charge by a vector addition of these individual forces acting alone on that point charge. The resulting vector located as parallel to the electric field vector at that point, with that point charge removed. Coulomb’s Law can also be interpreted in terms of atomic units with the force expressed in Hartrees per Bohr radius, the charge in terms of the elementary charge, and the distances in terms of the Bohr radius.

As it shown by Figure 2, and (4), when the charges have the same signs, they will repel each other while when they have a different signs, they should attract each other:

Coulomb’s Law in equation form is exact for point particles as well as for spherically symmetric charge distributions such as uniform balls of charge as long as one uses the center-to-center distance. A particle which has a certain amount, say, 5 Coulombs of the negative kind of charge is said to have a charge of −5 Coulombs and one with 5 Coulombs of the positive kind of charge is said to have a charge of Coulombs. Plus and minus signs designating the kind of charge has the usual arithmetic meaning when the charges enter into equations. Figure 3 shows two charges and which are located at the distance .

The arithmetic interpretation of the kind of charge in the vector form of Coulomb’s Law provides that equation to give the correct direction of the force for a combination of different charges.

Assuming having two charges and . We use the Figure 4 representation of Coulomb’s Law for charges and forces among them graphically when . The vector shows the force experienced by the charge and the vector represents the force experienced by the charge . The vector is also the displacement vector between two charges ( and ). The magnitudes if the vectors and will always equal.

As an example, we will explain the equilibrium for charges between three charges. We assume that there are three fixed charged objects collinear on a straight line as it shown by Figure 1. We also assumed the charges on the objects are and and they also have the same sign or type of charge. The indicates the distance between object 1 and object 3. We assumed that the positions of object 1 and object 3 are kept fixed. This is shown by the Figure 5.

In order to achieve equilibrium between charges, the total amount of forces between each adjacent pairs of charges must be the same. The following equation shows the concept to exist for the middle, charged object:

represents the distance between object 1 and object 3 as shown in:

Based on Newton’s 3rd Law, the forces between each pair of adjacent charges must be the same. The following equation (7) show equilibrium forces between the pair of and and between pair of and , respectively,

Our goal is to find the distances between objects. To find the needed values, we use (5) and (6). The result of applying Coulomb’s Law to (5) is shown by (8a):

After applying the algebra rules, (8a) becomes as (8b):

Based on (6) we can write the following equation (9):

Substituting (9) into (8b) and sorting with respect to , which is our unknown value, we get the following equation (10):

The following equation (11) is a standard quadratic equation for (10), which is written in a general format:

By solving (11), we will get two values for and distances. The solution correct from the physics point of view is the first one. The second would put the charge to the right of charge . It causes the electrostatic forces resulting from interaction with and would be acting in one direction to the right side and the net force could never be equal to zero consequently.

#### 6. Different Combinations of Exit Doors

As a matter of standard, each building should have at least one exit door located at a place that is visible to the public. In case of a single exit door in the environment, the only way to evacuate people will be to guide them to the exit door and through it and hence there is only one *α* zone and the rest of the environment belongs to one *β* zone. There will be no *θ* angle, which means that there are no safe boundaries available. Our solution is applicable only if we have more than two exit doors at each convex zone. If there are two or more exit doors, there will be a corresponding number of *α* zones, *β* zones, and *θ* angles, respectively.

#### 7. Application of Customized Coulomb’s Law

In this section, we demonstrate and apply the customized Coulomb’s Law to exit doors based on the current locations of the agent sets of each moment. We divided the process of dividing the environment and decision making of each boundary into four different phases: initialization, which is the process of determining locations and status for each exit door to form the initial safety boundaries, detection of boundaries, gathering data from sensors, which is sensing and detecting the locations of agents and also their physical specifications and movements by cameras and detectors to send them to the processing unit, and updating the boundaries and decision making which is updating and redrawing the safe boundaries based on the latest information gathered and sent by the detector devices that are installed in the environment. Each phase consists of many other substeps. We use different techniques for each phase. The phases and relative steps are described next.

##### 7.1. Phase (1) Initialization

This phase starts by detecting the location of each exit door and also measures the width of each exit door. We consider each exit door as a sphere with the diameter equal to the exit door width. We assume an abstract line drawn from each sphere’s center point to other sphere center points in such a manner as to form the largest enclosing polyhedral configuration. This configuration must meet each sphere only once. Because the goal of this step is to only determine the initial values and measures of locations and specifications for each exit door in the environment, to calculate and draw the initiate safe boundaries, we consider our environment to be empty; that is, devoid of agents.

###### 7.1.1. Initializing the Exit Doors

At this level, all exit doors located inside the environment will have been detected possibly using a raster map. We need to have two different measures for each. The width and the central point of each exit door, which is placed on the central straight line that connects two edges of exit doors. This can be done by the cameras and detectors that are installed in the environment. We may use some techniques to increase the speed of detecting and measuring locations of exit doors such as using a wire frame viewing of the environment.

###### 7.1.2. Determining the Sphere of Charges

We assumed that each exit door behaves as a sphere of charge with the diameter equal of the width called *α* zone. The *α* zone may be considered to have a simple 2D circular shape or a complete 3D sphere. In this paper, we considered the zones as a complete 3D shape. The amount of charge for each *α* zone is equal to relevant exit door charge. If an exit door blocked for any reason during monitoring the environment, we must consider its sphere and hence its charge considered to be 0.

###### 7.1.3. Determining Zones

At this level, we divide our environment into different convex zones. To do this, we use convexity concepts and rules that have previously been used in the neural networks. On the other hand, the environment must be divided into convex shapes such that each default line must meet the edges of the shape only two times. Each convex area must has at least a simple exit door inside; otherwise, we have to join this zone with the adjacent convex zone which has at least a single exit door.

###### 7.1.4. Determining the Exit Doors Boundary

This point consists of determining the largest simple nondirected cycle graph of length where is total number of exit doors located in each zone. This graph has vertices and edges. Every vertex has degree of 2. We label this graph . For example, in case of 5 exit doors among the convex zone, the largest simple, nondirected cycle graph has the length equal to 5 and also we have 5 different pairs of adjacent charges.

###### 7.1.5. Determining the Amount of Charge for Each Exit Door

We considered each exit door as a sphere with the diameter equal to the width of each exit door. Based on the metric measurement, the amount of positive charge for each exit door is given by the following equation: where is the charge of th exit door, and is the width of th exit door. For instance, in case of an exit door with the width of 1 meter, the charge of the mentioned exit door would be 100.

##### 7.2. Phase (2) Detection of Boundaries

At this phase, the process will determine the initial boundaries for each exit door using the initial values gathered in the previous phase. To determine the initial boundaries, this phase will find the point which is located on the line that connects the centers of each pair of exit doors (as charges). The location of this point obtained by considering the width of each exit door, then drawing a virtual vertical page crossing that point. This phase bisects the intersectional boundaries between different vertical pages to reach zones.

###### 7.2.1. Calculating the Charge for Each Adjacent Pair of Exit Doors

At this step, we will calculate the amount of charge between each adjacent pair of exit doors. To do this, we assumed a straight line between each pair of adjacent exit doors. We also assume that the locations of all exit doors are fixed and that the charges for each exit door are positive. We will put a positive charge on the straight line between each adjacent exit doors. The amount of the positive charge is given by the following equation: where is the amount of charge between two charges and where located at the adjacent pair on the mentioned straight line. The assumed that the positive charge we used between each pairs is the average value for them, using this strategy guarantees that the positive charge will stay somewhere between two fixed charges and not beyond them.

###### 7.2.2. Determining Equilibrium Point

At this step, the process will find the equilibrium location for each positive charge that is placed on the straight line between each pair of positive charges. All exit doors as positive charges are fixed. The positive charge will locate on the straight line and closer to the smaller positive charge. Since the two charges around the positive charge are positive, they will push the positive charge away from themselves. In such a case, the positive charge will stay closer to the smaller positive charge because the grater positive charge has a larger exert force than the smaller one. The equations demonstrated in the three electric charges in equilibrium are used to determine the location of the mentioned positive charges.

###### 7.2.3. Finding the Centroid Point for Each Shape

At this step, the process finds that the geometric center (i.e., centroid point) for each shape that contain related exit doors. The center of mass, or centroid of a 2D shape, is the intersection point of all straight lines that divide the shape into two areas with equal moment about the line. The centroid point is the arithmetic mean of all intersection points. The next step is to draw a line from that location to all positive charges and continue that line until it reaches an environment. This line separates the environment into two different areas such that each of them belongs to a different exit door.

###### 7.2.4. Determining and Binding Zones

Each exit door has a *θ* angle that belongs to it, which is drawn from the centroid point to the equilibrium points of the straight lines crossing from the relative adjacent charges. At the next point, we bind the largest *θ* angle which includes only a single exit door as the zone of the relative exit door. The process continues until all zones are specified for each exit door.

##### 7.3. Phase (3) Data Gathering and Analysis

There should be several sensors, cameras, and detectors installed at different locations in the environment in order to be able to determine the location of each exit door and especially the location of the agent set at each moment. These facilities estimate the status of each exit door in each instant in terms of evacuation ability rate. These devices will send pertinent data for agents in terms of their size and an estimate of their movement speeds to the central unit in order to classify analyzes and makes decisions. This phase generally gathers and analyzes the data obtained by different sensors and detectors installed inside the environment.

###### 7.3.1. Determining the Agent Locations

The crowd is dynamic and is constantly changing locations. The rate of movement is more unpredictable when agents are faced with an emergency situation. The process at this step will be to detect each individual position in the environment. One way to determine the positions is by using a grid. In order to make decision about the boundaries in real time, the sensors should be fast enough to determine individual locations and to send them to the central processing unit for analysis.

###### 7.3.2. Determining Each Agent’s Charge

The sensors and detectors should be able to determine the specifications of each individual such as body size and movement rate. For instance, based on the agent movement rate, the detector might determine the health status of each individual. Having these measures we are able to assign an accurate value as a charge to each agent. At this step, the process will determine the amount of charge for each individual located in the environment based on physical specifications. Each general convex zone consists of a collection of distinct zones, zones, and *θ* angle belonging to it. Each *β* zone has its distinct *α* zone and *θ* angle belonging to it. Furthermore, *α* and *β* zones and *θ* angles are non-overlapping among zones and angles as shown in:

Here Z is the general convex zone, is the th *α* zone of th zone and is the th *β* zone of th zone and is th *θ* angle, respectively. The environment may consist of a number of general convex zones inside. Each general convex zone must consist of at least a single exit door. In case of having a convex area without an exit door, we will join it to with its neighboring zone that contains at least a single exit door. The relations are shown by the following equation:
indicates that there is a collection of convex zones available in the environment. Each zone has its own set of agents. Each agent may have a different situation in terms of the physical status. A sample set of agent set in a sample general convex zone is shown by the following equation:

Here is the th zone and is the th agent that belongs to th zone.

Of all the agents available in each general convex zone, each *β* zone and hence exit door depend on their situations and locations support a number of them shown by the following equation:
where indicates the th *β* zone.We assumed that each agent has a negative charge based on the specifications that he/her possesses. The key features that we considered in this paper were age, sex, and health status. The amount of charge for each agent is given by the following equation:
where is the amount of negative charge for the th agent, is the age of the th agent, and the is the health status for the th agent. Because all given values of the equation are negative, the final result of is always smaller than zero. In case that there are no agents in any *β* zones, the total amount of charge for the mentioned zone will be considered to be 0. In order for having agents, the amount of charge in the *β* zone is relative to the amount of charge for the number of agents s and it is always smaller than 0. However (19) shows the amount of charge for *β* zones in different situations depending on the number of agents available in them:
where is the amount of negative charge for the th agent. One of key features related to the physical specification of agents that we considered in this paper is the age of each individual. The ranges of ages are varied from a place to another place and it depends on the usage of the environment and determination is based on the average age of the majority of people in the environment. We consider the normal value to be −1 and in order for having a reasonable result; we have to bind this value to the majority of people with the same range of age. For example, the usage of values in a kindergarten is different from a conference room because in a kindergarten the majority of people are children so we may bind the normal value to the group of ages below than 10 years old whereas in a conference room, because the average range of age is between 20 and 40, we need to bind the normal value to this group of age.

In our case study, we focused on a night club station, which consists of adult people as the majority range of ages inside, so we have to bind the normal values *of * to the ages that are placed between 10 and 40 years old. Based on the ages of agents in the environment, we used Table 1 to assign values to calculate the charges of each agent.

The other key feature in terms of calculation of agent charges is the gender of individuals. The values that may be used for each gender are different from situation to situation. In this paper, we assumed the default value, *of * for the males. In case of having only one gender in our environment, we have to consider default value for it. The amount of charge related to the gender of each agent is shown by the following Table 2.

The third physical key feature that we considered in this paper is the health status. The health status may vary from a place to place and it depends on the environment usage and is determined based on the health status of majority of the people are the environment. In this paper, we considered having only two options: Healthy and Disable. In some places, like hospitals or elder houses, there should be other options available in order to have a better estimate of the charges for each agent. The amount of charge related to the health status of each agent is shown by the following Table 3.

We have to pick a suitable value from each of the tables for each agent based on his/her physical specifications in order to be able to determine their amount of charge.

Apart from the physical specifications of each agent, focusing on the status of each exit doors is essential. We determine the amount of charge for each single exit door based on its situation at each time instant.

Different situations for the status of each exit door may vary based on other options that are related to the usage of the environment, as well as the location of each exit door. We always used the default rate for the best situation of exit door when it is usable, reliable and can evacuate people to its full capacity. In this paper, we used Table 4 to determine the safety rate for each exit door based on the status of it. We assumed the following values for each group of safety rates for exit doors.

To obtain the new values for charges of exit doors, we have to consider previous amount of charge for each exit door, and the latest safety status of each. The total amount of positive charge is shown by the following equation: where is the total positive charge of the th exit door, is the initial charge of the same exit door, and is the safety rate for the th exit door. If the exit door completely is blocked or not usable, we have to consider its charge as 0 as shown in:

The cameras and detectors will determine the safety rates of each exit door and send their status to the processing unit. In such situations, we have to remove the exit door from our environment and reassign its zone to the other ones that are still usable. The exit door will not be considered in forming the largest nondirected simple graph.

###### 7.3.3. Determining the New Charge for Each Exit Door

After all agent’s amount of charge is determined, at this step the process will calculate the new amount of positive charges for each exit doors based on the results obtained at the previous step. In order to determine the new value of each exit door charges, we need to consider all agents that are belong to that exit door at the moment. The new amount of charge for each exit door is shown by the following equation: where is the new positive charge for th exit door, is the initial positive amount of charge for the th zone which belongs to the th exit door, and is the previous positive amount of charge for the th exit door. The key feature of calculating the new charges for each exit door is based on (19) which is to expand the zone of those exit doors that have the smaller number of people inside and they are also are usable and stable. For example, assume having an exit door with 10 people in its zone and the adjacent exit door with the smaller width with only 3 people in its zone. Equation (19) will expand the area of the exit door with the smaller number of people. For the next round of processing, we might consider many of the people that belong to the bigger exit door for the smaller one.

###### 7.3.4. Determining the New Status for Each Exit Door

Regardless of the already mentioned features, there are many other features that may exist in the environment that should be mentioned while determining each zones and boundaries. Determining exit door status is necessary, especially in emergency situations. In the case of blocked exit doors for such reasons as smashed walls or people who block the exit door by pushing or shoving each other, the reliability of the exit door can be significantly decreased. In such cases, the amount of positive charge of exit door will reduce if its reliability decreases. We called the reliability factor for each exit door as safety rate of that exit door. At the initialization phase, the safety rate for each exit door that is ready to use is set to . This rate will change based on the new environmental information gathered by sensors based on each exit door status. The safety rate is shown by the following equation: where is the safety rate for the th exit door at the moment .

##### 7.4. Phase (4) Decision Making and Updating the Boundaries

To make the decision and updating the safe boundaries for each of the general convex zones, having the values described in the previous third phases is essential. Based on the new values for each *β* zones in each moment, the value of charges for each exit door, and hence the safe boundaries of the general convex zones will change. The process of determining the boundaries for each exit door should continue updating by gathering new data from different installed sensors at each moment. Having a reliable and real-time hardware in order to detect and determine the different physical status of the exit doors, people status, and locations is essential in forming the safe boundaries in a reasonable time. The process refreshes the results all the time to redirect to the second phase after reaching and completion of the third phase.

Having the safe boundaries, which is the result of the 4th phase, helps people to make a better decision. This produces lower risk and hence better results in terms of evacuating people out of danger in emergency situations.

#### 8. Case Study

In this section, we apply the optimized Coulomb’s Law to a sample environment and compare the results as a step towards validation of our model. We selected the Station nightclub environment. On Thursday, February 20, 2003, at The Station nightclub located at 211 Cowesett Avenue in West Warwick, Rhode Island a fire accident occurred, which was the fourth deadliest nightclub fire in American history. More than 100 people lost their lives because of it. The tour manager of the evening’s headlining band used a pyrotechnics during the show that was the main reason of firing. In the beginning, the fire ignited flammable sound insulation foam in the walls and then it spreads on ceilings surrounding the stage. Initially, there were about 132 people inside before the fire incident. Some of them were injured and about 32 escaped uninjured. Based on the what cameras and sensors were installed inside the environment recorded, growing billowing smoke and blocked one of exit doors quickly made escape impossible because of limiting the vision site. In our approach, we will first divide the area to convex zones and then we form the bidirectional cycle crossing all exit doors and based on the centroid location of the formed shape, we form the *α* zones, *β* zones, and *θ* angles. Based on some assumptions about the percentage of people who were spread in the environment and their physical specifications, we form the new zones. To apply the strategy, we consider only the map of empty building at first step to form the zones and then regarding the crowd distribution, we form the new safe boundaries. Figure 6 shows a general view of the building shown in Figure 6.

In order to increase the speed of processing and also to simplify the map, we consider the wire frame view for it. Showing the map in frame view also helps to distinguish between objects and people easier. Figure 7 shows the frame view of Figure 6.

At this level, because of determining the initial safe boundaries, we only focus on exit doors. In order to apply our strategy, at the first step we have to determine the exact locations of each exit door and also the width of each. This task would be done by using a raster technology and will perform and send to the processing unit by detectors and cameras that are installed in the environment. We also need to determine the general convex zones as well. Based on the environment map, we have generally two convex zones as shown by:

The first general convex zone consists of four exit doors and the second zone consists of a single exit door as it shown by:

Because we have more than one exit door in the first zone, there are *α* zones, *β* zones and *θ* angles for each exit door. Whereas the second zone only has a single *α* zone related to its exit door. There is no *β* zone and no *θ* angle exists for the second zone because it consists of only a single exit door and hence all area of the second zone belongs to its only exit door (ED_{5}).

We use the metric measurement in our paper and, therefore, of five exit doors available in the environment, the width of exit doors 1, 3, 4, and 5 all equal 1 meter, and exit door 2 is equal to 2 meters. Based on the width of each exit door, we are able to calculate the *α* zones and the charge of each one as they are shown in Table 5.

We consider each *α* zone related to each exit door as a sphere of charge which has a center equal the central width location of each exit door. Figure 8 shows the result of dividing the area into convex zones and *α* zone related to each exit door.

Because the second zone does not have any *β* zones and *θ* angles, we only focus on the first zone. We have four exit doors in this zone hence the largest simple non directed cycle graph has the length of 4. To form the mentioned graph, we need to connect the central points of each exit doors together through straight lines. This diagram must meet each exit door only once. Figure 9 shows the largest simple nondirected cycle graph of length 4 crossing all exit doors in the first convex zone.

At the next step, we need to find the centroid point of the 2D shape formed by the mentioned graph. We also need to find the equilibrium points between each adjacent pairs of charges. To do this, we need to have the values of the adjacent pairs of charges. Based on our strategy, we assumed all exit doors have the positive charges and also they are fixed in their places. To find the equilibrium location, we use a positive charge that its amount is equal the average of the adjacent pairs of charges. The mentioned positive charge is placed on the straight line between the pairs of charges, and it is closer to the smaller charge. In case of having the same amount of charges, the positive charge will locate in the middle of pairs of charges. To form *β* zones and *θ* angles, we have to connect from the centroid point to each equilibrium point and continue the line to the environment. Figure 10 shows the centroid location of the 2D shape for the mentioned graph, the equilibrium locations, the *β* zones, and *θ* angles related to the exit doors of the first zone.

Figure 10 shows all areas needed for the first zone when there is no any individual available in the environment. At this step, we will calculate the charges of the agents are available in the environment and will update the safe boundaries based on their distribution in the environment. The process of gathering information about the physical specifications of the agents and their locations is done by sensors and detectors that are installed in the environment. This data will then be processed by our method. Of 230 people that we assumed are available in the environment, we consider 200 people are located in the first zone and 30 people are places in the second zone. We also assumed that in each area, half of the people are male and the other half are female. We considered that all people in our environment have normal health status. We consider in each zone, the ages range is between 20 and 40 years old. We assumed that all exit doors are open all the time and safe to use with their full evacuation capacity which means no blocking will happen in the environment during the experiment. We apply our strategy in two different modes. When the distribution is the same and when it is not. Equation (26) shows the collections of the agents in each zones:

##### 8.1. Mode 1: Equal Crowd Distribution

Based on our assumption for the first mode, there are 100 males and 100 females available in the first zone. All of them have normal health statuses and are between 20 and 40 years old. We also assumed that their gender percentage for each *β* zone is the same as 50 percent. Hence, for each *β* zone in the general convex zone, we have 25 people consisting of 50 percent male (13 people) and 50 percent female (12 people). Table 6 shows the *β* zones, initial *α* zone charges, and new *α* zone charges.

Because we assume the crowd to have the same distribution, we just observed having slight changes for the safe boundaries after applying the charges of agents in each *β* zone. In this mode, we have four *β* zones, hence each zone is assumed to support a quarter of the people in it. We also considered having 13 males and 12 females in each *β* zone. Figure 11 shows the new safe boundaries based on the normal distribution of the crowd in the first general zone.

Considering the mentioned distribution may be useful in many places such as theater saloons or conferences rooms. In such places, because of the kind of usage of environment, the distribution of the crowd is equal for all areas inside, whereas in many other places, such as night clubs or hallways, because the crowd distribution is always subject to significant changes, we need to consider a more accurate and realistic pattern in our environment. In the following mode 2, we will consider having a random crowd distribution based on the different locations that are available in the environment.

##### 8.2. Mode 2: Random Crowd Distribution

In this mode, we consider a rational pattern of crowd distribution based on the usage of the environment and also the different locations available in the general convex zone. We divide and name each *β* zone into the following groups.

In the first zone, we have the highest concentration of the crowd available because of its usage. It consists of a Raised Platform and a Dance Floor. These areas have the most attractive options that can potentially cause the present people to gather in them. The second *β* zone consists of a Dressing Room and a Sun Room, so we will consider having the least percentage of people in these areas. The third *β* zone consists of a Bar that may have a number of people between the largest and the smallest area in terms of the percentage of people. The fourth *β* zone consists of a Kitchen, a Dart Room, and a Side Bar that have the least number of people in it. Of 100 percent of people (200 people) in the first general zone, based on the mentioned locations in each zone, we assumed that we have 60 percent of them in the first *β* zone (120 People), consisting of 50 percent males (60 people) and 50 percent female (60 people), 10 percent in the second *β* zone (20 people) consisting of 60 percent male (12 people) and 40 percent female (8 people), 20 percent in the third *β* zone (40 people) consisting of 70 percent male (28 people) and 30 percent female (12 people), and 10 percent in the fourth zone (20 people) consisting of 40 percent male (8 people) and 60 percent female (12 people). Tables 7 and 8 show the percentages and the number of people consisting of males and females in each *β* zone.

In this case, because of having a different distribution in each area, the *α* zones shows bigger differences than their previous values and hence we have different safe boundaries compared to the first mode. The number of people that each exit door supports is varied based on the area occupied by each. In some cases, because of changing the safe boundaries, some people may belong to a new exit door which means in order to have a safe evacuation they have to be guided through the new exit door that they belong to. Table 9 shows the *β* zones with old *α* zone charges and new *α* zone charges.

Based on the mentioned values shown in Table 9, we redraw and form the new safe boundaries based on the new values of charges for exit doors. Figure 12 shows the new safe boundaries based on the random crowd distribution after applying the agent charges in each *β* zone.

We assumed that all exit doors are stable and reliable during experiments. There are two general reasons that can affect an exit door’s status, such as explosions or falling objects around them or fallen or collapsing people around them. In the real word, in order to have better decisions about forming safe boundaries, considering the status of the exit doors is essential. If for any reason an exit door is blocked completely or it is not reliable anymore in terms of evacuating the crowd, our strategy is not applicable. In such cases, the amount of charge for exit doors will be 0 and it will not conform to the largest simple nondirected graph anymore.

#### 9. Conclusion

This paper explored a powerful mechanism for guiding crowds out of danger using Coulomb’s Law, graph theory, and convex and centroid concepts in order to form safe and reliable boundaries around each exit door. The output of our tool for supervising people is rapid identification of exit doors for groups of people fleeing danger. Use of this mechanism can quickly decrease errors committed by exiting individuals. The technology for how the supervisory people in the control room will use our model to guide people is beyond the scope of this article. Detecting people automatically is not trivial and remains to be explored in future studies. To be effective, the detectors and sensors should also be able to determine the specifications of each individual such as body size and movement rate. These are a few challenges to be addressed in the future. Despite challenges, our methodology yields strategies for guiding people who are trapped in an indoor public space, at dangerous locations, to be most rapidly evacuated.