DEGREE PROJECT IN COMPUTER ENGINEERING, FIRST CYCLE, 15 CREDITS STOCKHOLM, SWEDEN 2018

Evaluating classroom evacuation with crowd simulation

WILLY LIU

DANIEL PARHIZGAR

KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE Evaluating Classroom Evacuation with Crowd Simulation

WILLY LIU, DANIEL PARHIZGAR

Bachelor in Computer Science Date: June 6, 2018 Supervisor: Christopher Peters Examiner: Örjan Ekberg Swedish title: Evaluering av klassrumsevakuering med simulering av folkmassor School of Electrical Engineering and Computer Science

iii

Abstract

Effective organization of evacuation routes inside rooms needs to be considered when designing the layout. Studies have shown that an in- effective evacuation can in itself be the cause of injuries in emergency situations. This thesis examines how exit configurations and different layouts in classrooms will impact evacuation time using crowd simu- lation through unilaterally incompressible fluid. The classrooms used in the simulations were modelled after real classrooms at KTH Royal Institute of Technology. The different configurations were one exit, two exits, three exits, one exit on the back wall, and a double door on the back wall. These were chosen since previous research have focused on similar layouts. The simulator was used to simulate students evacuating from the different classrooms. The results suggests that which exit configura- tion is the most optimal is linked to the table layout of the classroom. In the simulated scenarios, two doors always result in faster evacua- tion time compared to one door. A double door in the back also de- creases evacuation time compared to one door. Three doors do not give significant improvements over two doors. Contrary to previous research, there exists no optimal exit configuration that is optimal in all cases. iv

Sammanfattning

Effektiv organisering av utrymningsvägar inuti rum måste beaktas vid utformningen av layouten. Studier har visat att en ineffektiv evakue- ring i sig kan orsaka skador i nödsituationer. Denna rapport under- söker hur utgångskonfigurationer och olika layouter i klassrummen kommer att påverka evakueringstiden med hjälp av folkmassimule- ring genom ensidigt inkompressibel vätska. De klassrum som använ- des i simuleringarna modellerades efter riktiga klassrum vid Kungliga Tekniska Högskolan. De olika konfigurationerna var en utgång, två ut- gångar, tre utgångar, en utgång på bakre väggen och en dubbeldörr på bakre väggen. Dessa valdes eftersom tidigare forskning har fokuserat på liknande layouts. Simulatorn användes för att simulera studenter som evakuerar från de olika klassrummen. Resultaten föreslår att vilken utgångskonfigu- ration som är optimal är kopplad till klassrummets bordslayout. I de simulerade scenarierna resulterar alltid två dörrar i snabbare evaku- eringstid jämfört med en dörr. En dubbeldörr vid baksidan minskar också evakueringstiden jämfört med en dörr. Tre utgångar ger inte märkbart bättre resultat än två dörrar. Till motsats till vad tidigare forskning har visat finns det ingen utgångskonfiguration som är op- timal i alla situationer. Contents

1 Introduction1 1.1 Research question...... 2 1.1.1 Purpose...... 2 1.2 Scope...... 2 1.3 Report outline...... 3

2 Background4 2.1 Unity...... 4 2.2 Crowd simulation...... 4 2.3 Unilaterally incompressible fluid...... 5 2.4 Crowd evacuation...... 7 2.4.1 Faster is slower effect...... 8 2.5 Related works...... 8 2.5.1 Crowd simulation state of the art...... 8 2.5.2 Evacuation simulation...... 9

3 Methods 12 3.1 Implementation...... 12 3.1.1 Modeling room layout...... 12 3.1.2 Building the simulation environments...... 14 3.1.3 Modelling 3D objects...... 14 3.1.4 Running the simulations...... 14 3.2 Evaluation...... 15 3.2.1 Collecting and evaluating the data...... 15 3.2.2 Comparing to previous research...... 15

4 Results 16 4.1 Small classroom...... 17 4.2 Medium classroom...... 19 4.3 Large classroom...... 21

v vi CONTENTS

4.4 Comparing number of exits...... 23

5 Discussion 24 5.1 Result discussion...... 24 5.1.1 Number of exits...... 24 5.1.2 Exit size and placement...... 25 5.1.3 Room layout...... 26 5.1.4 Summary...... 27 5.2 Limitations...... 27 5.3 Reflection...... 28 5.4 Future work...... 28

6 Conclusion 30

Bibliography 31 Chapter 1

Introduction

Effective organization of evacuation routes inside buildings is an im- portant aspect that architects need to consider when designing a build- ing. With the rising number of emergency situations occurring in school settings, it is important to be able to evaluate a classroom, in order to have a classroom that is as optimized as possible for evacuations. However, crowds can exhibit complex and/or unpredictable behavior during emergency situations [9]. Due to limited knowledge of human behavior, accurately predicting how people behave is diffi- cult [4]. In extreme cases of emergency situations, an ineffective evacu- ation can itself lead to injuries due to stampedes/people getting tram- pled as the crowd races to exit [5]. Although it is certainly possible to actually build the classroom to evaluate it, it might not give realistic results; The panic factor and other behaviors that arise in emergency situations are lost in drills, and ex- posing people to real danger cannot be considered a viable evaluation method. Simulating real life with computer programs can be a good way to research and draw conclusions about certain behaviours in different settings. One interesting subject within simulation is simulating crowd behaviours which can be useful when planning designs for the inside of a building, effective walkways in areas with dense crowds, or when designing evacuation plans. A crowd simulation will help reduce the cost and danger of creating and testing different classroom layouts for evacuation while still getting accurate results that can be applied in real life.

