Abstract
Pedestrian simulation modeling has become an important means to study the dynamic characters of dense populations. In the continuous pedestrian simulation model for complex simulation scenario with obstacles, the pedestrian path planning algorithm is an indispensable component, which is used for the calculation of pedestrian macro path and microscopic movement desired direction. However, there is less efficiency and poor robustness in the existing pedestrian path planning algorithm. To address this issue, we propose a new pedestrian path planning algorithm to solve these problems in this article. In our algorithm, we have two steps to determine pedestrian movement path, that is, the discrete potential fields are first generated by the flood fill algorithm and then the pedestrian desired speeds are determined along the negative gradient direction in the discrete potential field. Combined with the social force model, the proposed algorithm is applied in a corridor, a simple scene, and a complex scene, respectively, to verify its effectiveness and efficiency. The results demonstrate that the proposed pedestrian path planning algorithm in this article can greatly improve the computational efficiency of the continuous pedestrian simulation model, strengthen the robustness of application in complex scenes.
Introduction
With the development of economy, people communicate with each other frequently and there are more and more crowds of people in large public places such as airports, railway stations, supermarkets, gymnasia, and theaters. Dense crowds have the potential to become impenetrable or to develop into an unsteady state with turbulent flows,1–4 which are likely to compromise individual safety. In many instances, fatalities and injuries are not caused by exogenous factors such as fire, explosions, poisonous gas, or other hazards, but by crowd behavior itself. Therefore, pedestrian mobility behavior has gradually attracted the attention of scholars. Many pedestrian simulation models have been proposed to study the characteristics of pedestrian behavioral, movement laws, and evacuation.5–11 To simulate crowds in large and complex environment, individuals need to behave realistically both at a local level as well as at a global level when navigating the environment, that is, the pedestrian simulation can be regarded as a process that combines local motion planning with global path planning, corresponding to the microscopic motion model and the macroscopic path planning model. The microscopic motion models, such as the social forces model5–7 and the cellular automata model,8–11 consider the movements of each individual and focus on the interaction between individuals in local minima. The macroscopic path planning model has been proposed to deal with the crowd navigation at a global scale and derive the pedestrian desired speed direction for the microscopic motion model.
The crowd navigation can be modeled using network graph models. This class of models involves two aspects: spatial map generation and path planning algorithm. The spatial map, which is often made up of a series of nodes and edges, can capture many structural properties as well as the topological relationship of spatial arrangement. According to the spatial map, the path planning algorithm can obtain a proper route which consists of a series of nodes. Then, the pedestrian can move by the desired speed direction which directs from the current position to the adjacent node along the route. Therefore, crowd navigation functions as a guide of the pedestrian’s local movement. If the target or the destination changes during the motion, the individual has to employ the macroscopic path planning model to plan the path from the current position to the new destination, making the individual change the desired speed direction.
As to the spatial map representation modeling, the visibility graph,12–14 the Voronoi diagram,15–20 and the navigation mesh21–24 serve as the widely used map generation modeling method. In the visibility graph, the initial position, the goal position, and the vertices of obstacles in the simulation scenario are represented by the nodes. The walkable areas represent edges which act as a connector between the nodes. Kneidl et al. 25 presents an advanced method for the automated generation of a visibility graph to model large-scale way-finding decision. Based on the visibility graph, Kneidl et al. 12 has given a hybrid multi-scale model which combined with a large-scale navigation method and a small-scale navigation method for simulation of pedestrian dynamics. Turner et al. 13 presented a method to generate a graph of mutual visibility between locations based on a set of isovists, and their works showed that the visibility graph properties can predict pedestrians’ spatial behavior and simulate the way-finding process. Wang et al. 14 developed a space visibility graph model with cognitive pedestrian behavior and individual characteristics to analyze the pedestrian’s navigation decision and movement patterns.
The Voronoi diagram method divides the region into sub-regions with polygons which encircle the obstacles. Unlike the visibility graph, the nodes of the spatial map are the vertices of polygons, and the edges of the map are the sides of polygons constructed using equidistant points from the adjacent two points on the obstacle’s boundaries. Kambara et al. 15 applied the concept to construct a Delaunay diagram from neighbor nodes in the Voronoi diagram and used network Voronoi diagram to construct a subgraph based on the context for pedestrian route search. Nakamura et al. 16 has given a pedestrian movement model based on the Voronoi diagram, by which the walking route and direction of each pedestrian can be determined. Xiao et al. 17 introduced Voronoi diagram to obtain some useful motion information of pedestrian dynamic, such as local density, safe distance, and neighbors. And the walking direction of pedestrian in Voronoi cell can be divided into destination direction, potential detour direction, and potential following direction. 18 The three elementary walking directions are calculated inspired by the characteristics of the shapes of Voronoi cell. Šeda and Pich 19 have shown that generalized Voronoi diagrams can be used for fast generation of smooth paths sufficiently distant from obstacles. Hiyoshi et al. 20 proposed a Voronoi cellular automaton model using the Voronoi diagram as the underlying mesh to reproduce phenomena about walking direction decision which comes from the local features, such as corners.
As similar to the Voronoi diagram, the navigation mesh also divides the region into sub-regions with convex polygons. The navigation mesh can be categorized into triangulation and polygonization according to the number of sides of polygons. The adjacencies of these convex regions of open space are then calculated and used to construct a graph of connectivity between convex regions. Each region is a node on the graph and if two regions share a common edge in space, they are connected by an edge. Xia et al. 21 employed the triangular meshes to solve the reactive dynamic user equilibrium model for pedestrian flows based on a discontinuous Galerkin method. Boguslawski et al. 22 proposed a novel automated construction of navigation mesh by considering the variability of pedestrian density on the route, and derived a variable density navigation network for determining egress paths in the pedestrian evacuation. Chen et al. 23 presented a computation model on the general triangular grid and studied the modeling of pedestrian dynamics on triangular grids.
Navigation process with network graph models is usually considered as an optimization problem of route decision. In these optimization problems, the numbers of pedestrians in these nodes are seen as the decision variables. However, the efficiency issues of computation must be considered before applying this class of models to navigation. The algorithms for generating network is relatively complex that may result in low computational efficiency. Even more, they were insufficient robustness in the complex simulation scenarios. For instance, it should be recalculated when the scene environment changes, such as the fire smoke that is dynamically diffused. The efficiency of the navigation graph algorithm is
At present, potential field method has been widely used in mobile path planning, such as robots, vehicle, and pedestrian.26–28 In the potential field method, the simulation space is divided into a set of uniform grids called as cells. Each grid has been assigned a potential field value which can reflect the utility cost such as distance, congestion, discomfort cost, and the influence of other pedestrians.29–33 A gradient can therefore be applied based on the potential field that guides the agents from the source to the destination. These methods are useful to reduce the complexity at a macroscopic level.
Therefore, to avoid the less efficiency and poor robustness in the existing pedestrian path planning algorithm, we propose a new pedestrian path planning algorithm based on the potential field model in this article. Meanwhile, considering the computational efficiency of the potential field for navigation, this article draws on the idea of discrete potential field, proposes a calculation method of potential field, and then obtains the pedestrian’s desired speed direction in the pedestrian simulation model, which can realize the pedestrian movement path planning in complex scenes.
The rest of this article is organized as follows. Section ‘Algorithm and model description’ presents an algorithm to calculate the potential field by considering the distance, and then the pedestrian desired speed direction can be obtained for route navigation on the basis of the discrete potential fields. Section ‘Numerical results’ analyzes the property and applicability of the proposed method of route navigation based on grid potential field, both in the simple scenes and complex scenes. Finally, concluding remarks and future research directions are given in section ‘Conclusion’.
Algorithm and model description
In this section, the desired speed direction is calculated by two steps. The first step is to generate a discrete potential field by the flood fill algorithm, 34 and then the pedestrian desired speed direction is determined along the negative gradient direction in the discrete potential field.
Algorithm for grid potential field
In the flood filling method-based algorithm for generating the grid potential field, the two-dimensional (2D) square grid is first used to convert the continuous space into a grid system with the grid unit size represented as
The detailed algorithm for generating the potential field of the grids is as follows.
Figure 1 illustrates the potential field in a room with obstacles, where Figure 1(a) shows a continuous space scene, where the red line indicates the wall, the blue line indicates the obstacle, and the green line indicates the exit; Figure 1(b) shows discrete grid scenes, gray grids are wall or obstacle, green grids are exit, and the rest are blank grids. When the range parameter of neighborhood

