• No results found

An optimal control approach for rescue process during a fire disaster.

N/A
N/A
Protected

Academic year: 2022

Share "An optimal control approach for rescue process during a fire disaster."

Copied!
35
0
0

Loading.... (view fulltext now)

Full text

(1)

Royal Institute of Technology

Bachelor’s Thesis

An optimal control approach for rescue process during a fire disaster

Author:

Xiao Chen xiao2@kth.se Fredrik Isaksson freisa@kth.se

Supervisor:

Xiaoming Hu Yuecheng Yang

May 21, 2014

(2)

Abstract

This thesis aims to construct a realistic model of a leader led evacuation during a fire. By introducing a leader-follower idea we formulate this as a optimization problem. This is then attempted to be solved by optimization methods and some heuristic methods. The achieved solution can then be studied and analysed for inspiration in decision making in real life situations.

To reach these goals, the followers is formulated with a ’social force’ model with a desired direction towards the leader. The leader in the model represent the fireman in a real situation and how he and his decision making is affected by three different kinds of civilians; children, adults and elderly. By constructing a map over the feasible area we define obstacles and the danger in the building. Using these real world constrains we formulate an optimal control problem for the leaders path where the danger and the distance to the exit for all agents are parameters to be minimized. The problem will be hard to solve analytically and thus local minima’s and numerical solutions will be the primary focus.

Sammanfattning

I detta arbete syftar vi på att konstruerar en realistisk model av en brandsituation, där räddning av civila tas i beaktande. Genom införande av en leader-follower idé, formulerar vi det till ett optimeringsproblem. Vilken vi då försöker lösa med optimerings metoder och eventuellt med vissa heuristiska metoder. Den resulterande lösning kan då bearbetas och analyseras för inspirerande av handlande i verkliga situationerna.

För att nå fram till våra målsättningar, introducerar vi en följare med hjälp av den så

kallade ’social force’ modelen. Leadaren i simuleringen representerar en brandmanen

i en verklig situation som påverkas av tre olika typer av civila, nämligen barn, vuxna

och äldre dvs följarna. Genom att konstruerar en kartan över platsen där brand sker,

fastställer vi hinder och faran över karta. Med all realisering i hand formulerar vi opti-

merings problemet där framförallt faran och avståndet till utgången ska minimeras för

alla agenter. Problemet kommer att bli svårlöst analytiskt. För att komma fram till

en lösning kommer vi därför att studera locala minimum och numeriska lösningar till

problemet.

(3)

Acknowledgements

We would like to thank our patient, very helpful and insightful supervisor Yuecheng Yang at the department of Optimization and Systems Theory at the Royal Institute of Technology for his advise and help in performing this project.

We would also like to thank the head examiner Professor Xiaoming Hu for his valuable insight into the modeling process and for making the project possible to conduct.

ii

(4)

Contents

Acknowledgements ii

Contents iii

List of Figures v

List of Tables vi

1 Introduction 1

1.1 Introduction to the thesis . . . . 1

1.1.1 The environment . . . . 1

1.1.2 The agents . . . . 2

1.2 Relation to real situations . . . . 2

2 The mathematical model 4 2.1 Modeling the followers movement . . . . 4

2.1.1 The followers . . . . 4

2.1.1.1 Sensing ability of follower agent . . . . 5

2.1.1.2 The desired direction . . . . 6

2.1.1.3 The memory ability of agents . . . . 7

2.1.1.4 The follower-follower functions . . . . 8

2.1.1.5 The follower-obstacle functions . . . . 9

2.1.2 Danger and obstacles . . . . 10

2.2 Modeling the leader . . . . 10

2.2.1 Approximate leader . . . . 11

3 The Simulation 13 3.1 The followers - SIMULINK . . . . 13

3.1.1 The room . . . . 14

3.2 The leader - Optimization . . . . 15

3.2.1 Optimization algorithms . . . . 16

3.2.2 Simplified model . . . . 16

4 Results & Discussion 17 4.1 Results of the follower simulations - are they realistic? . . . . 17

4.2 The optimization and the path of the leader . . . . 17

4.2.1 The complete model . . . . 18

4.2.2 Using the simplified model . . . . 20

iii

(5)

Contents iv

5 Conclusions 23

5.1 General conclusions . . . . 23

5.1.1 Using a simplified model for optimization . . . . 23

5.1.2 The usefulness of the results . . . . 23

5.2 Possible further works . . . . 24

(6)

List of Figures

2.1 Sight range . . . . 6

3.1 The simulation room . . . . 14

3.2 Danger in the room . . . . 15

4.1 The inital paths . . . . 18

4.2 Danger, Complete optimization . . . . 20

4.3 Danger, simplified optimization . . . . 21

4.4 Difference in paths . . . . 22

v

(7)

List of Tables

4.1 Comparison of the objective function for the complete model. . . . . 19 4.2 Comparison of the objective function for the simplified model. . . . . 21

vi

(8)

Chapter 1

Introduction

1.1 Introduction to the thesis

The evacuation of buildings during a fire is a high stakes situation where bad decisions can lead to death or serious injurious. Simply heading towards the closest exit at maximum speed has been shown to be a sub optimal strategy for evacuating a building due to congestion at bottlenecks.[1] Doing practical experiments in this field is also something that is very hard to conduct ethically. Successfully modelling and efficient evaluation of these situations is thus highly desirable which is also reflected in the fact that quite a great deal of work has been conducted in the field of evacuation simulation and strategy.[1–8]

Much of the work has however been focused on the modelling of the agents and not the path of a rescuer.[1–4, 8] This thesis will thus focus on using the model to find a path for a rescuer.