1 2 CHAPTER 1. INTRODUCTION

1.1 Research question

This paper will investigate how crowd simulation can help with the evaluation of classroom evacuation times when the exit configuration and room layout is different. Specifically, we will focus on real class- room layouts based on typical classrooms present in KTH Royal Insti- tute of Technology. Our research question is the following:

How will exit placement, number of exits, exit size, the size of the room, and the room layout impact emergency evacuation time in classrooms?

1.1.1 Purpose Answering our research question is important since previous research have come to different conclusions regarding this subject and will lead to better knowledge about which exit layout works best for emergency evacuation. Answering this research question will also let us know how good of an evaluation tool simulation via unilaterally incompressible fluid is. This is important because this simulation model is relatively new [11] compared to other simulation methods [6] and it is therefore good to do more research on it.

1.2 Scope

Our thought process when delimiting ourselves is to aim for realistic behaviour in real life settings rather than realistic appearance, such as how realistically the people walk or the environment graphics. We will also limit ourselves to evacuation in classrooms, specifi- cally those of KTH Royal Institute of Technology which we have easy access to. We have limited ourselves to three specific classrooms of dif- ferent sizes, small, medium, and large (see chapter3 for more details). The rooms will also be filled with people and furniture according to what the blueprints of the classroom says and the max amount of peo- ple allowed in the rooms. When deciding on multiple exit placements, there are potentially limitless different variations one could come up CHAPTER 1. INTRODUCTION 3

with, but we want these to be located on the same wall to be scenarios being more realistic. However, we purposely try a layout with a door at the back of the classroom since previous research [18] specifically indicates that this is the best layout. Placing an exit on the actual back wall in the chosen classrooms is in practice not possible due to the lo- cation of said classrooms, but in real life it is possible to re-organize the furniture in a room to change where the back of it is located. The results should therefore still be applicable in real life. We also assume that the classrooms are located on floors where the people can’t use the windows as exit. Finally, another limitation we acknowledge is that real crowds have elements of randomness such as variation in people’s height, width, walking speed etc that is not taken into account in this report. We have also limited ourselves to simulations where each student’s starting po- sition is at one of the available seats in the classroom. In real life, the students could potentially be walking around in the classroom, lead- ing to a less even distribution, but we have chosen what we believe is the most representative scenario - when students are by their desks.

1.3 Report outline

This report will begin by outlining all relevant theory in chapter2. Concepts such as crowd simulation and crowd evacuation will be de- scribed, along with relevant related research about evacuation in gen- eral and simulated evacuations. Chapter3 will contain explanations of implementation and evaluation details and how we have chosen to answer our research question. Chapter4 contains the results from the simulated evacuation scenarios with detailed tables and graphs. Chapter5 contains the discussion with interpretations of the data ob- tained. Our test data is evaluated in relation to previous research in the same area. Our most important findings are finally summarized in the conclusion, chapter6. Chapter 2

Background

2.1 Unity

Unity is a game engine developed by Unity Technologies used pri- marily to develop games [17]. It has support for 27 different platforms including smartphones and game consoles making it a leading engine in the games industry [17].

2.2 Crowd simulation

Crowd simulation can be applied in many areas in today’s society. Two major areas are in the film industry, where simulating crowds can save money and time when compared to casting hundreds or thou- sands of actors to fill out a scene, and the industry where crowds need to be accurately simulated to make the game feel more alive and increase immersion. The area that this paper focuses on is using crowd simulations to simulate emergency situations in order to evaluate the layout/design of a room. In low crowd densities where people can move freely, crowd be- havior can be compared with the behavior of gases [8]. At medium and high densities, the properties are more akin to the motion of flu- ids [8]. Building a completely accurate crowd simulator is a difficult task since there are so many factors involved - each person’s decisions are not completely random, but show certain regularities and are usu- ally determined by utility [4].

4 CHAPTER 2. BACKGROUND 5

2.3 Unilaterally incompressible fluid

There exists many ways to simulate a crowd [20]. One way is to in- dividually control each person through some algorithm, but since a dense crowd can contain hundreds or thousands of individuals, com- puting the logic for each individual can be very performance intensive if the simulation is run in real time [16]. The simulation method used in this paper is based on the algo- rithms of Narain et al. [11]. This model was then used by Berglund and Ristic [1] to develop the crowd simulator used in this report, which was then further enhanced by Shabo [13] who made it possible to add groups in the crowd, although that specific functionality will not be a focus in this paper. The method of the Unilateral Incompressibilty Constraint (UIC) for crowd simulation was first introduced by Narain et al. [11]. This method of simulation is very optimized for large crowds with high density. Narain et al. [11] mention in their report that scenes with up to one million agents could be simulated at 3 seconds per frame on their testing computer, compared to another simulation method which failed to run at all when the number of agents went above 70 000. The crowd is represented as a continuum liquid described by a density and flow velocity. This ”liquid” does not behave as an ordi- nary physical fluid since crowds are not fully compressible1 (because people take up a certain amount of space and cannot be compressed indefinitely). However, crowds are not incompressible2 either, as the density of a crowd is not always constant. Crowds are a hybrid of the two, which Narain et al. [11] calls an ”unilaterally incompressible fluid”. The unilateral incompressibility constraint (UIC) is as follows: 2α ρ ≤ ρ = √ max 2 (2.1) 3dmin