Illustration of discretization scene and potential field calculation: (a) the continuous space scene, (b) the temporary potential field in discrete grid scene, and (c) the potential field in discrete grid scene.
Calculation of pedestrian speed desired direction
As mentioned above, the process of route navigation for a pedestrian is actually to calculate the pedestrian’s speed desired direction in the potential field method. In this article, the speed desired direction is determined by the negative gradient direction in the grid potential field. The concrete calculating method is as follows.
For the pedestrian locating at
We set the speed desired direction of the pedestrian
In this section, we intend to verify the accuracy of our proposed method for pedestrian speed desired direction through comparative analysis with other two different methods in the existing literature. Guo and Huang
35
proposed an algorithm for the static potential field (hereinafter referred to as Guo’s potential field) and their formulation for pedestrian speed desired direction (hereinafter referred to as
where
The other one is proposed by Sun and Shi,
36
where they assumed that pedestrian preferred to move toward the grid with a smaller potential field and the pedestrian speed desired direction are mentioned as
where
Actually, the speed desired direction in this article is an approximation of the desired direction calculating in continuous space according to equations (1) and (2). With the aim to analyze the deviation of the speed desired direction by potential field in the discrete grid from that in continuous space, we assume that the pedestrian is located at
where

The pedestrian’s desire direction point to the nearest point of exit.
Set
Numerical results
In this section, the applicability and properties of the proposed model is investigated in corridor and room for pedestrian evacuation simulation.
Analysis of desired speed direction in different scene
The desired speed direction in corridor simulation scene
In the corridor scene, the original direction is in parallel with the corridor, namely facing right (or the left), as shown in Figure 3. The right boundary of the corridor is set as the exit. In our proposed method, the pedestrian desired speed direction of each grid is obtained according to equation (2) after determining the grid discrete potential field, as shown in Figure 3, where the data in the grid denote the potential field and the blue arrows indicate the speed desired direction of the pedestrian in the grid. It can be seen from Figure 3 that the pedestrian desired speed direction in the corridor is consistent with that in the original direction, indicating the proposed calculation of pedestrian desired speed direction in this article is suitable for the corridor scene.

The potential field and the pedestrian desired speed direction in the corridor.
The desired speed direction in a room without obstacles
For the evacuation scene in the room without obstacles, we have a room of

The potential field and the pedestrian desired speed direction in the room without obstacles: (a) the geometric parameters of the room scene, and (b) the potential field and the pedestrian desired speed direction.
The desired speed direction around the obstacles
The motion of a pedestrian is influenced while he or she is nearby walls and obstacles. In particular, he or she always walk along borders of the walls and obstacles and try to keep a certain distance from the borders since it makes the individual uncomfortable to close the borders. This results in repulsive effects of obstacles which is considered in numerous microscopic pedestrian model, for example, the social force model described the repulsive effect as repulsive force between pedestrian and obstacles.
In our model, the repulsive effect from obstacles is also considered in the generation of the grid potential field. More specifically, we divided obstacles into grids and calculated the potential field of these grids by Step 4 of potential field algorithm in section ‘Algorithm for grid potential field’. According to the potential field of obstacle grids and equation (2), the desired speed directions of blank grids which abutting obstacle can be determined. The repulsive effect of pedestrians in the blank grids neighboring obstacles can be represented by these desired speed directions.
Figure 5 illustrated the desired speed directions of blank girds around obstacles. In Figure 5(a), the desired speed directions calculate without the potential field of obstacle grids. The desired speed directions point to the obstacle and guide pedestrian move close to the obstacle. The body of pedestrian will hit against the obstacles, and these made a mistake compared with the motion of pedestrian in fact.

The comparison of desired direction with and without obstacle field: (a) the model without obstacle field and (b) the model with obstacle field.
Figure 5(b) displays the desired speed direction calculated with the potential field of obstacle grids. It can be seen from the figure that the arrow of desired speed directions in the blank girds abutting obstacles point along obstacles. The pedestrian in these blank grids also move along the borders of obstacles according to the desired speed directions. These indicate that the potential field of obstacle grid calculated by Step 4 in section ‘Algorithm for grid potential field’ modifies the desired speed direction in Figure 5(a), and made it a reasonable motion direction. Thus, the method can be used to simulate pedestrians’ practical movement near obstacles.
Analysis of the properties of the model
Analysis of pedestrian speed direction deviation
The tracks of pedestrian with different formulas
As described in section ‘Calculation of pedestrian speed desired direction’, the desired speed direction, which was replaced as the motion direction of pedestrian by the gradient direction at the center coordinates of the grid, is an approximate value compared with the social force model. Therefore, the difference between the approximate speed direction from our model and the accurate speed direction from the social force model would cause to a few deviations about routes of pedestrians. To examine the route deviation, we marked the trajectory of motion route of different peoples from the initial position to exit, as shown in Figure 6.

Pedestrian trajectory difference in different models.
Figure 6 illustrates the route trajectory of seven individuals at different initial locations by different models. The blue line represents the trajectory record by equation (5), that is, the social force model. The green line, the yellow line, and the pink line represent the trajectory record by simulation with equations (2)–(4), respectively. It can be seen from the figure that the green line and the yellow line are basically coincident except for the trajectory line near the exit. This indicates that the potential field and equation (2) that calculate the desired speed direction formula are similar to those of the literature, 35 which can derive a reasonable motion path. The green line has a deviation from the blue line trajectory, and the deviation becomes more apparent as the pedestrian moves toward the exit. It is inferred that the increasing deviation has been formed by the cumulative difference between equations (2) and (5) in each grid. Compared with the deviation between the green line and the blue line, the deviation between the pink line and the blue line is more obvious, indicating that the discrepancies of the desired speed direction between equations (4) and (5) is larger than that between equations (2) and (5).
The speed direction deviation in different formulas
Figure 7 is the distribution diagram of grid cosine

The distribution diagram of grid cosine
To investigate the difference between Guo’s formula and our formula in a different potential field, we give the mean and standard deviation of all the grids cosine values with the two formulas under the Guo’s potential field and our potential field, illustrated in Figure 8. As shown in Figure 8, under the same potential field, the mean and standard deviation of all the grids cosine values obtained by our formula are both smaller than that in Guo’s formula, that means the dispersion degree of grids cosine values obtained by our formula is smaller. In addition, no matter which formula is used, the mean values of all the grids cosine values in our discrete potential field are greater than that in Guo’s potential field, while the standard deviation in our discrete potential field is smaller than that in Guo’s potential field. This shows that the potential field generated in our article is slightly better than Guo’s potential field.

The mean and standard deviation of all grids cosine with different formulas.
By comparing our formula with Guo’s formula, we know that if there is no obstacles in the neighborhood grids

The blank grid divided into four types of areas.
As shown in Figure 7(a) and (b), the grids cosine value distribution is the same within the area I (as shown in Figure 9), where the distance from the wall is greater than
During the evacuation process, pedestrian prefers to gather near the exit for a long time, so this article considers that it is more meaningful to analyze the grid cosine at the wall within the area III (see Figure 7(a)), where the exit is located. Figure 7 shows the mean and standard deviation of the cosine of grids within the area III. As shown in Figure 10, under the same potential field, the mean of these grids cosine obtained by our formula is significantly greater than that obtained by Guo’s formula within the area III, while the standard deviation of the cosine of grids is significantly smaller. This means that our formula performs better than Guo’s formula under the same potential field. Meanwhile, comparing with Guo’s potential field, under the same formula, the mean of these grids cosine in our potential field is significantly greater while the standard deviation of the cosine of grids is significantly smaller within the area III. These prove once again that our potential field is better than Guo’s potential field.

The mean and standard deviation of the cosine of grids within the area III with different formulas.
Analysis of the impact of the parameters
The impact of parameters
To investigate the impact of parameters

Diagram of mean of grids cosine with
The impact of parameters
In this subsection, we mainly investigate the impact of parameters

Diagram of mean of grids cosine values with
Analysis of the evacuation time
As described in section ‘Analysis of pedestrian speed direction deviation’, the pedestrian trajectory based on the model is deviated from the trajectory of the social force model. Furthermore, these deviations would lead to different evacuation times. To discuss the influence of trajectory deviation on the simulated evacuation time, we select the simulation scenario in Figure 4(a). Many repeated simulations with same pedestrian initial position distribution state are executed using the model and the social force model to calculate the simulated evacuation time of these two models. The parameters of the model are

Evacuation time difference against the occupancy.
It can be seen from Figure 13 that when
As the number of pedestrians increase, the mean and standard deviation of
Efficiency analysis in a complex scene
As stated above, it is critical to determine the pedestrian path in the evacuation scene with obstacles. To verify the effectiveness and efficiency of our model, we have two more models as comparison,37,38 which applies both the viewable methods to describe the spatial layout of the complex indoor evacuation scene, such as a network diagram in Figure 14(b). Based on the evacuation network, the pedestrian evacuation path is calculated by Dijkstra algorithm 39 and A* algorithm, 40 respectively (hereinafter referred to as Model 2 and Model 3, respectively).

An evacuation scenario with one exit and obstacles: (a) evacuation scenario with obstacles and (b) the route and desire direction in the network graph.
In the literature, 12 the current position of a pedestrian was considered as O node in each simulation update step, and then find the latest shortest path to D node in the viewable network. However, we found that the pedestrian shortest path remains unchanged when the nearest node in the pedestrian distance view remains unchanged in the simulation process. Therefore, with aims to ensure the computational efficiency by Dijkstra algorithm and A* algorithm for pedestrian evacuation shortest path, we optimize the approach of determining pedestrian evacuation path as follows according to the characteristics of the network graph and the path determination process in the evacuation process. That is checking first whether the node closest to the pedestrian in the visual network changes in each simulation step: (1) if not, retain the pedestrian evacuation path or (2) otherwise, update the evacuation path according to the new OD network, where O node is the current position of the pedestrian.
To sum up, Model 1 (that is proposed in this article) mainly includes three parts: (1) calculating the discrete potential field based on the discrete space grid scene; (2) calculating the pedestrian desired speed direction according to the potential field value around the pedestrian’s grid; and (3) determining the instantaneous speed by the original direction. Meanwhile, the Models 2 and 3 consist of three parts: (1) constructing a viewable network diagram; (2) determining the moving target nodes of pedestrians in the viewable network through by A* algorithm and Dijkstra algorithm, respectively; and (3) determining the instantaneous speed by the original direction model.
The scenario in Figure 14 is set as the basic evacuation scenario, the number of obstacles in this evacuation room is
Simulation time under different numbers of obstacle (unit: s).
Simulation time under different numbers of pedestrian (unit: s).
From Tables 1 and 2, we can see that under the same situation, the simulation time of Model 1 is significantly smaller than that of Models 2 and 3. For instance, as shown in Table 1, if there are 10 obstacles, the simulation time of Model 1 is 13.45 s, and 168.48 and 125.39 s for Models 2 and 3, respectively. Moreover, the simulation time of Model 1 is basically not affected by the change of the number of obstacles, that is, because the calculation process of the three parts of the Model 1 is basically irrelevant to the number of obstacles. But, more obstacles in the evacuation room means more nodes in the network of Models 2 and 3, that results in the following: (1) the time for constructing the viewable network in the first part of the two models increases and (2) the consumption time of the shortest path based on the network diagram in the second part also increases. Then, the total simulation time of Models 2 and 3 increases significantly. Moreover, the simulation time of Model 2 is relatively greater than that of Model 3. This is because it is more efficient to find the shortest path based on A* algorithm than Dijkstra-based algorithm in the same network.
Since, Part 2 in these models is used to determine the target node for each pedestrian, the simulation time in Part 2 increases as the number of pedestrian increases. Thus, the simulation time of the three models increases as the number of pedestrians increases, as shown in Table 2. Overall, the computational complexity of Part 2 in Model 1 is
Conclusion
For the pedestrian evacuation simulation model of indoor complex evacuation scenarios, it is difficult to determine the pedestrian speed expectation direction with the continuous space simulation model represented by the social force model, while their operation efficiency is relatively low. Hence, the article focuses on the characteristics of the discrete potential field to better describe the spatial layout of indoor complex scenes and establishes an improved path planning model based on the discrete potential field to determine the expected direction of pedestrian speed.
In this article, a new method of calculating the discrete potential field is put forward first, followed by the desired speed along with the gradient descent direction calculation formula. We verify first the validity of the proposed model in a corridor, then some comparative analyses with Guo’s formula and Sun’s formula are given in the indoor evacuation scene from the perspective of the cosine angle of the velocity expectation direction to verify the accuracy of our model. The results show that our formula performances are better than the both mentioned formulas. Meanwhile, the computational efficiency of our model is demonstrated in a complex evacuation scene. While, the applicable conditions and parameter range of the model are also investigated.
In general, the comparative results show that the discrete potential field idea derived from the cellular automaton model is more efficient and robust for the continuous simulation model, while it also can greatly improve the evacuation efficiency of pedestrian simulation in complex scenes.
Footnotes
Handling Editor: James Baldwin
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work is supported by the National Key R&D Program of China (2016YFB1200402, 2019YFB1600204), Project of Beijing Talent Fund (2016000021223ZK33), Beijing Postdoctoral Research foundation (201822005), and the China Postdoctoral Science Foundation (No. 2019M650413).
