diff --git a/.gitignore b/.gitignore index 0f5d83b0cc4cb03547d60a11221b79b6e4e461fd..93231441511647ab2a709b05d30350a8d07cc707 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,6 @@ code/out/ /*.png code/debug.txt code/run.py +report/**/*.csv +report/texput.log +report/MatejSutyBP.bbl.bak diff --git a/code/debug.txt b/code/debug.txt index fdddf8d45930477264f7d5a63b0fc7897cb5ac90..c7a752a9e8ac04c26f5fd491352151a6756d6337 100644 --- a/code/debug.txt +++ b/code/debug.txt @@ -509861,3 +509861,57 @@ num_agents:70 strategy:new position:far {'S': 2, 'O': 0.5, 'D': 0.5, 'F': 0.9} +Wed May 12 15:46:39 2021 +Seed:5332239779 +Width:25 +Height:25 +gate:(24, 12) +num_agents:200 +strategy:new +position:far +{'S': 1.5, 'O': 1, 'D': 0, 'F': 1} +Wed May 12 15:46:40 2021 +Seed:4653409147 +Width:25 +Height:25 +gate:(24, 12) +num_agents:200 +strategy:new +position:far +{'S': 1.5, 'O': 1, 'D': 0, 'F': 1} +Wed May 12 15:46:46 2021 +Seed:921641008 +Width:25 +Height:25 +gate:(24, 12) +num_agents:400 +strategy:new +position:far +{'S': 1.5, 'O': 1, 'D': 0, 'F': 1} +Wed May 12 15:46:47 2021 +Seed:4399473833 +Width:25 +Height:25 +gate:(24, 12) +num_agents:400 +strategy:new +position:far +{'S': 1.5, 'O': 1, 'D': 0, 'F': 1} +Wed May 12 15:47:27 2021 +Seed:4010389224 +Width:25 +Height:25 +gate:(24, 12) +num_agents:300 +strategy:new +position:far +{'S': 1.5, 'O': 1, 'D': 0, 'F': 1} +Wed May 12 15:47:28 2021 +Seed:2551849780 +Width:25 +Height:25 +gate:(24, 12) +num_agents:300 +strategy:new +position:far +{'S': 1.5, 'O': 1, 'D': 0, 'F': 1} diff --git a/code/run.py b/code/run.py index 1d696b2ed37b509413ac79bd95037818f88def3f..2ddb24c181848ff885dfd7a2b314f43c9a6a7bd5 100644 --- a/code/run.py +++ b/code/run.py @@ -558,6 +558,8 @@ def box_plot(ax, data, edge_color, fill_color): else: for patch in bp['boxes']: patch.set(facecolor=fill_color) + + def n_ks(settings): width = settings['width'] height = settings['height'] @@ -750,31 +752,48 @@ if __name__ == '__main__': #model = large() # - # run = False - # if run: - # tet = [] - # for i in range(0, 1000): - # if i % 128 == 0: - # print(i) - # model = simpleHetero() - # while model.running: - # model.step() - # tet.append(model.epoch) - # f = open('out/hetero/homoB2.obj', 'wb') - # pickle.dump(tet, f) - # else: - # f1 = open('out/hetero/homoB2.obj', 'rb') - # f2 = open('out/hetero/heteroB2.obj', 'rb') - # d1 = pickle.load(f1) - # d2 = pickle.load(f2) - # plt.hist(d1, label='Homogeneous kO', alpha=.7, edgecolor='red') - # plt.ylim(0, 350) - # plt.hist(d2, label="Heterogeneous kO", alpha=.7, edgecolor='yellow') - # plt.title("Heterogeneity in parameter kO") - # plt.xlabel("TET") - # plt.legend() - # plt.savefig("out/hetero/heteroB2.pdf") - # plt.show() + run = False + if run: + tet = [] + for i in range(0, 1000): + if i % 128 == 0: + print(i) + model = simpleHetero() + while model.running: + model.step() + tet.append(model.epoch) + f = open('out/hetero/homoB2.obj', 'wb') + pickle.dump(tet, f) + else: + first = False + if first: + f1 = open('out/hetero/homoA2.obj', 'rb') + f2 = open('out/hetero/heteroA2.obj', 'rb') + d1 = pickle.load(f1) + d2 = pickle.load(f2) + plt.hist(d1, range=(80, 95), bins=10, label='Homogeneous kO', alpha=.7, edgecolor='red') + plt.ylim(0, 400) + plt.hist(d2, range=(80, 95), bins=10, label="Heterogeneous kO", alpha=.7, edgecolor='yellow') + plt.title("Heterogeneity in parameter kO, low friction") + plt.xlabel("TET") + plt.legend() + plt.savefig("out/hetero/heteroE_A2.pdf") + plt.show() + else: + f1 = open('out/hetero/homoB2.obj', 'rb') + f2 = open('out/hetero/heteroB2.obj', 'rb') + d1 = pickle.load(f1) + d2 = pickle.load(f2) + plt.hist(d1, range=(80, 130), bins=10, label='Homogeneous kO', alpha=.7, edgecolor='red') + plt.ylim(0, 600) + plt.hist(d2, range=(80, 130), bins=10, label="Heterogeneous kO", alpha=.7, edgecolor='yellow') + plt.title("Heterogeneity in parameter kO, high friction") + plt.xlabel("TET") + plt.legend() + plt.savefig("out/hetero/heteroE_B2.pdf") + plt.show() + + # for repeat in range(100): # batch_param_comb() # sampleEvaluation() @@ -796,7 +815,7 @@ if __name__ == '__main__': } filepath = 'out/hmap15_(s25-o03-d05-f05-n70)' # n_dep(settings) - depickle2() + #depickle2() #n_ks(settings) #depickle_nns() #batch_sample(settings, iterations=100, max_iterations=500, filepath=filepath) diff --git a/report/MatejSutyBP.bib b/report/MatejSutyBP.bib index c26571d84cb5843348088b7e44cad5d3d809f409..8fd20b792fc810afca59038ff44fca4ca3f56b95 100644 --- a/report/MatejSutyBP.bib +++ b/report/MatejSutyBP.bib @@ -753,16 +753,60 @@ issn={2184-3228}, @inproceedings{Surynek2010OnTI, title={On the Intractability of the Optimal Multi-robot Path Planning}, author={Pavel Surynek}, - year={2010} + year={2010}, + url={ } +@Article{kosterSA, +AUTHOR = {Rahn, Simon and Gödel, Marion and Fischer, Rainer and Köster, Gerta}, +TITLE = {Dynamics of a Simulated Demonstration March: An Efficient Sensitivity Analysis}, +JOURNAL = {Sustainability}, +VOLUME = {13}, +YEAR = {2021}, +NUMBER = {6}, +ARTICLE-NUMBER = {3455}, +URL = {https://www.mdpi.com/2071-1050/13/6/3455}, +ISSN = {2071-1050}, +ABSTRACT = {Protest demonstrations are a manifestation of fundamental rights. Authorities are responsible for guiding protesters safely along predefined routes, typically set in an urban built environment. Microscopic crowd simulations support decision-makers in finding sustainable crowd management strategies. Planning routes usually requires knowledge about the length of the demonstration march. This case study quantifies the impact of two uncertain parameters, the number of protesters and the standard deviation of their free-flow speeds, on the length of a protest march through Kaiserslautern, Germany. Over 1000 participants walking through more than 100,000 m2 lead to a computationally demanding model that cannot be analyzed with a standard Monte Carlo ansatz. We select and apply analysis methods that are efficient for large topographies. This combination constitutes the main novelty of this paper: We compute Sobol’ indices with two different methods, based on polynomial chaos expansions, for a down-scaled version of the original set-up and compare them to Monte Carlo computations. We employ the more accurate of the approaches for the full-scale scenario. The global sensitivity analysis reveals a shift in the governing parameter from the number of protesters to the standard deviation of their free-flow speeds over time, stressing the benefits of a time-dependent analysis. We discuss typical actions, for example floats that reduce the variation of the free-flow speed, and their effectiveness in view of the findings.}, +DOI = {10.3390/su13063455} +} + + + +@article{nishinariSA, +title = {Measurement of congestion and intrinsic risk in pedestrian crowds}, +journal = {Transportation Research Part C: Emerging Technologies}, +volume = {91}, +pages = {124-155}, +year = {2018}, +issn = {0968-090X}, +doi = {https://doi.org/10.1016/j.trc.2018.03.027}, +url = {https://www.sciencedirect.com/science/article/pii/S0968090X18304133}, +author = {Claudio Feliciani and Katsuhiro Nishinari}, +keywords = {Pedestrian dynamics, Crowd management, Congestion, Fundamental diagram, Pedestrian safety, Crowd control}, +abstract = {In this study, we present a method to quantify the amount of congestion and the intrinsic risk in pedestrian crowds. Levels of congestion are estimated based on the velocity vector field obtained from the analysis of video recordings of moving crowds. By using data collected during supervised experiments, we show that the so-called “congestion level” allows to define a threshold for congestion under safe conditions and to measure the smoothness of pedestrian flows. The proposed approach has been compared with alternative quantities such as density, flow or the “crowd pressure” showing a more universal and consistent description of crowd motion. Later, the “crowd danger” of different pedestrian streams has been computed confirming that multidirectional motion is more dangerous than unidirectional one for equal levels of density. From a more practical perspective, the congestion level allowed to get a complete picture of the region in front of bottlenecks and to identify the formation of organized structures also under constant density and flow conditions. In addition, since only velocities are used in the computational process of the congestion level, it is more suitable for applications involving computer vision and emerging technologies, since density is usually difficult to obtain in very crowded situations. The congestion level and the crowd danger may help in the design of pedestrian facilities by simplifying interpretation of results from simulation and efficiently identify hotspots or design flaws. Finally, crowd control may benefit from the methods presented by potentially allowing a clear identification of dangerous locations during mass events.} +} + + +@article{FF_example, +title = {An extended floor field model considering the spread of fire and detour behavior}, +journal = {Physica A: Statistical Mechanics and its Applications}, +pages = {126069}, +year = {2021}, +issn = {0378-4371}, +doi = {https://doi.org/10.1016/j.physa.2021.126069}, +url = {https://www.sciencedirect.com/science/article/pii/S0378437121003423}, +author = {Minhyuck Lee and Jaeyoung Lee and Chulmin Jun}, +keywords = {Evacuation simulation, Floor field model (FFM), Fire spreading, Detour behavior}, +abstract = {In this study, we propose an extended floor field model considering the spread of fire and detour behavior. The model includes fire spreading field and fire recognition field. An agent who recognized fire makes a detour to an exit with the lowest risk considering transition probability based on the weighted static floor field. The improved transition probability takes into account the visibility of agent reduced by smoke diffusion. The proposed model differs significantly from the related models in that the agent dynamically chooses a safe path when it detects a fire. Compared to simulations using commercial software, the proposed model predicted longer evacuation times and a very small number of agents inhaling smoke. In particular, the proposed model implemented realistic pedestrian movements, such as trying to move away from the space filled with smoke.} +} diff --git a/report/MatejSutyBP.pdf b/report/MatejSutyBP.pdf index ef18f5e5e7a06aaec6e6306892f5db8d7b03129a..33bdf3fdfc1eecbb0f8c976643ed6772f4b90465 100644 Binary files a/report/MatejSutyBP.pdf and b/report/MatejSutyBP.pdf differ diff --git a/report/MatejSutyBP.tex b/report/MatejSutyBP.tex index 25e6a1a3b0ba92b02e11edfeb43cb30595c3d292..b2caf98440342a8e35a93d595a254c98156b27ef 100644 --- a/report/MatejSutyBP.tex +++ b/report/MatejSutyBP.tex @@ -23,6 +23,7 @@ \usepackage{subcaption} \usepackage{comment} \usepackage{emptypage} +\usepackage{pdfpages} %\usepackage{titleref} % \usepackage{dirtree} %directory tree visualisation @@ -81,7 +82,7 @@ Agentn{\' i} celul{\' a}rn{\' i} modely mohou b{\' y}t pou{\v z}ity pro simulaci The ability to predict and model the movement of pedestrians during evacuation is valuable knowledge. Understanding human behavior was always challenging, yet even individual activities such as movement are difficult to determine reliably. Pedestrian movement can be examined by physics, sociology, or psychology, but these methods fall short in complicated scenarios. -Increasing demands on safety procedures in buildings or during various events, such as evacuation, or demonstration, call for answers on pedestrian dynamics. Some available solutions provide precise simulations on how people move and interact, and others focus on real-time results and adaptation to a fast-changing environment. This thesis aims to simulate the people during an evacuation and predict their behavior. +Increasing demands on safety procedures in buildings or during various events, such as evacuation, or demonstration, call for answers on pedestrian dynamics. Some available solutions provide precise simulations on how people move and interact, and others focus on real-time results and adaptation to a fast-changing environment. The environment and setting are specific for each building, location, and various groups of people. It is essential to understand the influence of individual parameters on the process with so many possible settings. Simulating the process on a whole parametric space is very slow and could be sped up using only the significant parameters selected by sensitivity analysis. @@ -90,30 +91,31 @@ The environment and setting are specific for each building, location, and variou This careful selection of input parameters for the evacuation model can produce results faster and more precisely by providing insight into the importance of individual parameters. Understanding the evacuation process better, we can overcome critical situations that might lead to the loss of lives. -An experiment of pedestrian dynamics in a room was performed in 2012 at Czech technical university in Prague. The experiment was supervised by Pavel Hrab{\'a}k, and the results were used to create a model for simulating the pedestrian movement. I was offered to extend the capabilities of the model and perform further research to simulate the evacuations more precisely. The precision depends on key observable results, such as the duration of the complete evacuation and the flow of pedestrians through an exit. +An experiment of pedestrian dynamics in a room was performed in at Czech technical university in Prague. The experiment was supervised by Pavel Hrab{\'a}k, and the results were used to create a model for simulating the pedestrian movement. I was offered to extend the capabilities of the model and perform further research to simulate the evacuations more precisely. The precision depends on key observable results, such as total evacuation time and the flow of pedestrians through an exit. The multi-agent model I implemented in this thesis is inspired by floor-field cellular model. Cellular models are surprisingly capable of capturing complex phenomena and processes with only a simple set of rules. -This thesis focused on improving the feature of conflict solution and provides a new approach to the movement of agents in the model. The improvements are linked to the sensitivity of agents to the environment. +This thesis focuses on improving the feature of conflict solution and provides a new approach to the movement of agents in the model. The improvements are linked to the sensitivity parameters of agents to the environment. %The sensitivity analysis will show the corresponding contribution of input parameters to the variance in results. The final contribution of this thesis is the sensitivity analysis of input parameters to the variance in observable quantities, namely the total evacuation time. -This thesis is organized as follows: Chapter~\ref{chapter_state} focuses on the research of current approaches and trends used to model pedestrian dynamics. The distinction between microscopic and macroscopic models is explained. The inspiration for the model used in this thesis is mentioned as well. - +This thesis is organized as follows: +Chapter~\ref{chapter_state} focuses on the research of current approaches and trends used to model pedestrian dynamics. The distinction between microscopic and macroscopic models is explained. The inspiration for the model used in this thesis is mentioned and briefly explained, as well as several current models for pedestrian dynamics are described. The essential contribution of this thesis dwells in the research of sensitivity analysis (SA). The exact form of SA used in this thesis is highlighted. - - The following Chapter~\ref{chapter_real} explains the theory and the practice of the model. The first part in Section~\ref{sec_model_def} provides the theoretical fundamentals for the evacuation model --- the core components of the model and the mathematical methods. Later in Section~\ref{sec_implement} the software tools used in this research are mentioned . The particular implementation of components in the evacuation model is described. % In tandem with source code documentation in the Appendix, this section can be used to reproduce the evacuation model. The model framework is flexible and can be extended to provide more features. +The approach to sensitivity analysis is described in Chapter~\ref{chapter_analysis_design}, where necessary components of the analysis are explained (input parameters, observable quantitities, methods of SA). +The data and results gathered from simulations are analyzed in Chapter~\ref{chapter_analysis_design}. -The data and results gathered from simulations are analyzed in Chapter~\ref{chapter_analysis_design}. The spotlight is on global sensitivity analysis of input variables and their contribution to the variance of observable quantities.. The individual contributions present a better understanding of the evacuation is simulated. +The following Chapter~\ref{chapter_results} shows the results of analysis on the simulation data. The spotlight is on global sensitivity analysis of individual input variables and their contribution to the variance of observable quantities. The individual contributions present a better understanding of how the evacuation is simulated. +In the end, new discoveries are explained and summarized. Results and discoveries of this thesis can be further researched and analyzed. @@ -172,7 +174,7 @@ The open source evacuation simulator framework JuPedSim~\cite{jupedsim} utilizes The microscopic pedestrian and crowd dynamics can also be simulated by Vadere, an open source framework developed by the research group of Gerta Köster at the Department of Computer Science and Mathematics at the Munich University of Applied Sciences~\cite{abm_munich_exp_2_model}. Compared to JuPedSim, Vadere allows only two-dimensional systems. Vadere is based on Optimal Steps Model (OSM) that utilizes several layers: locomotion, individual and interaction. The locomotion layer uses continuous geometry and models the way in which people move, according to the dynamic navigation field that is updated at each time step. The OSM introduces real human step that adjusts to various situations, e.g. the steps are shorter when pedestrian is confronted with dense crowd and slows down. What follows is the individual layer, that describes the characteristics of each person - space requirements, desired speed, individual plans\dots{} Some of these parameters are assigned default values, which are derived from studies of the pedestrian flow~\cite{vadere_default_vals}. The last layer is the interaction layer that models social and environment interactions.\newline -R{\' o}bert Selvek from the Faculty of information technologies at Czech technical university in Prague proposed algorithm LC-MAE (Local Cooperative Multi Agent Evacuation). His algorithm assumes several types of agents with different levels of rationality, who move on a undirected graph from endangered part into the safe part as quickly as possible. It is achieved by local planning of agents and their paths. Compared to solutions using network flow and centralized planning, his solution produces results worse only by a small factor~\cite{selvek}. +Selvek from the Faculty of information technologies at Czech technical university in Prague proposed algorithm LC-MAE (Local Cooperative Multi Agent Evacuation). His algorithm assumes several types of agents with different levels of rationality, who move on a undirected graph from endangered part into the safe part as quickly as possible. It is achieved by local planning of agents and their paths. Compared to solutions using network flow and centralized planning, his solution produces results worse only by a small factor~\cite{selvek}. The goal of this thesis is different from the research of Selvek, as the cellular evacuation model in this thesis does not aim to calculate the fastest or most optimal evacuation plan, but rather models the behavior of pedestrian during evacuation based on input parameters.. The contribution of this thesis lies in the study of microscopic processes within the model, and SA of individual input parameters. @@ -201,13 +203,15 @@ The update rules of said~CA are: Detailed description of the procedures and components is in the Section~\ref{sec_model_def}. The course of the simulation is affected by a set of parameters which are explained in said section as well. These parameters will by analyzed by means of sensitivity analysis, described below in Section \ref{chapter_1_sensitivity}. \section{Sensitivity analysis}\label{chapter_1_sensitivity} -The research experience on this topic calls for a efficient computation and careful selection of input parameters due to high computational cost of microscopic pedestrian dynamics models. The stochastic selection used in simulation adds uncertainty to the model --- the output varies for the same input parameters. As such it is an expected feature because it imitates the randomness of human behavior. +The research experience on this topic calls for a efficient computation and careful selection of input parameters. The stochastic selection used in simulation adds uncertainty to the model --- the output varies for the same input parameters. As such, it is an expected feature because it imitates the randomness of human behavior. \textit{"Aleatory uncertainty, also called stochastic or variable uncertainty, refers to uncertainty that cannot be reduced by more exhaustive measurements or a better model. Epistemic uncertainty, or subjective uncertainty, on the other hand, refers to uncertainty that can be reduced"}~\cite{types_of_uncertainity}. Sensitivity analysis used in this thesis analyzes the epistemic uncertainty of results that is affected by input parameters with the OptiSLang software. -There are various other ways to calculate the influence of input parameters. A detailed overview can be found in Article ~\cite{types_of_sensitivity_analysis}. +Current research of evacuation models also focuses on sensitivity analysis of uncertain input parameters and their contribution to simulation output. In Article~\cite{kosterSA}, K{\"o}ster et al. use SA to study the influence of two input parameters, number of protesters and standard deviation of their free-flow speed, on the length of the protest march. Their method of SA computes Sobol’ indices with methods based on polynomial chaos expansions. Other research was performed by Claudio Feliciani and Katsuhiro Nishinari who present a method to quantify the amount of congestion in pedestrian crowds, which is estimated on the velocity vector field obtained from video recordings of moving crowds. To find the best parameter combination of the vector field, methods of SA were utilized ~\cite{nishinariSA}. + +There are several other ways to calculate the influence of input parameters, detailed overview can be found in Article ~\cite{types_of_sensitivity_analysis}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -236,21 +240,33 @@ At this moment there are only a few software solutions available which focus on \chapter{Realisation}\label{chapter_real} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Model definition}\label{sec_model_def} -As the core topic in this thesis, evacuation is the process of moving people from a place, possibly dangerous, to somewhere safe. The evacuation model in this thesis represents the people in evacuation as agents who move on a grid that acts as a room or other area. The grid is two-dimensional and consists of discreet cells. Cells are occupied by agents that move from one cell to another in 8 directions or stay in the same cell. The movement in the model is strictly discrete due to the nature of the cellular model. Movements are executed simultaneously, which leads to conflicts when two or more agents attempt to enter the same cell. Only one agent can be present in a cell at a time. +Evacuation, core topic of this thesis, is the process of moving people from a place, possibly dangerous, to somewhere safe. The evacuation model in this thesis represents the people in evacuation as agents who move on a grid that acts as a room or other area. The grid is two-dimensional, rectangular, and consists of discreet cells. Cells can be occupied by agents who move from one cell to another in 8 directions or stay in the same cell. The movement in the model is strictly discrete due to the nature of the cellular model. Movements are executed simultaneously, which leads to conflicts when two or more agents attempt to enter the same cell. Only one agent can be present in a cell at a time. -The agents are somewhat autonomous and react to the environment. They generally move in the direction to the exit. In this model, only one exit is used. Because the exit is a cell, only one agent can leave the room at every synchronous update of the simulation. There is an interaction with agents in adjacent cells. +The agents are somewhat autonomous and react to the environment. They generally move in the direction to the exit. In this paper, only grid with one exit is considered~\cite{FAST_imp}. Because the exit is a cell, only one agent can leave the room at every synchronous update of the simulation. There is an interaction with agents in adjacent cells. -The collective motion of agents is reproduced using various strategies: choosing destination cell and solving conflicts, and using heterogeneity in the parameters. The strategies work with parameters of aggressivity and sensitivity of each agent. The parameter of aggressivity plays a role in situations when two or more agents attempt to enter the same cell. -\pagebreak +\begin{figure}[h!] +\begin{center} + \begin{subfigure}[b]{1\linewidth} + \includegraphics[width=\linewidth]{img/raster/FFmodel.jpg} + + \end{subfigure} +\end{center} + \caption{Example of cellular floor-field model utilizing \textit{static} and \textit{dynamic} field, where agent can move to cells in Moore neighbourhood. \textit{Taken from~\cite{FF_example}.}} + \label{fig:cell} +\end{figure} + + +The collective motion of agents is reproduced using various strategies: choosing destination cell and solving conflicts, and using heterogeneity in the parameters. The strategies are affected by parameters of aggressivity and sensitivity of each agent and by parameter of friction. The parameter of aggressivity plays a role in situations when two or more agents attempt to enter the same cell. + \subsection{Components} \subsubsection*{AGENT}\label{agent} -Model is populated with $n$ agents which are placed to positions furthest away from the exit. Agents have specific parameters such as aggressivity $\gamma\in{[0, 1]}$, period of update $\tau\in{\mathbb{R}}$ and sensitivity parameters: potential $k_S\in{\mathbb{R}}$, occupancy $k_O\in{[0, 1]}$, diagonal movement $k_D\in{[0, 1]}$. +Model is populated with $n$ agents which are placed to unique positions on the grid. Agents have specific parameters such as aggressivity $\gamma\in{[0, 1]}$, inner time period $\tau\in{\mathbb{R}}$ and sensitivity parameters: to \textit{static} potential $k_S\in{\mathbb{R}}$, to occupancy $k_O\in{[0, 1]}$, to diagonal movement $k_D\in{[0, 1]}$. \paragraph*{} There are various ways to assign aggressivity $\gamma$ to agents: @@ -264,31 +280,30 @@ Each agent can move to 8 adjacent cells in the Moore neighborhood~\cite{moore_ne \subsubsection*{GRID}\label{grid} The space in which agents move is a -rectangular two-dimensional grid $G\subset\mathbb{Z}^2$ of width $W$ and height $H$. On every position -$(y_1, y_2):~y_1\in{\{0,1,\dots{},W-1\}},$ $y_2~\in{\{0,1,\dots{},H-1\}}$ is a cell $y$. Agents cannot leave the grid other than through the exit placed on the border of grid. Corresponding to real world the grid is \textit{not} spherical and it is not possible for agents to move from a cell on border and appear in a cell on the opposite side. +rectangular two-dimensional grid $G\subset\mathbb{Z}^2$ of width $W$ and height $H$. Grid consists of cells, which position is $(y_1, y_2):~y_1\in{\{0,1,\dots{},W-1\}},$ $y_2~\in{\{0,1,\dots{},H-1\}}$. Agents cannot leave the grid otherwise than through the exit placed on the border of grid. Corresponding to real world the grid is \textit{not} spherical and it is not possible for agents to move from a cell on border and appear in a cell on the opposite side. \subsubsection*{EXIT}\label{exit} -Agents can leave the grid only through exit cell $e$ placed on the border of the grid. Exit has the lowest static potential $S(e)=0$. This models uses only one exit. +Agents can leave the grid only through exit cell $e$ placed on the border of the grid. Exit has the lowest static potential $S(e)=0$. In this thesis, only one exit is considered. The moment when an agent moves to exit, he is removed from the grid. In each time-frame, only one agent can move to exit. \subsubsection*{STEP}\label{step} -Evacuation is simulated in a sequence of $m$ steps $\{s_1,\dots{},s_m\}$ executed by model. Each step consists of several phases (see Section \ref{schedule}) to select destination cells for agents, solve conflicts and move agents on grid. In this thesis, terms step and epoch are used interchangeably. The term step is used mostly during theoretical explanation of model and it's components, while epoch is mentioned in simulations and explanation of various phenomena during evacuations. +Evacuation is simulated in a sequence of $m$ steps $\{s_1,\dots{},s_m\}$ executed by model. Each step consists of several phases (see Section \ref{schedule}): selection of destination cells, conflict solution, agent movement \dots In this thesis, terms step and epoch are used interchangeably. The term step is used mostly during theoretical explanation of the model and it's components, while epoch is mentioned in simulations and explanation of various phenomena during evacuations. \subsubsection*{TIME FRAME}\label{tf} Continuous real life duration $T$ of evacuation is divided to $k$ time-frames $\textbf{t}=\{t_1,\dots{},t_k\}$. -One step $s_i$ of model takes $l=[t_i, t_{i+1}]$ time. Time-frame $t_i$ covers one step $s_i$ of model. - Agents move in two-dimensional grid in 8~directions. The vertical or horizontal movement takes nominal duration of $\tau$. The movement in diagonal direction takes $\sqrt{2}$ times longer. To allow for more periodic update $\sqrt{2}$ is approximated by rational constant $\frac{3}{2}$~\cite{timespan} resulting in duration of diagonal movement equal to $\frac{3}{2}\cdot{}\tau$. +One step $s_i$ of model takes $l=[t_i, t_{i+1}]$ time. Time-frame $t_i$ covers one step $s_i$ of the evacuation process. + Agents move in two-dimensional grid in 8~directions. In this thesis, all agents have uniform inner time period $\tau$, which is the duration of nominal vertical or horizontal movement. The movement in diagonal direction takes $\sqrt{2}$ times longer. To allow for more periodic update, $\sqrt{2}$ is approximated by rational constant $\frac{3}{2}$~\cite{timespan} resulting in duration of diagonal movement equal to $\frac{3}{2}\cdot{}\tau$. Because all agents have identical $\tau$, one step of the model takes $l=\tau$ time. The model implementation can assign heterogeneous $\tau$ to agents, but this would not contribute to the goal of this thesis. Detailed description of heterogeneity in velocity of agents and the impact on evacuation can be found in~\cite{timespan}. \subsubsection*{CELLS}\label{cells} Cell $y$ is an element of grid $G$ in position $(y_1, y_2):~y_1\in{\{0,1,\dots{},W-1\}},$ $y_2~\in{\{0,1,\dots{},H-1\}}$. -Each cell can be occupied by one agent at a given time-frame. Agents can move in 8 directions to cells in Moore neighborhood or decide to stay in the same cell. +Each cell can be occupied at most by one agent at a given time-frame. Agents can move in 8 directions to cells in Moore neighborhood or decide to stay in the same cell. The choice of Von Neumann neighborhood was rejected, because it does not allow agents to execute diagonal movement, which is influenced by $k_D$ and thus essential. %CHANGE THIS CHANGE THIS CHANGE THIS NOT NORMALIZED -Cell $y$ holds the normalized value of static potential $S_{norm}(y)\in{[0,1]}$. These values are normalized to fit the lowest value at exit $e: S(e) = 0$ and the highest value of cell $y: S(y) = q, q\in{\mathbb{R}}$ that is furthest away from the exit. -For cell $y$ and exit $e$ in grid $G$ is $S(y) = L_1(y, e)$ where $L_1(y, e)$ is Manhattan distance~\cite{distance_metric} from cell $y$ to exit $e$. +Cell $y$ holds the value of static potential $S(y)\in{\mathbb{R}}$. +For cell $y$ and exit $e$ in grid $G$ is $S(y) = L_1(y, e)$ where $L_1(y, e)$ is Manhattan distance~\cite{distance_metric} from cell $y$ to exit $e$. The function of static potential could be different, for example shortest distance to exit calculated with Dijkstra algorithm. In this thesis rectangular room without obstacles is considered, so $L_1$ distance metric calculates shortest distance to exit. \begin{figure}[h!] @@ -306,7 +321,7 @@ For cell $y$ and exit $e$ in grid $G$ is $S(y) = L_1(y, e)$ where $L_1(y, e)$ is \subsection{Methods} \subsubsection*{STRATEGY FOR CHOOSING DESTINATION CELL}\label{strategy_destination_cell} -In each step of the simulation, all agents calculate the individual attractiveness $P$ of cells in their neighborhood $N$. Attractiveness or attractivity $P\in{[0,1]}$ is the probability of agent selecting this cell as his preferred destination cell. The selection is executed in stochastic manner. +In each step of the simulation, all agents calculate the attractivity of individual cells in their neighborhood $N$. $N$ is a set of adjacent cells to the cell occupied by agent, and the occupied cell as well. Attractiveness or attractivity is used to calculate probability $P\in{[0,1]}$, which is the probability of agent selecting this cell as his preferred destination cell. The selection is executed in stochastic manner. Value of attractiveness depends on strategy for choosing destination cell. In the equations below can be found following members: @@ -315,36 +330,35 @@ $O(y)$ is the indicator of occupied cell $y$. When $y$ is occupied by an agent, $D(y)$ is the indicator of diagonal motion from agent's origin cell $x$ to destination cell $y$. When $y$ can be entered from $x$ by diagonal motion, $D(y)=1$, otherwise it is zero. Associated parameter $k_D$ is the sensitivity of agent to diagonal motion. \begin{itemize} - \item \textbf{Strategy $A$:} -Strategy $A$ was described by Pavel Hrab{\' a}k and Marek Buk{\'a}{\v c}ek in Article~~\cite{aggressive}. Attractivity $P$ of agent, who is in cell $x$, moving to adjacent cell~$y\in{N}$ is: +Strategy $A$ was described by Pavel Hrab{\' a}k and Marek Buk{\'a}{\v c}ek in Article~~\cite{aggressive}. Probability $P$ of agent, who is in cell $x$, moving to adjacent cell~$y\in{N}$ is: \begin{equation}\label{dest_strat_old} -P(y\leftarrow{}x \mid{}x) = \frac{\exp(-k_SS(y))(1 - k_OO(y))(1 - k_DD(y))} {\sum_{z\in{N}} \exp(-k_SS(z))(1 - k_OO(z)(1 - k_DD(z))} +P(y\leftarrow{}x \mid{}N) = \frac{\exp(-k_SS(y))(1 - k_OO(y))(1 - k_DD(y))} {\sum_{z\in{N}} \exp(-k_SS(z))(1 - k_OO(z)(1 - k_DD(z))} \end{equation} - +The nominator is the attractivity of cell $y$ to agent, which is normalized with attractivites of other cells in $N$ and thus can be used as probability. \item \textbf{Strategy $B$:} -Strategy $B$, introduced in this thesis, is more affected by the sensitivity to the occupancy of cells $k_O$. Attractivity $P$ of agent moving to cell~$y$ from cell~$x$, is calculated from $P_O$ and $P_S$. +Strategy $B$, introduced in this thesis, is more affected by the sensitivity to the occupancy of cells $k_O$. Probability $P$ of agent moving to cell~$y$ from cell~$x$, is calculated from $P_O$ and $P_S$. \begin{equation}\label{dest_strat_mix} -P(y\leftarrow{}x \mid{}x) = k_OP_O(y) + (1 - k_O)P_S(y) +P(y\leftarrow{}x \mid{}N) = k_OP_O(y) + (1 - k_O)P_S(y) \end{equation} -The term $P_O$ contributes to attractiveness with focus on occupancy. Notice the missing parameter $k_O$ in $(1-O(y))$ which is different from strategy $A$. Term is normalized across neighbor cells $N$ of $x$. +The term $P_O$ focuses on occupancy of cell. Notice the missing parameter $k_O$ in $(1-O(y))$ which is different from strategy $A$. Term $P_O$ is normalized across $P_O$ of neighbor cells from $N$. \begin{equation}\label{dest_strat_po} P_O(y) = \frac{\exp(-k_SS(y))(1 - O(y))(1 - k_DD(y))}{\sum_{z\in{N}} \exp(-k_SS(z))(1 - O(z)(1 - k_DD(z))} \end{equation} -The term $P_S$ takes into account only the static potential $S(y)$ and makes the agent move in the correct direction to the exit. This term is also normalized across neighbor cells $N$ of $x$. +The term $P_S$ takes into account the static potential $S(y)$ and makes the agent move in the correct direction to the exit, and the indicator of diagonal motion $D(y)$. Term $P_S$ is also normalized across neighbor cells from $N$. \begin{equation}\label{dest_strat_ps} P_S(y) = \frac{\exp(-k_SS(y))(1 - k_DD(y))}{\sum_{z\in{N}} \exp(-k_SS(z))(1 - k_DD(z))} \end{equation} \end{itemize} -\pagebreak + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{comment} @@ -373,7 +387,7 @@ P_S(y) = \frac{\exp(-k_SS(y))(1 - k_DD(y))}{\sum_{z\in{N}} \exp(-k_SS(z))(1 - k \includegraphics[width=\linewidth]{img/vector/situation_color.pdf} \end{subfigure} - \caption{Situation of agent A moving to exit. Agent B is in the way.} + \caption{Situation of two agents $\protect{A}$ and $\protect{B}$. Agent $B$ is blocking the exit for the other agent.} \label{fig_strat_choosing} \end{figure} @@ -381,7 +395,7 @@ P_S(y) = \frac{\exp(-k_SS(y))(1 - k_DD(y))}{\sum_{z\in{N}} \exp(-k_SS(z))(1 - k -Figure~\ref{fig_strat_choosing} presents a situation of agent~$A$ moving to $exit$ when agent~$B$ stands in the way. Cells are colored and numbered in correspondence to the graph legend in Figure~\ref{fig_comparison_strat_choosing}. Agent $A$ calculates the probabilities of transition to cells $0,\dots,8$ based on \textit{strategy for choosing destination cell.} +Figure~\ref{fig_strat_choosing} presents a situation, where agent~$A$ has blocked path to $exit$ --- agent~$B$ stands in the way. Cells are colored and numbered in correspondence to the graph legend in Figure~\ref{fig_comparison_strat_choosing}. Agent $A$ calculates the probabilities of transition to cells $0,\dots,8$ based on \textit{strategy for choosing destination cell.} @@ -394,19 +408,19 @@ Figure~\ref{fig_strat_choosing} presents a situation of agent~$A$ moving to $exi \includegraphics[width=\linewidth]{img/vector/2OLD-15-05.pdf} \caption{Old strategy $\protect{A}$.} \end{subfigure} - \caption{Comparison of strategies for choosing destination cell. Attractiveness of adjacent cells calculated for agent A in situation with blocked exit, see Figure~\ref{fig_strat_choosing}. Parameters:~$\protect{k_S=1.5,~k_D=0.5}$. On the left is the new \textit{strategy~B}, that produces more even distribution of attractivity of adjacent cells. This way the impact of $\protect{k_O}$ can be explained better.} + \caption{Comparison of strategies for choosing destination cell. Different colors show probabilities of moving to cells in neighborhood calculated for agent A in situation with blocked exit, see Figure~\ref{fig_strat_choosing}. Numbering in legend corresponds to cell numbering in Figure~\ref{fig_strat_choosing}, Parameters:~$\protect{k_S=1.5,~k_D=0.5}$. On the left is the new \textit{strategy~B}, that produces more even probability distribution of moving to adjacent cells. This way the impact of $\protect{k_O}$ can be explained in a more clear way.} \label{fig_comparison_strat_choosing} \end{figure} -Figure~\ref{fig_comparison_strat_choosing} shows the differences in probabilities of transition to adjacent cells of agent $A$. This $100\%$ stacked graph depends on the parameter of sensitivity to occupancy $k_O$ on the $x$-axis. With lower $k_O$, the agent is more likely to enter an occupied cell. We can see, in both strategies, that in low values, agent $A$ attempts to enter cell $7$ (occupied by agent $B$), whereas, in high values, he prefers to stay in his cell. The new proposed strategy $A$ in Subfigure~(a) shows a more linear decomposition of probabilities than in strategy $B$ in Subfigure~(b). With this strategy, $k_O$ is more predictable and intuitive than with strategy \textit{A}. More figures with different values for parameter of sensitivity to static field $k_S$ are found in Appendix~\ref{appendix_section_comparison_strategy}. +Figure~\ref{fig_comparison_strat_choosing} shows the differences in probability distribution of moving to cells in neighborhood $N$ of agent $A$. This $100\%$ stacked graph depends on the parameter of sensitivity to occupancy $k_O$ on the $x$-axis. With lower $k_O$, the agent is more likely to enter an occupied cell. We can see, in both strategies, that in low values, agent $A$ is more likely to enter cell $7$ (occupied by agent $B$), whereas, in high values, he prefers to stay in his cell. The new proposed strategy $A$ in Subfigure~(a) shows a more linear decomposition of probabilities than in strategy $B$ in Subfigure~(b). With strategy \textit{B} the value of $k_O$ can be interpreted in more clear way.. More figures with different values for parameter of sensitivity to static field $k_S$ are found in Appendix~\ref{appendix_section_comparison_strategy}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection*{AGGRESSIVITY}\label{aggressivity} -Aggressivity $\gamma\in{[0, 1]}$ is the ability of agent to win conflict. This term was introduced in research by Pavel Hrab{\' a}k and Marek Buk{\'a}{\v c}ek in Article~~\cite{aggressive}. Conflicts happen when two or more agents select same cell as their destination cell. This thesis provides two strategies for solving conflicts described below in Section \ref{strategy_solving_conflicts}. +Aggressivity $\gamma\in{[0, 1]}$ as agent parameter, defines the ability of agent to win conflict. This term was introduced in research by Pavel Hrab{\' a}k and Marek Buk{\'a}{\v c}ek in Article~~\cite{aggressive}. Conflicts happen when two or more agents select same cell as their destination cell. This thesis provides two strategies for solving conflicts described below in Section \ref{strategy_solving_conflicts}. There are various methods (see Section \ref{agent}) to assign $\gamma$ to $n$ agents: @@ -442,30 +456,33 @@ Figure~\ref{yadayada} shows all possible outcomes of conflict with three agents On the right is depicted a situation with two agents of $\gamma_2$, and one with $\gamma_1$, who attempt to enter the cell in the middle. This situation, with strategy \textit{A}, can result in one of the two agents with $\gamma_2$ entering the cell, as can be seen in the bottom row on the sides. Also, all of the agents could end up staying in their positions due to blocking occasion, as can be seen in the scheme in the middle of the bottom row. -\begin{figure}[h] - \centerline{ \includegraphics[scale=0.5]{img/raster/conflict_3x3_example_LOW.png}} +\begin{figure}[h!] + \begin{center} + \begin{subfigure}[b]{1\textwidth} + \includegraphics[width=\textwidth]{img/raster/conflict_3x3_example_LOW.png} + \end{subfigure} + \end{center} \caption{ - Conflict solution for $\protect{gamma_1 < \gamma_2}$. Left: more aggressive wins the conflict over two less aggressive agent. Right: the conflict of two more aggressive agents can resolve by the blocking of the movement. \textit{Taken from}~\cite{aggressive}. + Conflict solution for $\protect{\gamma_1 < \gamma_2}$. Left: more aggressive wins the conflict over two less aggressive agent. Right: the conflict of two more aggressive agents can resolve by the blocking of the movement. \textit{Taken from}~\cite{aggressive}. } \label{yadayada} \end{figure} - \begin{itemize} \item \textbf{Strategy $B$:} Strategy $B$ is implemented to repress jamming. During the implementation and testing an unsolicited phenomena of jamming near bottleneck, due to low aggressivity of agents, was discovered. -To prevent jamming the sensitivity parameter $\mu$ could be set to lower value but it will also lead to lower number of desired blocking occasions in other parts of the evacuation. When agents with low aggressivity $\epsilon$ get to conflict situation, the probability of one agent winning the conflict is also very low: $P=\mu{}\cdot{}(1 - \epsilon)$. +To prevent jamming the sensitivity parameter $\mu$ could be set to lower value but it will also lead to lower number of desired blocking occasions in other parts of the evacuation. When agents with low aggressivity $\epsilon \ll 1$ get to conflict situation, the probability of one agent winning the conflict is also very low: $P=\mu{}\cdot{}(1 - \epsilon)$. This strategy selects the winning agent $a_i$ stochastically with probability $P_i$ proportional to agent's respective aggressivity $\gamma_i$. Set of agents $\{a_1,\dots{},a_k\}$ with respective aggressivity parameters $\{\gamma_1,\dots{},\gamma_k\}$ produces for each agent $a_i$ a probability $P_i = \frac{\gamma_i}{\sum_{j\in{k}} \gamma_j}$. \end{itemize} New proposed strategy \textit{B} did not bring any new benefits as was noticed during the testing of the model. The friction parameter $\mu$ affects the creation of blocking occasion before the proportional probabilities of agents, based on their aggressivity, can be taken into account. With strategy \textit{B} jamming still occurs. Because of this reason, further simulations performed on this model use strategy \textit{A}. -The goal of this thesis was to perform research on conflict-solution and implement improved rules. The way in which conflicts are solved is significantly affected by agents themselves who participate in conflicts. What agent, and when it gets in conflict, is hence part of the conflict solution and the new proposed \textit{strategy for choosing destination cell} focuses on it. +The goal of this thesis was to perform research on conflict-solution and implement improved rules. The way in which conflicts are solved is significantly affected by agents themselves who participate in conflicts. Which agent, and where he gets in conflict, is hence part of the conflict solution and the new proposed \textit{strategy A for choosing destination cell} focuses on it. @@ -500,7 +517,7 @@ Mesa framework allows progressing in the simulation with different speed or by s \subsubsection*{PAgent} \textit{PAgent} represents a pedestrian agent in the simulation. Agents interact with the environment by sensing and moving. Each agent holds his set of parameters that calculate probabilities for destination cells. The strategy for selecting destination cell in Section~\ref{strategy_destination_cell} can be selected. The processes of movement in the model are strictly sequential. This approach allows line formation and homogeneous movement of all agents. -The Mesa framework allows visualizing the course of the simulation. In Figure \ref{MESA-map} are displayed circles --- \textit{PAgents} --- with a number showing the aggressivity $100\cdot{}\gamma$ value and different colors, that represent inner state of agents. To better understand the terms \textit{head} bond, blocked agent and exhausted agent, it is recommended to consult paragraph \textbf{PSchedule} in this Section, where said terms are explained. +The Mesa framework allows visualizing the course of the simulation. In Figure \ref{MESA-map} are displayed circles --- \textit{PAgents} --- with a number showing the aggressivity $100\cdot{}\gamma$ value and different colors, that represent inner state of agents. To better understand the terms \textit{head} bond, blocked agent and exhausted agent, it is recommended to consult paragraph \textit{PSchedule} in this Section, where said terms are explained. \begin{itemize} \item \textbf{Green} is the default color. \item \textbf{Red} is the color of an aggressive \textit{PAgent} --- his $\gamma$ is higher than 0.5. @@ -514,7 +531,7 @@ In Figure \ref{MESA-map} we can see rectangular tiles --- \textit{PCells} --- in The darker the color, the lower the static potential $S(y)$. Black tile is the \textit{exit}. \subsubsection*{PSchedule}\label{schedule} -\textit{PSchedule} orchestrates the sequence of steps in the simulation. Time in the model is split into time-frames. Agents moving at different speeds enter the sequence according to the duration of their movement~\cite{timespan}. Each movement, also remaining in its position, updates their inner period. The movement in diagonal motion takes $\sqrt{2}$ more time than orthogonal movement hence the agent's inner time period is increased by rationalized $\frac{3}{2}$ of nominal orthogonal movement. Nominal orthogonal movement has duration of 1 time-frame, the timespan of one step in the simulation. +\textit{PSchedule} orchestrates the sequence of steps in the simulation. Time in the model is split into time-frames. Agents moving at different speeds (for example because of diagonal movement) enter the sequence according to the duration of their movement~\cite{timespan}. Each movement, also remaining in its position, updates the time when their movement ends according to $\tau$. The movement in diagonal motion takes $\sqrt{2}$ more time than orthogonal movement hence the agent's inner time period is increased by rationalized $\frac{3}{2}$ of nominal orthogonal movement. Nominal orthogonal movement has duration of 1 time-frame, the timespan of one step in the simulation. One step can be split into~4~phases:~\textit{start, scan, solve, step.} Object PSchedule executes phase \textit{start} first for a group of all \textit{PAgents} and when all \textit{PAgents} finished their phase, it executes the same phase for all \textit{PCells}. The remaining phases (\textit{scan, solve, step}) are executed only by \textit{PAgents}. This order of execution delegates the tasks of calculating probabilities of destination cells to \textit{PAgents} and the task of selecting destination cell and solving conflict to \textit{PCells}. A detailed description of each phase: @@ -523,7 +540,7 @@ A detailed description of each phase: \item \textit{\textbf{Start}} \begin{itemize} \item \textit{PAgent} sets all his states (\textit{destination cell, color, head, tail)} to default. \textit{PAgent} then calculates the attractivity of adjacents cells based on the \textit{strategy for choosing destination cell}. The destination cell is chosen stochastically, and \textit{PAgent} joins the queue of agents attempting to enter this cell. - \item \textit{PCell} selects one agent from queue. If more than two agents are attempting to enter this cell, a conflict occurs. \textit{PCell} solves the~conflict based on the \textit{strategy for solving conflicts} described in Section~\ref{strategy_solving_conflicts}. PCell can create a blocking event when no agent enters this cell. In that case, all agents are assigned the blue color. Otherwise, it chooses a successful agent. That agent is then assigned this cell as his \textit{destination cell} and creates a \textit{head} bond to an agent occupying this cell if there is one. Also, the occupying agent creates a \textit{tail} bond in direction to the successful agent. This is the principle of bonds from Section~\ref{bonds}, which allows agents to form lines, and it is important for phase \textit{scan}. + \item \textit{PCell} selects one agent from queue. If more than two agents are attempting to enter this cell, a conflict occurs. \textit{PCell} solves the~conflict based on the \textit{strategy for solving conflicts} described in Section~\ref{strategy_solving_conflicts}. \textit{PCell} can create a blocking event when no agent enters this cell. In that case, all agents are assigned the blue color. Otherwise, it chooses a successful agent. That agent is then assigned this cell as his \textit{destination cell} and creates a \textit{head} bond to an agent occupying this cell if there is one. Also, the occupying agent creates a \textit{tail} bond in direction to the successful agent. This is the principle of bonds from Section~\ref{bonds}, which allows agents to form lines, and it is important for phase \textit{scan}. \end{itemize} \item \textit{\textbf{Scan}} @@ -629,14 +646,14 @@ J_{ij} &= \frac{m}{\Delta{t}} Sensitivity analysis of input parameters on total evacuation time is the main contribution of this thesis. SA was performed on OptiSLang software developed by Dynardo GmbH in Germany. The graphs --- 3D and COP --- exported from OptiSLang have the information of their origin in the caption. Additional research, that started the moment when first versions of the evacuation model were tested and the behavior of the model was observed, consists of several quantitative and qualitative analyses. On one hand, quantitative analysis presents it's results in numbers and graphs, that root in data from simulations. On the other hand, qualitative analysis focuses on understanding the qualities of the model, on the connections between parameters and it also focuses on explaining the preconditions that lead to specific phenomena. Both domains, quantitative and qualitative, are aided by visuals created in Matplotlib or in Mesa. \subsection{SA using MOP} -To measure the contribution of individual input parameters on the variance in $T_\text{TET}$, OptiSLang uses Metamodel of Optimal Prognosis (MOP). The metamodel can be Polynomial, MLS or Krigins model. At first, OptiSLang calculates the quality of each available model (Polynomial, MLS, Kriging) using Coefficient of Prognosis (COP) and then chooses the one with the highest quality. \textit{Note: Measuring the quality of each model takes a long time, hence some simulations were allowed to use only polynomial and MLS model, as these two models produce adequate results while keeping the computation time reasonable.} - +To measure the contribution of individual input parameters on the variance in $T_\text{TET}$, OptiSLang uses Metamodel of Optimal Prognosis (MOP). The metamodel includes Polynomial, MLS or Krigins model. At first, OptiSLang calculates the prognosis quality of each available model, (Polynomial, MLS, Kriging) using Coefficient of Prognosis (COP) and then chooses the one with the highest quality. Measuring the quality of each model takes a long time, hence some simulations were allowed to use only polynomial and MLS model, as these two models produce adequate results while keeping the computation time reasonable. -COP measures how individual parameters contribute to variance in $T_\text{TET}$. Using cross-validation, OptiSLang calculates the mean of observed quantity ($T_\text{TET}$) in various data points, for example by leaving out some other parameter, and compares them. When there is a variance for different data points, OptiSlang attributes the variance to examined parameter. MOP calculates total effect sensitivity index for observed quantity and input parameter. This approximation, however, can fit only so much results and thus it is assigned quality of COP, that shows much variance in observed quantities could be approximated with given MOP and COP of individual input parameters. Some parameters can be correlated hence the sum of individual COP can exceed quality of COP or even 100\%. +\textit{As a result of the MOP, we obtain an approximation model, which includes the important variables. Based on this meta-model, the total effect sensitivity indices, \dots, are used to quantify the variable importance. The variance contribution of a single input variable is quantified by the product of the CoP and the total effect sensitivity index estimated from the approximation model ~\cite{MOP_COP2011}.} COP$(X_i)$ is variance contribution of single input variable $X_i$, that shows how much $X_i$ contributed to the approximated variance using MOP. +When MOP has COP $60\%$, it means that it was able to capture $60\%$ of the variance in observed quantity. +Some parameters can be related to each other and the sum of individual parameters COP$(X_i)$ can exceed total COP or even $100\%$. For example, in MOP with COP $60\%$, parameters $X_1$ and $X_2$ with COP$(X_2)=50\%$ and COP$(X_2)=20\%$ individually contributed with $50\%$, respectively with $20\%$, to variance in observed quantity. -\textit{The variance contribution of a single input variable is quantified by the product of the COP and the total effect sensitivity index estimated from the approximation model.}~\cite{MOP_COP2011} - +\newpage \section{Simulations} At first, the simulations were observed on the Mesa framework web interface, that is depicted in~Figure~\ref{MESA-map}. They were used mostly during implementation of the model and in testing the new strategies. @@ -651,16 +668,16 @@ In the Table~\ref{table_simulations} are input parameters of simulations $S_2, S \begin{table}[h!] \begin{center} \label{tab:table1} - \begin{tabular}{|l|c|l|l|l|l|} + \begin{tabular}{|l|c|l|l|l|} \hline - \multicolumn{2} {|c|}{} & \multicolumn{4} {c|}{Simulation name}\\ - \hline \textbf{Parameters} & \textbf{Step} & $S_2$ & $S_3$ & $S_4$ & $S_4$ \\ + \multicolumn{2} {|c|}{} & \multicolumn{3} {c|}{Simulation name}\\ + \hline \textbf{Parameters} & \textbf{Step} & $S_2$ & $S_3$ & $S_4$ \\ \hline - iterations & - & 3 & 2 & 2 & 5\\ - $k_S$ & 0.1 & [0.3, 5.0] & [1.5, 4.5] & \{1.5, 3.0, 4.5\} & 1.5\\ - $k_O$ & 0.1 & [0.0, 1.0] & [0.0, 1.0] & [0.0, 1.0] & 0.3\\ - $k_D$ & 0.2 & [0.0, 0.1] & [0.0, 1.0] & [0.0, 0.9] & 0.5\\ - $\mu$ & 0.2 & [0.0, 0.1] & [0.0, 1.0] & [0.0, 0.9] & 0.5\\ + iterations & - & 3 & 2 & 2 \\ + $k_S$ & 0.1 & [0.3, 5.0] & [1.5, 4.5] & \{1.5, 3.0, 4.5\}\\ + $k_O$ & 0.1 & [0.0, 1.0] & [0.0, 1.0] & [0.0, 1.0]\\ + $k_D$ & 0.2 & [0.0, 0.1] & [0.0, 1.0] & [0.0, 0.9]\\ + $\mu$ & 0.2 & [0.0, 0.1] & [0.0, 1.0] & [0.0, 0.9]\\ \hline \end{tabular} \end{center} @@ -668,38 +685,35 @@ In the Table~\ref{table_simulations} are input parameters of simulations $S_2, S \label{table_simulations} \end{table} -In the 3D and COP graphs exported from OptiSLang, the axes are renamed, for clarity, with capitals $S, O, D, F, T$, and mean $S~=~k_S$, $O~=~k_O$, $D~=~k_D$, $F~=~\mu{}$ and $T~=~T_\text{TET}$. 3D graphs approximate the $T_\text{TET}$ with data from simulations and plot them on a plane. COP graphs shows how much individual parameters $S, O, D, F$ contribute to the variance in $T_\text{TET}$. The number in percent at the top of COP (for example on the right in Figure~\ref{ks_influence}) shows how many results from the simulations MOP was able to approximate. +In the 3D and COP graphs exported from OptiSLang, the axes are renamed, for clarity, with capitals $S, O, D, F, T$, and mean $S~=~k_S$, $O~=~k_O$, $D~=~k_D$, $F~=~\mu{}$ and $T~=~T_\text{TET}$. 3D graphs approximate the $T_\text{TET}$ with data from simulations and plot them on a plane. COP graphs shows how much individual parameters $S, O, D, F$ contribute to the variance in $T_\text{TET}$. The number in percent at the top of COP (for example on the right in Figure~\ref{ks_influence}) shows how much variance in $T_\text{TET}$ was MOP able to capture. %... %... \newpage -\chapter{Results} +\chapter{Results}\label{chapter_results} The results of SA in this chapter are explained by graphs from OptiSLang: the 3D plot of $T_\text{TET}$ and COP of individual parameters. The discoveries of qualitative analysis, such as linear dependency of $T_\text{TET}$ on number of agents $n$, are depicted by other graphs, for example histograms or boxplots. \section{Number of agents $\protect{n}$} It was expected, that the increase of total evacuation time $T_\text{TET}$ is linear and depends on the number of agents \textit{n}. Figure~\ref{n_dep} demonstrates the linear dependency of $T_\text{TET}$ on $n$. -In both figures, the simulations with higher friction $\mu{}=0.9$ show increasing variance of $T_\text{TET}$.\newline - -The sensitivity parameters for blue boxplots are $k_O=0.9,~k_D=0.5,~\mu=0.9$ and for red boxplots $k_O=0.9,~k_D=0.5,~\mu=0.1$. Each simulation was repeated $30$ times with differente seed $J$ for $G_2$. -Horizontal axis $x$ is the number of agents $n$ in tens and vertical axis $y$ is total evacuation time $T_\text{TET}$. The boxplots show the variance in $T_\text{TET}$ for each $n$. There are two graphs with different $k_S\in{}\{1.5, 3.5\}$. This shows that the influence of $n$ is significant and linear, and cannot be compared to influences of friction or sensitivity parameters.\newline +The sensitivity parameters for blue boxplots are $k_O=0.9,~k_D=0.5,~\mu=0.9$ and for red boxplots $k_O=0.9,~k_D=0.5,~\mu=0.1$. Each simulation was repeated $30$ times with different seeds $J$ for $G_2$. +Horizontal axis $x$ is the number of agents $n$ in tens and vertical axis $y$ is total evacuation time $T_\text{TET}$. The boxplots show the variance in $T_\text{TET}$ for each $n$. There are two graphs with different $k_S\in{}\{1.5, 3.5\}$. +In both figures, the simulations with higher friction $\mu{}=0.9$ show increasing variance of $T_\text{TET}$, because with more agents the conflicts occur more frequently and this results in more blocking occasions. Contrary to this, the boxplots in red, where $\mu$ is low, are rather consistent. These figures also demonstrate linear dependency of $T_\text{TET}$ on number of agents. The slope of linear dependency is influenced by other parameters, just as the variance in $T_\text{TET}$. -This happens because with more agents the conflicts occur more frequently and this results in more blocking occasions. Contrary to this, the boxplots in red are rather consistent. These figures demonstrate linear dependency of $T_\text{TET}$ on number of agents. The angle of the linearity is influence by other parameters. -\pagebreak \begin{figure}[h!] \begin{center} - \begin{subfigure}[b]{0.49\textwidth} + \begin{subfigure}[b]{0.8\textwidth} \includegraphics[width=\textwidth]{img/vector/s11-3-33.pdf} \caption{$\protect{k_S=1.5}$} \end{subfigure} - \begin{subfigure}[b]{0.49\textwidth} + \begin{subfigure}[b]{0.8\textwidth} \includegraphics[width=\textwidth]{img/vector/s12-6-55.pdf} \caption{$\protect{k_S=3.5}$} \end{subfigure} \end{center} - \caption{Linear dependency of TET on number of agents. Higher friction, blue boxplots, increases variance of the results. Two graphs with different $\protect{k_S}$ show linear dependence regardless of this parameter.} + \caption{Linear dependency of TET on number of agents. Higher friction, blue boxplots, increases variance of $\protect{T_\text{TET}}$. Two graphs with different $\protect{k_S}$ show linear dependency of total evacuation time on $n$, regardless of $k_S$.} \label{n_dep} \end{figure} @@ -707,29 +721,36 @@ This happens because with more agents the conflicts occur more frequently and th \newpage \section{Sensitivity to static field $\protect{k_S}$}\label{SA_ks} The probability of choosing destination cell $y$ is calculated from members $P_O$ and $P_S$ in the new strategy \textit{B} for choosing destination cell. -Notice $P_S$ member in Equation~\ref{dest_strat_ps}: +Notice $P_S$ member in Equation~\ref{dest_strat_ps}, which is replicated, for clarity, below: \begin{equation*} P_S(y) = \frac{\exp(-k_SS(y))(1 - k_DD(y))}{\sum_{z\in{N}} \exp(-k_SS(z))(1 - k_DD(z))} \end{equation*} -For cell $y_1$, which is closest to exit --- lowest $S(y)$ from adjacent cells --- the attractivity in nominator grows exponentially with increasing $k_S$. For better demonstration, the member $(1 - k_DD(y))$ is left out from the edited equation $\bar{P_S}$, where $y $ is destination cell from neighborhood $N$ for agent $A$ in cell $x$. -\begin{equation*} + For better demonstration, the member $(1 - k_DD(y))$ is left out from the edited equation $\bar{P_S}$, where $y $ is destination cell from neighborhood $N$ for agent $A$ in cell $x$. +\begin{equation} \begin{split} \bar{P_S}(y) & = \frac {\exp{(-k_SS(y))}\cdot{}\exp{(k_SS(x))}} {\sum_{z\in{N}}exp{(-k_SS(z))}\cdot{}\exp{(k_SS(x))}} \\ & = \frac {\exp{(-k_S(S(y)-S(x)))}} {\sum_{z\in{N}}exp{(-k_S(S(z)-S(x)))}} \end{split} -\end{equation*} +\end{equation} The equation above leads to discovery of member $\bar{P_S}$ being proportional to exponential difference in static potential: -\begin{equation*} -\bar{P_S}(y) \propto \exp{(-k_S(S(y) - S(x))} -\end{equation*} -Figure~\ref{fig_comparison_strat_choosing} shows agent $A$ in cell $y_5$ (cell will be noted $x$). -$A$ calculates $P_S$ of cells $y_7$ and $y_1$, where $S(y_7) < S(x) < S(y_1)$. As $k_S$ increases, the attractivity of cell closer to exit, $P_S(y_7)$, rapidly approaches 1. Opposite to this, the attractivity of cell $y_1$ with higher static potential, decreases to zero with increasing $k_S$. +\begin{equation}\label{propo} +\bar{P_S}(y) \propto \exp{(-k_S(S(y) - S(x)))} +\end{equation} +For cell $y$, which is closest to exit --- lowest $S(y)$ from adjacent cells --- the relative attractivity (the right hand side of Equation~(\ref{propo})) grows exponentially with increasing $k_S$. + + +For example, Figure~\ref{fig_comparison_strat_choosing} shows agent $A$ in cell $y_5$ (cell will be noted $x$). +$A$ calculates $P_S$ of cells $y_7$ and $y_1$, where $S(y_7) < S(x) < S(y_1)$. As $k_S$ increases, $P_S(y_7)$ of cell closer to exit, rapidly approaches 1. Opposite to this, $P_S(y_1)$ of cell with higher static potential, decreases to zero with increasing $k_S$. The influence of $k_S$ can be very strong for high numbers, and marginal for values lower than $1$. It was noticed during the testing phases of the model implementation, when the simulations with very low $k_S$ values lasted very long. Visual examination of simulation exposed the erratic movement of agents that did not progress to the exit. -\newpage Figure~\ref{ks_influence} is the 3D plot of approximated $T_\text{TET}$, from simulation $S_2$ in Table~\ref{table_simulations}, exported from OptiSLang. The black dots are the values of $T_\text{TET}$ from the simulations. \textit{MLS} model was used as MOP, superior to \textit{polynomial} model in terms of capturing COP. Due to too many simulation data \textit{Krigin} model was not allowed. Vertical axis $T$ is the $T_\text{TET}$, on horizontal axis $F$ are values of friction $\mu{}$ and horizontal axis $S$ holds the values of sensitivity to static field $k_S$. This figure shows very high $T_\text{TET}$ on axis $T$ for $k_S<1$ on axis $S$. For~$k_S~\gg{}~4.5$ the influence of $k_O, k_D$ is non-existent. Because $T_\text{TET}$ for these values is pointlessly high and steep slope lowers the resolution of the 3D graph, the interval of $k_S$ was limited to $[1.5, 4.5]$. In Figure~\ref{ko_friction} can be spotted how $T_\text{TET}$ does not change much for values higher than 4.5. The influence of $\mu{}$ on axis $F$ might seem marginal, but, as will be presented later, the friction parameter $\mu{}$ plays an important role in the course of the evacuation. +\newpage Figure~\ref{ks_influence} shows the 3D plot of approximated $T_\text{TET}$, from simulation $S_2$ in Table~\ref{table_simulations}, exported from OptiSLang. The black dots are the values of $T_\text{TET}$ from the simulations. \textit{MLS} model was selectedy by MOP. Because of long computational time, \textit{Krigin} model was not allowed. Vertical axis $T$ is the $T_\text{TET}$, on horizontal axis $F$ are values of friction $\mu{}$ and horizontal axis $S$ holds the values of sensitivity to static field $k_S$. This graph shows very high $T_\text{TET}$ for $k_S<1.5$. + +In the same figure, on the right, is a graph with COP of individual parameters. The COP$(k_S)$ is prevalent and other parameters have marginal values of COP. This is because of undesired erratic movement of agents, that increases $T_\text{TET}$ and it's variance, when $k_S$ is lower than $1.5$. In Figure~\ref{ko_friction} can be spotted how $T_\text{TET}$ does not change much for values higher than 4.5. Because of these reasons, the interval of $k_S$ was limited to $[1.5, 4.5]$ in further simulations. + +In Figure~\ref{ks_influence}, the influence of $\mu{}$ on axis $F$ might seem marginal, but, as will be presented later, the friction parameter $\mu{}$ plays an important role in the course of the evacuation. \begin{figure}[h!] \begin{center} @@ -746,9 +767,9 @@ The influence of $k_S$ can be very strong for high numbers, and marginal for val \end{figure} % Horizontal axes are parameters friction $\protect{\mu{}~\text{and}~k_S.}$ -The values $k_S\in{}[1.5, 4.5]$ used in simulations bring meaningful results, as other parameters influence the simulation more significantly, as can be seen in Figure~\ref{limited_ks} in COP graph on the right. According to COP, the most significant parameter is friction $\mu$, that contributed with $48\%$ to variance in observed quantity $T_\text{TET}$. Formerly, the most significant parameter was $k_S$, with contribution higher than $86\%$. Now, COP of $k_S$ dropped to $6\%$, on par with $k_D$. The quality of approximation, found in COP on the top, is lower as well, was $88\%$ and now is $67\%$. -This can be explained with very high variance in $T_\text{TET}$ for $k_S < 1.5$, which was attributed to $k_S$. -\pagebreak +In simulations with $k_S\in{}[1.5, 4.5]$, other parameters influence the simulation more significantly, as can be seen in Figure~\ref{limited_ks} in COP graph on the right. According to COP, the most significant parameter is friction $\mu$, that contributed with $48\%$ to variance in observed quantity $T_\text{TET}$. Formerly, the most significant parameter was $k_S$, with COP$(k_S)$ higher than $86\%$. Now, COP$(k_S)$ dropped to $6\%$, on par with COP$(k_D)$. COP of MOP on the top of the graph, is lower as well: was $88\%$ and now is $67\%$. +This can be explained with very high variance in $T_\text{TET}$ for $k_S < 1.5$, which was attributed to $k_S$. In simulations with limited $k_S$, the variance in $T_\text{TET}$ is lower. + \begin{figure}[h!] \begin{center} \begin{subfigure}[b]{0.6\linewidth} @@ -758,7 +779,7 @@ This can be explained with very high variance in $T_\text{TET}$ for $k_S < 1.5$, \includegraphics[width=\linewidth]{img/visuals/15-45/COP15-45.pdf} \end{subfigure} \end{center} - \caption{Left: 3D graph of $\protect{T_\text{TET}}$ from OptiSLang. Right: COP of input parameters, exported from OptiSLang. Data from simulation $\protect{S_3}$. With limited range of $\protect{k_S}$, the contribution of individual parameters in COP, on the right, is well distributed. \textit{Note: The angle of view is different compared to Figure~\ref{ks_influence}, axes $F$ and $S$ are switched.}} + \caption{Left: 3D graph of $\protect{T_\text{TET}}$ from OptiSLang. Right: COP of input parameters, exported from OptiSLang. Data from simulation $\protect{S_3}$. With limited range of $\protect{k_S}$, the COP of individual parameters, on the right, is well distributed. \textit{Note: The angle of view is different compared to Figure~\ref{ks_influence}, axes $F$ and $S$ are switched.}} \label{limited_ks} \end{figure} @@ -792,12 +813,12 @@ All sets have the same $k_D=0.5$. The green line shows how parameters $k_O=0.9, \mu{}=0.9$ are affected by $k_S$. The relative position of the green line, compared to others, shows that by allowing agents to overtake queue (high $k_O$) and with low number of conflicts (low $\mu$), the evacuation times are the shortest (81 to 105 epochs). Contrary to this, with same $k_O$ and higher $\mu{}=0.9$, the evacuations take longer (105 to 117 epochs) and the results for various $k_S$ vary a lot due to more frequent conflicts. -The remaining two sets have low $k_0=0.1$, which minimizes overtakes and forces the agents to stay in \textit{queues}.This results in longer evacuations. The higher $\mu=0.9$ in the orange line is rough. It should be noticed, that with increasing $k_S$, the evacuations take longer than in the beginning (115 epochs for low $k_S$ and 125 epochs for higher $k_S$). +The remaining two sets have low $k_0=0.1$, which minimizes overtaking, and forces the agents to stay in \textit{queues}.This results in longer evacuations. The higher $\mu=0.9$ in the orange line is rough. It should be noticed, that with increasing $k_S$, the evacuations take longer than in the beginning (115 epochs for low $k_S$ and 125 epochs for higher $k_S$). In the end the total evacuation time is increased with lower $k_O$ and it also increases with higher $\mu$. \newpage \section{Sensitivity to diagonal movement $\protect{k_D}$} -Agent that moves to adjacent diagonal cells increases his inner time period by $\frac{3}{2}$ of nominal movement duration. At the start of the simulation, agents closest to the exit have a free path, and move rapidly towards exit. Movement in diagonal directions allows agents, that are not in a straight line from the \textit{exit}, to get there with less movements. However, they are penalized by increased movement duration --- after two diagonal movements the agents are 'exhausted' and do not move. Especially at the start of the simulation, with low $k_D$, agents can move in waves, as can be seen in Figure~\ref{exhausted_agents} in Appendix~\ref{exhausted_appendix}. Diagonal movement is also useful when a queue or other congestion structure forms. The agents can overtake the queue when they move diagonally. +Agent that moves to adjacent diagonal cells his time, when movement ends, by $\frac{3}{2}$ of nominal movement duration. At the start of the simulation, agents closest to the exit have a free path, and move rapidly towards exit. Movement in diagonal directions allows agents, that are not in a straight line from the \textit{exit}, to get there with less movements. However, they are penalized by increased movement duration --- after two diagonal movements the agents are \textit{exhausted} and do not move. Especially at the start of the simulation, with low $k_D$, agents can move in waves, as can be seen in Figure~\ref{exhausted_agents} in Appendix~\ref{exhausted_appendix}. Diagonal movement is also useful when a queue or other congestion structure forms. The agents can overtake the queue when they move diagonally. \begin{figure}[h!] \begin{center} @@ -814,14 +835,9 @@ Agent that moves to adjacent diagonal cells increases his inner time period by $ \label{kd_influence} \end{figure} -Even though the microscopic behavior of agents can be significantly affected by $k_D$, the general effect on the $T_\text{TET}$ is marginal. SA using COP in Figure~\ref{limited_ks} shows that $k_D$ has very low influence (6\%) on the total evacuation time. -Figure~\ref{kd_influence} presents 3D graph and COP, exported from OptiSLang, of simulation $S_4$ with fixed $k_S=3.0$, which is in the middle of $k_S$ interval described before. It can be seen, that $k_D$ has minor influence and the prevalent input parameter is friction $\mu$. The quality of the approximation ($65\%$) can be compared to SA of $S_4$ with other other values $k_S\in{\{1.5, 4.5\}}$. - -The quality of approximation is $65\%$, yet the sum of individual COP of input parameters exceeds this value. Some parameters could be correlated and contribute to variance together. For extensive explanation, see Article~\cite{MOP_COP2011}, where the methods of SA in OptiSLang are described. - -\begin{comment} -3D graph in Figure~\ref{ko_influence} on the left, can be compared to SA with constant $k_S=4.5$ in Figure~\ref{kd_influence}. There is increased upper limit of the range of $T_\text{TET}$: from $T_\text{TET}\in{}[84, 100]$ ($k_S=4.5$) to $T_\text{TET}\in{}[88, 118]$ ($k_S=1.5$). When agents calculate transition probabilities of adjacent cells more evenly, they choose suboptimal cells more frequently and increate $T_\text{TET}$. The graphs, comparing new and old strategy for choosing destination cell, in Appendix~\ref{appendix_comparison_strategy_choosing} demonstrate how high $k_S$ can obliterate the chance to move to suboptimal cell. -\end{comment} +Even though the microscopic behavior of agents can be significantly affected by $k_D$, the general effect on the $T_\text{TET}$ is marginal. Graph of COP in Figure~\ref{limited_ks} shows that COP$(k_D)$ is very low ($6\%$) with $k_S\in{[1.5, 4.5]}$ . +Figure~\ref{kd_influence} presents 3D graph and COP, exported from OptiSLang, of simulation $S_4$ with fixed $k_S=3.0$, which is in the middle of $k_S$ interval described before. It can be seen, that COP$(k_D)$ is low and the prevalent input parameter is friction $\mu$, with COP$(\mu)=48\%$. The COP of MOP ($65\%$) is similar +to SA of simulation $S_4$ with other other values $k_S\in{\{1.5, 4.5\}}$. The quality of approximation is $65\%$, yet the sum of individual COP of input parameters exceeds this value. \begin{figure}[h!] @@ -844,12 +860,10 @@ The quality of approximation is $65\%$, yet the sum of individual COP of input \newpage \section{Friction parameter $\protect{\mu}$} -As was depicted in Figure~\ref{ko_friction}, $\mu{}$ and $k_O$ have significant influence on variance in $T_\text{TET}$. -Friction parameter $\mu{}$ affects the number of blocking occasions and directly increases the total evaction time. With higher number of agents $n$, the blocking occasions occur more frequently, because more agents create more conflicts. This results in increasing variance in $T_\text{TET}$, as is demonstrated in~Figure~\ref{n_dep}. The blue box-plots are simulations with high $\mu{}=0.9$ and show increasing variance of $T_\text{TET}$. Contrary to this, the red box-plots, simulations with low $\mu{}=0.1$, show rather constant variance of $T_\text{TET}$. - - -Friction $\mu{}$ affects the evacuation regardless of the other parameters $k_S,~k_O$ and $k_D$. For $k_S=4.5$ the influence of other parameters ($k_O, k_D$) is minimalized due to prevalent \textit{static} sensitivity, however $\mu{}$ retains its contribution to variance in $T_\text{TET}$ as can be seen in~Figure~\ref{ks45}. +As was depicted in previous Figures~\ref{ko_influence} and \ref{kd_influence}, $\mu{}$ and $k_O$ have significant contribution to variance in $T_\text{TET}$. +Friction parameter $\mu{}$ affects the number of blocking occasions and that can increase the total evaction time. With higher number of agents $n$, the blocking occasions occur more frequently, because more agents create more conflicts. This results in increased variance in $T_\text{TET}$, as is demonstrated in~Figure~\ref{n_dep}. The blue box-plots are simulations with high $\mu{}=0.9$ and show increasing variance of $T_\text{TET}$. Contrary to this, the red box-plots, simulations with low $\mu{}=0.1$, show rather constant variance of $T_\text{TET}$ with increasing $n$ of agents. +For high $k_S=4.5$ the COP$(X_i)$ of other parameters ($k_O, k_D$) is minimal due to prevalent \textit{static} sensitivity. However, $\mu{}$ has significant contribution to variance in $T_\text{TET}$ as can be seen in~Figure~\ref{ks45}. When $k_S=1.5$, COP$(\mu)$ is the lowest ($10\%$) and increases with $k_S$: for $k_S=1.5$, COP$(\mu)$ is $10\%$, then with $k_S=3.0$, COP$(\mu)$ is $50\%$, and later, with $k_S=4.5$, COP$(\mu)$ is highest at $59\%$. SA of input parameters on $T_\text{TET}$ for several constant values of $k_S$ shows, that for different $k_S$, COP$(X_i)$ for individual input parameters are in different order. For lower values of $k_S$, $k_D$ and $k_O$ have higher COP than $\mu$. With high $k_S$, $\mu$ has highest COP$(\mu)$ and other parameters have rather low COP$(X_i)$. \begin{figure}[h!] @@ -878,16 +892,16 @@ This simulation was, at first, run with \textit{homogeneous} $k_O=0.5$ for all a This simulation was then rerun, also repeated 1000 times, with \textit{heterogeneous} distribution of $k_O$. The $70$ agents were split to two groups of $35$. First groups was assigned $k_O=0.1$ and second group $k_0=0.9$, so the average $k_O$ of all agents was $0.5$, identical to the previous run. The orange histogram in Figure~\ref{s61_hetero} shows that this simulation resulted in shorter evacuations --- all iteration had $T_\text{TET}\in{[80, 91]}$. -Another simulation $S_{6.2}$ was performed, this time with increased friction $\mu=0.9$, other parameters remained unchanged $k_S=2.0, k_D=0.5$. Identical to $S_{6.1}$, simulation was repeated 1000 times --- once for \textit{homogeneous} and then for \textit{heterogeneous} $k_O$ of agents. Figure~\ref{s62_hetero} shows that distribution of $T_\text{TET}$ for \textit{homogeneous} $k_O$, blue histogram, is similar to \textit{heterogenenous} $k_O$ for two groups of agents, orange histogram. +Another simulation $S_{6.2}$ was performed, this time with increased friction $\mu=0.9$, other parameters remained unchanged $k_S=2.0, k_D=0.5$. Identical to $S_{6.1}$, simulation was repeated 1000 times --- once for \textit{homogeneous} and then for \textit{heterogeneous} $k_O$ of agents. Figure~\ref{s62_hetero} shows that distribution of $T_\text{TET}$ for \textit{homogeneous} $k_O$, blue histogram, is similar to \textit{heterogenenous} $k_O$ for two groups of agents, orange histogram. \begin{figure}[h!] \begin{center} -\begin{subfigure}[b]{0.49\linewidth} +\begin{subfigure}[b]{0.45\linewidth} \includegraphics[width=\linewidth]{img/vector/heteroA2.pdf} \caption{Simulation $\protect{S_{6.1}}$, low friction $\protect{\mu=0.1}$.} \label{s61_hetero} \end{subfigure} \hfill -\begin{subfigure}[b]{0.49\linewidth} +\begin{subfigure}[b]{0.45\linewidth} \includegraphics[width=\linewidth]{img/vector/heteroB2.pdf} \caption{Simulation $\protect{S_{6.2}}$, high friction $\protect{\mu=0.9}$} \label{s62_hetero} @@ -900,74 +914,6 @@ Another simulation $S_{6.2}$ was performed, this time with increased friction $\ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\begin{comment} - - -!!!! -Dynamics of a Simulated Demonstration March An Efficient SensitivityAnalysis.pdf -Sensitivity analysis methods provide metrics to quantify the effect of input parameterson the output. Thus, the parameters can be ranked according to importance -!!!! - -!!!! -EXECUTED SENSITIVTY ANALYSES -In short, previous applications of forward propagation and sensitivity analysis meth-ods to microscopic crowd simulations are few in number. Most of them use Monte Carlotechniques or polynomial chaos expansions [17–20]. -!!!! - - -!!! -Smith, R.C.Uncertainty Quantification: Theory, Implementation, and Applications; Computational Science and Engineering; Societyfor Industrial and Applied Mathematics: Philadelphia, PA, USA, 2014 -monte carlo converges at %Ohm(1/ N^0.5) -!!!! - - -!!!!! -%Agent-based_simulation_of_collective_cooperation_rsif.2020.0396.pdf -PSYCHOLOGY, various concepts, stationary crowds -Sieben A, Schumann J, Seyfried A. 2017 Collectivephenomena in crowds—where pedestriandynamics need social psychology.PLoS ONE12,1–19. (doi:10.1371/journal.pone.0177328) -Numerous authorsconducted experiments with a strong focus on unidirectionalflow of pedestrians with moderate density [23–26] and coun-terflow scenarios [27,28] or bottlenecks [29,30]. Other authorsfocused more on collective phenomena in crowds. For instance,[31] investigated the influence of barriers on the behaviour ofparticipants. They included the social psychology perspectiveby using questionnaires to obtain insights into participants’perception. And other authors focused more on egress andqueuing behaviour such as [32]. To our knowledge, [33] arethe first authors who conducted an experiment with a station-ary crowd and who tested the effects on walking participants.Even the exhaustive two-volume literature review [34,35] forempirical methods and experiments in pedestrian dynamicsdid not explicitly mention stationary crowds and their effects. -%Xueet al.conductedtheir own experiment [18] and integrated a sort ofâ€give way tocounterflowing agents’into a cellular automaton -!!!! - - - - -!!!! -%/Sensitivity_Analysis_for_Microscopic_Crowd_Simulat.pdf -The main application for pedestrian dynamics is the evaluation of building designs and evacuationconcepts. This includes planning emergency routes, identifying potential bottlenecks, and estimatingcapacity at events, in public spaces, or in large infrastructures, such as airports or railway stations.Independent of the approach, application, or background, the community shares an overall objective:making crowds safer -!!! - - -!!!! -Algorithms2020,13, 16224 of 266.Hirai, K.; Tarui, K. A simulation of the behavior of a crowd in panic. In Proceedings of the 1975 InternationalConference on Cybernetics and Society, San Francisco, CA, USA, 23–25 September 1975; p. 409.7.Helbing, D.; Farkas, I.; Vicsek, T. Simulating dynamical features of escape panic.Nature2000,407, 487–490.doi:10.1038/35035023.8.Tordeux, A.; Seyfried, A. Collision-free nonuniform dynamics within continuous optimal velocity models.Phys. Rev. E2014,90, 042812. doi:10.1103/PhysRevE.90.042812.9.Dietrich, F.; Köster, G. Gradient navigation model for pedestrian dynamics.Phys. Rev. E2014,89, 062801.doi:10.1103/PhysRevE.89.062801.10.Martinez-Gil, F.; Lozano, M.; Fernández, F.Emergent behaviors and scalability for multi-agentreinforcement learning-based pedestrian models.Simul. Model. Pract. Theory2017, 74, 117–133.doi:10.1016/j.simpat.2017.03.003. -!!!! - - -!!!! -What method to use? -Decision tree -%de Rocquigny, E. andDevictor, N.; Tarantola, S., Eds.Uncertainty in Industrial Practice; John Wiley & Sons,Ltd.: West Sussex, UK, 2008; doi:10.1002/9780470770733 - -Because there is a vast variety of global sensitivity methods available, users must choosethe most suitable method for their application. The choice can be supported by decision trees asprovided in [27]. In addition, several publications deal with links between different metrics: linksbetween derivative-based and variance-based indices are e.g., shown in [28] for derivative-basedglobal sensitivity measures [29] and Sobol’ indices and in [26] for activity scores and Sobol’ indices.The derivative-based global sensitivity metrics [25] are upper bounds for the Sobol’ indices [28,30] atreduced computational cost. Furthermore, they are also an upper bound for activity scores [26]. - -!!!! - - - - -!!!! -%Sensitivity_Analysis_for_Microscopic_Crowd_Simulat.pdf -Special type of SA in PD -In pedestrian dynamics, sensitivity analysis usually refers to studyingthe impact of the uncertainties in input parameters on the simulation results [32,33]. -To summarize, global sensitivity analysis methods have barely been used for crowd simulations. -!!!! - -\end{comment} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - @@ -984,10 +930,10 @@ To summarize, global sensitivity analysis methods have barely been used for crow \setsecnumdepth{part} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - \chapter{Conclusion} + \chapter{Conclusions} -In this thesis was performed research on cellular models, that simulate the evacuation of people from a room, and to analyze the process of conflict solution, when two or more agents attempt to enter the same cell. The \textit{floor-field} model, which was an inspiration for model used in this thesis, uses two cellular fields: \textit{dynamic} and \textit{static} field. Also present is a set of input parameters, that influence the behavior of agents in the model and the microscopic processes within (conflict solution, choosing destination cell, formation of structures). The agents in the simulation, who represent pedestrians in evacuation, can have homogeneous or heterogeneous parameters, for example the parameter of aggressivity, specific for each agent, that plays a role in solving conflicts. +In this thesis research on cellular models, that simulate the evacuation of people from a room, was performed. The process of conflict solution, when two or more agents attempt to enter the same cell, was analyzed. The \textit{floor-field} model, which was an inspiration for model used in this thesis, uses two cellular fields: \textit{dynamic} and \textit{static} field. Also present is a set of input parameters, that influence the behavior of agents in the model and the microscopic processes within (conflict solution, choosing destination cell, formation of structures). The agents in the simulation, who represent pedestrians in evacuation, can have homogeneous or heterogeneous parameters, for example the parameter of aggressivity, specific for each agent, that plays a role in solving conflicts. To perform said research, an agent based cellular evacuation model was implemented using Mesa ABM framework for Python. Using agents, the~model is able to capture the collective motion of pedestrians during an evacuation. It also demonstrates various phenomena of the evacuation, for example, the congestion at the exit. Individual agents are autonomous and interact with each other. These interactions, mainly the \textit{conflicts}, are analyzed. The model consists of various components, that can be further extended or customized. @@ -1182,6 +1128,7 @@ The last graph of the three, is the average flow through the exit. The exit can + %\begin{figure} % \dirtree{% % .1 readme.txt\DTcomment{the file with CD contents description}. diff --git a/report/img/raster/1-s2.0-S0378437121003423-gr1.jpg b/report/img/raster/1-s2.0-S0378437121003423-gr1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..901ac3e975cb142bc9ed418810cc70060664c472 Binary files /dev/null and b/report/img/raster/1-s2.0-S0378437121003423-gr1.jpg differ diff --git a/report/img/raster/FFmodel.jpg b/report/img/raster/FFmodel.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8660d596c8921d2f884ce09cc04d07ed11edaac3 Binary files /dev/null and b/report/img/raster/FFmodel.jpg differ diff --git a/report/img/raster/Response surface 3D plot 40 kriggins revers.bmp b/report/img/raster/Response surface 3D plot 40 kriggins revers.bmp deleted file mode 100644 index 7bab03a76513d632a796df773815afb4fcac8acd..0000000000000000000000000000000000000000 Binary files a/report/img/raster/Response surface 3D plot 40 kriggins revers.bmp and /dev/null differ diff --git a/report/img/raster/Response surface 3D plot kriggins 25.bmp b/report/img/raster/Response surface 3D plot kriggins 25.bmp deleted file mode 100644 index db44d9d6a67f9d06311b60ee14c2bf80a600745c..0000000000000000000000000000000000000000 Binary files a/report/img/raster/Response surface 3D plot kriggins 25.bmp and /dev/null differ diff --git a/report/img/raster/a.png b/report/img/raster/a.png new file mode 100644 index 0000000000000000000000000000000000000000..5cb5e1fbb73bd1817945e14e64c79fc258713561 Binary files /dev/null and b/report/img/raster/a.png differ diff --git a/report/img/raster/conflict_3x3_example_LOW.png b/report/img/raster/conflict_3x3_example_LOW.png index 5cb5e1fbb73bd1817945e14e64c79fc258713561..5b40b6b39751eb2ab7053047ff81821ff1c1a7c5 100644 Binary files a/report/img/raster/conflict_3x3_example_LOW.png and b/report/img/raster/conflict_3x3_example_LOW.png differ diff --git a/report/img/raster/low_KS.bmp b/report/img/raster/low_KS.bmp deleted file mode 100644 index c57da3a3ba8a3162f27ac86b7a957e8ee1ee1e1d..0000000000000000000000000000000000000000 Binary files a/report/img/raster/low_KS.bmp and /dev/null differ diff --git a/report/img/visuals/old, sodf 70 agents, extended/RS3Dpf70NE.png b/report/img/visuals/old, sodf 70 agents, extended/RS3Dpf70NE.png new file mode 100644 index 0000000000000000000000000000000000000000..8100e6433a47bcb10a2a881d0c9e6fca1177b33d Binary files /dev/null and b/report/img/visuals/old, sodf 70 agents, extended/RS3Dpf70NE.png differ diff --git a/report/img/visuals/old, sodf 70 agents, extended/Response surface 3D plot full 70 NE.bmp b/report/img/visuals/old, sodf 70 agents, extended/Response surface 3D plot full 70 NE.bmp deleted file mode 100644 index c57da3a3ba8a3162f27ac86b7a957e8ee1ee1e1d..0000000000000000000000000000000000000000 Binary files a/report/img/visuals/old, sodf 70 agents, extended/Response surface 3D plot full 70 NE.bmp and /dev/null differ diff --git a/report/img/visuals/sodf 70 agents, constant static/RS3DP25F.png b/report/img/visuals/sodf 70 agents, constant static/RS3DP25F.png new file mode 100644 index 0000000000000000000000000000000000000000..1a1df3ff4fd9990a4c2397f74d21231e2db3c100 Binary files /dev/null and b/report/img/visuals/sodf 70 agents, constant static/RS3DP25F.png differ diff --git a/report/img/visuals/sodf 70 agents, constant static/RS3DPK40.png b/report/img/visuals/sodf 70 agents, constant static/RS3DPK40.png new file mode 100644 index 0000000000000000000000000000000000000000..231e46bac326ac607c439e3999d75433bbc042d9 Binary files /dev/null and b/report/img/visuals/sodf 70 agents, constant static/RS3DPK40.png differ diff --git a/report/img/visuals/sodf 70 agents, constant static/RS3DPk25.png b/report/img/visuals/sodf 70 agents, constant static/RS3DPk25.png new file mode 100644 index 0000000000000000000000000000000000000000..d1a9e3a2f7e94c63ef204f3a35501e982474cb81 Binary files /dev/null and b/report/img/visuals/sodf 70 agents, constant static/RS3DPk25.png differ diff --git a/report/img/visuals/sodf 70 agents, constant static/RS3Dpf70NE.png b/report/img/visuals/sodf 70 agents, constant static/RS3Dpf70NE.png new file mode 100644 index 0000000000000000000000000000000000000000..8100e6433a47bcb10a2a881d0c9e6fca1177b33d Binary files /dev/null and b/report/img/visuals/sodf 70 agents, constant static/RS3Dpf70NE.png differ diff --git a/report/img/visuals/sodf 70 agents, constant static/RS3dP40k.png b/report/img/visuals/sodf 70 agents, constant static/RS3dP40k.png new file mode 100644 index 0000000000000000000000000000000000000000..15a88e0531d823a4d791495a35269e10c5e835ef Binary files /dev/null and b/report/img/visuals/sodf 70 agents, constant static/RS3dP40k.png differ diff --git a/report/img/visuals/sodf 70 agents, constant static/Response surface 3D plot 25 full.bmp b/report/img/visuals/sodf 70 agents, constant static/Response surface 3D plot 25 full.bmp deleted file mode 100644 index fdf84d422fad0027e6e20f416ec72185b35b4cbe..0000000000000000000000000000000000000000 Binary files a/report/img/visuals/sodf 70 agents, constant static/Response surface 3D plot 25 full.bmp and /dev/null differ diff --git a/report/img/visuals/sodf 70 agents, constant static/Response surface 3D plot 40 kriggins revers.bmp b/report/img/visuals/sodf 70 agents, constant static/Response surface 3D plot 40 kriggins revers.bmp deleted file mode 100644 index 7bab03a76513d632a796df773815afb4fcac8acd..0000000000000000000000000000000000000000 Binary files a/report/img/visuals/sodf 70 agents, constant static/Response surface 3D plot 40 kriggins revers.bmp and /dev/null differ diff --git a/report/img/visuals/sodf 70 agents, constant static/Response surface 3D plot kriggins 25.bmp b/report/img/visuals/sodf 70 agents, constant static/Response surface 3D plot kriggins 25.bmp deleted file mode 100644 index db44d9d6a67f9d06311b60ee14c2bf80a600745c..0000000000000000000000000000000000000000 Binary files a/report/img/visuals/sodf 70 agents, constant static/Response surface 3D plot kriggins 25.bmp and /dev/null differ diff --git a/report/img/visuals/sodf 70 agents, constant static/Response surface 3D plot kriggins 40.bmp b/report/img/visuals/sodf 70 agents, constant static/Response surface 3D plot kriggins 40.bmp deleted file mode 100644 index 8421843ecb6dd84848fe28b71d7a91c48d40521a..0000000000000000000000000000000000000000 Binary files a/report/img/visuals/sodf 70 agents, constant static/Response surface 3D plot kriggins 40.bmp and /dev/null differ diff --git a/report/img/visuals/sodf 70 agents, constant static/low_KS.png b/report/img/visuals/sodf 70 agents, constant static/low_KS.png new file mode 100644 index 0000000000000000000000000000000000000000..ed0a9c70e8b06db279e399688a4d3a0f55aa769a Binary files /dev/null and b/report/img/visuals/sodf 70 agents, constant static/low_KS.png differ