In this equation, ρ is the density, ρmax denotes the maximum al- lowed density of the crowd, and dmin is the minimum distance be- tween agents. The constant factor α ≤ 1 allows for more perfect - ing of the crowd (α = 1) or more constrained packing of the crowd (α < 1). [11]

1A compressible fluid is a fluid with variable density. 2An incompressible fluid is a fluid where the effects of pressure does not affect fluid density, i.e., a fluid with constant density. 6 CHAPTER 2. BACKGROUND

It is through this constraint that local collision avoidance is achieved. To ensure UIC (2.1) is maintained, a ”pressure” is applied on agents if they get close enough to violate the constraint, which affects their moving velocity. Collision avoidance is in other words implemented on the macro scale, rather than agent-level. [11] An overview image of the algorithm can be seen in figure 2.1 and the full simulation loop can be summarized as follows [11]:

1. At the beginning of each time step, each agent’s position xi is known.

2. Global planning determines the preferred velocity for each agent, vei, taking into account environmental obstacles, but not other agents.

3. The agent positions and preferred velocities are saved in a simu- lation grid.

4. If there are moving obstacles, recompute the free area in each grid cell.

5. UIC solve is performed, resulting in a corrected velocity field v.

6. Each agent determines its velocity vi and updates its position in the next time step according to the formula xi = xi + vi∆t where t is the time.

7. Pairwise collision detection by enforcing the minimum distance required using the new positions of the agents. CHAPTER 2. BACKGROUND 7

Figure 2.1: Overview of the algorithm used [11].

This simulation model does have certain limitations. For example, collision detection only happen when agents are about to walk into each other, the agents are not ”intelligent” enough to avoid detection altogether by changing their route [11].

2.4 Crowd evacuation

Helbing, Farkas, and Vicsek [5] have done extensive research on crowd behavior, noting that typical characteristics of panicked people include, but are not limited to:

• People moving or trying to move faster than normal

• Individuals start pushing each other, interactions between peo- ple become physical in nature

• Passing of a bottleneck becomes uncoordinated and the exit be- comes clogged

Helbing et al. [7] has also shown both experimentally and through simulation that the escape time distribution can be very broad due 8 CHAPTER 2. BACKGROUND

to jamming/clogging of the exit. In extreme cases of panic inducing events such as a fire, the evacuation itself can be a cause of injury [5]. It is also important to consider the obstacles (such as tables) within a room, since they can have an impact on the evacuation time [18][19]. This observation becomes crucial when studying classroom evacua- tions in particular, since classrooms contain many obstacles and peo- ple, making it a more dangerous area in case of emergency.

2.4.1 Faster is slower effect The ”faster is slower” effect is a phenomenon which states that the higher the desired velocity of people trying to evacuate, the higher the evacuation time [5]. This is relevant during evacuation scenarios since people naturally will have a higher desired velocity than normal in order to escape faster. This effect arises when the escapees push each other when escaping, and the slowing down is caused by a group of people temporarily the exit [14]. This effect has also been shown experimentally by Garcimartin et al. [3] where they performed evacuation drills with students; the results showed that the harder the students pushed each other in the race to exit, the slower the overall evacuation was.

2.5 Related works

This section presents some related works in the field of crowd evacua- tion simulation which are used as references in this report.

2.5.1 Crowd simulation state of the art In addition to the method used in this report (unilaterally incompress- ible fluid), there exists several methods to simulate crowds. This sec- tion will describe those that are most relevant to this report.

Social forces Helbing and Molnar [6] introduced a method of crowd simulation known as ”social forces” which has a main focus of simulating real- istic behavior. The social force, in contrast to physical forces, is not a force that is exerted on a person’s body through their environment, CHAPTER 2. BACKGROUND 9

but is rather a quantity that describes their willingness to act. Each person has a desired velocity and desired path which can be altered by these social forces. The people will then accelerate or slow down as if they were influenced by some external force. Helbing describes that there are several factors for the social forces. For example, strangers do not normally want to walk too close to each other, so the social force will prompt them to change their walking path until they are out of each other’s ”private sphere”. There are also factors concerning how comfortable each person is depending on how close they are to a wall.

Cellular automata Cellular automata consists of a two-dimensional regular grid of cells. Each cell can have one of finite states. Examples of states in a crowd simulation context can be that one cell is either occupied by a person, or is empty. Cellular automata evolve at each discrete time step, where the state of each cell is determined by the states in neighboring states and some local rules. [20]

Figure 2.2: A 3D environment and its grid representation in 2D [20].

As seen in figure 2.2, this simulation method does not result in any realistic-looking crowds, merely a two dimensional grid to represent their movements. Cellular automata has been used in various studies, such as by Varas et al. [18] and Daoliang, Lizhong, and Jian [2], which is described in 2.5.2.

2.5.2 Evacuation simulation

Exit dynamics of occupant evacuation in an emergency Daoliang, Lizhong, and Jian [2] conducted a study on the impact of exit width in crowd evacuations. They used the simulation model/technique cellullar automata. They had two test rooms, one of size 18 by 14 grid units with 200 individuals and another room with size 50 by 50 units 10 CHAPTER 2. BACKGROUND

and 1365 individuals. The rooms were without any obstacles. Within each test case, they had two tests: one with a single exit, testing how increasing the width affected evacuation time, and another with two separate exits (with a width allowing one person to exit at a time), testing how the distance between the two doors (along the same wall) affected evacuation time. The single door scenario showed in both cases that total evacuation time always decreased as exit size increased, but in a non-linear way. Beyond certain widths, the decrease in exit time became negligible (di- minishing returns). For the separated doors, neither a very small or very high distance is optimal. They also concluded that a symmetrical placement of the two doors is slightly better since the two doors are used by an even amount of people, instead of one door being more clogged than the other.