Most models try to find the fastest way to evacuate a building[1, 9]. However the fastest path is not necessarily the safest. The main goal of this thesis was aimed to reach the minimized danger of all people in the evacuation process by controlling the fireman to direct the paths of all individuals in order to avoid not only death but also serious injuries caused by proximity to fires. The realization of such goals is achieved basically by formulating it as an optimal control problem with the fireman’s dynamics as a control input and the response from the other individuals is modeled in a individual and realistic sense.

1.1.1 The environment

Fire disaster is a complex system with involvement of many elements. Situations may differ a lot due to the various types of conditions. Thus a workable problem require the

1

(9)

Chapter 1. Introduction 2

simplification and limitation of the reality. In this thesis work, the problem is limited to evacuation of the ground level of buildings. Although other buildings could be ap- proached in a similar way to our approach by making some small extensions. Three main concepts are introduced to describe the environment. The first is impassable objects that represent walls and other hard to move through areas such as an area filled with tables.

The second part is exits, they represent doorways out of the building or large windows.

Finally an artificially designed field is used over the entire building that describes the danger at each location to realize the hazardous effects of elevated heat levels and smoke.

1.1.2 The agents

In the model the people and fireman involved is to be represented mathematically. The idea of an agent system is used and two types of agent are introduced, the followers and the leader. The followers in the model correspond to ordinary people with little knowledge of fire situations and the area. The leader in the model could be related to a fireman or other evacuation leader that is directing the other people in the building with total knowledge of the environment.

Since different people are capable of helping themselves to different extents, modelling each agent with its own personal properties is necessary. An agent based approach is well suited for this need.[10] The reason of modelling differences in the agents is not only for physical characteristics such as speed but also for more ethical characteristics by assigning weights to the amount of danger experienced differently for each agent. The human’s need to accelerate in order change its velocity and direction is also taken into account, an agent can not turn instantly. This is done using a second order integrator system for the dynamics of the agents.

1.2 Relation to real situations

When constructing a model one has to consider what information is available to each agent at every step. The model tries to keep the information available to the followers as realistic as possible. They make decisions based on their own frame of reference and have a limited sight radius.

The information available to the leader however is quite exaggerate since the leader

has global information of the building including positions of agents and how the danger

field looks like at every position. This could be slightly feasible given that the leader

is extremely well prepared and has studied how a fire would develop in different areas

(10)

Chapter 1. Introduction 3

as well as having a total overview of the building (through surveillance cameras). This

situation is quite unrealistic and further extensions of this work could look at limiting

the leaders information and replacing it with statistical approximations of the area.

(11)

Chapter 2

The mathematical model

In this chapter the movement of the followers is realized and described as well as the optimal control problem for the leader’s movement is derived. Models for pedestrian behavior in evacuation situation have been studied quite a lot in previous works. [3, 4, 11–

13] An agent based model will be used to simplify the distinction between different agents.

[10, 14]

2.1 Modeling the followers movement

The dynamics governing the followers movement make use of the Social force model[1]

formulated by Helbing. It works by introducing virtual forces acting on each agent in order to simulate social behavior.

2.1.1 The followers

The system of concern contains n follower agents, the position and velocity of the agent i is defined as following

Definition 1. The position of the i:th follower is denoted

x

i

, i = 1, 2, 3, · · · , n (2.1)

Definition 2. The velocity of the i:th follower is denoted

v

i

, i = 1, 2, 3, · · · , n (2.2)

4

(12)

Chapter 2. The mathematical model 5

A certain individual does not walk into other people or walls but tries to avoid such things, the followers should thus be affected by obstacles, other followers, exits and leaders. Realistic movement also dictates that a person can not change his or her velocity instantaneously, we will thus model the movement using a second order system. This gives rise to the following definition.

Definition 3. The system governing the movements of the followers is given by

∂x

i

∂t =v

i

(2.3)

∂v

i

∂t = X

j6=i

F

i,f ol

(x

i

, x

j

) +

W

X

j=1

O

i,obs

(x

i

, w

j

)+ (2.4) + v

i,d

e

i,d

(x

0

) − αv

i

x

i

(0) =x

i,start

(2.5)

v

i

(0) =0 (2.6)

Where w

j

is the position of an obstacle.

This definition is the general structure of the social force model[1] and it allows for specific adaptions in the choices of the functions to suit the needs of the model. The F functions describe the follower’s interaction with other followers, typical it works to keep other agents outside of the agent’s personal zone. The O

j

functions describe human instincts related to objects such as avoiding walking into walls and instead predicting a path to avoid them. The v

i,d

e

i,d

term describes the current desired velocity to be traveling in and is typical goal driven. I our case it mostly involves following the leader.

The αv

i

term represents a damping term for the growth of the velocity of the agent. It can also be thought of as describing the increased exhaustion a higher movement speed generates.

2.1.1.1 Sensing ability of follower agent

Humans can sense and detect the environment using their sight, hearing and other sensing abilities. Their actions are heavily based upon their detecting results and thus give rise to the importance of sensing-acting interaction in the model. Due to efficiency and simplicity requirements, the main focus of the model lays on the visual sense realization.

The figure below illustrates the idea of visual sensing.

(13)

Chapter 2. The mathematical model 6

Figure 2.1: An illustration of an agents sight range.

As shown in the figure. Define the sight range of agent i to have the circle form with radian S

i

. Any target point can be recognized by agent i if two necessary conditions are fulfilled. For the first target point should position within the sight range of i. For the second target point should not be blocked by any obstacles of any kind i.e. no other point-objects on the line connecting agent i and target. These conditions can be expressed mathematically as below.

Condition1 :|V

target

| ≤ S

i

Condition2 :if no V

obs

such that 1 − V

target

|V

target

| · V

obs

|V

obs

| ≤ 0.001

V

target

is the vector from agent i to the target point. V

obs

is the vector from agent i to any other point objects withing the sight range of agent i. By using these conditions a weight function w

visual

can by defined:

w

visual

=

1 if Condition 1 and 2 are fulfiled 0 else

(2.7)

