Simulation of Pedestrian Behavior in the Collision-Avoidance Process considering Their Moving Preferences

Walking habits can affect the self-organizing movement in pedestrian flow. In China, pedestrians prefer to walk along the right-hand side in the collision-avoidance process, and the same is true for the left-hand preference that is followed in several countries.Through experiments with pedestrian flow, we find that the relative position between pedestrians can affect their moving preferences. We propose a kind of collision-avoidance force based on the social force model, which considers the predictions of potential conflict and the relative position between pedestrians. In the simulation, we use the improved model to explore the effect of moving preference on the collision-avoidance process and self-organizing pedestrianmovement.We conclude that the improved model can bring the simulation closer to reality and that moving preference is conducive to the self-adjustment of counterflow.


Introduction
Over the last few decades, research into pedestrian dynamics has attracted many scholars [1][2][3][4][5][6].Some researchers use simulation models to analyze pedestrian behavior characteristics and self-organizing phenomena.Understanding the origin of these self-organization phenomena has great significance to evacuation analysis, passenger transport hub design, and pedestrian traffic control.Typical pedestrian self-organized phenomena include arch-like formation, bottleneck oscillation, stripe formation, and lane formation.
Lane formation in pedestrian counterflow is an interesting self-organizing phenomenon."In a counterflow, the motion of the pedestrians tends to self-organize in such a way that dynamically varying lanes are formed where people move in the same direction.This effect is termed lane formation, which is a type of spontaneous symmetry breaking" [7].In the research field of lane-formation phenomena, most studies concern spatial interaction features or certain types of behavior in the process of collision avoidance.Some types of individual pedestrian behaviors have been analyzed by researchers, such as the following behaviors [7][8][9]: the walking sideways behavior [10], the "in-advance-avoid behavior" [11], and the right-preference behavior [12][13][14][15][16][17][18].In addition, the collective behavior of pedestrians also attracts a great deal of attention [19][20][21].The study of Ma et al. is very representative; they created a -nearest neighbor (kNN) model based on the cellular automaton model and proposed that the pedestrian interacts with a fixed number of his/her nearest neighbors who are walking from the opposite direction [21].
In addition to the above discrete models, some researchers apply the continuous model to study lane formation.The continuous model is represented by the social force model [22][23][24][25], in which the walking motivation of pedestrians is expressed in the form of force, the speed of pedestrians can be moved from 0 to the maximum, and the freedom of movement direction is higher than that of the discrete model.Helbing et al. pointed out that the essential effects on lane formation should be the relative velocity of pedestrians walking in opposite directions; the physical interactions caused by the relative velocities make the lane formation happen, even without considering the special walking behavior of pedestrians.Lane formation can also be simulated [26].Some researchers have pointed out that there are also some drawbacks in using the social force model to study the lane-formation phenomenon; in counterflow situations, the pedestrians do not attempt to avoid the oncoming traffic, and so unrealistic collisions may occur [27].In follow-up studies of the social force model, the individual decision-making is sufficiently taken into account by researchers.Heliövaara et al. proposed an agent-based crowd model and implemented the model in the social force model: "in the improved model pedestrians observe the walking directions of the agents in front of them and choose their own actions accordingly" [27].Yuen et al. proposed modifications of the social force model that reflect how overtaking behavior operates in counterflow [28].Shuaib and Zainuddin introduced an improved tactical aspect of decision-making into the social force model of pedestrian behavior, where the model considers the average density and flow inside such areas and models their effect on the pedestrians' decisions [29].Lee et al. proposed a socialforce-based pedestrian model; from their simulation results, they pointed out that the "following effect" and "evasive effect" are the main contributors to the lane formation [30].
Many factors have been observed and introduced into the study of the lane-formation phenomenon, which shows that there is not a unique cause of this phenomenon.In our view, if pedestrian behaviors or decision-making has broad similarities, self-organization would occur.Pedestrians have a certain similarity of direction choice in the collisionavoidance process: they prefer to walk along the right-hand side in the collision-avoidance process in China, and the same is true for the left-hand preference that is obeyed in several countries.We consider that when the density is relatively low and there is enough choice space for decision-making, they tend to avoid collision in a customary manner.Many scholars have studied the effect of the moving preference of pedestrians on the counterflow, but few studies have explored the factors that affect the moving preference.In the study of Guo [31], they proposed a revised social force model to simulate the pedestrian counterflow through a bottleneck.They considered the position factors to be important influence factors of the moving preference, with the position factors meaning the relative position between the pedestrian and the entrance/exit boundary.Through the analysis of a pedestrian experiment, we find that, under conditions of low density, the relative position between reverse pedestrians can also affect the moving preference in the collision-avoidance process.
Thus, the primary objective of this research is to study the collision-avoidance force model of moving preference, which is affected by the prediction of potential conflict and the relative position between pedestrians, and its effects on the the process of collision avoidance and lane formation.This paper is divided into two sections about the designed simulation of the moving preference.The first section analyzes the pedestrian experiment and builds the collision-avoidance force model.The second section presents several cases to study the effect of the moving preference on the self-organizing movement in pedestrian counterflow.The distance between pedestrians  and  is 8 meters.Pedestrian  walks from the left side of the scenario to the right side, and pedestrian  walks from the right side of the scenario to the left side.They keep moving until they reach the initial position of the other pedestrian.

