+ All Categories
Home > Documents > Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of...

Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of...

Date post: 23-Mar-2020
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
79
Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm Master Thesis Marko Apel Poznan University of Technology Institute of Computing Science Laboratory of Computing Systems July 15, 2004 Supervisor: Prof. Dr. rer. nat. Karl Thomas Waldeer Co-Supervisor: Prof. Dr. rer. nat. Klaus Harbusch
Transcript
Page 1: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

Simulation of Pedestrian FlowsBased on the Social Force Model

Using the Verlet Link Cell Algorithm

Master Thesis

Marko Apel

Poznan University of Technology

Institute of Computing Science

Laboratory of Computing Systems

July 15, 2004

Supervisor:Prof. Dr. rer. nat. Karl Thomas Waldeer

Co-Supervisor:Prof. Dr. rer. nat. Klaus Harbusch

Page 2: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

Poznan University of TechnologyInstitute of Computing Scienceul. Piotrowo 3a60-965 Poznan

Apel, Marko:Simulation of Pedestrian Flows Based on the SocialForce Model using the Verlet Link Cell AlgorithmMaster Thesis, Poznan University of Technology, 2004.

Page 3: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

Declaration of Honour

This thesis was developed at the Department of Transportation of the University ofApplied Sciences Braunschweig/Wolfenbuttel.I thank Prof. Waldeer for introducing me to the field of molecular dynamics andpedestrian flow and his interest in the progress of the work. Only his aid has madethis thesis possible.I thank Prof. Harbusch for the support he gave me during the development of thisthesis and his dedication to the study of ’Computational Science’.I especially thank my wife for providing me with the environment needed to workon this thesis.1

1This thesis was written using the LATEX editor TeXnicCenter 1 Beta 6.01 and the MiKTeX 2.3Compiler. All screenshos are edited using Visio 2000. All diagramms are created using MicrosoftExcel 2002.

Page 4: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

Abstract

In this thesis, the movement of pedestrians is simulated. The simulation is imple-mented using the social force model, introduced by Helbing and Molnar. Compu-tationally, this model is high demanding, therefore the Verlet link cell algorithm,known from physical molecular dynamics computer simulations, is applied to thesocial force model.A test room with bidirectional flow was constructed and the social force model wasapplied to the pedestrians in the constructed room. The output of the two differentimplementations of the model are evaluated and compared.It is shown that the implementation of the Verlet Link Cell algorithm leads toa reduction of computation time. To show the efficiency of the Verlet Link Cellalgorithm, a simulation with 10.000 people has been made.The results presented by Molnar are reproduced and the calculation time comparedto the Verlet link cell implementation is evaluated. The calculation time for a prede-fined simulation room could be reduced by 42%. The well known behaviour of bidi-rectional pedestrian flow could also be reproduced with use of the velocity-densitydiagram, mean velocity scattering diagram, fundamental diagram and accelerationnoise diagram.

Page 5: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

Source Code

The source code of the simulation isn’t yet cleaned of all comments, temporaryvariables for validation and compiler warnings due to conversion of variable types.Therefore the source code won’t be printed in this work, but it can be obtained fromthe author. To get a copy of the uncleaned version of the source code, please sendan email to [email protected].

Page 6: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

6

Page 7: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

Contents

1 Introduction 1

2 Models for pedestrian flow 32.1 Magnetic Force Model . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2 Queueing models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.3 Cellular Automata . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.4 Gas-kinetic model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.5 Social force model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.5.1 Driving force . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.5.2 Interactions between pedestrians . . . . . . . . . . . . . . . . 102.5.3 Interactions with boundaries . . . . . . . . . . . . . . . . . . 122.5.4 Attractive Interactions . . . . . . . . . . . . . . . . . . . . . . 132.5.5 Joining Behaviour . . . . . . . . . . . . . . . . . . . . . . . . 142.5.6 Unsystematic Variations and Individuality . . . . . . . . . . . 142.5.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3 Differential equation solving procedure 153.1 One-step methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.2 Multi-step methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4 Simulation procedure 194.1 Implementation of the social force model . . . . . . . . . . . . . . . . 194.2 Parameters and test area . . . . . . . . . . . . . . . . . . . . . . . . 204.3 Results of the social force model according to Helbing/Molnar . . . . 244.4 Verlet link cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254.5 Implementation of Verlet link cell . . . . . . . . . . . . . . . . . . . . 274.6 Step-size control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

5 Simulation results 335.1 Comparison of the different implementations . . . . . . . . . . . . . 33

i

Page 8: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

ii CONTENTS

5.2 Results of the Verlet link cell algorithm . . . . . . . . . . . . . . . . 355.2.1 Calculation of mean values . . . . . . . . . . . . . . . . . . . 355.2.2 Macroscopic measures in the bidirectional test case . . . . . . 365.2.3 Time development pictures of the test room . . . . . . . . . . 39

5.3 Simulation of huge crowds . . . . . . . . . . . . . . . . . . . . . . . . 485.4 Shadowing effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

6 Summary and Outlook 63

Page 9: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

List of Figures

2.1 Lane switching behaviour in Blue/Adler model . . . . . . . . . . . . 72.2 Forces of the social model . . . . . . . . . . . . . . . . . . . . . . . . 92.3 Distance between pedestrians . . . . . . . . . . . . . . . . . . . . . . 112.4 Form factor for anisotropic pedestrian behaviour . . . . . . . . . . . 12

4.1 Interaction between pedestrians . . . . . . . . . . . . . . . . . . . . . 214.2 Interaction with boundaries . . . . . . . . . . . . . . . . . . . . . . . 224.3 Test room . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234.4 Oscillation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244.5 Verlet-Sphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254.6 Principle of the Verlet algorithm . . . . . . . . . . . . . . . . . . . . 264.7 Flowchart Verlet Link cell . . . . . . . . . . . . . . . . . . . . . . . . 294.8 Comparison of stepsize 0.1 and 0.05 . . . . . . . . . . . . . . . . . . 314.9 Comparison of stepsize 0.1 and 0.025 . . . . . . . . . . . . . . . . . . 32

5.1 Comparison of the two implementaion of the social force model . . . 345.2 Velocity-density diagram . . . . . . . . . . . . . . . . . . . . . . . . . 375.3 Fundamental diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 375.4 Mean velocity scattering diagram . . . . . . . . . . . . . . . . . . . . 385.5 Acceleration noise diagram . . . . . . . . . . . . . . . . . . . . . . . 395.6 Density at different timesteps for the testroom simulation . . . . . . 405.7 Velocity at different timesteps for the testroom simulation . . . . . . 455.8 Stadium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495.9 Density at different timesteps for the stadium evacuation . . . . . . 515.10 Velocity at different timestpes for the stadion evacuation . . . . . . . 565.11 Shadowing effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

iii

Page 10: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

iv LIST OF FIGURES

Page 11: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

List of Tables

4.1 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

5.1 Color matchup densities for the testroom simulation . . . . . . . . . 395.2 Color matchup velocities for the testroom simulation . . . . . . . . . 445.3 Color matchup densities for stadium simulation . . . . . . . . . . . . 505.4 Color matchup velocities for stadium simulation . . . . . . . . . . . . 50

v

Page 12: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

vi LIST OF TABLES

Page 13: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

Chapter 1

Introduction

Nowadays, the importance of pedestrian areas, malls and pedestrian movement ingeneral has an important influence on the planning of these areas. It is importantto simulate pedestrian movement to get knowledge of the pedestrian behaviourand to adapt the knowledge in the planning stadium. Pedestrian flow simulation isextremely important in areas where the safety of people could be endangered. Thisis the case in panic and evacuation situations, where wrong or misconfigured escaperoutes could result in the death of human beings. In these cases, many people areinvolved which leads to a high calculation time for the simulation in most computermodels.

Several models have been proposed to simulate the pedestrian flow. One of thesemodels is the social force model which is able to characterize several phenomenonswhich can be observed in pedestrian movement. In this thesis, the Social ForceModel (along with other models) will be described and implemented in a simulation.Unfortunately, the complexity of the model is n2 (with n = number of pedestrias)which leads to high computation times for huge crowds. To minimize the calculationtime, the model must be expanded. From molecular dynamics, the Verlet linkcell algorithm is known, which includes neighbourhood tables and link cells. Thisalgorithm is described in this thesis and is implemented in the social force model.The Verlet link cell algorithm avoids the n2 complexity and is able to handlesimulations for huge crowds. To show the effetiveness of the algorithm, a stadiumevacuation with 10,000 pedestrians is described.

In chapter 2 of this thesis, the different models for pedestrian flows are introduced.The main focus is set on the social force model which is implemented in a computersimulation. Chapter 3 shortly describes integrational solver methods and the usedintegrational solver is shown. The implementation of the social force model in thecomputer simulation is described in chapter 4. Also in this chapter the Verlet linkcell algorithm is explained, along with its implementation in the simulation pro-gram. Chapter 5 is the discussion of the various simulation results. Also the normal

1

Page 14: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

2 CHAPTER 1. INTRODUCTION

implementation of the model according to Helbing and Molnar and the Verlet linkcell algorithm is compared. Chapter 6 gives an outlook and possible improvementsto the simulation.

Page 15: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

Chapter 2

Models for the simulation ofpedestrian flow

To simulate the movement of pedestrians, several models have been proposed.Nearly all models use the laws of physic to simulate the movement, thus reducingpedestrians to particles. The models either calculate the forces acting on thepedestrian and thus the acceleration of the pedestrian according to Newtons secondlaw. Or they use rule sets (in case of cellular automata) to simulate the movement.Integrational solver calculate the velocity for discrete time steps which leads tothe new postion of the pedestrian. Different proposed models are described in thischapter. The main focus is layed on the social force model, for this model will beimplemented in the simulation.

2.1 Magnetic Force Model

This model was introduced by S. Okazaki and S. Matsushita [1]. In this model,pedestrians are treated as magnetic objects within a magnetic field. Each pedestrianand each obstacle is given a positive magnetic pole and the destinations of thepedestrians are assigned negative poles. Due to the attractive force the pedestrianmoves to the desired destination. During the movement repulsive forces from otherpedestrians and obstacles avoide collisions.To use the model, several initial data must be supplemented before the simulation ofpedestrian movement starts. These are the destination, the position, the maximumvelocity, the orientation, the time to start and the method to walk (indicated route,shortest route or wayfinding). Due to Coulomb’s Law, the velocity would increaseunlimited by the acceleration, so the maximum velocity is required. Furthermore,the plan must be supplemented in x,y-coordinates.