Thus the social force from any target point acting on agent i is only active according to the value of w

visual

i.e.F

target

= F

target

w

visual

2.1.1.2 The desired direction

In the situation of a fire disaster, people tend to follow certain target as their guidelines

in order to get out of the danger. In the system of concern, it is assumed to have two

(14)

Chapter 2. The mathematical model 7

types of such targets. The first is the exit to get out of the building and the second is the fireman i.e. the leader agent that can be trusted to lead them to safety. The desired velocity of follower agent in the social force model definition 3 should thus depend on these two target objects. The definition of desired velocity of agent i is as follow

v

d

= X

targetj

w

visual

w

target

v

d

e

d,j

where e

d,j

= N

j

|N

j

| (2.8)

j is any possible target i.e. exit or leader. The desired velocity is the sum of contributions from all target objectives for agent i i.e. all exits and leaders introduced in the system.

w

visual

is the visual weight function defined in equation (2.7). w

target

is a constant weight associated with each target as the fact that certain targets are more attractive than others. N

j

is the vector pointing from agent i to its target j, the definition of the desired velocity will result in the agent to be forced toward the target and thus mainly cause the tracking-after-leader phenomenon.

2.1.1.3 The memory ability of agents

Humans have the ability to store information in their memory. This ability can be used to guide their movement. Thus such an influence causing by retention is essential in the model, especially when agent lost its sight of a certain target. As a natural fact the memory should lead the agent to position where the connection was lost. A simple way to realize this phenomenon is by introducing a third target objective for the follower agent, namely the memory position P

memo

defined as follows

P

memo

=

 

 

 

 

X

i

if agent i have not located any target since t = 0

X

i

if agent i have located a target and maintained the connection P

target

else

where P

target

is the position where agent i located his target for the last time.

By introducing this definition the P

memo

for agent i will be updated throughout the time depending on the status of the current situation. Using P

memo

and the definition of the desired velocity in equation 2.8 The memory attractive force can be described as the following

F

memo

= w

visual

w

mome

v

d

e

memo

(2.9)

with e

memo

= P

memo

− x

i

|P

memo

− x

i

|

The F

memo

guides the agent in case the connection to the target is lost.

(15)

Chapter 2. The mathematical model 8

2.1.1.4 The follower-follower functions

The ordinary people in a fire disaster are represented as followers in the model. The motion of each follower agent is influenced by other followers. As a psychological result he/she tries to keep a certain minimum distance from other followers. This repulsive effect is realized in the model by the following equation

N

X

j=1

A

i

e

(rij−Dij)/Bi

N

ji

(2.10)

A

i

and B

i

are constants representing the interacting strength and range, receptively. R

ij

is the sum of the radii of agent i and j, D

ij

is the distance between the center of mass of agent i and j and N

ji

is the normalized unit vector pointing from agent j to agent i.

In situation when agents get in physical contact with each other, that is when R

ij

≥ D

ij

, additional physical force will be acted upon agents, this physical force is modeled by the following equation

N

X

j=1

(G(r

ij

− D

ij

)(K

1

N

ji

+ K

2

∆V

ij

T

ij

)) (2.11) K

1

and K

2

are two large repulsive force constants representing the body force and slid- ing friction force between agents, respectively. G is a Heaviside function, where G(x) is zero when agents do not touch each other, and equals to argument x otherwise. T

ij

is the unit vector with the direction tangential to e

i,d

(t) and ∆V

ij

is the tangential velocity difference. Combining equations 2.10 and 2.11 gives us the F

i

, f ol equations as

F

i,f ol

=

N

X

j=1

A

i

e

(rij−Dij)/Bi

N

ji

+

N

X

j=1

(G(r

ij

− D

ij

)(K

1

N

ji

+ K

2

∆V

ij

T

ij

)) (2.12)

The equation (2.12) gathered above is the general result from Social force model [1]. Also this equation works fine within some extensions; a few modifications were made for more humanlike behaviors. One of the situations where (2.12) fails to produce desired results is when two agents are facing each other in the opposite direction with high accelerations i.e. high social force. A brutal collision will occur if no damping force is introduced. To solve this issue the following terms are introduced in the follower-follower model.

N

X

i=1

−w

damp

A

damp

v

i

· N

ij

e

Dij−rij

N

ij

(2.13)

and

N

X

i=1

w

damp

A

dampside

e

(rij−Dij)/Bdampside

T

ij

(2.14)

(16)

Chapter 2. The mathematical model 9

where

w

damp

=

1 if n

i

· n

j

+ 1 ≤ 0.05 0 else

(2.13) realize the fact that the human tends to slow down when someone is heading against him. A

damp

is the damping constant representing the strength of the damping force. This force is in the direction of N

ij

. (2.14) realize the fact that human tends to turns to the side to avoid collision. A

dampside

is the damping constant representing the desire to head to the side. w

damp

is the damping weight. n

i

is the direction of movement for agent i and n

j

is the direction of movement for agent j. The Definition of w

damp

allows the damping forces to be active only in the situation when someone is recognized by the agent i to direct against him.

By adding these additional force terms to equation (2.12), we get the following expression.

F

i,f ol

=

N

X

j=1

A

i

e

(rij−Dij)/Bi

N

ji

+

N

X

j=1

(G(r

ij

− D

ij

)(K

1

N

ji

+ K

2

∆V

ij

T

ij

)) +

. +

N

X

i=1

−w

damp

A

damp

v

i

· N

ij

e

Dij−rij

N

ij

+

N

X

i=1

w

damp

A

dampside

e

(rij−Dij)/Bdampside

T

ij

(2.15)

2.1.1.5 The follower-obstacle functions

Beside the influence from other agents, the motion of agent also depends on the appear- ance of obstacles in the environment. To avoid obstacles, social forces much similar to those described by equation 2.10 and 2.11 is apparent. The model is as follow

O

i,obs

=

