Fuzzy Pheromone Potential Fields for Virtual Pedestrian Simulation

. The study of collective movement of pedestrians is crucial in various situations, such as evacuation of buildings, stadiums, or external events like concerts or public events. In such situations and under panic conditions, several incidents and disasters may arise, resulting in loss of human lives. Hence, the study and modeling of the pedestrians behavior are imperative in both normal and panic situations. In a previous work, we developed a microscopic model for pedestrian movement based on the algorithm of Ant Colonies and the principles of cellular automata. We took advantage of a fuzzy model to better reflect the uncertainty and vagueness oftheperceptionofspacetopedestrians,especiallytorepresentthedesirabilityorblurredvisibilityofvirtualpedestrians.Thispaper usesthemechanismofartificialpotentialfields.Saidfieldsprovidevirtualpedestrianswithbettervisibilityoftheirsurroundings anditsvariouscomponents(goalsandobstacles).Thepredictionsprovidedbythefirst-ordertrafficflowtheoryareconfirmedby theresultsofthesimulation.Theadvantageofthismodelliesinthecombinationofbenefitsprovidedbythemodelofantsand artificialpotentialfieldsinafuzzymodeling,tobetterunderstandtheperceptionsofpedestrians.


Introduction
Pedestrians' dynamics are continuously affected by the design of their surroundings.Their comfort and mobility become very important both inside public building and in open areas.Architects and designers have to take into consideration the characteristics of pedestrian flows in order to design the infrastructure as well as to assess its efficiency and safety.In particular, a good understanding of the emergent patterns is required to predict how the flow will behave under different circumstances.Many studies have been carried out to evaluate these influences, either by traditional simulation tools or by developing models to serve modern pedestrian's simulation.Most of these models attempt to understand how space will affect pedestrians' crowd flow and how to improve space designing particularly in public transport.
In the real world, on the one hand, almost everything is relative and has a degree of truth.People can carry a wide variety of mental and physical work, without previous measurements or calculations.This ability is based on their perception.Probability theory, based on bivalent logic, shows an inability to operate on perception-based information.The bivalence of the conceptual structure characterizing probability theory is in fundamental conflict with reality, in which almost everything has a degree of truth.It is this reality which is the starting point of fuzzy theory.
On the other hand, pedestrians move in two-dimensional spaces, and their complex behavior is easily affected by surroundings architecture.Scientific researchers focused on studying the characteristics of unidirectional and bidirectional counter pedestrian flows [1].Their studies were conducted either by using models or by using empirical or experimental investigations with video analysis [2].
In previous work, we mix the concept of fuzzy ant given by Ant Colony paradigm and associated cellular automaton model.We have adopted a fuzzy model for its particular achieve a point P in a time ΔT ability to better represent pedestrian's desirability or visibility [3].Reference [4] introduced artificial potential concept for a first and small investigation without a deep development.
Another previous work presents a measurement of virtual pedestrians and vehicles' mutual accidents risk indicator [5], where pedestrians' dynamics are modeled using the basic fuzzy ant model [3], to which we have integrated artificial potential fields.
This paper is structured as follows: after a short introduction, in Section 2, we present the related works to our model.Next section presents definitions and some useful rules, in fuzzy logic, for our interest.The proposed model is described in Section 4 by introducing artificial potential fields' concept.And finally Section 6 describes the obtained results given by simulation.

Related Works
Faced to a navigation problem while moving with a proper motivation, pedestrians explore their environment and carry out a path planning to undertake.To perform this decomposition step, they use three levels of analysis: (i) strategic, (ii) tactical, and (iii) operational (see Figures 1 and 5).For example, an employee wants to join his office after a meeting at the strategic level; there are two possible paths and he chooses the closest at the tactical level, and then he moves there.While moving, he will interact with other pedestrians in his path and avoid obstacles in operational level.The latter proves to be sufficient to study the collective behavior of pedestrians.It includes three modeling levels according to the studied detail level: microscopic, mesoscopic, and macroscopic.

Macroscopic Approach.
Pedestrians' crowds' dynamics models belonging to this scale represent a generalization of those of traffic, considering the multidimensional nature of the dynamics and motivations of pedestrians moving toward specific objectives [6].These models are based on an analogy between the collective movement of pedestrians and that of fluid and granular flows [7].The macroscopic approach uses the equation of mass conservation and the amount of motion balance [6].However, we must remember that pedestrians have the flexibility of moving in two dimensions, with the possibility to stop and move according to the permissible speeds interval.But the hydrodynamic approach refers to the average quantities at the local level, and therefore the local velocity fluctuations are not explicitly modeled.Also pedestrians do not behave only according to physics laws.In addition, the characteristics and heterogeneities of pedestrians' motion as well as their individual characteristics are not taken into consideration.