3

Page 16: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

4 CHAPTER 2. MODELS FOR PEDESTRIAN FLOW

Due to the treatment of the pedestrians as magnetic objects, the force is givenby Coulomb’s Law:

F =1

4πε· Q1 ·Q2

s2(2.1)

Q1 and Q2 are the intensities of the magnetic loads, s is the distance between twoparticles. If this law is applied to pedestrian movement, the Coulomb constant 1

4πεis replaced by the konstant k. This constant has to be set by the simulation. Q1

represents the intensity of the magnetic load of a pedestrian, Q2 represents theintensity of a magnetic pole (opening like doors). This leads to the Coulomb Lawfor pedestrian movement:

F = k · Q1 ·Q2

s2(2.2)

When dealing with Coulomb’s Law, it must be recognized that force is a vectorquantity. Thus the electric force exerted on the pedestrian due to the charge of anattractive force is

~F = k · Q1 ·Q2

s3· ~s (2.3)

where ~s is the vector from a pedestrian to a mangetic pole. It can be seen that if Q1

and Q2 have the same sign, the resulting force is positive and thus the pedestrian(s)repell. If Q1 and Q2 have different signs (positive for a pedestrian, negative for thedestination of the pedestrian), the resulting force is negative, leading to a movementto the desired destination. When more than two charges are present (that is morethan one desired destination, more than one pedestrian), the force between anypair is the sum of the forces exerted by the various individual charges.

In addition to the force exerted on a pedestrian according to Coulomb’s Law, anotherforce acts on a pedestrian to avoid collisions with another pedestrian. If a pedestrianintersects within a specific area with another pedestrian, a repelling force (and thusan acceleration) is exerted on the pedestrian, resulting in a change of direction sothat the pedestrians won’t collide. This acceleration is calculated as follows:

a = tanβ · cosα · vA (2.4)

vA is the velocity of pedestrian A. β is the angle between the relative velocity ofpedestrian A to pedestrian B and the contacting line from the position of pedestrianA to the circle around pedestrian B. The circle is an imiginary area around a

Page 17: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

2.2. QUEUEING MODELS 5

pedestrian which can’t be crossed. α is the angle between the relative velocity ofpedestrian A to pedestrian B and the velocity of pedestrian A.

The model was used to simulate a fire escape in a floor, the movement of pedestriansin a part of a concourse of an underground railway station and the movement ina main floor of a hotel. The model was effectively applied to these occasions. Inthe fire escape it is shown how long it takes to escape from the building. In queuespaces, the number of waiting people, waiting time and movement process can beevaluated.

2.2 Queueing models

In queueing theory, the movement of pedestrians is described in terms of probabilityfunctions. Pedestrians arrive with a certain probability at a server, get the serviceand leave the queue. The three main elements in a queueing system are the arrivalin the queue, the service mechanism and the service discipline (i.e. FIFO). Thestochastic process in queueing models is the population number in a room. Severalimplementations regarding pedestrian flow have been made (i.e. [2, 3, 4]), one willbe pictured here exemplarily.Lovas [3] introduced a stochastic model where the pedestrian flow in a building canbe modeled as a queueing network. In the process, each pedestrian is treated as asingle flow object, interacting with other objects. Nodes in the queueing networkrepresent rooms and the links represent doors. Within the movement process, aperson selects the new node according to a certain probability. This results in aforward equation which describes the change in the population from time t to t + h,where h is the timestep. Regarding that equation, several performance measurescan be calculated (i.e. the mean number of persons in a node and the mean numberof save evacuees). A simulation tool called EVACSIM was developed with whichsimulations for several buildings, that is for several queueing networks, have beenmade. The movement process is visualized and informations about bottlenecks inthe queueing system can be made. Furthermore, information about the pedestriansat the nodes like the spend time is evaluated.

2.3 Cellular Automata

Cellular automata is a simple and fast method to simulate pedestrian flow. In acellular automata model, the walkway is seperated into a grid. Each cell of the gridcan be occupied by one single pedestrian. Movement is modelled as a change of celloccupations where several rules are applied to the automata model. These rule setsdiffer in the different proposed models. Some models ([5, 6, 7]) will be discussedexemplarily in this chapter.

Page 18: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

6 CHAPTER 2. MODELS FOR PEDESTRIAN FLOW

Blue and Adler [5] capture two elements of pedestrian movement: the forwardmovement and resolving conflicts. Forward movement indicates the desire of a pedes-trian to reach a certain destination. Conflict resolution means the desire to avoidphysical contact.The rule set proposed by Blue and Adler consists of six rules which are appliedon four different stages. The first stage applies lane changing rules. In the secondstage all pedestrian are assigned to the new cell. Within the third stage, forwardrules are applied on each pedestrian. In the last stage, pedestrians hop to their newcells.

Lane switching is indicated in this model by five rules. Switching is only possible ifthe adjacent cell is available, that is the cell is not occupied by a pedestrian.

1. Determine if the cells to the immediate right and left are available

2. Resolve conflicts if an adjacent cell is available but the cell two lanes over isoccupied. In this case a random number indicates which pedestrian will getaccess to the cell.

3. Terminate a lane change if both adjacent cells are unavailable.

4. Compute the unoccupied distance for the active and unoccupied adjacent lanes.If a distance is uniquely maximal, assign the pedestrian to that lane. Thisindicates that the pedestrian is taking the path which has no disturbanceswithin the maximum distance. If no maximum disctance is found, assign laneaccording to rule five.

5. If three lanes yield the maximum distance, apply a 80/10/10 split for currentlane and two adjacent lanes. If the two lanes yield the maximum distance,apply a 50/50 split.

The lane switching procedure is illustrated in figure 2.1. For pedestrian 1, the cellsto the left and right are available. The unoccupied distance is uniquely maximalfor the present lane and thus no lane change is made. Pedestrian 4 has a conflictin the right cell with pedestrian 6. Here, pedestrian 6 gets access to the conflictcell. Pedestrian 4 can now only switch to the lane to the left. In the left lane, theunocupied distance is uniquely maximal and thus pedestrian 4 will change the lane.The new position is represented by pedestrian 4’. Pedestrian 7 has no available lanesto the left and right. Therefore the lane change will be terminated in rule 3 of step1.

Page 19: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

2.3. CELLULAR AUTOMATA 7

�� 1

7 8

6 4 4'

5

3 2

9

0 0 1

3 0

pedestrian

unoccupied cell ��

conflict cell

0 unoccupied distance

lane change direction of

movement

Figure 2.1: Lane switching behaviour in Blue/Adler model

After the determination of the lane, the pedestrian is moved to the assigned lane.This is done in stage two. In stage three, pedestrians are assigned travel speeds.During this stage, pedestrians may be exchanged with a certain exchange probabiltywhich has to be set in the simulation. The exchange may happen if two pedes-trians oppose each other. In stage four all pedestrians are moved forward in the grid.

The model was applied to uni-directional pedestrian walkways and bi-directionalinterspersed flow. The results are compared with former works and observationsfrom other authors and showed the expected results.

Dijkstra, Jessurun and Timmermans [6] introduced a model with focus topedestrian movement within a mall. The movement of a pedestrian is evaluated infour steps:

1. Check if the pedestrian has passed a decision point (end of an activity or nodeof the underlying network). If this is true, goto step three. If not, goto steptwo.

2. If the pedestrian is in a decision cell (node of the network), examine the be-haviour of the pedestrian and turn the pedestrian towards the desired direction.This way, the decision point will be passed.

3. If the new evaluated cell is empty, move the pedestrian to the cell. If not, gotostep four.

4. If the cell to the left or right isn’t occupied, move to the left or right.

Page 20: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

8 CHAPTER 2. MODELS FOR PEDESTRIAN FLOW

In this model, the movement is directed to the destination and only changed atdecision points. Interactions with other pedestrians weren’t considered in the paper.

Yang Lizhong et al. [7] developed a cellular automata model for fire evacuation.Special rules regarding the fire emergency (danger grade) are introduced. Thisdanger grade consists of a position danger grade (determined by the distance to thenearest safety exit) and a fire danger grade (determined by the distance to the fire).In their model three stages are evaluated.

1. Each occupant selects a cell with the smallest danger grade, regarding his ownview of the cell(s). If all adjacent cells are occcupied or have a higher dangergrade, the occupant doesn’t move.

2. If more than one occupant wants to move to the same cell, the occupant israndomly selected. The others have to wait in this time-step.

3. Each occupant is updating the danger grades.

This basic model can be extended by introducing personal data of the occupantslike handicaps, knowledge of the area, etc. According to the authors, the model candeal with occupant evacuation from a large room conveniently and reasonably.

2.4 Gas-kinetic model of pedestrian flow

In this model, pedestrian crowds are treated like molecules in a dilute gas. Moleculemovement in a gas is assumed to be chaotic and thus the speed and position of themolecules can’t be determined exactly. Instead they are determined using a densityfunction f(~x,~v, t). Using Boltzmann’s transport equation [8, 9], this density functioncan be evaluated. The equation describes the change of the density function f intime for a given state as a difference of an inflow and outflow of the state due tobinary collisons (interactions). The interaction rate depends on the relative velocityof the two molecules and the scattering cross section.The first implementation of the gas-kinetic description into pedestrian flow analysiswas introduced by Henderson in 1971 [10]. Hoogendoorn and Bovy introduced amore complex gas-kinetic model for pedestrian flow [11]. In their model, the den-sity function f(~x,~v, ~w, t) depends on the position ~x, the velocity ~v and the desiredvelocity ~w at time t. The desired velocity is omitted in the further use of the model.Hoogendorn and Bovy provide an approach for the scattering cross section and solvethe constructed equation using the Monte Carlo method for a simple model case.The model was used on simulating unidirectional, bidirectional and crossing pedes-trian flow in a given room. In all three cases the expected velocity-density relationis qualitively reproduced.

Page 21: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

2.5. SOCIAL FORCE MODEL 9

2.5 Social force model of pedestrian flow