W

X

j=1

A

i

e

(ri−Dij)/Bi

N

ji

+

W

X

j=1

(G(r

i

− D

ij

)(K

1

N

ji

+ K

2

∆V

ij

T

ij

)) +

. +

W

X

i=1

−w

damp

A

damp

v

i

· N

ij

e

Dij−ri

N

ij

+

N

X

i=1

w

damp

A

dampside

e

(ri−Dij)/Bdampside

T

ij

(2.16)

The main difference to the follower-follower model is that the obstacles have fixed posi-

tions. The N

ij

becomes in this case the unit normal vector from the wall j and T

ij

is

the unit vector tangential to N

ij

. There are two candidates to the direction of T

ij

. To

model the human behavior realistically the direction of T

ij

is chose to be the one with

a smaller deviation angel with respect to v

i

(17)

Chapter 2. The mathematical model 10 2.1.2 Danger and obstacles

The obstacles of the environment is modelled as points, large objects such as walls or tables are modelled by collections of points tightly packed around the objects border, the way the follower-obstacle function has been designed makes it so that the followers will not be able to pass through them. Certain obstacles are also associated with danger, the typical such obstacle would represent a fire. Together all of these danger associated obstacles generate a ’danger function’ D(x) that describes how dangerous each position is to be staying in.

Definition 4. The danger function at the position x is defined as

D(x) =

0 if at exit

P

F

(2 · exp(3 − |x − x

F

|)) if else

where the sum is take over all points of fire. This is a oversimplified model of the danger in a fire situation. It may lack realistic correspondence but will still give some feel about how the danger may be modelled.

2.2 Modeling the leader

Based upon the idea of saving people by controlling the fireman, the path of the leader

will be constructed using an optimal control approach[15] aiming to minimize the danger

of all agents as well as the distance to the exit. Since the leader also represent a human

it will also be modeled using a second order system and parts of the social force model

can be applied even here to avoid obstacles. This leads to the following definition:

(18)

Chapter 2. The mathematical model 11

Definition 5. The path of the leader denoted x

t

is given by an optimal solution to the problem

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  min

N

X

i=0

w

i

Z

T

0

(D(x

i

(t)) + β|x

i

(t) − x

E

|) dt + 30w

i

N

X

i=0

D(x

i

(T ))

s.t. ∂x

0

∂t = v

0

∂v

0

∂t = U(t) +

W

X

j=1

O

obs

(x

0

, w

j

) − αv

0

|U(t)| ≤ U

max

x

0

(0) = x

E

v

0

(0) = 0

∂x

i

∂t = v

i

∂v

i

∂t = X

j6=i

F

i,f ol

(x

i

, x

j

) +

W

X

j=1

O

i,obs

(x

i

, w

j

) + e

i

(x

0

) − αv

i

x

i

(0) = x

i,start

v

i

(0) = 0

where x

0

is the position of the leader, x

E

is the location of the exit, T is the end time of the problem and w

i

is the importance weight for agent i. The importance weight represents that saving a child can be considered more desirable than saving a 40 year old criminal.

One could think that the objective function in this definition only depends on the move- ment of the leader in the first term since it is the only term containing any direct refer- ences to the leader, this is not the case since the movement of the followers is affected by the leader through the desired direction term. This definition will thus result in the leader trying to minimize the danger of the other agents as well.

2.2.1 Approximate leader

While the above definition 5 is quite straightforward to define, finding an actual optimal solution is far from simple. Thus even semi-optimal and numerical solutions of the stated problem are interesting to look at. One way of finding approximate solutions to the problem is by discretizing the time and the derivatives using the finite difference method

∂x

∂t (t) ≈ x(t + τ ) − x(t)

τ (2.17)

(19)

Chapter 2. The mathematical model 12

where τ is a small time step. The discretization acting upon the object function of definition 5 will produce the following discretized version of objective function

N

X

i=0 T /τ

X

n=0

(w

i

D(x

i

(nτ )) + β|x

i

(nτ ) − x

E

|) + 30w

i

N

X

i=0

D(x

i

(T )) (2.18)

The differential equations for both the leader and the followers will also be changed when doing this approximation. Generally a ODE of the form

∂G

∂T = F (t) (2.19)

will be converted into T

τ equations of the form

G(t + τ ) = G(t) + τ F (t) (2.20)

that will transform the problem. All the equations can be calculated explicitly thanks to the initial conditions.

The complete discretizised problem becomes:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 min

N

X

i=0

w

i T /τ

X

k=0

(D(x

i

(kτ )) + β|x

i

(kτ ) − x

E

|) + 30w

i

N

X

i=0

D(x

i

(T )) s.t. x

0

((k + 1)τ ) = x

0

(kτ ) + τ v

0

(kτ )

v

0

((k + 1)τ ) = v

0

(kτ ) + τ

U(kτ ) +

W

X

j=1

O

obs

(x

0

(kτ ), w

j

(kτ ) − αv

0

)

|U(t)| ≤ U

max

x

0

(0) = x

E

v

0

(0) = 0

x

i

((k + 1)τ ) = x

i

(kτ ) + τ v

i

(kτ ) k = 1, 2, 3 · · · T τ v

0

((k + 1)τ ) = v

0

(kτ ) + τ

 X

j6=i

F

i,f ol

(x

i

, x

j

) +

W

X

j=1

O

i,obs

(x

i

, w

j

) + v

i,d

e

i,d

(x

0

) − αv

i

 x

i

(0) = x

i,start

v

i

(0) = 0 k = 1, 2, 3 · · · T

τ

where each k gives rise to four new equations.

(20)

Chapter 3

The Simulation

3.1 The followers - SIMULINK