Cellular automaton model for evacuation process with obstacles Varas et al. [18] published a paper in which they simulated evacuation scenarios (using cellular automata) in classroom settings with obsta- cles and their goal was to find the optimal exit placement and size. Using their simulation, they found that ”traditional” exit placements (which they defined as placed in a corner of the classroom) yielded the worst evacuation time. A double door exit yielded the fastest evac- uation if placed at the back of the classroom, and replacing the dou- ble door with two single doors does not impact evacuation noticeably according to their findings. They also discovered that there exists a critical value for increasing exit width, such that increasing the width beyond that point does not yield lower evacuation times. This critical value is lower when there are obstacles in the room compared to if the room is completely empty.

Room evacuation through two contiguous exits Sticco et al. [15] have researched evacuation scenarios using the sim- ulation model ”social forces” (see snapshot in figure 2.3). They simu- lated evacuation scenarios in 20m x 20m, 30m x 30m, and 40m x 40m sized rooms with two doors placed on the same wall. The main pur- pose of this study was to investigate the impact of the distance be- tween two exits in rooms without obstacles. Their simulations showed that evacuation time increased as the distance between the two doors CHAPTER 2. BACKGROUND 11

increased. Their conclusion was therefore that a single double door setup is more efficient than two separate single doors.

Figure 2.3: Snapshot of 20m x 20m simulation with two exits, Sticco et al. [15]

Agent-based simulation of alternative classroom evacuation scenar- ios Liu, Jiang, and Shi [10] created evacuation simulations in classroom settings in order to determine optimal classroom schemes. They in- troduced an agent-based simulation created with Netlogo (an agent- based modeling software) which they used to investigate how evac- uation efficiency related to classroom layouts. The classrooms lay- outs they used in their simulations were based on Chinese construc- tion codes. The construction codes stated for example that a standard classroom should have two exit doors that are at least 0.9m wide. They modeled two classrooms with the same layout, except one had one exit and the other had two exits, and their results showed that classrooms with two exits shorten evacuation times in all situations. Chapter 3

Methods

In this chapter, we describe the approaches taken to answer the re- search questions such as the tools used, how the classrooms were mod- elled and the motivation behind them.

3.1 Implementation

3.1.1 Modeling room layout

Figure 3.1: A screenshot of the classroom E34 in progress

We have used a crowd simulation by Berglund and Ristic [1] and Shabo [13] in Unity version 2017.3.1f1 to simulate a group of people evacuating a classroom. A crowd simulator works best for what we are doing in this thesis because of how easy it is to build scenarios

12 CHAPTER 3. METHODS 13

without any additional costs, and because we can try some layouts that might not even exist in the real world, for example having three doors in a small room. We have built simple 3D models of classrooms based on typical classrooms at KTH. Classroom floor plans are available for all KTH classrooms online on their website, which were used to ensure our models were accurate. We have chosen KTH classrooms since our sim- ulations will model real scenarios. These results can then be verified and applied in real life. The floor plans, were downloaded and im- ported into Unity as a reference when modelling, as seen in figure 3.1. There are too many classrooms in KTH to run simulations on each one of them, so we chose to divide the classrooms into three size cat- egories, and model one room in each category. The categorization is as follows: small classrooms with around 30 seats or less, medium classrooms with 30 or more seats and a large classroom with around 60 seats. With these rooms, we have assessed the effects of changing: number of exits, placement of exits and the width of the exits. The American construction requirements [12] made by the Occupa- tional Safety & Health Administration for rooms (rooms in general, not specifically classrooms) and exits were used for reference when plac- ing multiple exits in the rooms since these will have to follow a certain set of rules. One example of their guidelines state that if a room has two exits, they must be placed as far away from each other as possible. Our layout variations will partly be based on which kinds of varia- tions are used in other research which are mentioned in section 2.5.A common conclusion from the other reports is that two doors are better than one in all cases [2][18][10]. Another study concluded that a dou- ble door set up with the exit at the back at the classroom was optimal [15]. Our comparison will include the following layout variations:

• One door (standard layout for small and medium classrooms)

• Two doors along the same wall (standard for large classrooms)

• Three doors along the same wall

• One door at the back of the classroom

• One double door at the back of the classroom 14 CHAPTER 3. METHODS

3.1.2 Building the simulation environments A functioning simulation environment need spawn nodes where the people are created, a goal node that the people go towards, and a straight path between them. The straight path between the nodes can’t be hindered by any solid objects which the people can’t walk through. If there exists no straight path between spawn and the goal, you can place around regular nodes in the environment so the people can use them to calculate the shortest route to the goal (more detail about this in section 3.1.4), if no such path exists, the agents will not be able to walk.

3.1.3 Modelling 3D objects Most tables and walls that we modelled were simple rectangular 3D shapes which are easy to create in Unity. The tables in classroom D41 (the medium classroom) were curve shaped, so the easiest way to cre- ate them was to first draw them as a 2D vector graphic using a software named Sketch. Using the program Blender, we could transform the 2D vector graphic into 3D objects which are compatible with Unity.