The social force model was developed by Helbing and Molnar[12, 13, 14, 15, 16]. Inthis model, the different motivations and influences of a pedestrain are describedby various force terms. It is mainly focussed on Newton dynamics with unit mass.This model is able to cover several natural phenomena which occur during pedestrianmovement:

1. Pedestrians normally choose the fastest route [17]

2. Pedestrians move with an indivdual speed [18], taking into account the situ-ation [19], sex, age, handicaps, surroundings, etc [18]. The speed is Gaussiandistributed [10].

3. Pedestrians keep a certain distance from other pedestrians [20]. The distanceis dependant on the pedestrian density and the walking speed.

In the following, the forces acting on a pedestrian are described in detail. They arealso shown in figure 2.2.

Figure 2.2: Forces of the social model

Page 22: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

10 CHAPTER 2. MODELS FOR PEDESTRIAN FLOW

2.5.1 Driving force

The most obvious force is the so called driving force which reflects the motivationof the pedestrian α to move to the desired destination with his desired velocity v0

α.It is given by

~f 0α =

v0α · ~e 0

α(t)τα

− ~vα(t)τα

(2.5)

where ~vα(t) is the actual velocity, ~e 0α(t) the desired direction of movement and τα

the relaxation time of pedestrian α. The desired direction of movement is calculatedfrom the momentary position of the pedestrian ~xα and the desired destination ~p:

~e 0α(t) =

~p− ~xα

‖~p− ~xα‖ (2.6)

2.5.2 Interactions between pedestrians

The interactions between pedestrians are also described by forces in this model andconsist of a socio-psychological force and physical interactions:

~fαβ(t) = ~f socαβ (t) + ~f

phαβ (t) (2.7)

The most important interaction between pedestrians is the behaviour to keep acertain distance to other pedestrians. To describe this behaviour, a repulsive socio-psychological force is implemented in the social force model. The repulsion dependson the distance between the interacting pedestrians- it has the highest value atthe lowest distance (but not beyond a maximum limit) and declines to zero withincreasing distance. These conditions can be implemented using an exponentialfunction, resulting in a force describing the interactions between pedestrians:

~fsocαβ (t) = Aα exp

[rαβ − dαβ

]~nαβ · Fαβ (2.8)

Aα denotes the interaction strength and Bα denotes the range of the repulsiveinteraction. dαβ is the distance between the pedestrians α and β, rαβ is the sumof their radii and ~nαβ is the normalized vector pointing from pedestrian β topedestrian α. ~nαβ and dαβ are time-dependant. Fαβ is a form factor for anisotropicbehaviour which is described later. Figure 2.3 illustrates the distance betweentwo interacting pedestrians. Each pedestrian has a radius which equals the spacehe occupies. Withing the exponential function, the effective unoccupied distancebetween the pedestrians is considered.

The pedestrian movement is normally anisotropic. That means that the action infront of the pedestrian is more important than the action behind him. Humans havethe ability to foresee the actions of other humans and thus they can react due toactions made by other humans. To implement this in the social force model, the

Page 23: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

2.5. SOCIAL FORCE MODEL 11

Figure 2.3: Distance between pedestrians

influences made by other pedestrians in the field of view of the pedestrian shouldbe greater than the influence of pedestrians out of the field of view. To includethis behaviour, a form factor is implemented which depends on the angle betweenthe desired direction of movement and the direction of the pedestrian exerting therepulsive force. The form factor is multiplied with the above mentioned repulsiveforce and is calculated via the following formula

Fαβ = λα + (1− λα)1 + cos (ϕαβ)

2(2.9)

The potential of the form factor for several λα is illustrated in figure 2.4.With λα < 1 the anisotropic character of the pedestrian movement can be consid-ered. If there is a repuslive force in the direct direction of movement (i.e. the anglebetween α and β is zero), the influence has the greatest value (Fαβ = 1). Anglesfrom 0◦ to 90◦ and 270◦ to 360◦ yield a greater form factor than angles from 90◦ to270◦ and thus the influence from pedestrians which are out of sight are less dominant.

The second part of equation 2.7 is resulting from physical interaction between pedes-trians. These interactions occur, if the sum of the radii of the pedestrians is greaterthan the distance between them. That is if rαβ ≥ dαβ. This actually means nearlyphysical contact, which is normally only consired in panic and evacuation situations(that is in situations with a high pedestrian density in bottlenecks like doors). Thephysical interactions are developed into two additional forces. These forces are thebody force and the sliding friction force. Both are inspired by granular interactions[21, 22]. The body force is counteracting body compression- the pedestrian is trying

Page 24: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

12 CHAPTER 2. MODELS FOR PEDESTRIAN FLOW

Direction

of movement

1

5 . 0

1 . 0

Figure 2.4: Form factor for anisotropic pedestrian behaviour

to avoid physical damage. It is calculated by the following equation:

kΘ(rαβ − dαβ)~nαβ (2.10)

The sliding friction force results from the tendency, that pedestrians try to avoidpassing other pedestrians with a high velocity at small distances. Thus a tangentialdeflection is introduced:

κΘ(rαβ − dαβ)∆vtβα

~tαβ (2.11)

The function Θ(z) is equal to its argument z if z > 0 (that is if the sum of the radii isgreater than the distance of the masses) and 0 otherwise (the pedestrians don’t toucheach other). ~tαβ = (−n2

αβ , n1αβ) is the tangential direction and ∆vt

βα = (~vβ−~vα) ·~tαβ

is the tangential component of the relative velocity. k and κ represent large valueconstants. The body force and the sliding friction force are summed to the physicalforce exerted from pedestrian β on pedestrian α, i.e.

fphαβ = kΘ(rαβ − dαβ)~nαβ + κΘ(rαβ − dαβ)∆vt

βα~tαβ (2.12)

2.5.3 Interactions with boundaries

Boundaries and obstacles are treated analogous to interactions between pedestrians.A pedestrian also tries to keep a certain distance from obstacles and boundaries.Normally a room consists of more than one boundary and typically some obstacles.The question is, which boundaries and obstcales influence the pedestrian. Threemodels are possible:

• Superposition: All boundaries and obstacles influence the pedestrian and thusall forces are summed up.

• Shortest distance: Only the boundary/obstacle with the shortest distance tothe pedestrian is considered

Page 25: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

2.5. SOCIAL FORCE MODEL 13

• Biggest impact: Only the boundary/obstacle with the highest influence isconsidered

The model used depends on the simulated phenomenon. In a room or passagewaywithout any other obstacles, the shortest distance model is equal to the biggestimpact model. In an angled passageway, the superposition of the influences ismore reasonable. The corner of the passageway is avoided while walking in thepassageway. This reflects the human behaviour.

Boundaries are modelled using polygons and thus the problem occurs, which poly-gon line should be used to calculate the influence of the boundary. As mentionedabove the same three models are used for to determine the influence of the boundary.

Regardless which model is used, one must calculate the distance between the pedes-trian and the boundary denoted by b, i.e. the distance between the pedestrian anda line of the polygon which represents the boundary. A line of the polygon is deter-mined by their verteces ~p and ~q. Depending on the actual position of the pedestrian,the distance vector between him and the line is calculated using vector algebra:

~dαb =

~p− ~xα for 〈~xα − ~p,~eqp〉 ≤ 0~p− ~xα − 〈~eqp, ~p− ~xα〉~eqp for 0 < 〈~xα − ~p,~eqp〉 ≤ ‖~q − ~p|

~q − ~rα for ‖~q − ~p| ≤ 〈~xα − ~p,~eqp〉(2.13)

〈~p, ~q〉 denotes the scalar product of ~p and ~q. Equation 2.13 describes the closestdistance from the pedestrian to the boundary or obstacle.

Keeping in mind, that the interaction is comparable to the interaction with anotherpedestrian, the force resulting from an interaction with a boundary can be calculatedusing equation 2.8, 2.10 and 2.11:

~fαb ={

Aα exp[rα − dαb

]+ kΘ(rα − dαb)

}~nαb− κΘ(rα− dαb)

⟨vα,~tαb

⟩~tαb (2.14)

~nαb denotes the direction perpendicular to boundary and ~tαb the direction parallelto the boundary.

2.5.4 Attractive Interactions

Several attractions can influence the behaviour of pedestrians. Shop windows, dis-play items or special attractions for instance can lead to a movement towards theattraction. The attraction is time-dependant and linear decreasing to zero. Theseattractions can be modelled in the same way as the social force between pedestri-ans (see equation 2.8). The difference lies in the interaction range Bαi between thepedestrian α and the attractive interaction i. It is normally larger than the inter-action range between pedestrians. The strength parameter Aαi is typically smaller,negative and time-dependant, as mentioned above.

Page 26: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

14 CHAPTER 2. MODELS FOR PEDESTRIAN FLOW

2.5.5 Joining Behaviour

Pedestrians often walk in groups. Once separated (e.g if a pedestrians has to avoidan obstacle), the individual pedestrians try to reform the group. This is done by aconstant attracting force acting from pedestrian β to pedestrian α. It only dependson ~nαβ .

~fattαβ = −Cαβ~nαβ (2.15)

2.5.6 Unsystematic Variations and Individuality

All pedestrians possess an individual behaviour and thus their movement can differfrom the assumed laws. This behaviour is represented by a random fluctuation forceξ. The fluctuation is Gaussian distributed and perpendicular to the vector pointingin the desired direction:

ξ =⟨~e 0

α, ~fα

⟩X~e⊥α (2.16)

~fα denotes the whole social force acting on pedestrian α. X is the normal distributedrandom number with zero mean and σ2-variance, i.e. X ∝ N(0, σ2). So, the densityof X is given by

f(x) =1√2π

· 1σ· e−x2

2σ2 (2.17)

2.5.7 Summary

The social force model consists of a sum of partial forces, representing the differentinfluences a pedestrian suffers in reality. They are shown in figure 2.2. This sum ofall forces describes the movement and direction of the pedestrian, i.e.

d~vαt

dt= ~f 0

α +∑

β

~fαβ +∑

b

~fαb +∑

i

~fαi +∑

β

~f attαβ + ξ (2.18)

Depending on the system simulated, not all forces have to be evaluated (for instancethe physical force can be neglected if no panic or evacuation ocuurs). This modeldescribes many phenomena occuring during pedestrian movement quite realistically,so it’s a promising approach and the base of the following procedure.

