• No results found

Simulating crowd behaviour in an emergency situation

N/A
N/A
Protected

Academic year: 2021

Share "Simulating crowd behaviour in an emergency situation"

Copied!
42
0
0

Loading.... (view fulltext now)

Full text

(1)

Department of Science and Technology Institutionen för teknik och naturvetenskap

Linköpings Universitet Linköpings Universitet

SE-601 74 Norrköping, Sweden 601 74 Norrköping

Examensarbete

LITH-ITN-MT-EX--05/061--SE

Simulating crowd behaviour in

an emergency situation

Markus Israelsson

(2)

LITH-ITN-MT-EX--05/061--SE

Simulating crowd behaviour in

an emergency situation

Examensarbete utfört i medieteknik

vid Linköpings Tekniska Högskola, Campus

Norrköping

Markus Israelsson

Handledare Mark Ollila

Examinator Mark Ollila

Norrköping 2005-12-16

(3)

Rapporttyp Report category Examensarbete B-uppsats C-uppsats D-uppsats _ ________________ Språk Language Svenska/Swedish Engelska/English _ ________________ Titel Title Författare Author Sammanfattning Abstract ISBN _____________________________________________________ ISRN _________________________________________________________________

Serietitel och serienummer ISSN

Title of series, numbering ___________________________________

Nyckelord

Keyword

Datum

Date

URL för elektronisk version

Avdelning, Institution

Division, Department

Institutionen för teknik och naturvetenskap Department of Science and Technology

2005-12-16

x

x

LITH-ITN-MT-EX--05/061--SE

Simulating crowd behaviour in an emergency situation

Markus Israelsson

In this thesis we have tried to simulate a crowd of humans in emergency situations. Based on previous research we have implemented a system that simulate human crowds in emergency situations. In this system each crowd member (called agents) is affected by forces from the surrounding environment which direct the movement of each agent. The forces can be either real physical forces or they can be psychological forces that represents humans tendency to

stay a certain distance from inanimate obstacles and other crowd members. In our system the crowd can consist of different populations separated by

average values of the properties each agent in the crowd has. The properties are easy to modify and are used as a way of modeling individuality for each agent. Changing properties changes the outcome of a simulation. The results are saved

in a file that can be used for further analysis.

Our most important result is that we have been able to use our system to make conclusions about real life crowd behaviour and also seen crowd effects in our simulations that are apparent in real life. Some of the results shows that in crowds where people try to help each other escape more people will survive. A crowd effect observed is arch like formations around doors. These formations breaks which let some people escape then the arch reforms and the pattern is

repeated. This is particularly visible when the average speed of the crowd members is high.

Our system still lacks some functionality which would allow easier use of the system and more accurate simulations.

(4)

Upphovsrätt

Detta dokument hålls tillgängligt på Internet – eller dess framtida ersättare –

under en längre tid från publiceringsdatum under förutsättning att inga

extra-ordinära omständigheter uppstår.

Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner,

skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat för

ickekommersiell forskning och för undervisning. Överföring av upphovsrätten

vid en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning av

dokumentet kräver upphovsmannens medgivande. För att garantera äktheten,

säkerheten och tillgängligheten finns det lösningar av teknisk och administrativ

art.

Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i

den omfattning som god sed kräver vid användning av dokumentet på ovan

beskrivna sätt samt skydd mot att dokumentet ändras eller presenteras i sådan

form eller i sådant sammanhang som är kränkande för upphovsmannens litterära

eller konstnärliga anseende eller egenart.

För ytterligare information om Linköping University Electronic Press se

förlagets hemsida

http://www.ep.liu.se/

Copyright

The publishers will keep this document online on the Internet - or its possible

replacement - for a considerable time from the date of publication barring

exceptional circumstances.

The online availability of the document implies a permanent permission for

anyone to read, to download, to print out single copies for your own use and to

use it unchanged for any non-commercial research and educational purpose.

Subsequent transfers of copyright cannot revoke this permission. All other uses

of the document are conditional on the consent of the copyright owner. The

publisher has taken technical and administrative measures to assure authenticity,

security and accessibility.

According to intellectual property law the author has the right to be

mentioned when his/her work is accessed as described above and to be protected

against infringement.

For additional information about the Linköping University Electronic Press

and its procedures for publication and for assurance of document integrity,

please refer to its WWW home page:

http://www.ep.liu.se/

(5)

Abstract

In this thesis we have tried to simulate a crowd of humans in emergency situations. Based on previous research we have implemented a system that simulate human crowds in emergency situations. In this system each crowd member (called agents) is affected by forces from the surrounding environment which direct the movement of each agent. The forces can be either real physical forces or they can be psychological forces that represents humans tendency to stay a certain distance from inanimate obstacles and other crowd members. In our system the crowd can consist of different populations separated by

average values of the properties each agent in the crowd has. The properties are easy to modify and are used as a way of modeling individuality for each agent. Changing properties changes the outcome of a simulation. The results are saved in a file that can be used for further analysis.

Our most important result is that we have been able to use our system to make conclusions about real life crowd behaviour and also seen crowd effects in our simulations that are apparent in real life. Some of the results shows that in crowds where people try to help each other escape more people will survive. A crowd effect observed is arch like formations around doors. These formations breaks which let some people escape then the arch reforms and the pattern is repeated. This is particularly visible when the average speed of the crowd members is high.

Our system still lacks some functionality which would allow easier use of the system and more accurate simulations.

(6)

Contents

1 Introduction . . . 1

1.1 Overview . . . 1

2 Background . . . 3

3 Social Force Model . . . 6

3.1 The Basic Helbing Model . . . 6

3.2 Group behaviour . . . 7

3.3 Further Add-ons . . . 8

3.3.1 Form factor for anisotropic behaviour . . . 8

3.3.2 Fluctuation force . . . 9

3.4 Integration scheme . . . 9

4 System Implementation . . . 11

4.1 Agent properties . . . 11

4.2 Forces between agents . . . 12

4.3 Forces from walls . . . 12

4.4 Fallen agents . . . 13 4.5 Path finding . . . 14 4.6 Family issues . . . 15 4.7 Instability issues . . . 16 5 Result . . . 18 5.1 Features . . . 18

5.2 The basic simulations . . . 18

5.3 Experiments with families . . . 21

5.4 The impact of the form factor . . . 23

6 Discussion . . . 27

7 Conclusions . . . 30

(7)

List of Figures

1 The shape of the anisotropic influence for different values of λ. . . 9

2 Force field showing forces from walls . . . 13

3 A texture used as background in the simulation . . . 15

4 Screen shot of a mix of populations. . . 18

5 Screen shot of a mix of populations. . . 19

6 Screen shot of a simple simulation. . . 19

7 Exit times for agents of different desired speeds. . . 20

8 Pedestrian flow divided by desired speed . . . 20

9 Leaving times for 200 people . . . 21

10 Screen shot of a simulation with groups. . . 22

11 Flow of people with variable AL and fixed DE. . . 22

12 The number of agents that managed to escape from the room with increasing AL. . . 23

13 Flow of people with variable DE and fixed AL. . . 24

14 The number of agents that managed to escape from the room with increasing DE. . . 24