3.1.4 Running the simulations After creating the models for the classrooms, we placed a spawn point for one person at each seat marker in the classroom floor plan. Mul- tiple waypoints/nodes were placed in the classrooms which allowed the agents to calculate the optimal path from their spawn point to the end goal. The simulator uses an adapted version of Floyd-Warshall’s algorithm to calculate the shortest path in the pre-processing with the help of the placed nodes [13]. The goal for all agents is placed outside the classroom. The simulations were made on a MacBook Pro (Retina, 15-inch, Mid 2015) with OS X Version 10.11.6 (El Capitan) and a MacBook Pro (13-inch, 2016) with macOS Version 10.13.4 (High Sierra). All the num- bers evaluated came from the MacBook Pro 15-inch, but we did try the simulations on both computers and both gave the same results. CHAPTER 3. METHODS 15

3.2 Evaluation

3.2.1 Collecting and evaluating the data We implemented a simple script that shows a timer for how long it takes for all agents to evacuate the room. It works by placing a colli- sion box by the exit(s) and counting the number of agents that enter the collision box. The timer stops when all the agents have left the classroom. Since the simulations have a certain element of random- ness, we ran each simulation five times and took the average time of that as the result. The standard deviation was also calculated. These time results were used to draw our conclusion about which of the dif- ferent layouts are the best for evacuation. We visualized the data by creating diagrams to see the differences more clearly.

3.2.2 Comparing to previous research We have referenced previous research results on evacuation, in order to create useful and relevant scenarios which can be compared. There exists multiple studies and research papers on similar subjects, some of which are mentioned in section 2.5. Since our different layout varia- tions in our simulations have been based on which kinds of variations have been used in other studies, this means that our results can be di- rectly compared. We can also draw conclusions on the viability of us- ing our crowd simulator (the unilaterally incompressible fluid model) as a tool in assessing evacuation scenarios. Chapter 4

Results

This chapter describes the results from the evacuation simulations that have been conducted. Three classrooms were modeled after real class- rooms in KTH, specifically E34 (small), D41 (medium), and Q33 (large). The small classroom is described in section 4.1, medium classroom in section 4.2, and the large classroom is described in section 4.3. Each scenario was simulated five times, which were used to calculate an average evacuation time. These average evacuation times are then vi- sualized in bar graphs. It should be noted that the absolute times are not of importance, it is rather the relative changes in evacuation time that are of interest in this project. For each classroom, there are also snapshots of the evacuation process for a few layouts that are of specific interest for the discussion. To recap, here are the exit configurations tested:

• One door (1 door)

• Two doors along the same wall (2 doors)

• Three doors along the same wall (3 doors)

• One door at the back of the classroom (1 door back)

• One double door at the back of the classroom (double door)

The names in parentheses are how the configurations are referred to in the tables and graphs.

16 CHAPTER 4. RESULTS 17

4.1 Small classroom

E34 is the smallest classroom tested in this report and has a capacity of 28 students. The standard layout has one door near one of the back corners, as seen in 4.1. An example of an evacuation process is seen in 4.2.

Figure 4.1: The floor plan from KTH on the left and the 3D model on the right

Figure 4.2: Evacuation process, one door in the back.

Run 1 Run 2 Run 3 Run 4 Run 5 avg. std dev 1 door 9.0632 9.0517 8.9938 8.9476 9.7459 9.160 0.296 2 doors 8.3770 8.2529 8.5860 8.5733 8.4604 8.449 0.125 3 doors 8.1319 8.0317 8.0494 7.9523 7.9380 8.021 0.070 1 door back 11.5649 11.0700 12.0447 12.3066 11.6436 11.726 0.425 double door 8.9476 8.6606 8.7977 8.7254 8.8436 8.795 0.099

Table 4.1: Time in seconds taken to evacuate E34 18 CHAPTER 4. RESULTS

Figure 4.3: Comparison of average evacuation times and standard deviations in the small classroom (E34)

Figure 4.3 shows that the layout with three doors yields the shortest evacuation time. Two doors are better than one door and the double door layout also decreases the evacuation slightly, by around half a second on average. CHAPTER 4. RESULTS 19

4.2 Medium classroom

This classroom has a slightly different layout: usually, the front of the classroom is on the short side of a rectangular classroom, but D41 faces a long side. D41 also has long, curved benches rather than regular desks. We purposefully chose a classroom with a slightly different internal layout in order to see if that could be a factor for the evacua- tion. See figure 4.4 to see the floorplan compared to the 3D model, and figure 4.5 for three frames from a simulated evacuation process. This classroom has a max capacity of 40 students.

Figure 4.4: The floor plan from KTH on the left and the 3D model on the right

Figure 4.5: Evacuation process of the double door scenario. It can be seen that three main lanes of people form: from the top, in the middle, and from the bottom. 20 CHAPTER 4. RESULTS

Run 1 Run 2 Run 3 Run 4 Run 5 avg. std dev 1 door 16.1711 16.1814 16.4642 16.5941 16.1992 16.322 0.174 2 doors 13.0189 12.8248 13.1434 13.0086 13.1621 13.032 0.121 3 doors 12.3672 12.1634 12.0214 12.1437 11.9192 12.123 0.151 1 door back 16.4792 18.4466 17.7418 16.8867 18.7735 17.666 0.878 double door 11.0242 10.3441 10.4990 11.4459 11.1985 10.902 0.418

Table 4.2: Time in seconds taken to evacuate D41 (one door / standard lay- out)

Figure 4.6: Comparison of average evacuation times and standard deviations in the medium classroom (D41)

Figure 4.6 shows that the double door layout gave the shortest evacuation time in this classroom. Three doors is around four seconds shorter than one door. Two doors is around three seconds shorter than the one door layout. CHAPTER 4. RESULTS 21

4.3 Large classroom