Page 27: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

Chapter 3

Differential equation solvingprocedure

The aim of this work is to implement the social force model presented in the previouschapter in a most performant simulation program. The movement of pedestrians,resulting from the calculation of the different forces must be calculated. This move-ment is modelled by differential equations which are solved numerical by numericalsolver.

3.1 One-step methods

One-step methods use only one previous value Yi to evaluate the next value Yi+1. Themost common one-step methods are the Euler-Cauchy method (first order method)and the Runge-Kutta method (fourth order method). The Euler-Cauchy method iseasy to implement, but is inaccurate. The Runge-Kutta method is computationallymore demanding, but is more accurate. The fourth order Runge-Kutta method hasfour force calls per timestep. That is, every time step the forces of the social forcemodel have to be calculated four times. In our case, the Euler method is not accurateenough and the Runge-Kutta is computationally too demanding because of the fourforce calls. Therefore other integrators have to be considered.

15

Page 28: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

16 CHAPTER 3. DIFFERENTIAL EQUATION SOLVING PROCEDURE

3.2 Multi-step methods

Multi-step methods use more than one previous value to evaluate the next approxi-mated value. The most common numerical solver for molecular dynamic simulationsis the so called Velocity Verlet algorithm. It is formulated as follows [23].

(i) Specify the initial positions r1i

(ii) Specify the initial velocities v1i

(iii) Compute the positions at time step n + 1 as

rn+1i = rn

i + hvni +

12m−1h2Fn

i (3.1)

(iv) Compute the velocities at time step n + 1 as

vn+1i = vn

i + h(Fn+1i + Fn

i )/2m (3.2)

In step iv the new velocity is calculated using the force at timestep n + 1. This isonly possible if the forces only depend on the position and not on the velocity of theparticle. If the force depends on the the velocity, it can’t be calculated for timestepn + 1 because the velocity at timestep n + 1 isn’t known. The computed velocitydepends on itself and thus can’t be calculated. In our case, the force depends on thevelocity and the position of the pedestrians and thus the Velocity Verlet algorithmcan’t be used.

Gear’s algorithm compensates the problem which occurs while calculating the forceswith the Velocity Verlet algorithm. This algorithm is a predictor-corrector methodwhich first calculates an approximated value with a one-step method or a multi-stepmethod. This value is called a predictor. The predictor will be corrected with acorrector value. Gear’s algorithm keeps two higher derivatives to be able to get abetter estimate of the new positions and velocities [24]. The introduced algorithmis of fifth order, but can be expanded up to eigth order if more derivatives arecalculated. First, the new positions, velocities, accelerations and higher derivativesare predicted:

r(p)n+1 = rn + hvn +

h2

2an +

h3

6αn +

h4

24βn (3.3)

v(p)n+1 = vn + han +

h2

2αn +

h3

6βn

a(p)n+1 = an + hαn +

h2

2βn

α(p)n+1 = αn + hβn

αn is the first derivation of an and βn is the second derivation of an. From thepredicted positions, the difference between the acceleration at timestep n + 1 andthe predicted acceleration a

(p)n+1 will be evaluated:

Page 29: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

3.2. MULTI-STEP METHODS 17

c = an+1 − a(p)n+1 (3.4)

With this factor, the corrected positions, velocities and higher derivatives will becalculated:

rn+1 = r(p)n+1 + c

h2

219120

(3.5)

vn+1 = v(p)n+1 + c

h

234

αn+1 = α(p)n+1 + c

13h

12

βn+1 = βn + c1

12h2

112

Gear’s predictor-corrector method has been succesfully used in molecular dynamics(especially with canonical and large canonical systems) and is known as a mosteconomical integrator for molecular dynamics [24]. Furthermore, it can deal withforces which are position- and velocity-dependant. It also has less force calls thenRunge-Kutta (one instead of four). Thus, this numerical solver was implemented tosimulate the movement of the pedestrians.

Page 30: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

18 CHAPTER 3. DIFFERENTIAL EQUATION SOLVING PROCEDURE

Page 31: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

Chapter 4

Simulation procedure

The simulation procedure was implemented using the C-Programming language andthe Microsoft Visual C++ 6.0 Compiler. In a first step the one-to-one implemen-tation of the social force model is done. The driving force, the interactions be-tween pedestrians including physical interactions and interactions with obstaclesand boundaries as described in the literature are considered. No random force partsare used in this implementation. The implementation leads to an n2 complexity(as shown in the next section) which is highly compationally demanding. In thesecond simulation approach, the Verlet link cell (VLC) algorithm is implemetedwhich avoids the n2 complexity. This approch will be discussed in section 4.4. Allsimulations have been made on a computer with these specifications:

• Operating system: Windows 2000 SP4

• Processors: Two Intel XEON 1.8 GHz Processors with 512KB Cache. Loadbalancing of the two processors was handled by the operating system, no codefor load balancing was implemented in the simulation. During the simulation,50% of the processor capacity was used, that is one processor was calculating,the second processor was able to handle other requests.

• RAM: 512 MB PC800 ECC RDRAM

• Disk Controller: Adaptec 29160N Ultra/160 SCSI-Controller

• Harddisk: 36 GB SCSI Harddisk, 10.000 r/min

4.1 Implementation of the social force model

After setting the simulation parameters (see section 4.2), the predicted values foreach pedestrian and timestep are calculated. Subsequent, the driving force is calcu-lated. Once the driving force is calculated, the social forces must be considered. Toto this, the social force from a pedestrian to all other pedestrians must be calculated.

19

Page 32: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

20 CHAPTER 4. SIMULATION PROCEDURE

This leads to the already mentioned n2 complexity, which actually leads to a double-loop in the program. The social force and the driving force are summed. The lastcalculated force is the interaction force with boundaries. For each pedestrian, theforce with every polygon element of every obstacle/boundary must be calculated.The calculated force is added to the previously computed driving force and socialforce. The last step in the algorithm is the calculation of the corrector values and thecalculation of the position, velocity and acceleration with use of the corrector values.

The algorithm can be summarized:

Set the simulation parameters

For each timestep do

For each pedestrian do

Calculate predictor valuesCalculate driving forceFor each other pedestrian in the system do

Calculate social forceAdd social force to driving force

For each boundary element doCalculate interaction force with boundariesAdd force to driving force and social forces

Calculate corrector valuesCalculate position, velocity and acceleration of the pedestrian

4.2 Parameters of the social force model and the defi-nition of the test area

As mentioned above, the driving force, the interactions between pedestrians andthe interactions with boundaries is implemented in the first simulation apporach.Therefore, several parameters have to be set, according to the forces.

ParametersAccording to Molnar [15], the desired velocity is set to 1.34 m/s with a relaxationtime between 0.2 and 0.5. The relaxation time specifies the elapsed time until 63%of the desired velocity is reached. In the implemented simulation, the relaxationtime was set to 0.5 which produced realistic results.Molnar also stated that with a desired velocity of 1.34 m/s and a relaxation time of0.5, the interaction strength of 2.1 and the interaction range of 0.3 m is used. Theconstants for physical interactions between pedestrians aren’t found in literature andthus they were validated by making several runs with the simulation. When two

Page 33: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

4.2. PARAMETERS AND TEST AREA 21

pedestrians get closer, they should avoid contact and thus bypass each other. Thisbehaviour must be reflected by the simulation. It is found that in addition to theinteraction range and interaction strength of the social force between pedestrians, thevalues of k = 2 and κ = 4.8 yields the desired effect. The radius of the pedestrians isset to 0.2 m. With these values, the physical interactions result in forces that forcethe pedestrians to evade each other. But they aren’t so big that the pedestriansare pushed through obstacles or boundaries. To simulate the anisotropic characterof pedestrian movement, the form factor λ was set to 0.2. With this value, theinteractions outside of the field of view have little effect on the forces. The result ofthe parameters for the interaction between pedestrians is shown in figure 4.1.

Figure 4.1: Interaction between pedestrians

The parameters for the interactions with boundaries are set in such a way thatpedestrians neither get too close to the boundary nor get pushed too far away fromit. It is found by various runs with the simulation, that an interaction strength of 5.1and an interaction range of 0.5 m has the desired effect. The constants for physicalinteractions are set to the same value as in the interaction between pedestrians.In the simulation, the superposition principle of polygon elements of boundaries isused. To evaluate the interaction with boundaries, a desired velocity of 0 was setin the simulation and a pedestrian was initially put directly at a boundary. Theinteraction force with boundaries must push the pedestrian towards the room. Thisis be proofed by the simulation and can be seen in figure 4.2. The pedestrians avoidcontact with the wall in the passage.It must be stated here, that all parameters should be further evaluated by additionalruns. It may be possible that several parameters must be changed to improve thesimulation.All parameters for the simulation are summarized in table 4.1.

Page 34: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

22 CHAPTER 4. SIMULATION PROCEDURE

Figure 4.2: Interaction with boundaries

Parameter Formula element Formula Valuedesired velocity v0

α 2.5 1.34 m/srelaxation time τα 2.5 0.5 s

interaction strength pedestrians Aα 2.8 2.1interaction range pedestrians Bα 2.8 0.3 m

λ λα 2.9 0.2interaction strength boundaries Aα 2.14 5.1interaction range boundaries Bα 2.14 0.5 m

k k 2.10, 2.14 2κ κ 2.11, 2.14 4.8

radius of pedestrians r 2.8, 2.10, 2.11, 2.14 0.2 m

Table 4.1: Parameters

Page 35: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

4.2. PARAMETERS AND TEST AREA 23

Test room

To evaluate the data and to be able to compare the results with the Verlet link cellalgorithm, a test room was implemented in the simulation. In this room, bidirec-tional flow through a corridor takes place. The bidirectioal flow through the passageleads to interactions between pedestrians and thus interaction forces are present.The constructed room can be seen in figure 4.3.

� � � �� � � �

wall

� � � �� � � �

wall

49.5 m

15 m 19 m 15.5 m

33 m

12 m

12 m

Intermediate

goal

Intermediate

goal

Actual

goal

Actual

goal

Figure 4.3: Test room