15 Flow of people with variable DE and fixed AL for two different distributions of the AL parameter . . . 25

16 The number of agents that managed to escape from the room with increasing DE for two different distributions of the AL parameter. 25 17 Flow for different values of λ. . . 26

(8)

1 Introduction 1

1

Introduction

Humans are complex beings and a good computer simulation of a human is something that we probably never will be able to achieve. In this thesis we will try to simulate a crowd of humans. A crowd of humans is simply a large

number of humans considered or gathered together. Simulating a large number of humans must be an impossible task if one human, due to its complexity, is nearly impossible to simulate adequately. To be able to solve this first one has to remember that most crowd simulations are only about the motion and a little bit about the behaviour of the crowd as a whole. Therefore not every single entity in the simulation of a human crowd has to be able to do everything that humans can. Second, a crowd of humans actually always show the same kind of patterns, for some reason it seems as when people come together a group motion is constructed. A motion that is always there, no matter what people actually think of and are doing. Simulating this motion involves solving a number of problems. How should we define the motion abilities of one entity in the crowd? How to define paths for the crowd members to indicate how they desire to navigate their environment? How do we make the crowd members avoid stationary and moving obstacles along their desired paths and how do we make them adjust their speed to surrounding changes so that they themselves do not become obstacles? Higher-level behaviour for example grouping of families may also be desired in a crowd simulation.

This thesis describes our way of addressing these problems. The thesis focus on the behaviour in emergency situations such as when a crowd of humans tries to escape a room. The obvious use of such a system is as a helping tool for

designing the environment to make the exit times for crowds shorter and the exiting process flow smoother. This can be done by finding the points in the environment that acts as bottlenecks which hinders the flow of people and then redesign the environment to remove as many of the bottlenecks as possible. Another use of this kind of system is to find out how different blends of the population will manage in an environment. Will for example a crowd consisting of many disabled people not escape in time while a crowd consisting of

professional athletes always escapes in time?

1.1

Overview

The reader of this thesis is assumed to have knowledge about mathematical notation and understand the concept of simulating phenomenons using a computer.

Chapter 2 takes us through previous research in the field of crowd simulation. Chapter 3 explains in more detail the chosen method for the work in this thesis

(9)

1 Introduction 2

and the equations involved. Chapter 4 presents our implementation of the equations presented in Chapter 3. Chapter 5 presents our results and the discussion of the results takes place in Chapter 6. Finally Chapter 7 and Chapter 8 concludes this thesis by summing up our accomplishment and suggesting future work that would extend and improve our work.

(10)

2 Background 3

2

Background

An example of early studies of the problems around crowd simulation is Reynolds [1] research of flocking behaviour. He managed to produce realistic flocking motion of moving entities called boids (bird-oid). This was achieved by giving each boid three tasks. The tasks were collision avoidance, velocity

matching and flock centering. Collision avoidance is the task of avoiding

collision with nearby flock mates and other objects in the simulated world. The task of velocity matching meant that each boid tries to adjust their velocities to their nearest flock mates. The last task, flock centering, mean that each boid tries to stay close to their flock mates. These three tasks combined affect the movement of each boid and by maintaining a good balance between them realistic flocking behaviour is created. To get a more realistic motion there are also restrictions on the flock members (called agents) abilities such as defining a maximum acceleration, maximum speed and limited perception for each boid. Helbing proposed a model based on physics and socio-psychological forces to model crowd behaviour [2] and then later used it to model crowds in panic situations [3]. A socio-psychological force represent humans tendency to keep a certain distance to other people. Each pedestrian is modelled as a point with a certain mass and a certain speed. The direction of motion is decided by the goal point of the pedestrian and is then modified by forces from surrounding

pedestrians and obstacles acting on the pedestrian. This type of approach is called a social force model because both physical and social forces are involved. A good quite up-to-date summary of the social force model can be found in [4]. Other researchers have extended the work of Helbing. A paper proposed by Braun et al. [5] extend the Helbing model by introducing the concept of groups (families for example) that try to stay together during the evacuation of a room. Each agent also is more of an individual since two extra properties of the agent is introduced. These properties are called altruism and dependency. An agent with high altruism tend to help other agents and an agent with high dependency is more likely to be in need of help. Courty et al. [6] use the

Helbing model for real-time simulation of large crowds using graphics hardware. Their idea is to represent the environment in which the simulation take place as a texture. From this texture a force field is created which is then used as a look up table of forces affecting the agents during the simulation process. Also the properties of the agents are represented as float textures. A fragment shader and the pbuffer is then used to do most of the calculations on the Graphics Processing Unit (GPU). This allows for fast calculations and simulations of crowds consisting of up to 10000 agents at interactive frame rates. Groups that try to stick together and some of the features in the basic Helbing model are not present in the work by Courty et al. [6].

(11)

2 Background 4

There are more researchers that have proposed mathematical models for walking behaviour of single pedestrians, for example Hosoi et al. [7]. They modeled each pedestrian as a servo system. The poles of the servo system decides the speed of each pedestrian. The poles themselves are dependant on the pedestrian density around a pedestrian. That is, if there are a lot of other agents around a

pedestrian then the density is high and the poles are chosen so that the speed of the pedestrian gets low. If the surrounding pedestrian density is low the speed gets higher. This approach describes the behaviours of small crowds and some of the features of a crowd can be shown. Another mathematical model is proposed by Saiwaki et al. [8, 9], they use the Chaos equations to get crowd motion effects. In their papers the focus is on the crowd motion on the macro level. This means that the chaos equations defines the shape of the crowd and an overall motion of different forms (linear, circular, oscillating) can be seen. Even though the crowd members all move in the same general direction the irregularities in chaos equations make each individual take different paths. To generate local events, like crowd members stopping at a certain point for a while, extra equations are introduced. These equations are based on models for electrical charges which acts as attractors or repellents on the individuals in the crowd. The electrical charges interrupt the chaos equations motion and lets the affected individuals stand still for a while before resuming their motion.

All the above solutions have similarities or are closely related to particle systems. The agents can be seen as particles whose only goal are to get from one point to another and the goal of the system as a whole is to simulate crowd movement. More complex behavioural systems require more than the basic movement from point A to point B. These systems often use autonomous agents which can reason by itself as the base entity in the crowd [10, 11]. The most popular agent architecture for autonomous agents is the BDI (Belief Desire Intention) architecture [12] or extensions based on it. Other solutions exist, for example the GAA (Generic Agent Architecture) [13]. There are methods in which different levels of autonomous agents are used [14, 15, 16]. Musse et al. [14] used a technique with group behaviour as the highest level. The group is similar to an autonomous agent in the sense that it has a desire and planning for the whole group. The group behaviour is then distributed between the individuals in the group and they all try to reach the same goal or do the same thing.

An important aspect of crowd simulation is how to define the paths for the different members of the crowd. Most of the work with crowd simulation let paths for the members to follow be computed before the simulation starts running. If complex paths are required this can put demands on the storage and computation of the hardware used since a lot of applications strive to simulate in real-time. Therefore there often are solutions that computes a path

(12)

2 Background 5