For preforming the actual simulations of the followers behaviour defined in 2 the propri- etary simulation software Simulink is used.[16] Simulink implements models by allowing the user to construct the corresponding state-space model in a graphical interface. The model is then solved by one of the built in solvers. The solver and special parameters of the solver such as step length or error tolerance can be specified by the user. The main motivation for using Simulink is its close integration with MATLAB that gives access to a powerful optimization toolbox.[17]

The solver corresponding to the euler discretization done in equation 2.20 in simulink is called ODE1 and can be found under the fixed step solvers. For the simulink model a quite small step size needs to be chosen, as a largest the step size can be of the size 0.02 seconds. The problem that arises from too large step sizes are not related to any instabilities of the converges of the discretazied model but instead arise from the fact that equation 2.16 is non-linear and has extremely large values close to the obstacle. A large step size will thus result in situations where the agent gets unreasonably close to the obstacle and will thus experience an extremely large force that otherwise would not have occurred. Empirical investigations has shown that this problem start to arise for values larger than 0.02 seconds. To avoid this issue a step size of 0.01 seconds is used.

It is possible that certain correcting forces in the social force model or differently tuned agent parameters could avoid this problem, the later is however hard to motivate from a model validity perspective.

The implementation builds on scaleability of user agents through mainly matrix repre- sentations of all agents locations as well as a couple of user defined functions. Each

13

(21)

Chapter 3. Introduction 14

property such as size, speed or reaction to others can thus be individually tuned through matrix operations and MATLABs element-wise operations. The user defined functions primarily calculates the sums in definition 5 and 3 and is the cause of majority of the simulations running time.

3.1.1 The room

The standard room in which all simulations for this rapport is preformed is loosely based on the computer labs in the E building of the main campus of the Royal institute of Technology. The reason for using this area as a model for the tests is based on the fact that spontaneous fires are relative probable compared to ordinary rooms due to the high concentration of technology and the room layout allows for several different path choices from each point. Three fires are placed inside the room at semi-choke points in order to get a non trivial evacuation. The room with the fires placed can be seen in figure 3.1.

0 2 4 6 8 10 12 14 16 18

0 5 10 15 20 25

Figure 3.1: The simulation room, Cyan represents obstacles and red represents fires.

The objective function in definition 5 to be minimized is overlaid with the standard room

in figure 3.2 for the purpose of illustrating how the danger in the room is modelled.

(22)

Chapter 3. Introduction 15

Figure 3.2: The danger function in the room. The applied colormap is JET with red as most dangerous and blue as least dangerous.

3.2 The leader - Optimization

To find an numerical semi-optimal path for the leader to take MATLAB and its powerful optimization toolbox that contains a great deal of different optimization algorithms is used. The advantage in using MATLAB is mainly the immense time save in not imple- menting our own version of the optimizations algorithms, MATLAB also has support for parallel execution in its routines which also is non trivial to implement efficiently.

The problem to be minimize is a multi variable, non linear constrained optimization problem, this demands the use of the matlab routine fmincon [18], since it is the only one that solves such problems. fmincon does however allow for different choices in optimization algorithm to solve such problems. The reasoning of which algorithm to use is described in the next section.

We choose to simplify our problem in the numerical solution to not being a full optimiza-

tion of U (t) for every time step in the simulation. The choice is taken mainly due to the

time reasons. If one was to use a full optimization for every time step of the simulation

it would for a 60 second simulation with a time step of 0.01 seconds arrive at 6001 points

that should be optimized. Since the problem is a two dimensional problem this would

(23)

Chapter 3. Introduction 16

result in a single hessian evaluation requiring at least 12002 simulation evaluations. To avoid this time sink the optimization is limited to only 30 points and thus reduce the required amount of function calls by a factor of 200. To find the values of U(t) for the time steps in between these 30 points a linear spline interpolation is performed. Doing this can also be motivated through the fact that controlling a fireman’s path at a 0.01 second precision is quite unrealistic.

3.2.1 Optimization algorithms

The available algorithms of fmincon are the Trust region reflective, Active set, SQP and interior point algorithm.[19] The Trust region reflective algorithm is not applicable to our problem since it requires an analytically defined Hessian of the objective function.

That would require an analytic solution to the behavior of the system given a specific function U (t) which is not available due to the complexity of the system involving things such as heaviside functions and differential equations: Using a simpler, smoother model could eliminate this problem and make this algorithm applicable.

For the remaining algorithms to be considered the implementation of interior point algo- rithm is primarily a large scale algorithm[18] and thus require the use of sparse matrices.

The problem is not a sparse problem so disregarding the use of the interior point al- gorithm is a good decision. This leaves the active set and SQP implementations which are rather similar that both try and estimate the original problem with a quadratic pro- gramming optimization problem. This simpler problem is then numerically solved by estimating the hessian of the problem with finite differences and using quadratic pro- gramming theory. The active set algorithm is chosen due to its ability of taking large steps[20] compared with SQP. An additional reason is SQP has implementations that can delay the already slow solution process.[18]

3.2.2 Simplified model

The complete model derived in chapter 2 may result in quite time consuming opti- mization, to reduce the running time a simplified model is implemented with only the repulsive forces towards agents and obstacles as well as the desired direction introduced.

The optimization algorithm using this simplified model was processed with five paths in

order to gain new and improved paths. The generated paths are then tested in the com-

plete algorithm and the results are compared with the full optimization. Using a weak

constraint and algorithms for unconstrained optimization was also tested, no significant

speed up was detectable for such a method.

(24)

Chapter 4

Results & Discussion

4.1 Results of the follower simulations - are they realistic?

The results of the simulations of the follower agents are satisfactory, the agents behave human like in most situations but there are still special cases that makes the incomplete- ness of the model apparent. One such situations are following walls with corners, more often then not the agents can get stuck after following a wall to corner due to the fact that the extremely small amount of path finding terms in the model. The model is also quite unrealistic in the sense that agents do not try to save themselves. This is however something that could be implemented through the use of the desired direction and an exploration term for the agents.