At the start of the simulation, 50 pedestrians are randomly distributed at eachside of the corridor. Their intial velocity and acceleration is set to zero. The firstdestination of each pedestrian is set in the middle of the entrance of the corridor.This leads to a directed movement of each pedestrian towards the corridor. If thepedestrians are within a range of 5.7 meters of the first destination, they are assignedthe actual destination of their movement. This parameter is found making severalruns with the simulation. It provides a smooth transition in the corridor. The actualdestination is at the opposite side of the corridor. Due to the fact that all pedestrianshave to pass the corridor, the interactions will take place inside the corridor. If nointermediate destination is set, the pedestrians will try to move directly towardstheir destination and thus bounce against the walls building the room. This won’trepresent human behaviour- humans will move directly towards the corridor andthus the intermediate point at the entrance of the corridor has to be set.

Page 36: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

24 CHAPTER 4. SIMULATION PROCEDURE

4.3 Computational results of the social force model ac-cording to Helbing/Molnar

Molnar stated in his work, that several facts resulting from analysing pedestrianflows, can be proofed by the simulation. These are in special the trail building ofpedestrians and oscillation with bidirectional flow in a narrow passage. To evaluatethe simulation, several runs with different room geometries are made to check if thetrail buidling and oscillation can be reproduced.Oscillation can be proofed by the simulation. In a birectional flow in a narrowpassage, only a few pedestrians reach the other side of the passage. This flowcontinues until the pressure of the other side stops the flow. A short period ofbalance occurs until another few pedestrians reach the other side. The test case forthe oscillation can be seen in 4.4.

Figure 4.4: Oscillation

Trail building can be shown rudimentary by the predefined test room. Trails in eachdirection can be seen, but unfortunately the density in the passage isn’t high enoughto get separate trails for each direction. To further validate the trail building, thedensity should be increased.

Page 37: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

4.4. VERLET LINK CELL 25

4.4 The Verlet link cell algorithm

The calculation of the social force leads to two nested loops and thus a n2-complexitywhich has to be evaded to get the computational results in an acceptable period oftime [25, 26]. This can be done using the Verlet link cell algorithm which is acombination of neighbourhood tables (Verlet algorithm) and cell algorithms (linkcell) ([27]).In the Verlet algorithm, a circle for each pedestrian is introduced (called Verlet-circle,see figure 4.5) which has a radius of the interaction length of the social force. Thatradius is the maximum distance between two pedestrians for which the social forcewill be calculated. Pedestrians outside the Verlet circle won’t effect the pedestrianat all and thus can be neglected for the force calculation.

r + d

r

Figure 4.5: Verlet-Sphere

If the changes of the evaluated forces are relatively small and the timesteps dt areadequately small, then the interacting pedestrians during a specific period won’tchange. This is illustrated in figure 4.6. Within the timestep dt, the interaction

Page 38: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

26 CHAPTER 4. SIMULATION PROCEDURE

time

dt

interaction partner

at time t interaction partner

at time t + dt

Figure 4.6: Principle of the Verlet algorithm

partners within the Verlet circle only change slightly. Only at the edges of theVerlet circle changes occur. Some pedestrians leave the Verlet circle and some mayenter the Verlet circle. Because the changes occur at the edge of the Verlet circle,they have a small effect on the force calculation of the specific pedestrian. Theyare located at the highest possible distance and thus the calculated force is rathersmall (the interaction force depends on the distance between the pedestrians).This results in a rather low change of the absolute force. So every dtth step, thedistances to all other pedestrians are calculated. A table for each pedestrian ismade which contains all pedestrians within the Verlet circle. For the next dt - 1steps in time, only the pedestrians within that tables are considered [28].

To implement the Verlet algorithm, it must be checked which pedestrian are withinthe Verlet circle of each pedestrian. This determination has still n2 complexity,because from each pedestrian, every other pedestrian must be checked. Withthe assumption that the interacting pedestrans won’t change within timestep dt,this evaluation must only be done every dt seconds. This is reducing the overallcalculation time, but the n2 complexity is not avoided.

To reduce the complexity, the Verlet algorithm is expanded with the link cell algo-rithm. For this approach, the simulated room is split into cubic cells. With the linkcell algorithm, each pedestrian is now assigned to a specific cell in the constructedgrid. The length of the edges of the cells is set such it exceeds the radius of theVerlet circle. That way it is guaranteed that the possible interaction partners ofa pedestrian are within the cell he is located and the 8 adjacent cells (see figure4.5). Pedestrians outside these cells are definately farther away than the maximumdistance for which the social force must be calculated. Therefore, not all pedestrianhave to be evalatuated for the possible interaction partners, but only the pedestri-ans within the 9 cells. To have actual data, the assignment of pedestrians to cells

Page 39: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

4.5. IMPLEMENTATION OF VERLET LINK CELL 27

must be updated regularily. It can also be assumed, that within an adequately smalltimestep dt, the fluctuations of cells will be small. Therefore, the update of cellsmust only be done every dt seconds. This update has linear complexity- each pedes-trian must be assgined a cell. Also, the n2 complexity of the Verlet circle is reduced,because with the link cell algorithm it’s not necessary to check all pedestrians forpossible interactions.

4.5 Implementation of the Verlet link cell algorithm

The implementation of the Verlet link cell algorithm is shown using the flowchartshown in figures 4.7

At the beginning of the simulation, the radius of the Verlet sphere is set. Thisradius must be the longest distance up to which the social force will be calculated.With the parameters shown in table 4.1, a radius of the Verlet Sphere of 10 m leadsapproximately to an absolute value of a social force of 2.66 · 10−14 m/s2 which isneglectible. Furthermore it can be argued, that in real life pedestrians won’t reactif another pedestrian is crossing the path in 10 m distance.Using the radius of the Verlet Sphere, the simulation space is divided by a grid. Thelength of the edges of a cells must be greater than the radius of the Verlet Sphere,here set to 1.05 · 10. After generating the grid, the neighbour cells of each cell arecalculated and stored in an array (called label). This has to be done once at thebeginning of the simulation.Within the time integration procedure, the Verlet table is calculated every full sec-ond. With a step size of 0.1 sec, the Verlet table is updated every 10 time steps.To calculate the Verlet Table, the cells in which the pedestrian fit have to be deter-mined. Subsequent to this, the number of pedestrians in each cell is calculated andthe pedestrians are assigned to cells. Both informations are stored: the cell in whichthe pedestrian fits and which pedestrians are in which cell. Now all cells are evalu-ated to store the Verlet table. First, the interactions within a cell are considered andsecond, the interactions with the neighbouring cells are evaluated. The interactingpedestrians are stored in two arrays. Finally, it is checked, if the possible interac-tions are within the Verlet Sphere of the pedestrian. This is done by calculating thedistance between the interacting pedestrians. If the distance is less than the radiusof the Verlet Sphere, the interacting pedestrians are stored in another two arrays.These arrays (the Verlet table) are used to calculate the social force between pedes-trians. The loops determining the potential interacting pedestrians and interactingpedestrians within the Verlet circle are vectorized and thus very efficient.After calculating the Verlet table, the forces according to the social force modelis calculated by using Gear’s integrator. The first step consists of calculating thepredictors. With the predicted values, the driving force is calculated. Subsequentto the driving force, the social force is evaluated. Because of the Verlet link cellalgorithm, not all interactions between all pedestrians are considered. Only the

Page 40: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

28 CHAPTER 4. SIMULATION PROCEDURE

interacting pedestrians stored in the Verlet table will be used. Finally, the interactionforce with boundaries is calculated. All three forces are summed und finally thecorrectors are calculated which leads to the new position, velocity and acceleratonof the pedestrians. The positions, velocities and accelerations of each pedestrianare stored and after the whole simulation analysed in a sampling program. Afterincreasing the elapsed time by the timestep, the next calculation of the forces begin.

Page 41: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

4.5. IMPLEMENTATION OF VERLET LINK CELL 29

Start

Determine neighbour cells for each cell

full second?

Determine cell surrounding the

pedestrian

yes

Set number of pedestrians of each cell

to 0

Increase number of

pedestrians for the

determined cell, assign

the pedestrian to the cell

Determine interacting pedestrians within the

cell, mll++

Determine interacting pedestrians in adjacent

cells, mll++

mll != 0 ?

mll = 0

Calculate distance

between pedestrians

distance < rc ?

Save pedestrians within the Verlet-sphere

yes

yes

no

Save interacting pedestrians in Verlet-

table

no

no

II

all cells

evaluated?

no yes

I

Figure 4.7: Flowchart Verlet Link cell

Page 42: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

30 CHAPTER 4. SIMULATION PROCEDURE

II

Calculate predictors

Calculate driving force

Calculate social force

entry in Verlet-

table?

yes

no

Calculate interaction

force with boundaries

Calculate correctors

increase time by dt

time < total

time?

yes

End

no

I

Store position, velocity, acceleration

data sampling

Page 43: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

4.6. STEP-SIZE CONTROL 31

4.6 Step-size control

Normally, step size control is needed to minimize errors in the solver tool. Errorsmay occur if the used step size is too big. In areas with less changes in the forces,the step size can be higher than in areas where the force changes rapidly. In thesimulation of pedestrian flow, the forces don’t change rapidly. It only has slightchanges where many pedestrians interact. Thus it can be assumed that step sizecontrol is not needed while simulating pedestrian flows based on the social forcemodel. To prove this assumption, simulations for three different timesteps in thetest room have been made. The inital time step was set to 0.1. A higher timestepof 0.2 lead to inaccepatable results in the simulation (i.e. breakthroughs) and thuscan’t be used. If the timestep is decreased to to 0.05 and 0.025, the mean errorof the position of the pedestrians is approximately 1m (see figures 4.8 and 4.9).The mean error is calculated as the arithmetic average value of the positions of allpedestrians at the specific time. The difference in the position between the twoevaluated stepsizes are summed for each timestep and divided by the number ofpedestrians. It is assumed that decreasing the timestep won’t lead to a significantimprovement of the simulation and therefore no step-size control was implemented.The timestep is set to 0.1 for the duration of the whole simulation, because it yieldsacceptable results in less computation time for the whole simulation period of 300seconds.

Figure 4.8: Comparison of stepsize 0.1 and 0.05

Page 44: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

32 CHAPTER 4. SIMULATION PROCEDURE

Figure 4.9: Comparison of stepsize 0.1 and 0.025

Page 45: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

Chapter 5