For this classroom, the standard layout was with two doors on the same long side wall. This classroom has a max capability of 60 stu- dents. The classroom is seen in figure 4.7, and a few evacuation simu- lations are shown in 4.8, 4.9 and 4.10.

Figure 4.7: The floor plan from KTH on the left and the 3D model on the right

Figure 4.8: Evacuation process in the standard layout. It can be seen in the middle frame near the top that two groups of people fall behind.

Figure 4.9: Evacuation process, single door. A large group of people gather near the bottom of the image. 22 CHAPTER 4. RESULTS

Figure 4.10: Evacuation process, single door at the back. Two lines of people form during the evacuation.

Run 1 Run 2 Run 3 Run 4 Run 5 avg. std dev 1 door 22.8606 21.3394 22.8518 21.9813 23.3812 22.483 0.727 2 doors 16.5491 17.8763 16.8533 16.334 16.0368 16.730 0.632 3 doors 16.2492 16.0620 16.2791 16.4159 16.0717 16.216 0.134 1 door back 20.6059 20.5608 20.6268 21.3792 20.2971 20.694 0.363 double door 17.6224 17.2253 17.0738 16.8321 17.1843 17.188 0.257

Table 4.3: Time in seconds taken to evacuate Q33 (one door)

Figure 4.11: Comparison of average evacuation times and standard devia- tions in the large classroom (Q33) CHAPTER 4. RESULTS 23

The results for Q33, seen in figure 4.11, are similar to E34 where the three door layout is the fastest and the two door layout and the double door layout are slightly slower.

4.4 Comparing number of exits

Figure 4.12: Time saved using different amount of doors

Looking at 4.12, we see that all rooms benefit from having two door compared to one. In larger rooms the time saved is more significant to that of the smaller rooms. Comparing the time we save by having three doors instead of two, it is less than one second faster in every scenario and the larger rooms do not benefit from it more than the smaller ones. Chapter 5

Discussion

This chapter will start with a discussion and interpretation of the re- sults obtained in this study, and then continue with our thoughts and ideas for future work.

5.1 Result discussion

To summarize the previous chapters, three classroom layouts were modeled after three real classrooms at KTH Royal Institute of Technol- ogy. The classrooms are referred to as ”small”, ”medium” and ”large” classrooms. Each classroom had three variations modeled, where the exits were varied in position, size, and number of exits.

5.1.1 Number of exits The results showed that having two doors instead of one door im- proved the evacuation time in all three scenarios, which is in line with previous research [2][18][10]. While these results might be obvious, it is still a good indicator that our crowd simulator is reliable and shows realistic results. These improvements in time difference were more sig- nificant in the medium and large classrooms, where the difference in time were several seconds. However, in the small classroom, the time difference was under one second. This is can be seen clearly in figure 4.12. Having two doors in a small classroom is beneficial to evacuation time, but since the improvement is so small, it might not be worth it if considering economic factors.

24 CHAPTER 5. DISCUSSION 25

For the three door variation, we can see that the improvement over the two door variation is very small, under one second in all three classrooms. The overall evacuation is improved, but since we have chosen to place all exits along the same wall, the people near the op- posite wall still take long time to reach the exit. It can be seen in figure 4.8 that some people near the top of the image lag behind somewhat, leading to a more even flow of people exiting. One solution to this is to simply place the exits on different walls, but this is rarely practical in reality, since most, if not all classrooms at KTH are placed by an outer wall of the school building. Additionally, the three exits are not used to their maximum potential in our simulations. Since the agents are set to take the shortest path, some agents choose to walk to the new third exit since it is closer location-wise even though it might be clogged. This leaves one of the three exits mostly unused. In the case of the small classroom, there are not enough people to significantly clog any exit when there are two exits, so the improvement in time in this case is simply due to the fact that the new third door is closer to many agents. In all classrooms except for the large one, one door in the back was the slowest. The slowest scenario in the large classroom was the one with just one door. Looking at figure 4.9 we see that many of the peo- ple gather around the bottom part of the room because of this path be- ing the shortest for them, and makes it harder for each other to move forward. When looking at the scenario with one door in the back (fig- ure 4.8), the people split up so half of them take the upper path and the other half take the bottom path which leads to lower chance of blocking.

5.1.2 Exit size and placement Having a single double door exit was suggested as the optimal layout by Varas et al. [18] and Sticco et al. [15]. This layout showed improve- ments in all three scenarios. In both the small and large classroom, the improvements were slightly worse when compared to the layout with two single doors; The difference was less than half a second in both cases. Interestingly, the double door layout gave the shortest evacua- tion time in the medium classroom by several seconds. Previous research do not seem to fully agree whether two separate doors or one double door is the best. The research of Sticco et al. [15] suggests that since increasing distance between two doors increases 26 CHAPTER 5. DISCUSSION

evacuation time, one single double door is more efficient that two sep- arate doors. However, Varas et al. [18] has shown that two separate doors does improve evacuation time, even though the improvement is very small. There are many possible reason for this seeming ”con- tradiction”. One reason could be that Sticco et al. [15] had simulations without obstacles while Varas et al. [18] had obstacles, with classroom layouts specifically. Our results points towards the reason being the obstacle layout.