The Experiment about Pedestrian Collision-Avoidance
Behavior.We define our scope of research to be pedestrian counterflow that is not in crowded conditions.In this case, pedestrians have choice space in their behavior decision.
A experiment was performed to study collisionavoidance behavior in October 2016.A group of 50 persons participated, uniformly composed of male students aged around 25 years old.As shown in Figure 1, the experimental scenario is that the distance between pedestrians  and  is 8 meters and that they move in the opposite direction.They will keep moving until they reach the initial position of the other pedestrian.The experiment is carried out 7 times in each group, where, each time, the initial relative position between pedestrians is different (the relative positions are shown in 2).We performed 100 groups of independent experiments, from which we calculate the avoid-collision distance, the direction selection of collision avoidance, and the experimental time.
(1) Pedestrians usually adjust their direction in advance to avoid collision with the reverse pedestrians, where the size of this avoid-collision distance is determined by the pedestrian's specific personality factors, which is what some studies have pointed out for use in the potential conflict prediction behavior of pedestrians.The results of the experiment about the avoid-collision distance (the distance between pedestrians at which a pedestrian begins to adjust his/her movement direction) are shown in Figure 3.Most of the time, pedestrians began to adjust their direction of movement when the distance between them was about two meters.
(2) The relative position between the pedestrians can affect the direction of collision avoidance.As shown in Figure 4, when the value of |  | is relatively small (Path a , Path b , and Path c ), most pedestrians prefer to move to the right-hand side in the process of collision avoidance.We consider that when |  | is small (|  | < 0.2 m), the relative position between the pedestrians is the "face-to-face" case.In this case, there is no obvious difference between moving to the left-hand side and the right-hand side, and, therefore, the collision-avoidance direction choice depends on the subconscious moving preferences of the pedestrian.In the experiment, the moving preferences are characterized by the right-preference.
When the value of |  | is large (Path d , Path e , Path f , and Path g ), pedestrians tend to maintain the current relative position or make minor adjustments based on the relative position to complete the collision avoidance.We consider that when |  | is large (|  | ≥ 0.2 m), the relative position between the pedestrians is the "brush past" case.In this case, there is a significant difference between moving to the left-hand side and the right-hand side.In the "brush past" case, the moving preference is not the influencing factor for the direction of collision avoidance, but rather the direction is determined by the relative position.
(3) The relative position between pedestrians has a limited effect on the time of the collision-avoidance process.As shown in Figure 5, there is no obvious difference between the experimental times of different paths.Some scholars point out that when a pedestrian going to the right (left) comes face-to-face with a walker going to the left (right), he turns himself sidelong to avoid a collision, where the benefit of this kind of sidling behavior is that pedestrians do not have to slow down substantially [10].Because of the existence of sidling behavior, the collision-avoidance time in the "face-to-face" case is not significantly higher than that in the "brush past" case.In other words, the change in relative position between the pedestrians would not cause significant fluctuations in the collision-avoidance time.