The overall conclusion is that the agents behave realistically in the large part of situa- tions in which they encounter, they do however experience a somewhat large degree of bounciness due to sharp interactions with the walls. This phenomena should be avoidable through better interaction parameter tuning.

4.2 The optimization and the path of the leader

The optimization procedure unfortunately only generate local minimums that generally does not differ all too much from the initial guess. The results will thus be firstly more orientated towards in which order to enter rooms and secondly the actual path in the rooms. The same conditions for the parameters of the model and the locations of the agents were used for each run, most parameter values corespond roughly with those in Helbings works[1]. The five initial paths that were studied can be seen in figure 4.1. The four first paths are paths to demonstrate the algorithm and the fifth path is a reasonable

17

(25)

Chapter 4. Results & Discussion 18

path for the test of a more realistic situation. All the paths have a relatively close values of the objective function to each other, varying between 5500 and 6200.

0 2 4 6 8 10 12 14 16 18

0 5 10 15 20 25

x−Distance [m]

y−Distance [m]

Path 1

(a) Path 1

0 2 4 6 8 10 12 14 16 18

0 5 10 15 20 25

x−Distance [m]

y−Distance [m]

Path 2

(b) Path 2

0 2 4 6 8 10 12 14 16 18

0 5 10 15 20 25

x−Distance [m]

y−Distance [m]

Path 3

(c) Path 3

0 2 4 6 8 10 12 14 16 18

0 5 10 15 20 25

x−Distance [m]

y−Distance [m]

Path 4

(d) Path 4

0 2 4 6 8 10 12 14 16 18

0 5 10 15 20 25 30

x−distance [m]

y−distance [m]

Path 5

(e) Path 5

Figure 4.1: The five different inital paths. The red dot represents the initial position.

4.2.1 The complete model

The objective function at each step in the simulation for all the initial paths as well as

the result after the optimization is plotted in figure 4.2. One can note that the general

idea for all the paths is to temporarily increase the danger in order to later reach a lower

level resulting in a total lower danger. In figure 4.2 the most of the improvement are

(26)

Chapter 4. Results & Discussion 19

observed to be done at the second half of the optimization. This is due to the fact that optimization finds local minimums and changing the path early on would most likely lead to a collision with a wall for the leader later on. This could prevent the leader from entering a room which in turn would lead to an agent being left in a dangerous situation. So an improvement early on would lead to a more dangerous situation later on. One could expect this to be corrected by changing the path later on as well, however such a change would require global information of the problem which the solver does not have. To summarize the optimization algorithm does not used the principle of increasing danger temporarily to later on gain a better result in the save way that the leader does.

The comparison of the total danger for the different paths before and after optimization are gathered in the table below.

Path Danger before Danger after Difference # of extra agents saved

Path 1 5938 3729 2210 2

Path 2 6103 4446 1657 2

Path 3 5910 3544 2366 3

Path 4 5505 4603 901 1

Path 5 6205 4879 1326 1

Table 4.1: Comparison of the objective function for the complete model.

As shown in the table the optimization does for all the paths, it reduce the danger for

the path by atleast 15%. The worst result for the danger is the realistic path, it also

has the second worst improvement. One possible explanation for this is that the realistic

path is quite fast for the leader, this means that the leader risks leaving agents behind

by moving too fast, this is also what happens in path 5 the realistic path. The local

minimum convergences then does not allow for the path to be slowed down in sufficient

way to attain better results.

(27)

Chapter 4. Results & Discussion 20

0 1000 2000 3000 4000 5000 6000 7000

0 20 40 60 80 100 120 140 160

Timstep, H = 0.01

Danger

Path 1, Complete optimization

(a) Path 1

0 1000 2000 3000 4000 5000 6000 7000

0 20 40 60 80 100 120 140 160 180

Timstep, H = 0.01

Danger

Path 2, Complete optimization

(b) Path 2

0 1000 2000 3000 4000 5000 6000 7000

0 20 40 60 80 100 120 140

Timstep, H = 0.01

Danger

Path 3, Complete optimization

(c) Path 3

0 1000 2000 3000 4000 5000 6000 7000

0 20 40 60 80 100 120

Timstep, H = 0.01

Danger

Path 4, Complete optimization

(d) Path 4

0 1000 2000 3000 4000 5000 6000 7000

0 20 40 60 80 100 120 140

Timstep, H = 0.01

Danger

Path 5, Complete optimization

(e) Path 5

Figure 4.2: The danger function for the different paths before and after complete optimization. The red line represents the optimized result.

4.2.2 Using the simplified model

For the simplified models the optimization result can be viewed in figure 4.3 and in table

4.2.

(28)

Chapter 4. Results & Discussion 21

Path Danger before Danger after Difference # of extra agents saved

Path 1 5938 5007 932 1

Path 2 6103 4813 1290 2

Path 3 5910 4141 1769 3

Path 4 5505 4581 924 2

Path 5 6204 6187 18 0

Table 4.2: Comparison of the objective function for the simplified model.

0 1000 2000 3000 4000 5000 6000 7000

0 20 40 60 80 100 120 140 160

Timstep, H = 0.01

Danger

Path 1, Simplified optimization

(a) Path 1

0 1000 2000 3000 4000 5000 6000 7000

0 20 40 60 80 100 120 140 160 180

Timstep, H = 0.01

Danger

Path 2, Simplified optimization

(b) Path 2

0 1000 2000 3000 4000 5000 6000 7000

0 50 100 150

Timstep, H = 0.01

Danger

Path 3, Simplified optimization

(c) Path 3

0 1000 2000 3000 4000 5000 6000 7000

0 20 40 60 80 100 120

Timstep, H = 0.01

Danger

Path 4, Simplified optimization

(d) Path 4

0 1000 2000 3000 4000 5000 6000 7000

20 40 60 80 100 120 140

Timstep, H = 0.01

Danger