and let a group of agents follow that path [14] or to compute the paths for some agents called leaders and then have other agents follow these leaders [17]. A very interesting paper about steering behaviours and path following is Steering Behaviors For Autonomous Characters by Reynolds [18]. In that paper

Reynolds presents and categorize steering behaviours for autonomous agents that are modeled as a simple vehicle with mass, position, velocity, orientation, maximum acceleration and speed. He starts out by describing basic steering behaviours like seek (finding a way to a point in space) and flee (the inverse of seek) and then describes how to combine the basic steering behaviours into more complex movement (like path following). The more advanced steering behaviours often use prediction of the target points location (the target point can be moving) together with a more basic steering behaviour.

Last and perhaps least, at least in this report, is the question of how to display the information on screen. Most of the research focus on the behaviour and motion and not on the visual details of a crowd. There exists of course techniques for displaying as few polygons on screen as possible and when it comes to crowd modelling these techniques are used if they are required (for example on crowds modelled in games and movies). Some interesting research has been done by Francho Tecchia et al. [19]. They use image based rendering techniques for visualising a real-time crowd.

(13)

3 Social Force Model 6

3

Social Force Model

3.1

The Basic Helbing Model

Dirk Helbing and P´eter Moln´ar developed a social force model for pedestrians [2] that Helbing later used to model crowd behaviour in escape panic [3]. This paper found our interest and we decided to model crowd behaviour based on the same technique as in that paper. The reason we chose this approach in which the agent is fairly simple (not autonomous) is because there is no need for a more advanced approach. The approaches with autonomous agents are mostly used for games, movies and applications which are meant for pleasure whereas this model has actually been used before in trying to model crowds in emergency situations. When choosing between mathematical models suggested in Chapter 2 the work by Helbing et al. shows the most promising results. The social force model is, as can be understood by the name, a model in which the agents in the simulation are affected by social and physical forces from each other and the environment around them. Each agent in the simulation is modelled as a circle with a mass, a centre of mass and a radius. Helbing makes use of the following equation to model the forces affecting one agent:

mi dvi dt = mi v0 ie0i(t) − vi(t) τi + X j(6=i) fij + X W fiW (1)

As can be understood this system is based on Newton dynamics and the acceleration that is computed in Equation 1 is used to calculate the velocity and position of each agent. Each agent i has a mass mi and wants to move with

the speed v0

i in the direction e0i. The first part of Equation 1 is the so called

driving force and represent the force that makes the agent reach its goal. This part describes how the agent tries to adapt its current velocity vi to the desired

speed within a certain time τi. The middle part of Equation 1 is the sum of all

the forces from the agents surrounding agent i. And the third part is the sum of all the forces from the environment acting upon the agent. The mathematical expression for calculating the force from an agent upon another is:

fij = {Aiexp

rij −dij

Bi + kg(rij− dij)}nij + κg(rij − dij)∆vt

jitij (2)

Where Ai, Bi, k and κ are constants. Ai and Bi sets the distances kept between

agents during normal conditions (normal desired velocities, and normal flow over a certain area). The other two constants k and κ determine what happens during actual physical interactions. rij denotes the sum of the radii of the two

agents i and j. The distance between the agents is denoted by dij. The first

part of Equation 3.1 is the radial force acting on the agents. This force is therefore pointing in the direction of nij, which is a normalized vector pointing

(14)

3 Social Force Model 7

on the agents which points in the normalized tangential direction tij. The

function g(x) will return zero if its argument is less than or equal to zero, which means that the agents do not touch each other. The function will return its argument if it is greater than zero, which means that the agents do touch each other. To get a measure of the friction between agents the tangential velocity difference ∆vt

ji = (vj − vi) · tij is calculated and applied in the perpendicular

direction to the vector nij if the agents touch each other. The mathematical

expression for calculating the forces from walls (third part in Equation 1) is very similar to Equation 3.1:

fiW = {Aiexp

ri−diW

Bi + kg(ri− diW)}niW + κg(ri− diW)(vt

i · tiW)tiW (3)

The main difference is the distance calculations and the fact that the wall is not moving. To change Equation to Equation the distance and radii parameters are replaced by ri, which is just the the radii of agent i, and diW, which is the

distance to the wall from the center of mass of the agent. The vector niW is the

direction perpendicular to the wall and tiW is the direction tangential to it. The

tangential velocity differences is calculated by vti · tiW since the velocity of the

wall is zero.

3.2

Group behaviour

A group of researchers [5] made an addition to the basic Helbing model to model groups that tries to stick together. These groups of agents, called a family, have a desire to help each other escape the environment. To model this effect another force called the altruism force is introduced and just added to the basic Helbing model. The extended Helbing model then looks like:

mi dvi dt = mi v0 ie0i(t) − vi(t) τi + X j(6=i) fij + X W fiW + Ff i (4)

The altruism force is modeled by: Ff i= K ·

X

j

ALiDEj|dij − dip|eij (5)

K is a constant, dij is a vector pointing from agent i to agent j and dip is a

vector pointing from agent i to its desired position. The vector eij is a unitary

version of dij to denote in which direction the force should point. The real

important part of this calculation are the parameters ALi (altruism parameter)

and DEj (dependency parameter). These two parameters are what defines how

strongly the family members are held together. An agent with high altruism will find more attraction to family members, especially those that have a high value on its dependency parameter. The two parameters values range from 0 to 1.

(15)

3 Social Force Model 8

The altruism parameter can be said to model those people that have a tendency to help others and the dependency parameter can be said to model those people that can not move as fast as the average person, for example children or

disabled people. A further addition made cause of this extension to the basic Helbing model is that the desired speed vi0 of an agent i has to be calculated from the dependency parameter and the maximum speed vm

i in this way:

vi0 = (1 − DEi)vmi (6)

When the desired speed is calculated it is assumed that all agents belonging to the same family have the same maximum speed and that slower members of the family simply has a higher value on their dependency parameter. This

additional force is in the direction of the center of family members that need help, which means that families will be drawn towards each other. When two agents in a family are close enough to each other the one with a high value for its dependency parameter will adopt the value of the agent with the lower value. Which will mean that the two family members start to move together at the same speed as the fastest one of them. This could be thought of as if the family members manages to help each other reach the goal.

3.3

Further Add-ons

For more realistic motion of the agents two simple things can be done. The first thing is changing the behaviour of the agents to give more importance to people in front of them than to the people behind them since humans normally do not care as much about people behind them as those in front of them. The other thing that can be done is introducing a fluctuation force which is used to model the irregular behaviour that people actually have when for example suddenly taking one step to the left to check something or to regain balance due to some unexpected pushing.

3.3.1 Form factor for anisotropic behaviour

To make the agents care less about people behind them a so called form factor is introduced. The form factor looks like this:

λα+ (1 − λα)

1 + cos(ϕαβ)

2 (7)

The ϕαβ is the angle between the desired direction of the agent and the

direction to the agent under consideration while λα is what decides the shape of

the anisotropic influence. To get anisotropic characteristics λα should be lower

than one. Some shapes of the anisotropic influence are shown in Figure 1. As can be seen agents in front of the agent (in the same direction as the agents chosen direction of movement) influence more than those behind if the value of

(16)

3 Social Force Model 9