The Social Force Model.
The social force model for traffic flow is as follows [23]: In the social force model, pedestrian's movement is affected by three types of force: the will force f will that reflects the influence of the moving target on pedestrian, the interaction force f  between pedestrian and his/her nearby pedestrians, and the interaction force f  between pedestrian and his/her nearby walls or obstacles.
The equation of will force f will indicates that pedestrian  of mass   likes to move with a certain desired speed V 0  in a certain direction  0  , generally, which is the destination direction and therefore tends to correspondingly adapt his/her actual velocity V  with a certain characteristic time   .The function of f will is to enable the pedestrian to achieve his/her desired speed V 0  , and, to make his/her actual motion direction to approach his/her destination direction  0  , the direction of f will is not the destination direction but V 0  ()e 0  () − k  (), which shows that the actual effect of this force is a kind of corrective action.
The change of pedestrian motion speed is influenced not only by the will force but also by "interaction forces" f  and f  .The pedestrian  tends to maintain a velocity-dependent distance from another pedestrian  and walls .To include this tendency as the interaction forces, f  and f  are added the social force model: where   and   are positive constants,   is the sum of their radii   and   ,   = ‖  −   ‖ denotes the distance between the centers of two pedestrians, and n  is the normalized vector pointing from pedestrian  to ; t  is a tangential direction.The function of () equals zero if the pedestrians do not touch each other (  >   ) and otherwise equals the argument .
where   and   are positive constants,   denotes the distance between the wall and pedestrian , and n  is the normalized vector pointing from the wall to pedestrian ; t  is a tangential direction.The function of () equals zero if the pedestrians do not touch the wall (  >   ) and otherwise equals the argument .
We focus on the collision-avoidance behavior of pedestrians, so we mainly study the interaction force between two pedestrians (f  ).f  can be divided into three types of force: the f avoidance and the contact force (which contains f extrusion and f friction ).
f avoidance describe the psychological tendency of two pedestrians  and  to maintain a velocity-dependent distance from each other by a repulsive interaction force f avoidance (  exp[(  −   )/  ]n  ), where   and   are constants,   is the sum of their radii   and   ,   = ‖  −   ‖ denotes the distance between the pedestrians' centers of mass, and n  is the normalized vector pointing from pedestrian  to . |  −   | is the actual distance between pedestrians  and .The equation of f avoidance indicates that the smaller the distance is, the stronger the will for protecting walking space is and the greater f avoidance is.When   ≤   , there is physical contact between pedestrians and f extrusion and f friction exist.
As shown in Figure 6,  is the pedestrian who is moving from the right side to the left in the passage.The red area is f avoidance search range of , where  is in the search range and his/her movement direction is opposite to that of .The collision avoidance between  and  relies on the f avoidance between  and .We divide f avoidance into horizontal components f avoidance,  and vertical components f avoidance,  .Under the action of f avoidance,  , the pedestrian  begins to slow down.The direction of f avoidance,  determines the direction of collision avoidance, and the direction of f avoidance,  is determined by the relative position between the pedestrians.The size of f avoidance,  affects the time of the collisionavoidance process.
There is no problem when we simulate the "brush past" case with the original social force model, as it can reflect the impact of relative position on the direction of collision avoidance.However, because the direction of collision avoidance is only determined by the relative position between the pedestrians, the social force model is unable to reflect the influence of the moving preference on the direction of collision avoidance.As the relative position of pedestrians becomes closer to the "face-to-face" case, the size of f avoidance,  is smaller, which would increase the time of collision avoidance and deviate significantly from reality.

The Collision-Avoidance Force Model considering Moving
Preference.We construct a force f  based on the social force model, which can reflect the moving preference of the pedestrian.
We design the parameters that are used to define the search scope of collision avoidance.The search scope of collision avoidance consists of two parts: the search radius (  ) and the search angle.The value of the radius we refer to as the avoid-collision distance is shown in Figure 3.We define the search angle as a 180-degree angle in the current direction of the pedestrian, and we use the angle between the current speed of pedestrian  (k  ) and the vector from  to ( ⃗   ) to judge whether pedestrian  is in the search angle of pedestrian .Based on the above analysis, we define  ,1 and  ,2 as follows: We use the vertical   (from the center of  to the movement direction of ) to reflect the relative position of pedestrians  and .As shown in Figure 7(a), when |  | >   +   ,  would not collide with ,  and  do not need to take action to avoid collision, and f  does not exist.As shown in Figure 7(b), when  < |  | ≤   +   , we consider this relative position to be the "brush past" case.The collision avoidance between the pedestrians can be accomplished by f avoidance in the social force model, so we do not introduce f  in this case.As shown in Figure 7(c), when |  | ≤ , this relative position is similar to the "face-to-face" case.To reflect the effect of the moving preference, we introduce f  .
In the social force model, the pedestrian's walking space is not discrete, so this is different from the CA or LG models, and there are very few absolute "face-to-face" cases (|  | = 0).Based on the experimental results shown in Figure 4, it is not only in the absolute "face-to-face" cases (|  | = 0) that there is the moving preference.So we design  as the characteristic value to distinguish between the "brush past" case and the "face-to-face" case.If |  | ≤ , whether pedestrian  is on the left or right side of pedestrian ; the same moving preference would affect the individual decision-making.Based on the above analysis, we define  ,3 as follows: We focus on the order of f  .f  and f avoidance all reflect the psychological tendency of pedestrians to avoid collision.Therefore, we suppose that f  and f avoidance are of the same type; that is, that they are in the same order.We define f  as follows: where |  exp[(  −   )/  ]| is the order of f  ,  is the strength parameter of f  ,  , ,  = 1, 2, 3 are three nondimensional parameters, and n  is the unit vector perpendicular to the movement direction of .Based on our experimental results in Figure 4, the moving preference shows a rightpreference, so, in our work, n  is the right vertical direction of pedestrian movement.Finally, we add f  into the social force model:

Simulation and Discussion
We take the parameters as in Table 1.The simulation results are averaged over 200 independent simulations.

The Effect of the Moving Preference on the Process of Collision Avoidance.
To study the effect of the moving preference on the process of collision avoidance, we explore the relationship between the relative position   and the collisionavoidance time (the definition of the collision-avoidance time is shown in Figure 8).In this simulation, there are two reverse pedestrians  and .We observe the process of collision avoidance between  and  in different relative positions   and record the collision-avoidance time.The results are shown in Figure 9, which indicate that when there is no f  or when f  is relatively small, in the "face-to-face" case (  is between −0.2 m and 0.2 m), the collision-avoidance time will have a sharp increase.That means that the pedestrians slow down substantially in the process of collision avoidance, which is not in conformity with the experimental result shown in Figure 5.When the strength parameter of f   = 1, we can find that the collision-avoidance time is relatively stable in the "face-to-face" case.We compare the empirical and simulation results for the moving trajectories.Figure 10 is the experimental result of the moving trajectory, in which Figure 10(a) is the "face-toface" case (  = 0 m) and Figure 10(b) is the "brush past" case (  = −0.3m). Figure 11 is the simulation result of the moving trajectories by the original social force model, and Figure 12 is the simulation result of the moving trajectories by the improved model.We find that, by introducing f  , pedestrians move to the right-hand side in the "face-to-face" case, and, in the "brush past" case, the moving trajectories would not change.This is consistent with the original intention of our model design.By comparing the empirical results and the simulation results, we find that the simulation results are closer to the empirical results in the the "face-to-face" case when considering the moving preference.

The Effect of Moving Preference on the Lane-Formation
Phenomenon.First, we must emphasize that, even without considering the special walking behavior of pedestrians, the lane formation can also be simulated by the social force model.Therefore, in this section, we are not going to discuss the cause of the lane-formation phenomenon.We just want to determine the effect of moving preference on the laneformation phenomenon.
To study the effect of moving preference on the laneformation phenomenon, we explore the relationship between the number of lanes and the characteristic value of the relative position .In this simulation, the pedestrians are added into the passage from the left boundary and the right boundary with the same pedestrian arrival rate.We observe the lane formation in the case of different ; the simulation snapshots are shown in Figure 13.As shown in Figure 13(a), when Figure 10: The moving trajectory in the "face-to-face" case and the "brush past" case.(a) is the "face-to-face" case, where   = 0 m (Path a in Figure 2), and (b) is the "brush past" case, where   = −0.3m (Path g in Figure 2).3 lanes.When  = 0.4 m, most of the time, there are 2 or 3 lanes, and the frequency is the highest for 2 lanes.As shown in Figure 15(b), when  = 0.2 m, most of time, there are about 4 or 5 lanes, and we consider this to be the closest to the actual lane formation that we observed.
By this simulation, we find that the moving preference can affect the number of lanes and that the characteristic value of the relative position  can affect the accuracy of the simulation.
We explore the effect of moving preference on the number of conflicts in the counterflow.In this article, the definition of the conflict is that the distance between two pedestrians with opposite moving directions   ⩽ 5 cm and their relative position |  | <   +   .In the simulation, the pedestrians are added into the passage from the left boundary and the right boundary with the same pedestrian arrival rate, and we count the number of conflicts in 240 s, with the result shown in Figure 16.With the increase in pedestrians, the number of conflicts also increases, and the extent of the increase in conflicts in the case of the right-preference is less than that in the case of no right-preference.Comparing the case of the right-preference with the case of no right-preference, we find that the number of conflicts is significantly decreased.The maximum difference is observed at   = 0.3, and the number of conflicts is more than doubled (2.13 times).In the case of the right-preference, pedestrians have the same moving preference: when there is a potential conflict before a pedestrian, the pedestrian and the reverse pedestrian all move to the right-hand side so that physical contact between reverse pedestrians can be avoided.In the case of no rightpreference, the decision-making of the pedestrian is more random as the number of conflicts is more than in the case of the right-preference.
To further study the conflict in counterflow, we analyze the change process of the conflicts in 240 s, with the results shown in Figure 17.In the case of the right-preference, when  = 22 s, the pedestrian counterflow begins to occur, and the conflicts between pedestrians appear.A relatively sharp increase in conflicts occurs in the adjustment period of about 20 seconds, and, at  = 40s, the increase begins to slow down.Throughout the process, the extent of the increase in conflict is small and stable.In contrast, in the case of no rightpreference, the adjustment period is longer and the extent of increase in conflict is bigger.The conflict between pedestrians means a change of lane formation (the position and number of lanes), where the number of conflicts is an important influence factor of the stability of the lane formation.We consider that the moving preference can enhance the stability of lane formation, and it is conducive to self-adjustment of the counterflow.
To study the effect of moving preference on the efficiency of pedestrians passing, we analyze the change process of the mean speed in 240 s in the counterflow.The result is shown in Figure 18, where we can find that the mean speed in the case of the right-preference is faster than in the case of no right-preference.Much as in the situation of conflict, in comparison with the case of no right-preference, after a short period of adjustment, the mean speed in the case of the right-preference maintains a more stable state.To further examine this, we compare the simulation data with actual empirical data; the empirical results were determined by Weidmann [32] and Older [33] for the counterflow under open boundary conditions.The results are shown in Figure 19.
The results in the case of right-preference are higher than those in the case of no right-preference and are much more similar to the empirical data.This indicates that the moving preference plays an important role in pedestrian traffic: it can improve the efficiency of pedestrians passing and make it stable.