5.1.3 Room layout An interesting result is the fact that the double door layout is the most optimal layout in the medium classroom (see figure 4.6). Since the average value was calculated from several simulations, it is highly un- likely that this phenomenon was due to random chance. It is more likely that the table layout of the classroom contributed to this phe- nomenon since it differs from the traditional table layout present in the small and large classrooms. When looking at the evacuation pro- cess in figure 4.5, we can see that there are three lanes of people formed when evacuating. This does not happen in the other classrooms since the tables are laid out in such a way that only two lanes of people can form, as seen in 4.2 and 4.10. One might assume that it is the placement of the exit, rather than its width, that has led to the improvements in evacuation time, but table 4.6 shows that merely placing the exit by the back of the classroom yields the the worst or second worst evac- uation time in the simulation results. Therefore, the exit must also be sufficiently wide. In order to properly confirm this, it would have been beneficial to create simulation scenarios in a medium sized classroom, with a traditional layout to compare with. It does however seem un- likely that it would contradict our current conclusions since all our results point towards the fact that room size itself has no major impact on the evacuation. Therefore, we still conclude that room layout is an important factor in emergency evacuations. The proximity of the exit(s) in relation to all agents is a key factor in evacuation time. From the evacuation processes of a single door at the back, it can be observed that the reason for the increased evacuation time is due to the fact that most agents reach the exit around the same time. This leads to heavy bottle-necking as all agents try to escape si- multaneously. This is similar to the so called ”faster-is-slower” effect. CHAPTER 5. DISCUSSION 27

In the case of a single exit at a side wall, the evacuation process hap- pens in a more orderly fashion since the agents walk in such a fashion that only a few of them arrive at the exit at the same time.

5.1.4 Summary Unfortunately, but somewhat expected, it seems that no exit config- uration is superior in all cases, at least not for the ones tested in this thesis. The only conclusions that can be drawn definitively seems to be that increasing the number of exits always decreases evacuation time up to a certain point where the improvements become negligible. In- creasing the exit width also decreases evacuation time. An important factor that is not often discussed in related research is how to place the classroom desks for optimal evacuation. Our results suggests that the internal table layout can have a bigger impact on evacuation time than exit configuration, but this needs further research before it can be said definitively.

5.2 Limitations

There are certain behaviours from people not present in the crowd sim- ulation. There is the panic factor that might arise in evacuation scenar- ios. In real life some people might even take a faster route by jumping over obstacles. The biggest limitation would then be the simulator itself since it could not simulate everything that plays into an evac- uation. However, this has to be the case with almost all simulations because there will always be unpredictable behavior in real people that cannot be covered in a simulation. Working with a perfect sim- ulation could make the times faster but might not necessarily change the results of which layouts are the best for evacuation. One thing that would probably affect the results the most are if people can change the layout of the classroom during the evacuation, by for example push- ing away certain furniture to create new paths to the exit. As we saw with the results, the biggest time saver would be to have more possi- ble paths to an exit. But in real life, it might also cause more trouble to push away the furniture, potentially blocking a person’s already de- cided path. 28 CHAPTER 5. DISCUSSION

5.3 Reflection

Sometimes, when discussing the results it is easy to forget that this was all made using a crowd simulation because of how realistic the results seem to be. This is thanks to the crowd simulation behaving correctly. For example it becomes slower when the people don’t have much space to move in, or it gets harder to exit the door when many people gather around it. Overall we think the crowd simulation has been a great and accurate tool for this thesis when comparing with previous research. It is of course not flawless because of people not being able to jump over tables or change their speeds in the middle of a run, but we still think that the improvement ratio of the different sce- narios should be accurate despite some of the non-accurate behaviour of the simulated people.

5.4 Future work

The biggest classroom we tested on could fit 60 people in it. At KTH, there exist even larger lecture halls, many of which can have around 200 people. Our general conclusion about better classroom layouts for evacuation might not apply to these larger classrooms because of their unique inside layout. In these rooms, the seats are located on different altitudes. Somebody might want to do research on how the inside of a very large lecture hall should be constructed for optimal evacuation, or just the inside of any classroom no matter what the size is since we mostly focused on exit sizes and placements. Room evacuation can of course also be extended to more than just classrooms. Classrooms are usually simple shaped rooms with most of them having a rectangular shape with simple layouts inside of them. Some businesses require the architects to be a bit more creative and different with their designs of a room. Therefore, there still exists other unique shapes or layouts of rooms that can be tested on to find what design choices lead to more harm than others in case of emergency. Since there are certain aspects of evacuations that cannot be simu- lated in our simulator, it would be interesting to confirm these results with other methods of simulation, or even real life studies. Finally, another good area of future work would be to do similar research as we have done, but this time with more realistic input in CHAPTER 5. DISCUSSION 29

the simulator. Examples of realistic input involve speeds and sizes on the people based on real-world data. Since our simulations were based on real classrooms, it is possible to conduct similar studies using real- life people. It would also be interesting to test these scenarios with the ability to change certain crowd behaviors, such as trying to simulate panic or erratic behaviors, which would occur in real situations. Chapter 6

Conclusion

Through simulating evacuation scenarios based on real classrooms in KTH Royal Institute of Technology and comparing the results with previous related works, the following conclusions were drawn: In the scenarios tested, two exits always resulted in faster evacua- tion compared to one exit. Further increasing the number of exits be- yond two does not show significant improvement in any of the tested scenarios, suggesting diminishing returns with increased number of exits. A double door at the back also decreases evacuation time com- pared to one door. However, which one of the configurations is opti- mal depends on how the furniture of the classroom is laid out. Con- trary to previous research, there is no configuration of exit placement, size, or number of exits that is optimal in all cases. The room layout is a key factor in evacuation time, so the exit configuration cannot be considered without also considering room layout. We have found that the classroom size has no major impact on which exit configuration is better.