Figure 1: The shape of the anisotropic influence for different values of λ. As can be seen the value of the form factor in Equation 7 is less for angles different from zero when the value of λ decreases. Also for lower values of λ, agents behind the agent is less important than those in front. When λ is equal to one the circle drawn is the unity circle.

λ is below one. The calculated form factor in Equation 7 is then multiplied with the social part of the force from Equation 3.1 in this way:

Aiexp rij −dij Bi · λα+ (1 − λα)1 + cos(ϕαβ) 2 ! (8) 3.3.2 Fluctuation force

The fluctuation is calculated as a force and then just added to Equation 1. The property of this fluctuation should be such as to make the sum of all the other forces in Equation 1 to deviate a bit from the desired direction of the agent therefore the direction of the fluctuation force is tangential to the desired

direction of the agent. The fluctuation force is calculated by use of the equation: ξ = he0i, fiiN (0, µ)e⊥i (9)

Where fi is the sum of all the other forces acting upon the agent, and N (0, µ) is

a gaussian distributed random number with mean value 0 and standard deviation µ. The direction of the force (tangential to the desired direction of the agent) is denoted by e⊥i .

3.4

Integration scheme

As can be seen by Equation 1 in Chapter 3.1 we have so far only calculated the acceleration of an agent. To be able to calculate this acceleration a velocity is

(17)

3 Social Force Model 10

required (as can be seen by the equations) and to be able to display the agents relative to each other on the computer screen a position is also required. To solve these dynamical equations and find positions and velocities for the agents an integration has to be performed. Integrations are performed with the help of an algorithm, an example of this is the Verlet Leapfrog integration scheme. If a denotes the calculated acceleration from Equation 1, v denotes velocity and r denotes position, n denotes the current time step and ∆t is the size of each time step then the equations for the Verlet Leapfrog integration scheme look like this:

vn+1

2 = vn− 1

2 + a∆t (10)

rn+1= rn+ vn+12∆t (11)

The algorithm was baptised Verlet Leapfrog since it is a version of the Verlet integration scheme and that the velocities ”leapfrog” over the current time step since they go directly from half a time step behind to half a time step ahead. If the velocities of the current time step n is needed then they can be calculated by a simple average between the last and the new time step:

vn=

1