Simulation results

5.1 Comparison of the different implementations

Mean error of the Verlet Link Cell implementationTo show that the implementation of the social force model using the Verlet Link Cellalgorithm shows no significant difference in the calculated positions of the pedestri-ans (that is in the movement of the pedestrians), the results of both implementationsare compared. A fixed start-distribution of pedestrians is used for both implementa-tions to compare the results. The previously mentioned test room is used, with thedifference that the pedestrians start in both implementations from the same startingposition.For each timestep in the simulation, the distance between the calculated positionsof each pedestrian of the both implementations is calculated and summed. Fur-thermore, for each timestep the mean value, the maximum and minimum value isevaluated and put into a diagram (see figure 5.1). The diagram shows that themean error is approximately 0 for the first 42 seconds of the simulation. Withinthis period, only interactions within the passage occur in the simulation space andthus no differences between the two implementations is seen. After 42 seconds, themean error increases to approximately 0.14 m. This mean error is introduced bythe heavy interactions of the pedestrians at the destination of their movement. Thepedestrians aren’t taken from the system once they reach their destination and thusheavy interactions at the destinations appear. Once all pedestrians have reachedteir destination, they oscillate around it and thus the mean error remains nearlyconstant after a few timesteps. In the simulated space, bidirectinal flow within anarrow passage leads to many interactions. But these interactions only lead to a verysmall difference of the two implementaions of the model. It is assumed, that withless interactions, the mean error will even more decrease. Because of the very smallmean error of the pedestrian movement, it is also assumed that the implementationof the Verlet Link Cell algorithm leads to a non-significant error.

33

Page 46: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

34 CHAPTER 5. SIMULATION RESULTS

Figure 5.1: Comparison of the two implementaion of the social force model

Calculation time of the Verlet Link Cell algorithmOnce it is proved, that the Verlet Link Cell algorithm leads to valid results, the cal-culation speed is validated. The implementation of the social force model accordingto Helbing and Molnar needs a calculation time of approximately 48 seconds for100 pedestrians, a simulation period of 300 seconds and a timestep of 0.1 seconds.The Verlet Link Cell implementation ends the simulation for the same parametersafter approximately 28 seconds. It is seen, that the Verlet Link Cell implementationonly needs about 58% of the calculation time of the normal implementation of themodel. The more pedestrians that occur in the simulation space, the more thisadvantage will increase. It must be stated here, that the Verlet Link Cell won’tnecessarily decrease the calculation time. This advantage depends on the simu-lated occasion. There may be occasions where the Verlet Link Cell won’t decrasethe calculation time, but it is highly probably that it will be decreased in most cases.

Influence of the radius of the Verlet SphereThe greater the radius of the Verlet sphere, the more interactions may occur. Ifthe radius is set such high, that the simulation space is divided into one cell only,the results of the normal implementation of the model and the Verlet Link Cellimplementation is the same. This is proved by a test run which leads to exactly thesame positions of the pedestrians. To benefit from the advantages of the Verlet LinkCell algorithm, a reasonable radius for the Verlet Sphere must be found. This valuewas already discussed in section 4.5.

Page 47: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

5.2. RESULTS OF THE VERLET LINK CELL ALGORITHM 35

5.2 Computational results of the Verlet link cell algo-rithm

After the confirmation of the right implementation of the Verlet Link Cell algo-rithm, several runs have been made to decrease random scattering of the pedestrianmovement. For this sample, 50 pedestrians each are randomly distributed at bothsides of the passgae of the test room. 100 runs with different starting positions aremade and the results of all runs are evaluated. A mean velocity-density diagram,fundamental diagram, velocity scattering diagram, acceleration noise diagram, ve-locity progress pictures and density progress pictures are created. For the diagrams,the mean absolute velocity or the mean absolute acceleration must be calculated.For the progress pictures, the mean velocity for each direction x and y of the move-ment must be calculated to get the direction of the velocity. The calculation of thedifferent mean values will be described in section 5.2.1.

5.2.1 Calculation of mean values

Calculation of the mean absolute velocity and accelerationFor the mentioned diagrams, only the pedestrians within the passage are consid-ered. For each separate run, the number of pedestrians within the passage for eachtimestep is evaluated and the mean absolute velocity for each timestep is calculated.This can be expressed by the following equation:

∀i,j vij =1

nij

nij∑

k=1

√v2x,ijk + v2

y,ijk (5.1)

with nij as the number of pedestrians within the passage for run i and timestep jand k as the index of the pedestrian. vx,ijk denotes the velocity in x-direction ofpedestrian k for run i and timestep j and vy,ijk denotes the velocity in y-direction ofpedestrian k for run i and timestep j. The mean velocities for all runs are summedand the mean velocity for all runs is calculated:

∀j vj =1nj

nj∑

i=1

vij (5.2)

where nj is the number of runs with pedestrians inside the passage at timestep j.This leads to the mean velocity of all runs for each timestep. The mean accelerationis calculated simultaniously.

Calculation of the mean statistical spreadTo get the statistical spread, the statistical variance is calculated. This is done using

s2 =1

n− 1

(n∑

i=1

v2i − n · v2

)(5.3)

Page 48: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

36 CHAPTER 5. SIMULATION RESULTS

n denotes the total number of pedestrians within the passage and v denotes the meanvelocity of pedestrians wthin the passage. To evaluate the equation, the square of themean velocities for each run and timestep are summed and the variance for each runand timestep is calculated using the equation shown above. For this, the previouslycalculated mean velocity for each run is needed (see equation 5.1). The variancesare summed for all runs and divided by the number of runs with pedestrian insidethe passage for each timestep. This procedure can be summarized by the followingequation:

∀j s2vj

=1nj

( nj∑

1

1nij − 1

[ nij∑

i=1

v2ij − nij · v2

ij

])(5.4)

nj is the number of runs with pedestrians in the passage at timestep j, nij is thenumber of pedestrians in the passage in run i at timestep j. The expression followingthe first sum is actually the variance of run i at timestep j.

5.2.2 Macroscopic measures in the bidirectional test case

The mean absolute velocity and the density in the passage have been put in a chartwhich is shown in figure 5.2. It is seen, that with increasing density, the velocity isdecreasing. This is a known fact for homogenious crowds. Normally, the chart hasan inflection point where the gradient is highly increasing. At this point, a ratherminor increase in the density results in a rather major decrease of the velocity. Thispoint is known as the critical density. Simulations with higher densities for thetest room should be made in following simulation approaches to validate the criticaldensity. Furthermore, it can be seen that the chart consists of two seperate lines.This results from the two different states of the passage. First, the passage is fillingwith pedestrians and thus the density increases. At the turning point of the chart,most pedestrians leave the passage and thus the density is decreasing again whichresults in the line returning to higher velocities.The fundamental chart shows the coherance between the flow and the density inthe passage. From figure 5.3 can be seen that the flow is increasing with increasingdensity. The more people are in the passage, the higher the flow will be. This willbe true until the density exceeds the capacity of the area and thus no free flow ispossible anymore. From this density, the flow will decrease with increasing densities.The maximum flow could not be reached in the simulation and should be proved insimulation approaches with higher densities.

Page 49: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

5.2. RESULTS OF THE VERLET LINK CELL ALGORITHM 37

Figure 5.2: Velocity-density diagram

Figure 5.3: Fundamental diagram

Page 50: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

38 CHAPTER 5. SIMULATION RESULTS

Another interesting measure is the mean velocity scattering which can be seen infigure 5.4. It shows that the velocity spread is constant within a small range forlow densitites. Within these densities, few interactions between the pedestriansoccur and the velocity is rather constant. With higher densities, the interactionsincrease which results in fluctuations in the velocities. Due to these fluctuations,the velocity spread increases.

The lower line in the chart represents the filling of the passage while the upperline shows the clearance. This means that the spread is higher when the passageis cleared. This can be due to the fluctuations inserted in the system. While thepassage is filling, no inital fluctuations are present and thus the spread is lower.

Figure 5.4: Mean velocity scattering diagram

Figure 5.5 shows the density dependance of the scattering acceleration. This dia-gram can be used to make assumptions about the quality of the result. The higherthe spread, the more uncomfort the flow is for each pedestrian. This is analog tovehicular traffic (see [29]). From figure 5.5 can be seen that the acceleration noiseincreases when the density in the passage increased. This results from the interac-tions in the passage. To validate the model, the parameters for the force calculationshould be changed and the acceleration-noise chart should be constructed. If theacceleration noise decreases, the parameters fit better to the model.

Page 51: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

5.2. RESULTS OF THE VERLET LINK CELL ALGORITHM 39

Figure 5.5: Acceleration noise diagram

5.2.3 Time development pictures of the test room

Density time development

In the following figures, the density at different timesteps is shown. The timesteps (inseconds) are shown in the dialog window at the top left. The test room is separatedinto a grid and the mean density at each grid element is calculated. Several runsare made to optimize the grid. It is found that a grid element with 2.25 m2 yieldsgood results. In the figures, the different colors mean different densities. The colormatchup can be seen in table 5.1

Color Density (pedestrians/cell)White 0

Light Blue 0 - 1Dark Blue 1 - 2

Green 2 - 3Yellow 3 - 4Red > 4

Table 5.1: Color matchup densities for the testroom simulation

In figure 5.6 can be seen that at the start of the simulation, the mean densitiesfor all 100 runs are rather low. Once the simulation started, the pedestrians walk

Page 52: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

40 CHAPTER 5. SIMULATION RESULTS

directly to the entrance of the passage. After 6 seconds, the first congestions atthe borders of the passage appear. Here, the pedestrians from above and below theentrance have to contrive in the stream of the pedestrians who enter the passagehorizontally. These congestions increase until most pedestrians entered the passage(at 15 seconds). After 10 seconds, the pedestrian streams from both directionsstart to contact in the middle of the passage. From this time, the densities inthe passage increase, with the highest density in the middle of the passage wherethe main contact point of the two streams is located. Once all pedestrians are inthe passage (after approximately 15 seconds), the congestions at the entrance ofthe passage start to disappear while the congestions in the middle of the passageincrease. These congestion are dissolving while the pedestrians bypass each otherdue to their calculated forces. After 27 seconds, most pedestrians left the maincontact point in the middle of the passage and head towards their final destinationof movement. Now the congestions occur at the two final points of the pedestrianmovement (starting from second 31). The pedestrians aren’t taken from the systemonce they reach their destination, so at these points, heavy interactions occur. Dueto the small distance to the destination, the driving force is rather low and the mainacting force is the force between the interacting pedestrians. Thus, all pedestrianoscillate around the destinations, resulting in high densities at these points.

