1 Introduction

Crowd simulation is a topic that was investigated since the 1980s when Reynolds introduce the boid system to model the motion of flock of birds, herds and land animals or a schools of fishes [21]. Realistic simulation of crowds is an important issue for the production of virtual worlds for games, crowd management, vehicles, public space design, drivers and pilots, education, entertainment or architectural and urban planning [19]. The literature shows that researchers use the word crowd for almost every situation where more than two individuals are interacting with each other [4]. Several authors use crowd as a description for a multitude of individuals walking through the same space at a certain moment in time.

In this paper, crowds have been defined using the description as follows: more than 2 people (agent/individual/pedestrian) at the same location during the same time period. Meanwhile, crowd simulations are considered from two aspects: intra-group simulation and inter-group simulation. Various approaches have been proposed to simulate large, heterogeneous crowds and they are widely used on real-time applications, however, due to complexity of each agent and the size of the crowd, crowd simulation is a big challenge to simulate in real-time the virtual environment. In this paper, we focus on addressing the following two problems:

  1. (1)

    density-based information for intra-group simulation,

  2. (2)

    discrete choice models for inter-group simulation.

Crowd density has been previously studied by other researchers. The density-based information is often defined using the number of pedestrians divided by the captured area. Researches show that when crowd density is low, pedestrians can move quickly through the virtual environment. As density increases, pedestrians will move more slowly through the virtual environment [5].

Karamouzas et al. [15] proposed a grid-based algorithm for density-based information crowd simulation. The algorithm marks each cell in a grid as dense when a pedestrian enters it, and this density value decreases gradually over time. It is shown that path planning on this grid leads to a natural variety among pedestrians. However, the algorithm has some limitations as follows:

  1. (a)

    the grid is an approximation of the environment’s geometry;

  2. (b)

    path planning is usually more expensive on a grid;

  3. (c)

    the algorithm is also not based on the real-world density concept which has been validated in many studies.

Höcker et al. [9] used a collection of squares to approximate the local density information. A drawback of this method is that these squares can overlap and cause some parts of the walk-able space to be represented more than once. Furthermore, some parts of the walk-able space may not be represented at all. Wouter et al. [33] proposed the desirability of a route by combining distance information with crowd density information. The method partitions any 2-D or multilayered 3-D polygonal environment into a set of no overlapping polygonal regions. The method also addresses the issue of (partial) replanning during simulation. However, a drawback of this method is that the proposed method can not exactly compute distance information.

To overcome drawbacks of previous research, in this paper, our goal is to use continuously updated density information to guide pedestrians through a crowded environment in real-time for intra-group simulation. We maintain crowd density information in a navigation mesh that partitions the environment into a collection of walk-able regions.

Various approaches are used to simulate a variety of crowd behaviors by goal-driven crowd simulation [2, 7, 17, 25, 28]. Some representative works as follow:

Treuille et al. [28] presented a real-time crowd model based on continuum dynamics. A dynamic potential field simultaneously integrates global navigation with moving obstacles such as other people, efficiently solving for the motion of large crowds without the need for explicit collision avoidance. Chen et al. [2] simulated a school of fish and modeled its behavior using mental states and a finite state machine. Funge et al. [7] proposed a sophisticated cognitive framework to model agents decision making by including environmental knowledge and logic. In all these works, a drawback of all these methods is that a suitable decision making scheme needs to be designed specifically for each scenario. To address this issue, Liu et al. [17] proposed the discrete choice model to simulate virtual agents goal selection and the algorithm simulates heterogeneous crowd behaviors: evacuation, shopping, and rioting scenarios. The advantages of the algorithm include:

  1. (1)

    It can be easily integrated with existing local collision avoidance schemes.

  2. (2)

    It is simple to implement and has a small runtime overhead.

  3. (3)

    It can also simulate crowd motions composing of hundreds of agents at interactive rates.

However, this algorithm still has some problems such as:

  1. (1)

    It is tedious to manually assign goals for hundreds of agents.

  2. (2)

    Agents walking in groups is often closer to flocking than strictly following a moving target.