2(vn+12 + vn− 1

(18)

4 System Implementation 11

4

System Implementation

Using the equations in Chapter 3 we made an application using the

programming languages C++ for the force calculations and OpenGL for the visualization of the crowd. Parameters that need to be changed for a new simulation are fed to the program via a simple text file. There is no graphical user interface due to that there is no real need for it at the current stage of the program. When the program is running there are two separate threads. One that takes care of the calculations and one that does the drawing to the screen. The graphics visualization is kept as simple as possible and is therefore only in two dimensions. All the data generated by the system is stored in a text file. We use MATLAB [20] to read this data and visualize it in graphs but there is nothing that stops a user from using another program since the only output from our system is a text file. At the first check it is easy to believe that the equations in Chapter 3 would be straightforward and easy to implement but there have been a number of problems needing to be solved with implementing these equations. Our solution will now be explained.

4.1

Agent properties

There are a number of constants and also some properties of the agents that needs to be defined for the simulation to work. For the constants in Equation 3.1 and Equation 3 we simply use the values suggested by Helbing et al. [3]. Although in reality some of these constants should be different for every agent we set the same value of the constants for all agents (for the values see Table 1). This can be done with the motivation that we still will have enough other

Constant Value τi 0.5 (s) Ai 2 · 103 (N ) Bi 0.08 (m) k 1.2 · 105 (kgs−2) κ 2.4 · 105 (kgm−1s−1)

Table 1: Values of the constants in the simulation

properties for the agents to make them look as individuals. Properties like mass, height of the agent (not visible in the simulation), desired speed, maximum speed, altruism parameter, dependency parameter and starting position are randomly gaussian distributed with mean and standard deviation defined by the text file that are read by the program. The radii of the agents in the simulation are randomly generated in an indirect way since they are derived from heights and mass through a simple calculation. Average values for heights

(19)

4 System Implementation 12

and mass gives an average radius. The values for average heights and mass are taken from The National Service Administration [21] in Sweden.

4.2

Forces between agents

If we for every agent needed to calculate the force in Equation 3.1 from every other agent in the simulation the calculation required would be immense. But due to the nature of the exponential function the force quite quickly goes to zero with increasing distance between agents. Therefore the force do not need to be calculated if the agents are further apart than about 1.5 metres. To not have to check the distance to every agent we divide the simulation space into a grid and only calculates the forces from agents in the grid squares closest to the square in which the agent under consideration is positioned. A further check can be made to see which of these agents are close enough to affect the agent under consideration but this is not really necessary if the size of the grid

squares is chosen wisely. With a size of the grid squares somewhere between one and two metres the biggest force that is calculated will be small enough to be insignificant.

4.3

Forces from walls

When forces that comes from walls and affects an agent are calculated there must be a way to determine how far away from the wall an agent is positioned. There are various algorithms used to determine the distance between a point in space and the nearest polygon but as we were doing the background research we came across a paper [6] that calculates the equations in Chapter 3 using the graphic hardware on a computer. In that paper they calculate forces from walls for the maximum and minimum radii in advance and store them as a force field, then they store the force field in a texture to be able to use the graphics

hardware for calculations. During the simulation they interpolate a force from the walls depending on the radius of the agent using the values for the forces for the maximum and minimum radius stored in the force field. In our application we use this idea and calculate the forces and store them as a force field in a matrix, although we never use the graphics hardware to calculate forces later in the simulation. The force field is calculated using the information from an actual texture over the environment in which white pixels denote walls or object that have to be avoided. For open space the pixels are black. The reason why we chose to do this was because we wanted to be able to draw a texture in a drawing program, then let our application read and calculate the force field from that texture. Due to time constraints we have not been able to implement this feature and the texture is hardware coded into the program. The texture that the force field is calculated from is used in the simulation to visualize where the agents are positioned in the room. Our algorithm for calculating the

(20)

4 System Implementation 13

force field works well and an accurate force field is calculated as long as the different walls and corners are not to close to each other. Inside the walls the force field is not entirely correct but this should not matter since the agents should not be inside the walls anyway. A force field calculated from a texture can be seen in Figure 2. The majority of the forces points down right (yellow in

Figure 2: The force field (right) calculated from an environment (left) and then color coded. Yellow means that the force points in the down right direction, green is down, blue is left and red is up. A high color intensity means that the force is big. Black means that the force is zero.

the figure) because of the crudeness of the force calculation algorithm. As can be seen the strength of the forces rapidly decrease to zero, hence the large amount of black in the image. The drawback of calculating and storing a force field in advance is that the tangential part in Equation 3 needs the distance to, and the tangential direction of, the wall. Because of this we choose to leave the tangential part of Equation 3 out in this version of our system. For suggestions to solutions on how to implement the tangential part see Chapter 8.

4.4

Fallen agents

In the paper by Helbing et al. [3] agents that have a desired velocity above 5 ms−1 falls down and become non-moving obstacles for other agents under a certain condition. This condition is that the sum of the magnitudes of the radial forces acting on an agent divided by its circumference exceeds 1600 N m−1. That value is an estimated number for how much pressure a person can stand without getting really injured. No explanation is give why this only affects agents with a desired speed over a certain limit. We thought this was strange because the real velocity of the agent was not part of the way to determine if it was going to fall or not. We decided that in our implementation the agents will fall down if their

(21)

4 System Implementation 14

real velocity (not the desired velocity) exceeds the limit when the pressure is great enough. The fallen agents are currently not any kind of obstacle to the agents that still moves around (see section 8 for more detail on this).

4.5

Path finding

When the environment gets more complex than just an empty room with one or two exits some kind of path finding for the agents have to be implemented to make them walk around walls and other objects. We choose to solve this problem by defining a path for each agent to follow. The path we make is actually just a couple of desired points that the agent will follow in a certain order to reach an exit. To know which points that are interesting we use the texture that defines the environment. This texture have red pixels to denote exit points (see Figure 3). Then when the force field is calculated the program checks every pixel to see if it is a corner. The simple corner detection algorithm we use is as follows:

• Choose a wall pixel in the texture.

• Calculate the number of wall pixels surrounding the pixel in a 3 by 3 area. • If there are more than 5 wall points in the 3 by 3 area then the pixel is

not a corner pixel.

• If there are 4 or less wall points in the 3 by 3 area then the pixel is a corner pixel.

• If there are 5 wall points in the 3 by 3 area then the pixel could be a corner pixel. To determine whether it is a corner pixel or not check a bigger area around it to be sure that the wall the pixel belongs to is just not non-vertical or non-horizontal.

If the pixel is in a corner then an extra way point is stored, the way point is set to be a certain distance from the corner pixel. These way points are marked as blue pixels on the texture (see Figure 3). The blue and red pixels were mostly useful for debugging purposes when writing the path finding algorithm. From each stored way point a path is computed to all exits and then when an agent is created it chooses the nearest path to the exit that it wants to reach using this stored path information. Every time the position of an agent has changed a check is made to see if it still can see the way point it is aiming for, if the way point is blocked another way point is chosen. This works well except that some problems can occur when the agents switch from one way point to another way point positioned closer to the exit. The reason is that the agent can be affected

(22)

4 System Implementation 15

Figure 3: A texture used as background in the simulation, red pixels denote exit points and blue pixels denote way points needed for the agents to find a path around walls. As can be seen the corner detection algorithm works well.

by forces from walls while at the same time seeing the next way point due to the crudeness of the visibility algorithm (this algorithm, a simple ray tracing, is one of the bottlenecks of the simulation). This makes the agent move a bit slower for a while.

4.6

Family issues

To implement Equation 5 each agent belonging to a family need a family ID. All the agents of the same family also must have the same maximum speed, otherwise the importance of the dependency parameter would be diminished. Other than this the implementation of the force equation it self is

straight-forward. The problems occur when introducing path finding. First of all, all family member must want to reach the same exit if they are to be held together. The problem is that family members can have different paths to the same exit which can make the driving forces balance each other out and the agents come to a standstill. We have tried a couple of solutions to this but none of these solutions gave an acceptable result without introducing too many extra calculations. If all the family members start fairly close to one another then this problem is unlikely to happen. Another problem with the family force is that it might make the agents move a bit faster than they should be able to. This problem arises when an agent have all its family members between itself and the point it is aiming for. The force added from the families might be great enough to not let it adjust its speed to the desired speed fast enough and the agent move faster than it should. Remember that for family members the desired speed is actually also a measure of how fast they can move without help, not only a measure of the speed with which they want to move. The value of the constant K in Equation 5 is chosen by trial and error until the grouping of families looks natural. We thought it was a bit strange to let two family

(23)

4 System Implementation 16

members that get close enough to each other move at the speed of the fastest of them. If a person in real life needs help moving it usually slows down the one helping the disable person. We tried to take the average of the agents speeds and use that as the speed they moved at when they moved as a group. This approach sometimes made the forces that kept the families together strong enough to make them move away from the desired point instead of moving towards it. We could not quickly find a suitable solution to this problem and decided to leave it for a later version of the system.

4.7

Instability issues

Using the above described techniques we can calculate the acceleration for each agent. After each agent has a new value for their acceleration we use this to update the position and velocity according to Chapter 3.4. After updating the position of an agent we check to see if this change in position means that the agent has left the room or if something else has happened to the agent. This procedure of updating the accelerations and positions require us to loop

through all the agents twice. If we were to update the velocity and position and check whether something has happened to the agent after calculating the

acceleration for only that agent we would get accumulated errors since the new position of the agent would affect the calculation of accelerations for agents that still are in an previous time frame than the agent under consideration. The heavy requirement on calculations and the need for more than one loop can take time, which can make the time step ∆t from Equation 10 and Equation 11 grow large. Due to the very large force constants in the equations used there can be instability problems if the time step is too large. This instability makes the simulation ”explode”, which means that the agents suddenly get so high velocities that they are pushed through the walls and out of the room. Since we want this simulation to run in real time we want to have a variable time step and still have a stable solution even with large time steps. The problem is that there are so many calculations for each agent and if there are a lot of agents in the simulation the time step will be large. One way to solve this is to find a suitable integration scheme. We have tried a couple of integration schemes but have not found a suitable one therefore we have had to add another way to keep the forces from becoming too large. This addition is to set the maximum

allowed value for the forces. In this way the simulation will never explode and a stability will be kept. This limit of forces would not be allowed during a

simulation of physical phenomenons like for example water or atom movements. In this case with psychosocial forces this maximum limit just means that no one ever will break the laws of physics and to fast reach a speed that is way to high for any human unless being in a vehicle of some sort. One might say that it would be better to just lower the force constants but since their values are chosen to model human behaviour under normal conditions they should not be

(24)

4 System Implementation 17

changed without a good reason. The exploding in the simulation occurs due to the fact that the large time step makes the center of mass for two agents be closer to one another than is ever possible in real life. This makes the force between the agents so large that they get an acceleration which makes them reach inhuman velocities.

(25)

5 Result 18

5

Result

5.1

Features

In our application different populations can be chosen and it is easy to define the variables that affect the simulation. In Figure 4 and 5 about 30 percent of the population are member of families and the rest are not. Also the different colors denotes different kind of distributions for the length and weight of the agents. The length and weights define the radii of the agents. To change the background the source code have to be edited in a simple way. Every simulation generate data that can be used to draw conclusions about the behaviour of the crowd and this data is stored in a text file.

Figure 4: Screen shot of a simulation when 200 agents escape the room through a two metre wide door. About 30 percent of the population belong to families. The simulation has just started to run.

5.2

The basic simulations

To verify that our system reproduces the same kind of results as Helbing et al. [3] we repeat one of his experiment in which 200 agents escape exit an empty room through a one metre wide opening. We run five simulations for each of the desired speeds 0.5 ms−1− 10.0 ms−1 with the interval 0.5 ms−1. The speed

0.8 ms−1 is also simulated since the constants are set so that the measured flow should be 0.73 persons per second for a one metre wide opening with this speed. Our measured flow for this speed is 0.7563 s−1m−1 (averaged over the five simulations). The results can be seen in figures 6 - 9.

(26)

5 Result 19

Figure 5: Screen shot of a simulation when 200 agents escape the room through a two metre wide door. About 30 percent of the population belong to families. The simulation has been running a little while.

Figure 6: Screen shot of a simulation when 200 agents escape the room through a one metre wide door.

(27)

5 Result 20

Figure 7: Exit times for agents of different desired speeds. The exit times for agents seem to be most evenly spaced out around the normal pedestrian speeds (0.8 ms−1− 1.5 ms−1).

Figure 8: Pedestrian flow divided by desired speed, which shows the efficiency of leaving for different speeds. The highest efficiency is around normal walking speeds for humans.

(28)

5 Result 21

Figure 9: Leaving times and number of dead for different desired speeds when 200 people tries to escape a room with a one metre wide door. The leaving times get significantly shorter with increasing desired speeds but only because a lot of agents do not escape. This effect is apparent in the previous figure.

5.3

Experiments with families

Next we evaluate the impact of individuality modelled by the altruism (AL) and dependency (DE) parameters (Chapter 3.2). This is done in a way similar to [5] for a population with average heights and weights. A screenshot of how we visualize families can be seen in Figure 10. Figure 11 shows the measured flow for five different mean values of the AL parameter. The mean values used are 0.1, 0.3, 0.5, 0.7 and 0.9, the standard deviation is 0.1. The mean value and standard deviation of the DE parameter is 0.5 and 0.5. For each change of parameter value five simulations are run and then the result is averaged. The number of agents in the simulation is 80. A higher mean value for the AL parameter has the effect that more agents escape the room as can be seen in Figure 12. Once again the agents are in an empty room but the door is two metres wide. No agents were (seriously) injured due to pushing in the

experiments with the families. This means that all of the agents that did not escape failed to do so because they needed help to get out and no one helped them.

We decided to run simulations with varying DE parameters for three different distributions of the AL parameter. The mean values used for the DE parameter are 0.1, 0.3, 0.5, 0.7 and 0.9, the standard deviation is 0.1. The mean value and standard deviation for the AL parameter in our first set of simulations is 0.5 respectively 0.5. This value of the standard deviation was chosen to mimic the

(29)

5 Result 22

Figure 10: Screen shot of a simulation with a population consisting of groups. Some families have found each other. Agents with the same number belong to the same family.

Figure 11: Flow of people with variable AL and fixed DE. The flow does not change much for different values of AL.

(30)

5 Result 23

Figure 12: The number of agents that managed to escape from the room with increasing AL. There is a slight increase in number of escaped agents with increasing AL. This increase is important when every agent is considered a human.

simulations made by Braun et al. [5]. For each change of mean value of the DE parameter five simulations are run and then the result is averaged. The number of agents in the simulation is 80. The result of varying the DE parameter is very apparent (Figure 13). The pedestrian flow decreases with higher mean value of the DE parameter since this means that more agents have disabilities which hinders them from moving if they do not get help. Figure 14 shows the average number of agents that managed to escape the room. As can be seen this number decreases with increasing mean value of the DE parameter. The mean value of the AL parameter for the other set of simulations with varying DE parameter are 0.25 and 0.75 respectively. The standard deviation of the AL parameter in these simulation are only 0.1 because we wanted the value of the AL parameter to stay pretty close to the mean value. The change of the standard deviation makes these result less comparable to the first set of simulations with fixed AL parameter. Therefore the resulting pedestrian flow and the number of agents that escaped the room is shown in two separate graphs (figures 15 and 16).

5.4

The impact of the form factor

In all of the above simulations the value of λ (Chapter 3.3.1) have been set to 1.0 but we need to test how this variable affects the simulations to. We did not simulate any families during this test cause they will not be affected differently than agents that does not belong to a family but introduces calculations which would slow down the simulation. We ran five simulations each for the values

(31)

5 Result 24

Figure 13: Flow of people with variable DE and fixed AL. The flow decreases a lot with increasing values for DE. This is because the average speed in the simulation decreases with increasing DE.

Figure 14: The number of agents that managed to escape from the room with increasing DE.

(32)

5 Result 25

Figure 15: Flow of people with variable DE and fixed AL for two different distributions of the AL parameter. The flow decreases a lot with increasing mean values for the DE parameter. This is because the average speed in the simulation decreases with increasing mean value of this parameter.

Figure 16: The number of agents that managed to escape from the room with increasing DE for two different distributions of the AL parameter. For a higher mean value of the AL parameter more agents escape the room.

(33)

5 Result 26

0.25, 0.50, 0.75 and 1.0 of λ. The resulting flow can be seen in Figure 17. When the value of λ is low the agents tend to get too close to one another and then gets pushed back. This pushing turns into a wave that propagates in one direction through the entire population. When the value of λ increases this pushing is less likely to start but more importantly the waves are more damped and therefore do not propagate to the rim of the crowd. This makes the

movement of the crowd smoother and the flow increases. These waves are similar to waves that form when a simulation is run in which the agents all have high desired velocities. In both cases this phenomenon is caused by higher forces between agents due to small distances between agents. With small distances a small unexpected change in position by one agent starts a chain reaction of unexpected movement between agents.

Figure 17: Flow for different values of λ. As can be seen the flow increases a lot when each agent give equal importance to the agents around them, no matter if they are in front of or behind the agent. For low values of λ waves propagate through the crowd that pushes all the agents back. For higher values of λ these waves are less likely to start and get damped faster when they occur.

(34)

6 Discussion 27

6

Discussion

Figures 4 and 5 indicate that our path planning and corner detection algorithm works fine even in a fairly complex environment. In Figure 4 the simulation has just started to run and the agents are spread out all over the environment. When the simulation has been running a little while the path streaks show up (Figure 5). All agents tries to take the shortest route to the exit. Because of the fact that all agents tries to take the shortest route and the fact that there are not that many short routes to the exit the crowd density quickly grow large around openings. This is consistent with how a crowd of humans would behave in real life. Although a room this large would probably have a second exit for emergency situations in real life.

The results in Figure 7 shows us that for normal pedestrian velocity the exit times for agents are regularly spaced over time. For higher and lower velocities there are irregularities which are caused by arch like formations in front of the door that suddenly break and a couple of agents manages to escape. Then the arch like formation reforms and the pattern repeats itself. To not have a steady flow of pedestrian is undesirable when leaving a building in emergency

situations. By looking at the efficiency graph in Figure 8 we see that the most efficient flow is around normal walking velocities. Figure 9 clearly shows that the leaving times decreases with higher velocities which seems to contradict what is previously stated but as can be seen in the figure the cost of low leaving times is that a lot of people does not actually escape the room due to pressure injuries. They get knocked down and can not get up again. That is what the efficiency graph in Figure 8 reflects. The results shown in figures 7, 8 and 9 are not fully consistent with the results in [3]. If fully consistent results are

desirable one way of solving this would be to make the time steps in the simulation smaller but more importantly, the calculations and decisions for when an agent falls down would have to be changed. We could for example let the agents fall only if their desired speed is greater than 5 ms−1 like in the work by Helbing et al. [3]. We could also make the fallen agents more of an obstacle than they are at the moment. Our system treats fallen and injured people the same as it treats floor, and therefore the injured are (too) easily walked over. Figure 11 shows that a higher value of the AL parameter yields a slightly lower pedestrian flow. This slight decrease in flow is due to that more agents tries to rescue other agents. At least some of them succeeds in their tasks as can be seen in Figure 12. As can be seen the change in flow with increased AL is not that big, this is similar to the results in [5]. The flow might sink a bit with increased AL but the effect is also that more agents leave the room. Agents that would normally not be able to leave the room at all get rescued. If every agent in the simulation was as valuable as a human life then even the slightest

(35)

6 Discussion 28

increase in the number of escaped agents would be important. Applied to real life situations these results mean that if we kept our calm in emergency

situations and tried to help each other more people would escape without risking that much since the leaving times do not decrease that much. By further testing of the AL parameter this conclusion could be verified.

Figure 13 shows that the pedestrian flow decreases a lot with increasing DE parameter. This is because a larger number of agents have disabilities that decreases the speed at which they can move (or are just generally slow movers). Also, since the number of agents that try to help family members are about the same for each different DE distribution, the agents with disabilities do not get any help and therefore the flow decreases rapidly with increasing mean value of the DE parameter. As can be seen in Figure 14 the number of people that manages to escape decreases with higher mean value of the DE parameters. They are simply left behind since no agent wants or cares or is able to help them.

Figures 15 and 16 shows the same pattern as in figures 13 and 14. What is interesting to notice is that for a higher mean value of the AL parameter more agents manages to escape the room (Figure 16). This confirms the results of the simulations that resulted in Figure 14 which makes the conclusion made earlier about the effect of the AL parameter upon the simulation more valid. What is interesting to notice is also that for low mean values of the DE parameter the resulting pedestrian flow is lower when the mean value of the AL parameter is 0.75 than when it is 0.25. This result can be predicted by looking at Equation 5 in Chapter 3.2. For a high mean value of the AL parameter the force calculated in Equation 5 will more often be great enough to make the agents go and help family members. This helping of other agents can take time and therefore the resulting average flow gets lower. When the mean value of the DE parameter gets higher the situation is different because those agents needing help gets help faster, and probably from more than one family member, when the mean value of the AL parameter is high. This results in a higher pedestrian flow for high mean values of the AL parameter than for low mean values. So in cases when a crowd consists of many disabled people it is better if a lot of people tries to help those with disabilities. More people will escape and not be left behind without a great decrease in the escape time.

In Figure 17 we see that different values of λ have great impacts on the pedestrian flow. The choice of value for λ is therefore quite important for the simulation. In a densely packed crowd humans are generally more aware of what is behind them, not because they can see them without turning their head, but simply because they are close enough to accidentally touch one another. In normal crowds people are not really aware of all the surrounding

(36)

6 Discussion 29

persons but the space between people are big enough to allow for unexpected movement without producing waves. This way of thinking would make the user of our system choose higher values of λ if the crowd is not expected to be so dense and lower values if the crowd is expected to have a great density. That kind of choice is the opposite of viewing the anisotropic form factor as a model for vision effects. We recommend care when choosing the value for λ and it all depends on the situation and wanted effects in the crowd.

(37)

7 Conclusions 30

7

Conclusions

In this thesis we choose to model crowd motion as a particle system. Based on previous work by various researchers [2, 3, 5, 6] we have constructed a system that works well within certain limits. We have successfully implemented most of the equations presented in Chapter 3 which are most of the equations that the previous researchers have used. We have come up with our own detection algorithm for corners and used this to successfully implement a crude path finding system that works well even if there is more than one exit to the room. Also we constructed a crude ray tracing to detect walls between an agent and its goal. We have modeled a simple individuality for each agent and the system is built in a way which makes it easy to change these parameters. The crowd simulated can consist of different populations which differs in average radii and mass. Each simulation saves data that can later be used for deeper analysis of what occurred during the simulation by using an analysis program of the users choice. Our test simulations shows that some functionality is still lacking but the work that has been done works well. We have been able to use our system to make conclusions about real life crowd behaviour and also seen crowd effects in our simulations that are apparent in real life.

(38)

8 Future work 31

8

Future work

There are a number of improvement that can be made to the system, some of these were intentionally left for the future and some of these were not

implemented due to the time constraint of the thesis work. The most important of these features is to be able to read the background texture used to define the environment from a file to get around the necessity of having to edit the source code to change the environment in which the simulation take place. This could be done by finding a library for reading images that contain RGBA values and include this into the project.

The second most important future feature that is needed is the change of the behaviour around fallen agents. They should be more of an obstacle to other agents than they are now. In the latest version of the system the fallen agents are as simple to pass as regular floor. There should be some force from these fallen agents that affects other agents so it is harder to pass them. We have tried to let the fallen agents affect other agents like if they were standing with full forces. As we expected this approach make the fallen bodies block the exits in ways which makes it impossible for any agent to leave, even when only a few agents fall. Blocking of exits only happens in real life if a lot of people fall, otherwise there are always some people that will be able to pass, sooner or later. To get more realistic simulations most agents should be able to pass or step over fallen agents, but if a route around them is possible then that should be preferable. We have some ideas on how to do this but have not had time to test them. The simplest way is just to let the forces from fallen agents be just small fraction of the forces from standing agents. Another way could be to let part of the force affect other agents as long as they do not stand on the fallen agent. Then when an agent step on a fallen agent a constant force in the opposite direction of movement could be affecting the walking agent.

The third most important improvement is the performance of the system. By changing the integration scheme, improving the path finding and visibility algorithm and also by using features of the GPU similar to the work by Courty et al. [6] to allow for faster calculations the system might be able to visualize larger crowds than are now possible.

Another area of improvement is the equations themselves. We have not implemented the tangential part of Equation 3 and only the radial force from walls are calculated. The tangential force calculation from walls need the distance between an agent and the wall and also the tangential direction of the wall. To not have to define special algorithms to search for the nearest wall pixel we could define another matrix with the distances and tangential

directions to the nearest wall in every texture pixel and then use this matrix for access to this information while calculating the force in Equation 3. Also, since

(39)

8 Future work 32

our application do not use the graphics hardware at the moment a smarter storage of the force field could be used. There are a lot of pixels whose force components are close to zero and therefore this information could be clamped together in a smarter way. The smartest solution would of course be to use the GPU if that is faster.

Another equation whose result could be derived faster if the computer has sufficient memory is the calculation of the anisotropic form factor. The need for calculation of the force at every possible angle could be questioned and instead it could be sufficient to store the value of the form factor for each integer

between 0 and 360 degrees in a look-up table. Then when the angle between the desired direction of the agent and the direction to the agent under consideration is calculated it is round to the nearest integer value. This integer value could then be used with the look-up table. More importantly further evaluation of the effect from anisotropic form factor in the crowd simulations should be made to see if this feature is even necessary. Comparisons between real life situations and simulated situations should be done in a better way. We would also like to find time to test the effect of the fluctuation force on the crowd (see Chapter 3.3.2). Making the system more configurable before running a simulation, by allowing for more variables and constants to be changeable, would also be good.

Preferably every constant should be changeable without having to edit the source code. Some constants should also be dependent on the situation. For example the constant K in Equation 5 could be dependent on the maximum speed of the family to which the agent using this equation belong. As it is now the constant is chosen to fit most situations. The problem occurs when the maximum speed of the family gets to low or to high. This will make the force holding the families together either to strong or to weak. This means that either the family members seem to not care about each other or they seem to be able to run faster than their maximum when they see each other and try to group up. Also this dependency on speed would make it easier to let two family members move at a speed averaged between the members than at the speed of the fastest in the group. If this is tried now the force that keeps families together can be greater than the forces pushing the family in the direction of the exit. This makes the families wander around the environment as a group without finding an exit except by sheer luck.

An interesting feature to add to the system is movable inanimate objects. This could be done by using the subtexture feature of OpenGL. Making a texture of an object that should move about and how it should move in the environment. From the texture a force field could be calculated for that object, then

recalculate the affected portion of the total environments force field every time the object has moved. The recalculation can be done simply by pixel-by-pixel

(40)

8 Future work 33

subtraction of the moving force field from the place where it was located on the previous time frame. After this a pixel-by-pixel addition is done in the area where the moving object will be located.

Further studies also need to be done to improve the analyzing part of the system. For example more information about the properties of agents that escape, for example in which environment the fastest agents escape first. Generating maps that shows locations of obstruction areas due to clogging of the crowd would be good to do. Ideas for how to do this can be found in [22].

(41)

Bibliography

[1] C. W. Reynolds, “Flocks, Herds and Schools: A Distributed Behavioral Model,” in ACM SIGGRAPH Computer Graphics, vol. 21 n. 4, pp. 25–34, July 1987.

[2] D. Helbing and P. Moln´ar, “Social force model for pedestrian dynamics,” Physical Review E, vol. 51, pp. 4282 – 4286, May 1995.

[3] D. Helbing, I. Farkas, and T. Vicsek, “Simulating Dynamical Features of Escape Panic,” Nature, vol. 407, pp. 487 – 490, 2000.

[4] M. Apel, “Models for pedestrian flow and crowddynamics,” Tech. Rep. 1, University of Applied Sciences, Faculty of Traffic and Transportation, Feb. 2004.

[5] A. Braun, S. R. Musse, L. P. de Oliveira, and B. E. Bodmann, “Modeling individual behaviors in crowd simulation,” in Proceedings of the 16th In-ternational Conference on Computer Animation and Social Agents, 2003., pp. 143 – 148, 2003.

[6] N. Courty and S. R. Musse, “FASTCROWD: Real-Time Simulation and Interaction with Large Crowds based on Graphics Hardware.” Short Paper in ACM SCA 2004 - Symposium on Computer Animation, 2004. Grenoble, France.

[7] M. Hosoi, S. Ishijima, and A. Kojima, “Dynamical Model of a Pedestrian in a Crowd,” in IEEE International Workshop on Robot and Human Commu-nication, pp. 44–49, 1996.

[8] N. Saiwaki, T. Komatsu, T. Yoshida, and S. Nishida, “Automatic Generation of Moving Crowd using Chaos Model,” in Systems, Man, and Cybernetics, 1997. ’Computational Cybernetics and Simulation’, 1997 IEEE International Conference on, vol. 4, pp. 3715 – 3721, 1997.

[9] Y. Hijikata, T. Komatsu, N. Saiwaki, and S. Nishida, “Automatic Generation of Moving Crowd using Chaos and Electric Charge Model,” in Systems, Man and Cybernetics, 2002 IEEE International Conference on, vol. 2, pp. 342 – 347, 2002.

(42)

BIBLIOGRAPHY 35

[10] J. D. Funge, Make Them Behave - Cognitive Models for Computer Animation (1998). PhD thesis, University of Toronto, 1998.

[11] A. Szarowicz, J. Amiguet-Vercher, and P. Forte, “Multiagent interaction for crowd scene simulation.” American Association for Artificial Intelligence, 2001.

[12] A. S. Rao and M. P. Georgeff, “Modeling rational agents within a BDI-Architecture,” in Principles of Knowledge Representation and Reasoning, Proceedings of the Second International Conference, pp. 473 – 484, 1991. [13] J. M. Vidal and P. Buhler, “A Generic Agent Architecture for Multiagent

Systems,” 2002.

[14] S. R. Musse and D. Thalmann, “Hierarchical Model for Real Time Simu-lation of Virtual Human Crowds,” Visualization and Computer Graphics, IEEE Transactions on, vol. 7, no. 2, pp. 152 – 164, 2001.

[15] S. R. Musse, C. Babski, T. Capain, and D. Thalmann, “Crowd Modelling in Collaborative Virtual Environments,” in Proceedings of the ACM symposium on Virtual reality software and technology, pp. 115 – 123, 1998.

[16] E. Schweiss, S. R. Musse, F. Garat, and D. Thalmann, “An Architecture to Guide Crowds Using a Rule-Based Behavior System,” in Proceedings of the third annual conference on Autonomous Agents, pp. 334 – 335, 1999.

[17] T.-Y. Li, Y.-J. Jeng, and S.-I. Chang, “Simulating Virtual Human Crowds with a Leader-Follower Model,” in Computer Animation, 2001. The Four-teenth Conference on Computer Animation. Proceedings, pp. 93 – 102, 2001. [18] C. W. Reynolds, “Steering Behaviors For Autonomous Characters,” in Game

Developers Conference, pp. 763–782, 1999.

[19] F. Tecchia, C. Loscos, and Y. Chrysanthou, “Image-Based Crowd Render-ing,” in IEEE Computer Graphics and Applications, pp. 36 – 43, 2002. [20] MATLAB. http://www.mathworks.com/academia/student version. Last

visited 20051201.

[21] Pliktverket. http://www.pliktverket.se. Last visited 20051201.

References

Related documents

The increasing availability of data and attention to services has increased the understanding of the contribution of services to innovation and productivity in

Generella styrmedel kan ha varit mindre verksamma än man har trott De generella styrmedlen, till skillnad från de specifika styrmedlen, har kommit att användas i större

Parallellmarknader innebär dock inte en drivkraft för en grön omställning Ökad andel direktförsäljning räddar många lokala producenter och kan tyckas utgöra en drivkraft

Närmare 90 procent av de statliga medlen (intäkter och utgifter) för näringslivets klimatomställning går till generella styrmedel, det vill säga styrmedel som påverkar

• Utbildningsnivåerna i Sveriges FA-regioner varierar kraftigt. I Stockholm har 46 procent av de sysselsatta eftergymnasial utbildning, medan samma andel i Dorotea endast

I dag uppgår denna del av befolkningen till knappt 4 200 personer och år 2030 beräknas det finnas drygt 4 800 personer i Gällivare kommun som är 65 år eller äldre i

Den förbättrade tillgängligheten berör framför allt boende i områden med en mycket hög eller hög tillgänglighet till tätorter, men även antalet personer med längre än

På många små orter i gles- och landsbygder, där varken några nya apotek eller försälj- ningsställen för receptfria läkemedel har tillkommit, är nätet av