Mesoscopic
Approach.This approach adopts the principle of platoon traffic by focusing on groups of pedestrians with common behavioral characteristics [8].It is used when the state of the system can be identified by the positions and velocities of microscopic entities, while their representation is given by an appropriate probability distribution on the microscopic state.
The models belonging to this scale differ from the way they model the interactions between the particles.These interactions may be localized, as in the case of the Boltzmann equation, or medium-range, as for the Vlasov equation.The difference compared to the classical kinetic theory is that interactions do not follow the rules of classical mechanics, but rather the driving strategy is expressed by the behavioral rules of formed pedestrian groups.
A combined macroscopic simulation of vehicles and pedestrians is extremely helpful for all-encompassing traffic control.Zhang and Chang [9] developed a hybrid model for both pedestrians' and vehicular traffic, by using the macroscopic Hartmann and Sivers model on a network of nodes and edges.This model can be used to identify pathways and roads, which have a higher risk of congestions [10].Otherwise, the work presented in [9] has integrated the strengths of the Mixed-Cellular Automata with some probabilistic functions in order to offer a realistic mechanism to reflect the competing and conflict interactions between vehicle and pedestrian flows, whereas Di Mauro et al. developed a hybrid evacuation model able to target both pedestrians and vehicles traffic patterns during an evacuation under the constraint of modeling a large number of evacuees [11].

Microscopic Approach.
This scale describes the collective dynamics of pedestrians and their forms of self-organization, from a detailed analysis of their individual movement.Unlike macroscopic and mesoscopic models, these models take into account the specific motivations of pedestrians and their interactions [12].However, they clash problems of analysis, calculation, and cost.They can be categorized into several categories corresponding to different ways of describing the acceleration term on the basis of a detailed interpretation of individual behavior.Categories are as follows: (1) Rules Based Models.They have been widely used to simulate animal herds and crowds of pedestrians.Two key examples are the Boids [13] and the PSO (Particle Swarm Optimization) metaheuristic of swarm's intelligence.These models have simple rules to simulate a virtual group of entities moving collectively avoiding obstacles and collisions between them [14].(2) Cellular Automata Based Models.They adopt an artificial intelligence approach for modeling pedestrian simulation, based on simple formulations of physical systems under conditions discretized in terms of space, time, and values of physical quantities [15].Spatial discretization is space displacement pedestrian as discrete uniform lattice cells, while temporal discretization represents the change frequency of pedestrians positions, as transitions between cells.These transitions are governed by a function of the cells states in the pedestrians' neighborhood and those they occupy.(3) Physical Forces Based Models.They are motivated by the observation that the pedestrians movement deviates from a straight trajectory in the presence of other pedestrians or obstacles.Trends in social behavior of pedestrians are formalized using a combination of sociopsychological and physical forces covering pedestrian individual motivation and obstacle avoidance.Hence, the term "social forces" (acceleration, repulsion, and attraction) arises, to which pedestrians are subject to long range [16].(4) Network Queues Based Models.These models represent the pedestrian environment as a network and describe how they move from one node to another [17].They rely heavily on the basic principles of the waiting theory.However, the assumptions of the latter condition restrict its applicability in modeling realworld situations.( 5) Models Based on Multiagent Systems: They are especially beneficial when it comes to modeling a heterogeneous population of agents with complex behaviors.Important examples based on multiagent systems models can be identified in the following work [18,19].However, despite their obvious advantages, these models have been criticized for their lack (or scarcity) of integrating psychological and physiological elements to make them more realistic and allow decisions similar to those of humans.

Fundamental Diagrams of Traffic Flow
Fundamental diagrams of traffic flow are curves representing relations between flow and density, density and speed, and speed and flow (Figure 2).These diagrams are vital tools which enable analysis of fundamental relationship of traffic flow [20].In this work, we are interested in curve connecting the flow and density of the traffic of pedestrians, by analyzing in parallel the density curves and flow separately.
The flow and density vary with time and location.When there is no pedestrian on the map, the density is zero, and the flow is also zero.Meanwhile, when the pedestrians number increases, gradually the density as well as flow increases.Traffic reaches its jam state when pedestrians cannot move because their density becomes maximum (see Figure 2).At jam density, flow will be zero because the pedestrians are not moving.When density is between zero density and jam density, flow is in a free state.Note that the same flow can have two different densities.However, corresponding speeds are different.