To address these mentioned issues, in this paper, we propose a unified and well defined framework for crowd simulation in real-time virtual environment. Based on this framework, we propose to combine density information and discrete choice model to realistic simulation of crowds and path plan for group simulation. This paper introduces the following main results:

  1. (1)

    For intra-group simulation, we propose a unified and well defined framework for crowd simulation in real-time virtual environment. Based on this framework, for intra-group simulation, we propose a novel density-based information crowd simulation to collision free.

  2. (2)

    For inter-group simulation, we propose a novel discrete choice model to realistic simulation of crowds and path plan.

  3. (3)

    A variable bounding box method and angle rule are proposed to solve intra-group/inter-groups intersection problem.

In this paper, we propose a novel algorithm for crowd simulation in real-time virtual environment. Simulation results show the effectiveness of the proposed algorithm. The remainder of the paper is organized as follows. Section 2 describes related work. The proposed algorithm for crowd simulation is discussed in Section 3. Experimental results are presented in Section 4. Section 5 concludes the paper.

2 Related work

Crowd simulation is a very active topic and many different kinds of models have been proposed to perform simulation. In this section, we briefly review related work about crowd simulation.

Many techniques exist to help pedestrians move realistically through virtual environments. Such as: cellular automaton(CA), social force models, activity choice models, behavioral models, rule-based model, graph models, continuum models, and hybrid models [6].

Cellular automaton model is a discrete model based on discrete movements of pedestrians through a grid of cells, each in one of a finite number of states. Several adaptations have been proposed to improve the reality of CA models. An observation fan has been proposed, which can be considered as a formalization of the perceptive capabilities of pedestrians [10]. Chraibi et al. [3] used the dynamic floor field to record the repulsive influences of nearby objects and pedestrians.

Social force model has been the starting point, which is based on the fluid crowd modeling method [14]. Most researchers assume that pedestrians mostly face standard conditions. They apply optimized behavioral strategies that they have learned over time such as cooperation and object avoidance. The drawback is that pedestrians may appear to shake or vibrate continuously, and thus, is not suitable for real-time simulation [19].

The HiDAC model is one of the state-of-the-art hybrid methods in modeling local motions [18]. Basically, HiDAC model focuses on the problem of simulating the local motion and global way finding behaviors of crowds moving in a natural manner within the dynamically changing virtual environments. However, it only takes into account the walls, obstacles and agents. It does not take dynamic objects into consideration. The activity choice model was presented by Hoogendoorn [11]. This model has tried to define the foundation of the simulated behavior based on behavioral rules. However, it does not take into account the distance to a destination in the expected cost function.

Rule-based model was proposed by Reynolds [20, 21]. Crowd chooses the direction that allows the most direct path to a destination point, taking into account the presence of obstacles and path plan. The drawback is that the local nature of the method gives no guarantee on the path.

Graph-based techniques such as probabilistic road maps, rapidly exploring random trees, and way point graphs represent the environment by using a set of one-dimensional edges. The researchers focus on using mathematical approaches to solve crowd movement problems. Most researchers permit characters in walk-able regions to control their movements inside each 2-D region. This flexibility also makes it much easier for characters to avoid other moving characters [30]. Lemercier et al. [16] proposed a model for simulating following behaviors that matches the requirement of crowd simulation.The method focused on the emergence of stop-and-go waves which are observed in unidirectional traffic. The main contributions include:study on following behaviors,a numerical model for simulating such interactions, and its calibration,evaluation and applications. P. Charalambous et al. [1] presented a data-driven method for the real-time synthesis of believable steering behaviors for virtual crowds. The proposed method interlinks the input examples into a structure. A virtual character’s state is encoded using a temporal representation.However,if the method is used in complex environment and huge pedestrians(more than 12,000 pedestrians), the GPU load is more than 80 %. It does not fit for real-time simulation.