Figure 5.6: Density at different timesteps for the testroom simulation

Page 53: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

5.2. RESULTS OF THE VERLET LINK CELL ALGORITHM 41

Page 54: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

42 CHAPTER 5. SIMULATION RESULTS

Page 55: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

5.2. RESULTS OF THE VERLET LINK CELL ALGORITHM 43

Page 56: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

44 CHAPTER 5. SIMULATION RESULTS

Velocity time development

To show the velocity time development, the direction of the velocities must be evalu-ated. To do this, the simulation space is devided into a grid and for each grid element,the velocity and number of pedestrians at each timestep is calculated. Here, not themean absolute velocity is needed, but the mean velocity in both directions, x andy. These are calculated simultaniously as stated for the mean absolute velocity (seeequation 5.1), with the difference, that for each grid element at each time step, thevelocities in both directions are summed independantly.

∀i,j vx,ij =1

nij

nij∑

k=1

vx,ijk (5.5)

∀i,j vy,ij =1

nij

nij∑

k=1

vy,ijk (5.6)

The velocity progress is constructed similar to the density progress. The colormatchup for the velocities is shown in table 5.2. In figure 5.7, the direction ofthe mean velocities for each grid point can be seen. The line in each grid elementrepresents the direction of the velocity.

Color Velocity (m/s)White 0

Light Blue 0 - 0.25Dark Blue 0.25 - 0.5

Green 0.5 - 0.75Yellow 0.75 - 1.0Purple 1.0 - 1.25Red > 1.25

Table 5.2: Color matchup velocities for the testroom simulation

The velocity progress should be seen in dependance of the density progress. The ve-locity decreases with increasing densities. While the pedestrians enter the passage,the density at the entrance of the passage increaes. This results in a decreasingvelocity (see figure 5.7). The same fact occurs while the interaction in the middleof the passage increase, that is when the two streams get in contact. The density isincreasing, which slows down the pedestrians. When the passage is emptying, thepedestrians are able to speed up again (queue discharge) until they reach their finaldestination. At the final destinations, the density is increasing again, which alsoleads to a reduction of the velocities. Around the final destinations are also gridelements with low density. This should result in a rather high velocity. But becauseof the vanishing driving force, the velocities are also low.

Page 57: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

5.2. RESULTS OF THE VERLET LINK CELL ALGORITHM 45

Figure 5.7: Velocity at different timesteps for the testroom simulation

Page 58: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

46 CHAPTER 5. SIMULATION RESULTS

Page 59: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

5.2. RESULTS OF THE VERLET LINK CELL ALGORITHM 47

Page 60: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

48 CHAPTER 5. SIMULATION RESULTS

5.3 Simulation of huge crowds using the Verlet link cellalgorithm

As stated before, the advantage of the Verlet Link Cell algorithm increaseswith higher numbers of pedestrians. Here, the avoidance of the n2-complexitygreatly influences the reduction of calculation time. To show the efficiency of theimplemented Verlet Link Cell algorithm, a simulation space with 10,000 people isimplemented. It is shown in figure 5.8.The shown room is interpreted as a football stadium where the playground is inthe middle of the stadium. At each side of the stadium, two exits with a width of 5m each are located. The pedestrians are located at all four sides of the playgroundwith 2,500 pedestrians per side. The simulation expresses an evacuation of thestadium. Its parameters are used as stated in table 4.1. At the start of thesimulation, each pedestrian is assigned an exit. This is done by weigthed search.The nearest exit has the highest probability to get selected, but all other exits canbe set for each pedestrian too. The farthest exit has the lowest probability to getchoosen. This probabilistic determination of the exits should express the unrationalhuman behaviour which can occur in panic situations. Within the simulation space,no other obstacles are present. Therefore the pedestrians can cross the playgroundin any way they like.

40 runs with randomly distributed pedestrians have been made and the velocityand density progress figures have been constructed. One simulation run took ap-proximately 75 minutes on the given machine. Assuming that the implementation

Page 61: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

5.3. SIMULATION OF HUGE CROWDS 49

Figure 5.8: Stadium

of the social force model according to Helbing and Molnar needed 48 secondsfor 100 pedestrians, the needed calculation time for 10,000 pedestrians will beapproximately 8000 minutes (113.3 hours) due to the n2-complexity. Here, thegreat advantage of the Verlet Link Cell algorithm is seen dramatically.

Figure 5.9 shows the density progress of the simulation and figures 5.10 shows thevelocity progress of the 10,000 pedestrians. The timesteps (in seconds) are shownin the dialog window at the top right. Due to higher densities, the color matchup isdifferent to the testroom. Again, the color matchup for the stadium can be seen intables 5.3 and 5.4.

The density interval from 0 - 1.5 is divided into 6 seperate blue tones. The darker theblue tone, the closer the density is to 1.5. The velocity interval from 0 - 1 is dividedinto 4 seperate blue tones. The darker the blue tone, the closer the velocity is to 1.0.

From the figures is seen that during the whole simulation time, the densities inthe different grid elements are rather low, except for the grid elements surroundingthe exits. Therefore, congestions at the exits occur. These congestions are presentduring the whole simulation time. Pedestrians with free way to the exit immediatelyaccelerate to the desired velocity, while pedestrians with no free way to the exitaren’t able to accelerate. These pedestrians are locked in the middle of the four

Page 62: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

50 CHAPTER 5. SIMULATION RESULTS

Color Density (pedestrians/cell)White 0Blue 0 - 1.5Green 1.5 - 2.0Yellow 2.0 - 2.5Purple 2.5 - 3.0Orange 3.0 - 4.0Grey 4.0 - 5.0Red > 5.0

Table 5.3: Color matchup densities for stadium simulation

Color Velocity (m/s)White 0Blue 0 - 1Green 1.0 - 1.2Yellow 1.2 - 1.25Purple 1.25 - 1.3Red > 1.3

Table 5.4: Color matchup velocities for stadium simulation