Path 5, Simplified optimization

(e) Path 5

Figure 4.3: The danger function for the different paths. The red line represents the

optimized result

(29)

Chapter 4. Results & Discussion 22

From the results above an obvious observation is that even using a simplified model will still generate a significant improvement of the leader’s path. The results of this optimization is also concentrated to the later part of the optimization.

Even though the changes in the input U (t) is quite small between the initial path and the optimized path, the changes in the shape of the path is not necessarily small. As an example the max norm of the difference between the second initial path and the optimized result is 3.26 · 10

−5

. The result of this small difference is illustrated in figure 4.4 and as one can see the difference is quite significant and certainly not a change one would expect from a change as small as 10

−5

.

0 2 4 6 8 10 12 14 16 18

−5 0 5 10 15 20 25 30

Path 2, Comparision

Figure 4.4: The second initial path plotted in blue and the optimized result plotted in red. The difference is significant.

From the above picture one can note that the agents behavior is quite bouncy and that

the leaders path use the walls to maneuver. The bounciness is mostly due to poorly

tuned agents parameters in relation to the simulation step size and could most likely be

avoided. The fact that the leader uses the walls so frequently is due to the fact that such

actions are merely "a free lunch" since the problem only constrains the control function

U (t) and not the whole term controlling the acceleration of the leader. This makes it so

that using the walls to maneuver allows higher speeds to be achieved.

(30)

Chapter 5

Conclusions

5.1 General conclusions

5.1.1 Using a simplified model for optimization

The results achieved by using the simplified model gave an average improvement of 986,6 to compare with the complete model simulations that gave an average improvement of 1692. This difference is rather large however the simplified model ran about 3 times faster then the complete model and gives good improvement although not as good as the complete optimization. This is a quite big time save in comparison to the rather small loss of improvement. One can thus conclude that using a simplified model for the optimization is a reasonable practice if one has time limitations. No situation where the simplified optimization gave a worse result than the initial path has been encountered, there is however no guaranty that there will be an improvement in the path as can be seen from path 5. It should also be quite simple to construct a path which would be worsened by a simplified optimization.

5.1.2 The usefulness of the results

A question one has to evaluate is if the model and optimization is of any real use and if it assists in the fire evacuation process. The social force model description of the agents turned out to be very successful. With proper tuning of the involved parameters one can achieve very realistic movement that also takes into account the difference between agents, our movement contained a large degree of bouncing that may be considered unrealistic. This can however be prevented with better tuned parameters. The agility of the system thus allows us to model situations where not only completely health agents

23

(31)

Chapter 5. Conclusions 24

are present but also situations where for example individuals constrained to wheelchairs are present. The defined dynamic can help to assist in investigations done by social planers in how to create safe and bottleneck free buildings.

As for the usefulness of the optimization and the construction of the leader’s path, the overall results show a decreasing effect of danger as expected but much of its efficiency depends on the actual initial path. thus a reasonable and wisely chosen initial path is essential for the optimization method. A big problem of the optimization is the large run time. This is partially solved by using the simplified model described in the previous section. The optimization is also lackluster since it only finds local minimums and mostly makes changes in the later part of the simulation. The optimization can still be useful though, doing an optimization for a suggested path eliminates small inconsistencies as well as reduce variations between paths which makes comparisons between potential paths possible.

The model used for the optimization problem lacks a realistic description of the danger in the room as well as realistic initial path for the evacuation of the building. Most of these are artificially constructed and designed without ample amount of empirical background. Lack of such can be improved if one could collaborate with real firemen in designing both of these. Such improvement will in turn make the method developed in this thesis adaptable for more realistic situations. Beside these, one can conclude that the method show promise potential for assistance in fire situations especially if the run times could be improved.

5.2 Possible further works

The areas of further works are quite extensive, one could go on to look at multi-leader systems for evacuation. Going in this direction one could also limit the information avail- able to the leader, doing this in a multi leader system could then involve communication strategy. A simple way to limit the knowledge of the leaders would be to implement a third type of agent that only reacts to leader when it is within the agents line of sight and interacts with nothing else. This agent would represent a "area explored" concept.

If these agents are then placed in all rooms and they are included into the objective function we have efficiently created a way to explore rooms in order to make sure that they are empty.

Another big area to look at is code optimization, our implementations can certainly be

made to run faster especially if one were to reduce the overhead involved with using

(32)

Bibliography 25

MATLAB and Simulink. A port of the concept to a faster program i.e. C++ should result in significant improvements in running times.

The ease of defining agent interactions also makes it possible to model other situations and thus makes it interesting to look at non-fire situations. For example the model could most likely be adapted in a way to describe hostage situations and many other high risk situations that more insight into could be society to great benefit.

One area that could be interesting to look at is a combination of the described method

and combinatorial optimization. One could limit the continuous optimization to only

optimize the path through single rooms and do a combinatorial optimization for choosing

the order of the rooms. The continuous problem would create a danger weight associated

with passing though a room going from door i to door j and this would then be used in

the combinatorial problem. Doing this would allow for motivated choices of the initial

paths as well as allow for the same calculations to describe many identical rooms that

make up a complete building. This could help in reducing the time required to solve

the problem as well as reduce the amount of bad local minimums that the solver can

converge to.

(33)

Bibliography

[1] Dirk Helbing, Illés Farkas, and Tamás Vicsek. Simulating dynamical features of escape panic. Nature, page 2000.

[2] G. Sokhansefat, M. Delavar, and M. Banedj-Schafii. Multi-agent simulation of wayfinding for rescue operation during building fire. 6(12):1142 – 1150, 2012. ISSN 1307-6892. URL http://waset.org/Publications?p=72 .

[3] Neal Wagner and Vikas Agrawal. An agent-based simulation system for concert venue crowd evacuation modeling in the presence of a fire disaster. Expert Syst.