The representative of continuum theory for group motions is Roger L. Hughes [13] work. The model uses a potential function to guide pedestrians towards their goal. However, it only investigates analytic properties of the equations and does not discuss simulation case. Treuille et al. [29] improved the work in [13]. The proposed model adopts similar potential function of combining pedestrians into groups and the use of discomfort fields to handle geographical preferences. However, the model does not consider to trade-off between local and global planning. Huang et al. [12] reformulated Hughes model and their model shows that the pedestrian route choice strategy in Hughes model satisfies the reactive dynamic user equilibrium principle. A pedestrian chooses a route to minimize the instantaneous travel cost to the destination. The model presents the efficient weighted essentially non-oscillatory scheme for the conservation equation. However, the model does not ensure pedestrian intersect problem in 2D and 3D display.

Most previously described models were developed to predict pedestrian movement based on their revealed movements. In 2010, Robin [22] developed a model that simulates the short range behavior of a pedestrian as a response to her immediate environment and the presence of other pedestrians. This model simulates both constrained and unconstrained pedestrian movements. D. Wolinski et al. [32] presented a novel framework to evaluate multi-agent crowd simulation algorithms based on real-world observations of crowd movements. A key aspect of the approach is to enable fair comparisons by automatically estimating the parameters that enable the simulation algorithms to best fit the given data. However, the parameter estimation as an optimization problem is still needed to solve further. Wijermans [31] also proposed a behavioral model that displays movement decisions in dynamic interplay between individuals and their environment. That behavioral-based model does crowd simulation well. However, this model only considers basic characteristic movement parameters.

Based on the analysis of these models, in this paper, crowd simulations are considered from two aspects: intra-group simulation and inter-group simulation. For intra-group simulation, we propose a novel density-based information crowd simulation to collision free. For inter-group simulation, we propose a novel discrete choice model to realistic simulation of crowds and path planning. In the next section, we discuss the proposed framework for crowd simulation in real-time virtual environment.

3 Methodology

3.1 Density-based information for intra-group simulation

Due to intra-group simulation, its walk-able areas are fixed. In this paper, we take into account local path information under navigation mesh. We assume that all walk-able areas are represented by (1) as follows:

$$ R_{walk-able}=\left \{R_{1},\cdots,R_{i},R_{i+1}{\cdots} \right \} $$
(1)

Note that, in this paper, our navigation mesh is based on the medial point of a two-dimensional environment. We use similar work with the Explicit Corridor Map data structure [26]. We also use a linear number of extra line segments to connect the vertices of the medial point of an intra-group. Figure 1 shows a good example of this case. Each walk-able region contains exactly on edge of the medial point.

Fig. 1
figure 1

The arrangement mesh partitions the environment into a set of walk-able regions. Orange line segments connect the vertices of the medial axis to the nearest obstacles

Given the density values ρ for all of the walk-able regions, ρ is defined to the total area occupied by the intra-group inside the walk-able region divided by the total area of the walk-able.

$$ \rho=Group_{number}\Big/\sum\limits_{i=1}^{n}R_{walk-able} $$
(2)

Each time the group moves, the density values ρ for all of the walk-able regions need to be updated. When a group leaves the current walk-able region, each group’s current walk-able region R i is tracked. We add the area of that group to an area sum for R i+1. The density values ρ for any medial point 𝜖 are simply the density value of walk-able region. The updated time t u p d a t e for traversing any single walk-able region is computed by (3) as follows:

$$ t_{update}=\left\{\begin{matrix} t_{min}(\epsilon)+w.t_{delay}(\epsilon)\\ t_{max}(\epsilon)+(1-w).t_{delay}(\epsilon) \end{matrix}\right. $$
(3)

where t m i n (𝜖) is the time required to traverse the point 𝜖 at maximum speed, t m a x (𝜖) is the time required to traverse the point 𝜖 at minimum speed. t d e l a y (𝜖) is the expected extra traversal time. w is a nonnegative weight, if w = 0, intra-group will look for the shortest path. If w = 1, intra-group will look for the fastest path.

The monotonic function t d e l a y (𝜖) should return zero when ρ (𝜖) = 0 , and it should return ∝ when ρ (𝜖) = 1. In this work, we give the following function:

$$ t_{delay}(\epsilon)=\frac{\left \| \epsilon \right \|.V_{min}(1-\rho (\epsilon ))}{V_{max}(1-\rho (\epsilon ))} $$
(4)

where V m a x and V m i n are the maximum and minimum speed of a group, respectively.

From (1)-(4), we get a weighted graph by assigning a weight to each edge of the medial axis. Then, the A* search algorithm on this graph is run, the best path for any pedestrian can be quickly determined [8]. The straight-line time to reach the goal is used as the A* heuristic function.

Based on the previous analysis, intra-group simulation method can be summarized as follows:

figure d

3.2 Discrete choice models for inter-group simulation

For inter-group simulation, we propose a novel discrete choice model to realistic simulation of crowds and path planning. The discrete choice model is used to model choices of a decision maker from an alternative set. DC model have been used in the study and prediction of business decisions, including pricing and product development [24]. The existing techniques of discrete choice model can be classified into two categories: binomial choice models and multinomial choice models. Binomial choice model deals with two alternatives. Multinomial choice model is able to select goals from more than two alternatives. A survey of these models can be found in [27].

In this paper, we take into account global path and local information under navigation mesh. When an inter-group faces a choice potential field goal, a net utility U i of each potential goal is computed. Here, we define the dynamic potential field for crowd simulation. The dynamic potential field includes two parts: static potential field P s t a t i c and region potential field P r e g i o n . The inter-groups, which are with the maximum walk speed, are determined by the density of the surrounding group and the group behavioral. We describe a maximum speed group motion at location (x,y) with direction θ as follows:

$$ u(x,y,t)=f(\rho (x,y,t))P_{region}^{x} $$
(5)
$$ v(x,y,t)=f(\rho (x,y,t))P_{region}^{y} $$
(6)

where f(ρ) is the moving speed of inter-group. \(P_{region}^{x}\) and \(P_{region}^{y}\) are the potential field with direction x and y cosines θ of the moving group.

In our work, a common goal with the same potential field in the same region is supposed. To arrive goal point by the shortest path, the region potential field \(P_{region}^{x}\) and \(P_{region}^{y}\) can be computed by (7) and (8) as follows:

$$ P_{region}^{x}=-\frac{\partial P}{\partial x}\Bigg/\left[\left( \frac{\partial P}{\partial x}\right)^{2}+\left( \frac{\partial P}{\partial y}\right)^{2}\right]^{1/2} $$
(7)
$$ P_{region}^{y}=-\frac{\partial P}{\partial y}\Bigg/\left[\left( \frac{\partial P}{\partial x}\right)^{2}+\left( \frac{\partial P}{\partial y}\right)^{2}\right]^{1/2} $$
(8)

Hence, the utility of the goal potential field i to inter-group \(U_{P_{goal}}\) is defined as follows:

$$ U_{P_{goal}}=P_{static}+P_{region} $$
(9)

According to the cognitive study on crowd behaviors, for inter-group simulation, we propose the discrete choice model by an exponential function as follows:

$$ f_{inter-group-pos}=V_{pos}e^{k_{pos(G/G_{max})}} $$
(10)

where V p o s is a constant to scale the expression result within [0,1]. k is constant to the positive feedback. G is the current number of inter-group inside a potential goal P g o a l . And G m a x is the maximum number of inter-groups that the potential goal can accommodate.

On the other hand, a negative feedback mode can be defined as follows:

$$ f_{inter-group-neg}=-V_{neg}e^{k_{neg(1-\sqrt{G_{max}/G})}} $$
(11)

The proposed dynamic discrete choice feedback model is obtained by integrating the effects of positive and negative feedbacks as follows:

$$ f_{inter-group-DC}=f_{inter-group-pos}+f_{inter-group-neg} $$
(12)

The dynamic feedback model can be considered as a function of variable G.

We show that the proposed DC model formulation with dynamic feedbacks can be used to simulate goal selection of different inter-group behaviors well, including evacuation, shopping and rioting. Here, we only discuss the evacuation case. When fires happen at a market or a Plaza, inter-groups often have to make choice, such as selecting an exit to escape. The representative utility U i of choosing an exit is determined by the following:

$$ G_{inter-group}(i)=V_{pos}e^{k_{pos(G_{i}/G_{i,max})}}-V_{neg}e^{k_{neg(1-\sqrt{G_{i,max}/G_{i}})}} $$
(13)

where G i n t e rg r o u p(i) denotes “attractiveness” of exit i to model the blocking status of i. G i is the number of inter-groups near exit i and G i,m a x is the number of inter-group that could block exit i.

Note that the normalized distance between inter-group U i and exit i is a key factor in our DC model. It is set \(d_{i,U_{i}}\). We may incorporate this factor into our DC model by forming the attributes of X i as follows:

$$ X_{i}=\left[\frac{1}{d_{i,U_{i}}},G_{inter-group}(i)\right] $$
(14)

Then, point i will be chosen as exiting for inter-group U i simulation in most cases.

3.3 The intersection detection method for group simulation

The intersection problem is a challenging topic for crowd simulation. For intra-group simulation, we propose novel density-based information for crowd simulation. Due to density-based information constraint, the proposed method can solve collision free problem. However, some pedestrians in intra-group still bring an intersection problem. Especially, for inter-group simulation, if discrete choice models parameters do not fit for number of crowd simulation, the intersection problem of intra-group/inter-group will happen.

In this paper, we propose a variable bounding box method for intra-group/inter-group simulation. Our method can solve the intersection problem well. The proposed method of the intersection problem is described as follows:

Assume agents/groups(by determined using density-based information) I(G) have random position P(x,y) o r i g i n a l , then P(x,y) n e w is an updated position. Vector \(\overrightarrow {x,y}\) is described from P(x,y) o r i g i n a l to P(x,y) n e w . The proposed method is implemented step N. Total numbers (including agents and group) of crowd simulation is set M. When the method detects an intersection problem in intra-group/inter-group with static objects or moving environment, the rectification position P r e c t i f i c a t i o n (x,y) can be computed by equation as follows:

$$ P_{rectification}(x,y)=P(x,y)_{new}+1/(N-n)\times \overrightarrow{x,y} $$
(15)
$$ P(x,y)_{new}\leftarrow P_{rectification}(x,y)M $$
(16)

where n is an updated step for our method. If intersection problem is brought between agents of intra-group or inter-group, a priority hierarchies method will be used for this problem. The key issue of priority hierarchies is how to judge priority hierarchical of agents of intra-group or inter-group. In this method, original position information and moving direction will be used. Here, we give two judgment tenets as follows.

  1. (1)

    The current position of agents of intra-group or inter-group is originally position before rectification. The value of priority hierarchies of originally position is higher than the current position.

  2. (2)

    If agents(pedestrians)intersection happened between intra-group or inter-group, higher priority hierarchy between previous positions and current positions will be decided by using the proposed angles rule. The angles rule is described as follows:

The moving direction of pedestrians i m and i k are set f m and f k , respectively, and their moving angle which is composed by between individuals center joint line and moving direction are set Θ m and Θ k , respectively. Figure 2a and b (\({\Theta }_{m}>= 90^{^{\circ }}\) and \({\Theta }_{k}>= 90^{^{\circ }}\)), for these two cases, the pedestrians i and k are parallel relevant to their same direction or in front of each other. We use tenet (1) to compute priority hierarchy of individuals. Figure 2c (\({\Theta }_{m} < 90^{^{\circ }}\), \({\Theta }_{k}<90^{^{\circ }}\) and Θ m k ) and Fig. 2d (\({\Theta }_{m}>90^{^{\circ }}\), \({\Theta }_{k}<90^{^{\circ }}\)), to this two cases, pedestrians i m and i k use tenet (2) to compute priority hierarchy of pedestrians, pedestrians i k is in back of i m .

Fig. 2
figure 2

Angle rule for priority hierarchy, a pedestrians i m and i k are parallel relevant to their same direction, pedestrians do not intersect each other. b pedestrians i m and i k have different directions and priority, which also use tenet (1) to compute, c pedestrian position i m is in front of i k using tenet (2) to compute, and d pedestrian position i k is in back of i m , use tenet (2) to compute priority hierarchy

4 Experimental results

In all simulations, the system clock is used to create real-time environments. We implement 3D game engine in mixture of VC++ and Director 10. All the experiments were performed on PC running Windows XP. The PC is 2.8GHz Intel Xeon i5 3470 processor, Intel GMA HD 4000 graphics card, and 4GB of RAM. Various sets of intra-group/inter-group behaviors are simulated using the proposed algorithm, which can produce smooth behavior for thousands of pedestrians at interactive rates.

In this section, the experiment includes four parts. In Section 4.1, we analyze density information for crowd simulation in various scenarios. In Section 4.2, we analyze the DC model for crowd simulation in various scenarios. In Section 4.3, we analyze the intersection detection method for crowd simulation. In Section 4.4, we define a “stopping rule”, which is based on the personality of the pedestrian to solve this problem.

4.1 Density-based information for intra-group simulation

We maintain crowd density information in a navigation mesh that partitions the environment into a collection of walk-able regions. The shortest paths can be used to guide pedestrians through an environment. In this experiment, density-based path planning can guide pedestrians around congested areas, thus, avoiding difficult local collision avoidance problems. The proposed algorithm can be easily extended to deal with 3D problems (e.g. uneven surface). As the proposed algorithm result is shown in Figs. 3 and 4. Navigation meshes of Plaza is shown in Fig. 3a, and b is navigation mesh of Plaza with virtual environment. From Figs. 3c and 4a, nearly all of the pedestrians follow the same short path when density information is not considered. This leads to a traffic jam. By contrast, Figs. 3d and 4b shows that pedestrians will naturally spread out among all of the available routes when density information is considered. Here, each pedestrian in the simulation also has been assigned an offset between -1 and 1. Figs. 3d and 4b shows the efficiency of our algorithm.

Fig. 3
figure 3

a navigation meshes of Plaza, b navigation mesh of Plaza with virtual environment, the multilayered virtual environment that is used in our experiments. c intra-group simulation without density information, most of the pedestrians follow the same short path. This leads to a traffic jam. d inter-group simulation without density information. When density information is considered, the pedestrians will naturally spread out among the available routes

Fig. 4
figure 4

a intra-group simulation without density information, most of the pedestrians will go to square by following the same short path. It will bring a traffic jam. b inter-group simulation without density information. When density information is considered, the pedestrians will naturally spread out among the available routes, such as two aside of square

The first experiment measures the overhead to maintain the density values for the walk-able regions and the medial axis. In this experiment, we insert a large number of pedestrians with random start and goal positions into each of our environments and simulated their movement. Pedestrians were removed from the environment as soon as they reached their goal position. Table 1 shows the time needed to perform each frame of the simulation for the entire crowd. Such as the Plaza environment, simulating 10000 simultaneously moving pedestrians took 27 millisecond per step on average when density updates were switched off. With the densities enabled, the average step time for 10000 simultaneously moving pedestrians was 24 millisecond. From Table 1, updating the crowds density information only marginally affects the running time, and large crowds can still be steered in real-time.

Table 1 step time with/without density information (ms)

4.2 Discrete choice models for inter-group simulation

In this paper, the proposed DC model can simulate virtual pedestrians goal selection. In this experiment, various heterogeneous inter-group behaviors are simulated, such as walking, evacuation, and shopping. Figure 5 shows a good result of the proposed DC model. From Fig. 5, it is clear that the proposed algorithm can be used for inter-group simulation in real-time virtual environments. We also clearly find that various heterogeneous inter-group behaviors can be simulated well. In this experiment, we also use density information in intra-group simulation to collision-free.

Fig. 5
figure 5

Discrete choice model for inter-group simulation with density information in intra-group

In order to highlight our proposed algorithm well, the combination of discrete choice model and density information is simulated. Figure 6 shows the most reliable real-time test data points, which tests the performances of different numbers of the pedestrians 25 times. It is clear that the frames per second decreased quickly along the exponential curve by increasing the number of pedestrians. If considering the 24 fps standard, our algorithm is suitable for the construction of real-time crowd simulation model with the number of pedestrians less than 12,000. Meanwhile, some related methods [28] and [17] also are compared in this experiment. We can find that the methods [28] and [17] have much less frames per second and they do not fit for real-time crowd simulation with a large number of pedestrians.

Fig. 6
figure 6

Our method uses 25 test points with different numbers of pedestrians. The method in [28]use 12 test points with different sizes of pedestrians. The method in [17] use 22 test points with different numbers of pedestrians

Meanwhile, we also take into account GPU load situation by using DC model and density information in this experiment. Figure 7 shows experimental result that measures the GPU load as the amount of GPU time that is required to generate one second of pedestrians movements. We consider the performance as real-time when the GPU load is at most 40 %. From Fig. 7, we can see that even for 12, 000 pedestrians, our method can still efficiently behavior simulation at interactive rates requiring less than 50 % of the process. Therefore, the proposed algorithm can be used for crowd simulation in real-time virtual environments. Meanwhile, some related methods [17, 18, 28] also are compared in this experiment. From Fig. 7, we can find that the proposed method have less than GPU load than the methods [17, 18, 28]. Our method is more suitable for real-time crowd simulation with the same number of pedestrians than other methods [17, 18, 28].

Fig. 7
figure 7

Relation between the number of pedestrians and the GPU load per second traversed time. When the number of pedestrians are the same case, the related methods [17, 18, 28], and our method are compared in this experiment

4.3 Intersection detection method for crow simulation

For intra-group simulation and inter-group simulation, we solve collision-free problem well. The intersection detection is an extremely challenging issue in crowd simulation. In our work, we use a variable bounding box method for intra-group/inter-groups intersection problem.

Figure 8 shows an experimental result of market simulation which shows the effectiveness of our method. In this experiment, we firstly simulate 10000 pedestrians retreating on computational virtual environment, and all pedestrians moving toward their targets. In Fig. 8a, we can notice a man has an intersection case with the front table(See the circled area). Figure 8b shows intersect elimination by our method. It is clear that the used method can solve intersection problem well.

Fig. 8
figure 8

Demonstration of intersection elimination, a the results with an intersection detection and elimination, and b intersect elimination by our method. Note that the circle area in results

4.4 Solving “shaking” behaviors

In many algorithms, when pedestrians encounter a bottleneck (or corridor portal), an unnatural behavior happen, where pedestrians appear to vibrate or shake continuously in the original place. In this paper, crow simulation includes two parts: intra-group and inter-group simulation, “shaking” can be found in intra-group simulation. Some methods such as CA model or rule-based model can avoid this problem by correcting this behavior through predefined rules [23]. However, these algorithms need to check all the neighboring pedestrians to determine the best information. This will lead to a great amount of computation which sometimes is unacceptable. In this paper, we define a “stopping rule”, which is based on the personality of the pedestrian. If pedestrian i has a higher level than pedestrian j, then pedestrian j will be stopping in the original place to let pedestrian i first through positions. Figure 9b shows simulation result of using the proposed method. Figure 9c and d show other door case of “shaking” behaviors. Figure 9 shows our method is the effectiveness.

Fig. 9
figure 9

The elevator case: a Two pedestrians encounter a bottleneck and “shaking” in the original place, and b “shaking” elimination by our method. The door case: c three pedestrians encounter a bottleneck and “shaking” in the original place, and d “shaking” elimination by our method. Note that the results is shown in red circle area

5 Conclusions

Crowd simulation with high congestion can lead to traffic jams and seems unnatural. To improve the realism of our simulations, crowd simulation is classified into intra-group simulation and inter-group simulation. We focus on addressing three problems:

  1. 1)

    for intra-group simulation, we propose a novel density-based information crowd simulation to collision free.

  2. 2)

    For inter-group simulation, we propose a novel discrete choice model to realistic simulation of crowds and path planning.

  3. 3)

    Furthermore, we also propose a variable bounding box method for intra-group/inter-groups intersection problem. The proposed algorithm can be tuned to simulate different types of crowd behaviors.

The current field of crowd simulation shows three large fields of application, which includes:

  1. 1)

    Crowd movement models, it is used in evacuation time calculations.

  2. 2)

    Crowd motion research, a high computational burden is not necessarily an issue.

  3. 3)

    Practice system, the infrastructure layout of major crowd events needs to be assessed before and during the course of event. Our future research will look into the combination of simulation models that provide the correct display of crowd motion where necessary and the calculation speed when possible.