pedestrians areas. While the first pedestrians leave the stadium, the border offast moving pedestrians is propagating and more pedestrians are able to accelerate(see figures 5.10 and 5.3. After 60 seconds, the borders are dissolved and thefour different blocks which contained the pedestrians aren’t visible anymore. Theprogressing border can be interpreted as a shockwave which is moving through thepedestrian crowd. Once the shockwave went through the crowd and all pedestriansare moving, interaction on the playground and at the exits occur which lead to slowvelocities at these areas.

From the progress figures is seen that the movement seems to create a specialpattern. This pattern represents the path building behaviour of human beings.These paths occur due to the deterministic calculaton of the forces. The unsys-tematic fluctuations and thus a probabilitic influence isn’t implemented in thesimulation. This would lead to a difference in the pattern, but it can be assumedthat the pattern will still be existing. It may possible that the patterns representthe evacuation behaviour of human beings for the given builidng. Thus it may bepossible to simulate the evacuation behaviour and build the evacuation ways independance of these patterns.

The velocities in the middle of the stadium are rather low, although the densities are

Page 63: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

5.3. SIMULATION OF HUGE CROWDS 51

low too. It can be assumed that the velocities in this are should be near to the desiredvelocity. This isn’t true due to fluctuations in that region. For all simulated runs,the fluctuation in the middle of the stadium is rather high- only a few pedestriancross the playground in comparison to the exits. To eliminate this, more simulationruns with different exits should be made.

Figure 5.9: Density at different timesteps for the stadium evacuation

Page 64: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

52 CHAPTER 5. SIMULATION RESULTS

Page 65: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

5.3. SIMULATION OF HUGE CROWDS 53

Page 66: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

54 CHAPTER 5. SIMULATION RESULTS

Page 67: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

5.3. SIMULATION OF HUGE CROWDS 55

Page 68: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

56 CHAPTER 5. SIMULATION RESULTS

Figure 5.10: Velocity at different timestpes for the stadion evacuation

Page 69: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

5.3. SIMULATION OF HUGE CROWDS 57

Page 70: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

58 CHAPTER 5. SIMULATION RESULTS

Page 71: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

5.3. SIMULATION OF HUGE CROWDS 59

Page 72: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

60 CHAPTER 5. SIMULATION RESULTS

5.4 Shadowing effects

Shadowing effects occur where a nontransparent obstacle is present between twopedestrians. If the distance between the pedestrians is small enough (or in thecase of the Verlet Link Cell algorithm: the two pedestrians are within the Verletsphere), a social force between these pedestrians is calculated. But in reality, theywon’t interact with each other, because there’s no line of sight between them. Thiscould lead to unrealistic social forces and thus in the worst case to the failure ofthe simulation procedure used. Therefore it can be assumed that the shadowingeffects should be evaluated while calculating the social forces. This evaluation willlead to an increase of the processing time, because more calculations have to bemade. While calculating the social force, an additional loop must be implementedto evaluate the shadowing effects with all obstacle elements within the Verlet sphereof the pedestrian. In this section, a method of resolution will be presented. Thismethod isn’t yet implemented in the simulation, but should be evaluated in futureexperiments. It may be possible, that the shadowing effects have less impact on thesimulation than predicted. Shadowing effects are important when both interactingpedestrians are located directly at the wall. If they aren’t located directly at thewall and thus have a greater distance between them, the social force is smaller.The smaller the social force, the less important the shadowing effects are. Inthe constructed test room, shadowing effects can only occur at the corners of thepassage. There it is not possible, that two pedestrians are both located immediatelyat the wall. Therefore, the shadowing effects have less impact on the social force inthe used test room. To prove this, a quantitative analysis will be made in the future.

Page 73: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

5.4. SHADOWING EFFECTS 61

As mentioned in chapter 2.5.3, obstacles and boundaries are represented by polygonelements, that is by straight lines. The line of sight between the two interactingpedestrians can also be represented by a straight line. Shadowing effects occurwhen the two lines intersect within the coordinate range of the pedestrians. Lineswill only intersect if they aren’t parallel. In any other case, the intersection point hasto be calculated by equating the two linear equations. The principle of shadowingeffects is shown in figure 5.11.

boundary

line of sight

y 1 B

x 1 B

x 2 B

y 2 B

x 1 L

y 1 L

x 2 L

y 2 L

I y x

I

grid element

Figure 5.11: Shadowing effects

The polygon element of the obstacle is represented by the linear equation

yB = mB · (x− xB1 ) + yB

1 (5.7)

xB1 and yB

1 are the coordinates of the starting vertex of the boundary. mB is thegradient of the boundary. It is calculated as

mB =yB2 − yB

1

xB2 − xB

1

(5.8)

where xB2 and yB

2 are the coordinates of the ending vertex of the boundary. Similarto this, the line of sight between the pedestrians is represented by

yL = mL · (x− xL1 ) + yL

1 (5.9)

with xL1 and yL

1 as the coordinates of pedestrian one and mL as the gradient of theline of sight. The gradient of the line of sight is calculated as

mL =yL2 − yL

1

xL2 − xL

1

(5.10)

Page 74: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

62 CHAPTER 5. SIMULATION RESULTS

xL2 and yL

2 denote the coordinates of pedestrian two. The intersection point is nowretrieved by

yL = yB (5.11)

Solving this equation, the x-coordinate of the intersection point is calculated by

xI =mBxB

1 −mLxL1 + yL

1 − yB1

mB −mL(5.12)

If the x-coordinate of the intersection points lies between the start- and end-x-coordinate of the obstacle element, the shadowing effect occurs and thus no socialforce should be calculated.

While calculating the intersection point, the special case of a vertical polygonelement must be considered. In this case, the x-coordinate of the intersection pointis the x-coordinate of the vertical polygon element. If the boundary is a verticalline, shadowing effects will occur if the x-coordinate of the intersection point liesbetween the x-coordinates of the line of sight, that is between the x-coordinates ofthe two interacting pedestrians.

The shadowing effects must be considered for each interacting pair of pedestrianswith each polygon element of all obstacles. This is computationally demanding andthus the polygon elements should be implemented in the Verlet Link Cell algorithm.That way, only the obstacle elements within the Verlet sphere have to be considered.To implement the obstacle elements in the Verlet tables, each obstacle element mustbe linked to the grid element of the constructed grid. Here it may be necessaryto further divide the obstacle elements so they can be uniquely assigned to a gridelement. This must only be done once before the simulation starts, because theobstacle elements won’t change their position and thus they won’t change theirgrid element. Before the calculation of the interaction force between the interactingpedestrians, the validation of the shadowing effect takes place. Due to the separationof the simulation space into the grid and the function of the Verlet link cell algorithm,only the obstacle elements within the grid element of the analysed pedestrian andthe 8 surrounding elements must be evaluated- similar to the creation of the Verlettable shown in chapter 4.5. All other obstacle elements are not within the Verletsphere and thus have no influence on the social force.

Page 75: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

Chapter 6

Summary and Outlook

This work shows the implementation of the social force model for pedestrian flowin a computer simulation. The model is implemented and the results are comparedwith known phenomena made by Helbing and Molnar. The implementation showsthe described phenomena. The drawback of the model is the n2 complexity. Toavoid this complexity, the social force model is expanded by the Verlet link cellalgorithm. This algorithm dramtically reduces the computation time of the givenproblems, so huge crowds and statistical runs are possible. Several diagrams aregenerated which show qualitively the known behaviour of the different characteristicin pedestrian or vehicular flows. The advantage of the Verlet link cell algorithmis shown simulating an evacuation of 10,000 people from a stadion. Nevertheless,there are still many things to be considered in following simulaton approaches.

Verification of parametersThe parameters mentioned in table 4.1 should be changed and further simulationruns with other parameters should be made. In combination with the accelerationnoise chart, the best parameters should be evaluated.

Influence of geometric arrangementsThere may be a great influence of geometric arrangements on the Verlet Link Cellalgorithm. This influence should be evaluated by introducing several geometricarrangements and validation of the results.

Parallelisation of processesThe purpose of this thesis was to prove that with the use of a special algorithm(the Verlet link cell algorithm), the complexity of the social force model can behandled on a single-processor machine. It may be interesting to carry the simulationproblem for real huge crowds on a shared memory multiprocessor machine to benefitfrom both, the Verlet link cell algorithm and the processing with many processors.Here, one has to think about the distribution of the tasks to the different processors.

63

Page 76: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

64 CHAPTER 6. SUMMARY AND OUTLOOK

Validation of other pedestrians flowsIn addition to the simulated bidirectional flow, unidirectional flow and crossing flowshould be simulated. The velocity-density chart should be created and evaulatedwith existing charts from the literature.

Increasing the densityAs mentioned in the previous chapter, the critical density in the test room couldnbot been reached. Therefore, more runs with higher densities should be made toevaulate the simulation resluts.

Implement obstacles in the Verlet-tableRight now, only pedestrian interaction are implemented in the Verlet table. Infollowing researches should be evaluated if obstacles can be implemented in theVerlet table. This would avoid that the interaction between each pedestrian andeach obstacle element must be calculated. The importance of the implementationincreases with an increasing number of obstacles in the simulation area.

Implement unsystematic variationsThe unsystematic variations, that is the random human behaviour, should beimplemented in the simulations to get ever more realistic simulation results.

Implement validation of shadowing effectsThe determinations of shadowing effects should be included in the simulation. Itshould be validated if these effects have a significant influence on the simulationoutput.

Page 77: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

Bibliography

[1] S. Okazaki and S. Matsushita. A study of simulation model for pedestrian move-ment with evacuation and queuing. Proceedings of the International Conferenceon Engineering for Crowd Safety, pages 271–280, 1993.

[2] Jr J. Yuhaski and J. Macgregor Smith. Modeling circulation systems in build-ings using state dependent queueing models. Queueing Systems, pages 319–338,1989.

[3] G. G. Lovas. Modeling and simulation of pedestrian traffic flow. Transpn. Res.B, 28V(6):429–443, 1994.

[4] N. Ashford, M. O’Leary, and P. D. McGinity. Stochastic modelling of passengerand baggage flows through an airport terminal. Traffic Engineering & Control,1976.

[5] V. J. Blue and J. L. Adler. Bi-directional emergent fundamental pedestrianflows from cellular automata microsimulation. Proceedings of the 14th Interna-tional Symposium of Transportation and Traffic Theory, 1999.

[6] J. Dijkstra, J. Jessurun, and H. Timmermans. A multi-agent cellular automatamodel of pedestrian movement. Pedestrian and Evacuation Dynamics, pages173–181, 2001.

[7] Y. Lizhong, F. Weifeng, H. Rui, and D. Zhihua. Occupant evacuation modelbased on cellular automata in fire. Cinese Science Bulletin, 47(17):1484–1487,2002.

[8] J. T. Duderstadt and W. R. Martin. Transport Theory. John Wiley and sons,1979.

[9] A. Sommerfeld. Vorlesungen uber Theoretische Physik, volume V. Verlag HarriDeutsch, 1988.

[10] L. F. Henderson. The statistics of crowd fluids. Nature, 229:381–383, February1971.

[11] S. Hoogendoorn and P. H. L. Bovy. Gas-kinetic modeling and simulation ofpedestrian flows. Transportaion Research Record, 1710:28–36, 2000.

65

Page 78: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

66 BIBLIOGRAPHY

[12] D. Helbing and P. Molnar. Social force model for pedestrian dynamics. PhysicalReview E, 51(5):4282–4286, May 1995.

[13] D. Helbing. Traffic and related self-driven many-particles systems. Reviews ofmodern physics, 73:1067–1141, October 2001.

[14] D. Helbing. Verkehrsdynamik. Springer-Verlag, 1997.

[15] P. Molnar. Modellierung und Simulation der Dynamik von Fußgangerstromen.PhD thesis, Universitat Stuttgart, 1995.

[16] M. Schreckenberg and S.D. Sharma, editors. Pedestrian and Evacuation Dy-namics. Springer Verlag, 2002.

[17] J. Ganem. A behavioral demonstration of fermat’s principle. The PhysicsTeacher, 36, Februar 1998.

[18] U. Weidmann. Transporttechnik der Fußganger. Institut fur Verkehrsplanung,Transporttechnik und Eisenbahnbau, ETH Zurich, 1993.

[19] W. M. Predtetschenski and A. I. Milinski. Personenstrome in Gebauden -Berechnungsmethoden fur die Projektierung. Muller, 1971.

[20] W. Brilon, M. Großmann, and H. Blanke. Verfahren fur die Berechnung derLeistungsfahigkeit und Qualitat des Verkehrsablaufes auf Straßen. Bundesmin-isterium fur Verkehr, Abteilung Straßenbau, Bonn-Bad Godesberg, 1993.

[21] D. E. Wolf and P. Grassberger, editors. Workshop on Friction, Arching, Contactdynamics. World Scientific, 1997.

[22] G. H. Ristow and H. J. Herrmann. Density patterns in two-dimensional hoppers.Physical Review E, 50(1), July 1994.

[23] D. W. Heermann. Computer Simulation Methods in Theoretical Physics.Springer Verlag, 1990.

[24] Daniel Spangberg. NGSSC course: Numerical Analysis - Project work. UppsalaUniversity, 2000.

[25] K. T. Waldeer. Zerstaubung von Oberflachen gefrorener Edelgase durch Io-nenbeschuß. PhD thesis, Technische Universitat Braunschweig, 1991.

[26] K. T. Waldeer and H. M. Urbassek. kev-atom bombardment of condensed raregases: Molecular dynamics simulation. Nucl. Instr. Meth. B73, pages 14–28,1993.

[27] D. C. Rapaport. The Art of Molecular Dynamics Simulation. Cambridge Uni-versity Press, 1995.

Page 79: Simulation of Pedestrian Flows Based on the Social Force ...apel/thesis.pdf · Simulation of Pedestrian Flows Based on the Social Force Model Using the Verlet Link Cell Algorithm

BIBLIOGRAPHY 67

[28] L. Verlet. Computer ”experiments” on classical fluids. i. thermodynamical prop-erties of lennard-jones molecules. Physical Review, 159(1):98–103, July 1967.

[29] W. Leutzbach. Introduction to the Theory of Traffic Flow. Springer, 1988.


Recommended