Appl., 41(6):2807–2815, May 2014. ISSN 0957-4174. doi: 10.1016/j.eswa.2013.10.

013. URL http://dx.doi.org/10.1016/j.eswa.2013.10.013 .

[4] Yiquan Song, Jianhua Gong, Yi Li, Tiejun Cui, Liqun Fang, and Wuchun Cao.

Crowd evacuation simulation for bioterrorism in micro-spatial environments based on virtual geographic environments. Safety Science, 53:105–113, March 2013. ISSN 09257535. doi: 10.1016/j.ssci.2012.08.011. URL http://dx.doi.org/10.1016/j.

ssci.2012.08.011.

[5] Margrethe Kobes, Ira Helsloot, Bauke de Vries, and Jos G. Post. Building safety and human behaviour in fire: A literature review. Fire Safety Journal, October 2009.

ISSN 03797112. doi: 10.1016/j.firesaf.2009.08.005. URL http://dx.doi.org/10.

1016/j.firesaf.2009.08.005.

[6] S. Gwynne, E.R. Galea, M. Owen, P.J. Lawrence, and L. Filippidis. A re- view of the methodologies used in evacuation modelling. Fire and Materials, 23:

383–388, 1999. URL http://www3.interscience.wiley.com/cgi-bin/abstract/

71000864/ABSTRACT?CRETRY=1&SRETRY=0 .

[7] Erica Kuligowski. Review of 28 egress modells. 2004.

[8] J. Floyd, S. Hunt, F. Williams, and P. Tatem. A Network Fire Model for the Simu- lation of Fire Growth and Smoke Spread in Multiple Compartments with Complex Ventilation. Journal of Fire Protection Engineering, 15(3):199–229, 2005.

26

(34)

Bibliography 27

[9] Yang Peng Chen Hai-Tao, Zhang Li-Hong and Yu Run-Cang. Studies on the evac- uation model for limited visibility and evacuation optimization in an emergency.

Information Technology Journal, 12:4768–4775, 2013.

[10] Chenghui Yang Chuanjun Ren and Shiyao Jin. A multi-agent simulation of escape panic. International Joint Conference on Computational Sciences and Optimization, pages 383–385, April 2009.

[11] Muzhou Xiong, Shanyu Tang, and Dan Zhao. A hybrid model for simulating crowd evacuation. New Generation Comput., 31(3):211–235, 2013. URL http://dblp.

uni-trier.de/db/journals/ngc/ngc31.html#XiongTZ13.

[12] Nuria Pelechano, Jan Allbeck, and Norman Badler. Virtual Crowds: Methods, Sim- ulation, and Control (Synthesis Lectures on Computer Graphics and Animation).

Morgan and Claypool Publishers, 2008. ISBN 1598296418, 9781598296419.

[13] Pushkin P.E Kachroo, Sabiha Amin Wadoo, Sadeq J Al-nasur, and Apoorva Shende.

Pedestrian Dynamics: Feedback Control of Crowd Evacuation. Understanding Com- plex Systems. Springer, Berlin, Heidelberg, 2008.

[14] David Kinny, Jane Yung jen Hsu, Guido Governatori, and Aditya K. Ghose, editors.

Agents in Principle, Agents in Practice - 14th International Conference, PRIMA 2011, Wollongong, Australia, November 16-18, 2011. Proceedings, volume 7047 of Lecture Notes in Computer Science, 2011. Springer. ISBN 978-3-642-25043-9. URL http://dblp.uni-trier.de/db/conf/prima/prima2011.html.

[15] H.J. Sussmann and J.C. Willems. 300 years of optimal control: from the brachys- tochrone to the maximum principle. IEEE Control Systems Magazine, 17(3):32–44, June 1997. ISSN 02721708. doi: 10.1109/37.588098. URL http://ieeexplore.

ieee.org/lpdocs/epic03/wrapper.htm?arnumber=588098 .

[16] Inc The MathWorks. Simulink , . URL

R

http://www.mathworks.se/products/

simulink/.

[17] Victor M. Becerra. Solving optimal control problems with state constraints using nonlinear programming and simulation tools. IEEE Trans. Education, pages 377–

384, 2004.

[18] Inc The MathWorks. Constrained nonlinear optimization algo- rithms, 2014. URL http://www.mathworks.se/help/optim/ug/

constrained-nonlinear-optimization-algorithms.html.

[19] Inc The MathWorks. Find minimum of constrained nonlinear multivariable function,

. URL http://www.mathworks.se/help/optim/ug/fmincon.html .

(35)

Bibliography 28

[20] Inc The MathWorks. Choosing a solver, 2014. URL http://www.mathworks.se/

help/optim/ug/choosing-a-solver.html#bsbwxm7 .

References

Related documents

In conclusion, the material that was collected for the case study of http://www.dn.se conveys an understanding of the now that is both deeply rooted in the past and full of messages

The advantage of such an approach is that we can transform the mental model that experts still use when reaching the conclusion medium, into a well-vetted formal model that can

In-depth interviews Researchers at Uppsala University, researcher-CEO Current Power Sweden AB, local authority representatives from the regional office, project manager and

Another goal is, to demonstrate the possibility of closed loop control of the foam level in the water model using the sound signal as measurement.. Foam level control in a LD-

Mer än 90% av eleverna har svarat stämmer bra eller stämmer mycket bra när det kommer till frågan om de anser att det är viktigt att skolan undervisar om anabola steroider och

En annan vanlig effekt inom fixeringen ortorexi är social isolering vilket innebär att en person med ortorexi följer en strikt hälsosam diet som blir en del av dennes personlighet

We previously reported that immunizations with apoptotic HIV-1/Murine Leukemia virus (MuLV) infected cells lead to induction of both cellular and humoral immune responses as well

The model is limited to the efficiency metrics examination time, turnover time, scanner utility, number of examinations performed, and scheduling consistency... 3 2