Conclusion
(1) A collision-avoidance force model f  is proposed to simulate the pedestrian moving preference in the collision-avoidance process.f  considers the prediction for potential conflict and the effect of the relative position between pedestrians on the individual decision-making.
(2) Adding f  into the social force model, the collisionavoidance process and the lane-formation phenomenon are simulated by the improved model.
(3) f  can reduce the collision-avoidance time in the "face-to-face" case, rendering the collision-avoidance process and the lane formation closer to reality.
(4) If the moving preferences of pedestrians have a wide range of similarity in the counterflow, this type of moving preference is conducive to a self-adjustment of the pedestrian flow and can improve the efficiency of pedestrian passing and make the efficiency more stable.
In future work, we will study the moving preferences of pedestrians in other real dynamic scenarios, for example, in the process of merging and separating in T-shaped channels or in the moving process when pedestrians flow through bottleneck.We believe that, in different scenarios, pedestrians have different moving preferences, which can be simulated by constructing an appropriate force base on the social force model.

Figure 1 :
Figure 1: The collision-avoidance behavior experiment scenario.The distance between pedestrians  and  is 8 meters.Pedestrian  walks from the left side of the scenario to the right side, and pedestrian  walks from the right side of the scenario to the left side.They keep moving until they reach the initial position of the other pedestrian.

Motion direction of jFigure 2 :
Figure 2: The different relative positions.We use the vertical   (from the center of pedestrian  to the movement direction of pedestrian ) to reflect the relative position of pedestrians  and .If pedestrian  is to the left of 's position, we give   a negative value, and, otherwise,   has a positive value.In Path a ,   = 0; in Path b ,   = 0.1; in Path c ,   = −0.1; in Path d ,   = 0.2; in Path e ,   = −0.2; in Path f ,   = 0.3; and in Path g ,   = −0.3.

Figure 3 :Figure 4 :
Figure 3: The investigation results about the avoid-collision distance.

Figure 5 :
Figure 5: The experimental time in different relative position cases.We define the experimental time as the time when the two pedestrians have both reached the destination.

Figure 6 :
Figure 6: Force analysis of the pedestrian collision-avoidance process in the original social force model.

Figure 8 :Figure 9 :
Figure 8: The definition of the collision-avoidance time: when pedestrian  walks into the search scope of collision avoidance of pedestrian  and the relative position   <   +   , we record the time  0 .When  walks out of the search scope, we record the time  1 and the collision-avoidance time  ca =  1 −  0 .According to the experimental results, we define the search radius as   =2 m.

Figure 15 :Figure 16 :
Figure 15:  The frequency of number of lanes formed for different .For comparison with the actual data shown in Figure14, in the simulation, the pedestrians are added into the area from the left boundary and the right boundary with the same pedestrian arrival rate (0.2 P/(m⋅s)), and this arrival rate leads to the same density as in Figure14.

Figure 17 :Figure 18 :
Figure 17: The plot of the number of conflicts versus the time.In the simulation, the pedestrian arrival rate is 0.2 P/(m⋅s),  = 1 and  = 0.2 m.

Figure 19 :
Figure 19: Fundamental diagram comparing data.In the simulation,  = 1 and  = 0.2 m.For comparison with the actual empirical data, we take the desired speed of pedestrian V 0  = 1.34 m/s.

Table 1 :
Parameters in this simulation.