Fuzzy Theory
Nonrandom impreciseness or vagueness occurs associated with numeric quantities in many human activities.This impreciseness may have different origins.For example, it is usual to say "he is about forty" or "I expect to make more than two million on this deal."The natural modeling tool for this kind of situation is the theory of fuzzy sets.Given that precise numeric quantities are represented by real numbers, it should be thought that imprecise or vague quantities may be represented by "real fuzzy numbers." Zadeh introduced the concept of an infinite valued logic [21] where he described fuzzy set theory mathematics by extension fuzzy logic.The fuzzy concept cannot be represented by the conventional approaches.Consequently, the theory of the classic probability do not supply an abstract frame suited to represent the knowledge, because such a concept is lexically indistinct.Fuzzy set theory maps the values true and false to real numbers on the interval [0, 1].New operations for the logic calculations were proposed as a generalization of the classic one.The work given by Wang et al. [22] proposes the following definitions and performs a ranking method for fuzzy number.Definition 1.Let  be a nonempty set.A fuzzy set "" in  is characterized by its membership function: () is interpreted as the degree of membership of element  in fuzzy set  for each  ∈ .The set  is completely determined by the set of tuples  = {(,   ())/ ∈ }.Definition 2. The membership function  Ã() of trapezoidal fuzzy number (TNF) Ã(, , , ) is defined by where 0 ≤  ≤ 1 is a constant and   Particularly, if  = , the trapezoidal fuzzy number is reduced to a triangular fuzzy number denoted by Ã(, , ; ) or Ã(, , ) if  = 1.
Because   Ã and   Ã are two applications strictly monotonous and continuous, then their reverse exists and must be also strictly monotonous and continuous.Let ( Figures 2 and 3 give, respectively, membership function and reciprocal membership function of a trapezoidal fuzzy number.
Or for a triangular fuzzy number, 0 ( Ã) =  1 3 . (5) Particularly, for a normal triangular fuzzy number, we have The ordering function of fuzzy number [17] is defined by So, let Ã and B be two fuzzy numbers:

Proposed Model
Our model is based on the paradigm of two-dimensional cellular automata and ACO (Ant Colony Optimization) metaheuristic in its simplest version, without focusing on an optimization aspect that differs from our goal [23].The latter consists in developing a model of virtual pedestrians' motion, without providing it with any personal intelligence formula.The bioinspired character of intelligence in swarms treats virtual pedestrians like a swarm that can act and interact with the components of their environment, while having a collective artificial distributed intelligence.This collective intelligence enables them to produce structures self-organized and global that are not even considered at the local level.Artificial potential fields are integrated to facilitate pedestrians' navigation toward their goals.

Artificial Potential Fields.
The potential field method treats pedestrian as a particle moving on an artificial potential field.The goal point acts as an attractive force on the pedestrian and the known obstacles act as repulsive forces.The superposition of all forces impacts the pedestrian.Therefore, an artificial potential field guides the pedestrian toward the goal point while simultaneously avoiding obstacles.
In general, the scalar potential field is defined as the sum of the attractive potential field of the goal point and the repulsive potential field of the obstacles [24]: where  att and  rep are the attractive and repulsive potentials, respectively.The attractive potential influence attracts the pedestrian toward the goal position, while repulsive one tends to push him away from the obstacles.Similarly, the vector field of artificial forces () acting at the pedestrian position  = (, ) is given by where  att () = −∇ att and  rep () = −∇ rep , where ∇ is the gradient vector of potential  at pedestrian position  = (, ) in a two-dimensional map.

Attractive Potential Field.
The most commonly used form of potential field functions proposed by Khatib is defined as (see [24]) where   = ‖ −   ‖ denotes the Euclidian distance,  is the pedestrian current position and   is the position of an attraction point, and  is an adjustable positive constant.The attractive force  att () could be computed as the corresponding potential is differentiable.So we have  att () = −∇ att =        −        .
Hence, the attractive force tends linearly toward zero as the pedestrian reaches the goal.

Repulsive Potential Field. One example of repulsion potential field is given by
where   = ‖ −   ‖ denotes the Euclidian distance,  is the pedestrian current position and   is the obstacle position, and  is an adjustable positive constant.
The repulsive potential field is positive or null and tends to infinity as  gets closer to the obstacle.If the object boundary is convex and piecewise differentiable,   is differentiable everywhere in the configuration space.
Then, the repulsive force could be computed as Advances in Fuzzy Systems Consequently, the resulting force () acts on the pedestrian by guiding him toward the goal object while simultaneously avoiding obstacles [25].
The abovementioned formulation does not allow virtual pedestrians to pass between closely spaced obstacles.To solve this problem, Miguel and colleagues proposed a modified formulation for repulsion forces [26]: The introduction of the term ‖ −   ‖  ensures that the total potential reaches its global minimum 0, if and only if  =   .The corresponding repulsive force is given by while while  OR = ∇  and  OG = −∇  are two unit vectors pointing from obstacle to pedestrian and from this latter to the goal, respectively.Consequently,  rep repulses the pedestrian from the obstacle with its component  rep1 and attracts him toward the goal with the component  rep2 .Hence, this formulation solves the problem of nonreachable goals under some obstacles configurations.

Model Rules. Our model uses Ant Colony Optimization
paradigm, which is one of the most successful techniques in swarm intelligence.It is inspired by the pheromone trail laying and following behavior of ants.Such behaviors allow ant colonies and find shortest paths between their colonies and food sources.Ants communicate indirectly by the mine of chemical pheromone trials.In nature, ants usually walk randomly while laying down pheromone trials.If other ants find such a path, they do not keep walking randomly but follow the trail and reinforce it if they find food.However, the pheromone evaporates with time passing.More ants will visit a shorter path and consequently the pheromone density remains high for a longer time.
Pedestrians move in a two-dimensional map.For each pedestrian in a cell () and wishing to move to a cell (), the possibility of movement depends on the following: (1) A parameter of dynamic floor field   .
(2) An attractive potential field to the goal  att .
(3) A repulsive potential field to obstacles  rep .(4) The movement possibility toward a cell  depending on its occupation state (  = 1 or   = 0).We have chosen to not represent this parameter as a fuzzy number because it does not require a degree of correctness.Each cell can hold just one person per time, and its size is set to fit this matter.(5) A fuzzy general utility of movement from a cell () to a cell () given by while τ is the pheromone quantity,  is the influence control parameter of τ ,  is the influence control parameter of η , and    8 is the set of eight cells neighboring cell ().The pedestrian desirability or visibility is given by where while  0 is a specific parameter for each obstacle in the simulation grid and   and   are the distances between pedestrian position and nearest obstacle and the goal, respectively.dist(,   ) = |−  |+|−  | is the Manhattan distance between points  and   .(6) The pheromone update rule is given by where  is pheromone vaporization rate.Δτ  = ∑  =1 Δτ   () is the sum of pheromone laid down by all pedestrians at time step .In a time step, only one pedestrian occupies a cell, so Δτ   () =   ().Since in the real world pedestrians cannot move in a straight line, we choose then to replace the Manhattan distance.Literature proposes many distance algorithms.For their simplicity, we choose to apply the brush fire algorithm in calculating distance between the next target cell and an obstacle, and wavefront algorithm for the one between the next target cell and the goal.These algorithms are applied using Von Neumann neighborhood.

Brush Fire and Wavefront Algorithms.
The brush fire algorithm is as follows: (1) Initialize all distances by 0 (2) Set distance of cells, on which obstacle to 1 The result is a distance map in which each cell contains the minimum distance to an obstacle.Since wavefront algorithm is a variant of brush fire one, we apply the algorithm of brush fire starting with the objective.The cells distances on which the goal is set are initialized by 2, and the others by 0. We obtain a distance map from goal to all cells.

Conflicts Mitigation. Pedestrian collision means two pedestrians will move into the same cell in time step (𝑡 + 1).
A solution is proposed to avoid this problem.We choose randomly one of two pedestrians to enable him to execute his step.The other pedestrian remains in his cell.

Model's Algorithm. The proposed model follows the following algorithm:
(1) The repulsive potential is calculated for all obstacles (denoted as obs in the following equation) by the following formula: (2) The attractive potential toward the goal is calculated for cells in the map.
(3) For each pedestrian, the utility of transition to a nonoccupied neighboring cell () is determined by the attractive potential, the repulsive potential, the dynamic field, and the state of occupation of the cell.Pedestrians choose to move to cell () where the fuzzy general utility obtains its maximum value: The conflicts arising between pedestrians attempting to move to the same target cell are solved randomly.
(4) Pedestrians who are allowed to move execute their simulation step.
(5) Pedestrians update the amount of pheromone present in the cells just before their movement.
(6) Pedestrians alter the dynamic floor field of the cell they occupied before their move.In Figure 5, we represent our model algorithm.
Figure 4 shows reciprocal memberships function of a trapezoidal fuzzy number.
In this model, the fuzzification of pedestrians' utility concerns only spatial perception (obstacles, amount of pheromone for dynamic floor, etc.).Our goal in this approach is to have a simple model integrating fuzzy modeling and the Ant Colony paradigm and artificial potential fields' concept.This model ensures an easy and effective navigation to pedestrians by attracting them automatically to their objectives while repulsing them from obstacles in their ways.Certainly, other cognitive and behavioral factors will be considered in our future work.This work is scheduled to consider dangerousness of crossing intersections by pedestrians.Perception of vehicle speed by pedestrians and other psychological factors can be integrated.The software architecture of the simulator allows this extension.For theoretical foundation, the fuzzy general utility proposed here may be interpreted as a fuzzy probability, extending the crisp probability transition given by Ant Colony paradigm.

Results and Discussion
We choose at first a simulation scenario as a blocked corridor (see Figure 6).We placed a statistical detector in the part of the corridor closest to the destination.Resulting attractive and repulsive potential fields are shown in Figures 7 and 8.
We are not interested in the variation of influence parameters of fields' floor.These parameters are set to 1 ( = 1 and  = 1) for a fixed value of static and dynamic influences.
We have varied the width of different fuzzy numbers used from crisp state "0" to "0.8," to express pedestrian's degree of their environment perception.We noticed that pedestrian's density increases until it reaches a maximum value when traffic becomes congested (see Figure 9), while pedestrians flow decreases in the same phase (see see Figure 10).
The fundamental diagram (see Figure 11) illustrates the phases of the free and congested pedestrian's traffic.We observe that crisp pedestrians having exact knowledge about their environment take more time to be in congested state as shown in Figure 12 by red curve.This time decreases while increasing fuzzy numbers width.For very low density, pedestrians can evacuate easily and quickly compared to the case of maximum density where pedestrian movement becomes impossible.Pedestrians move according to the artificial potential fields and virtual trace left by others, and the fact of increasing the width of their components implies that the fuzzification threshold also increases.This does not allow pedestrians to find their way out quickly.Imprecise perception of pedestrians in relation to their environment leads the system to an entropy state that produces congestion at an earlier time (see Figure 9).Average evacuation time for pedestrians increases while the fuzzy numbers width increases (see Figure 12).As for a macroscopic traffic model, these results show that with extending the fuzzy ant model, by the use of artificial potential fields, we can obtain results During simulation, pedestrians move forward with the same speed until they are blocked either by the corridor or by other blocked pedestrians (see Figure 13).They form therefore a spreading chock wave as shown in Figure 13.
As a second test, we choose to simulate an evacuation of students from their classroom (see Figure 14).The latter has two doors; we placed in the first a pedestrian's generator to generate students, and we marked the second as a destination.We placed a statistical detector in the second door of the classroom closest to the destination.The fundamental diagram (see Figure 15) shows the phases of the traffic free and congested pedestrian.Indeed, at very low densities, pedestrians can be evacuated easily and rapidly than in the case of a maximum density.Pedestrian traffic becomes congested when the density reaches a maximum value where pedestrian traffic is almost impossible, while the pedestrian flow decreases in the same phase.Furthermore, the mean discharge time for pedestrians increases while the density of pedestrians increases.

Conclusion
In this paper, we present a virtual pedestrian simulation model.Our model uses the basic ant model, to which we have integrated artificial potential fields to guide pedestrian in their navigation toward their destinations.Relation between density and velocity of pedestrian movement has so far mainly been analyzed using an empirical approach and fundamental relations found from the fitting of experimental

Figure 3 :
Figure 3: Memberships function of a trapezoidal fuzzy number.

Figure 4 :
Figure 4: Reciprocal memberships function of a trapezoidal fuzzy number.

Figure 7 :
Figure 7: Resulting attractive potential field in the blocked corridor scenario.

Figure 8 :
Figure 8: Resulting repulsive potential field in the blocked corridor scenario.