30 Bibliography

[1] Johan Berglund and Richard Ristic. “High-density Real-time Vir- tual Crowds via Unilaterally Incompressible Fluid Simulation”. In: (2015), p. 8. [2] Zhao Daoliang, Yang Lizhong, and Li Jian. “Exit dynamics of occupant evacuation in an emergency”. In: Physica A: Statisti- cal Mechanics and its Applications 363.2 (2006), pp. 501–511. ISSN: 0378-4371. DOI: https://doi.org/10.1016/j.physa. 2005.08.012. URL: http://www.sciencedirect.com/ science/article/pii/S0378437105008447. [3] A Garcimartin et al. “Experimental evidence of the “Faster Is Slower” effect”. In: Transportation Research Procedia 2 (2014), pp. 760– 767. [4] Dirk Helbing. “A mathematical model for the behavior of pedes- trians”. In: Systems Research and Behavioral Science 36.4 (1991), pp. 298–310. [5] Dirk Helbing, Illés Farkas, and Tamás Vicsek. “Simulating dy- namical features of escape panic”. In: Nature (2000). DOI: 10 . 1038/35035023. URL: http://dx.doi.org/10.1038/ 35035023. [6] Dirk Helbing and Peter Molnar. “Social force model for pedes- trian dynamics”. In: Physical review E 51.5 (1995), p. 4282. [7] Dirk Helbing et al. “Lattice gas simulation of experimentally studied evacuation dynamics”. In: Physical review E 67.6 (2003), p. 067101. [8] Dirk Helbing et al. “Simulation of pedestrian crowds in normal and evacuation situations”. In: Pedestrian and evacuation dynamics 21.2 (2002), pp. 21–58.

31 32 BIBLIOGRAPHY

[9] Hai-Jun Huang and Ren-Yong Guo. “Static floor field and exit choice for pedestrian evacuation in rooms with internal obsta- cles and multiple exits”. In: Phys. Rev. E 78 (2 Aug. 2008), p. 021131. DOI: 10 . 1103 / PhysRevE . 78 . 021131. URL: https : / / link.aps.org/doi/10.1103/PhysRevE.78.021131. [10] Runjiao Liu, Difei Jiang, and Lei Shi. “Agent-based simulation of alternative classroom evacuation scenarios”. In: Frontiers of Ar- chitectural Research 5.1 (2016), pp. 111–125. ISSN: 2095-2635. DOI: https://doi.org/10.1016/j.foar.2015.12.002. URL: http://www.sciencedirect.com/science/article/ pii/S2095263515000710. [11] Rahul Narain et al. “Aggregate Dynamics for Dense Crowd Sim- ulation”. In: ACM Trans. Graph. 28.5 (Dec. 2009), 122:1–122:8. ISSN: 0730-0301. DOI: 10.1145/1618452.1618468. URL: http:// doi.acm.org.focus.lib.kth.se/10.1145/1618452. 1618468. [12] OSHA. “Design and construction requirements for exit routes”. In: Occupational Safety & Health Administration Standards 29-CFR 1910.36 (2014). URL: https://www.osha.gov/pls/oshaweb/ owadisp.show_document?p_table=STANDARDS&p_id= 9724. [13] Jack Shabo. “High Density Simulation of Crowds with Groups in Real-Time”. MA thesis. KTH, School of Computer Science and Communication (CSC), 2017, p. 100. [14] I. M. Sticco et al. “Beyond the faster-is-slower effect”. In: Phys. Rev. E 96 (5 2017), p. 052303. DOI: 10.1103/PhysRevE.96. 052303. URL: https://link.aps.org/doi/10.1103/ PhysRevE.96.052303. [15] I.M. Sticco et al. “Room evacuation through two contiguous ex- its”. In: Physica A: Statistical Mechanics and its Applications 474 (2017), pp. 172–185. ISSN: 0378-4371. DOI: https://doi.org/ 10 . 1016 / j . physa . 2017 . 01 . 079. URL: http : / / www . sciencedirect.com/science/article/pii/S0378437117300973. [16] Adrien Treuille, Seth Cooper, and Zoran Popovi´c.“Continuum Crowds”. In: ACM Trans. Graph. 25.3 (July 2006), pp. 1160–1168. ISSN: 0730-0301. DOI: 10.1145/1141911.1142008. URL: http: //doi.acm.org/10.1145/1141911.1142008. BIBLIOGRAPHY 33

[17] Unity Technologies. Unity [Software]. Version 2017.4.1f1. Apr. 27, 2018. URL: https://unity3d.com/unity. [18] A. Varas et al. “Cellular automaton model for evacuation process with obstacles”. In: Physica A: Statistical Mechanics and its Appli- cations 382.2 (2007), pp. 631–642. ISSN: 0378-4371. DOI: https: //doi.org/10.1016/j.physa.2007.04.006. URL: http: / / www . sciencedirect . com / science / article / pii / S0378437107003676. [19] Daichi Yanagisawa et al. “Introduction of frictional and turning function for pedestrian outflow with an obstacle”. In: Phys. Rev. E 80 (3 Sept. 2009), p. 036110. DOI: 10.1103/PhysRevE.80. 036110. URL: https://link.aps.org/doi/10.1103/ PhysRevE.80.036110. [20] Xiaoping Zheng, Tingkuan Zhong, and Mengting Liu. “Mod- eling crowd evacuation of a building based on seven method- ological approaches”. In: Building and Environment 44.3 (2009), pp. 437–445. www.kth.se