Commit 65d8c327 authored by Arne Graf's avatar Arne Graf

b4 split into chpt files

parent fe5bce10
......@@ -8,25 +8,25 @@
% Define block styles
\tikzstyle{decision} = [diamond, draw, fill=blue!20,
\tikzstyle{decision0} = [diamond, draw, fill=blue!20,
text width=4.5em, node distance=3cm, inner sep=0pt]
\tikzstyle{block} = [rectangle, draw, fill=blue!20,
\tikzstyle{block0} = [rectangle, draw, fill=blue!20,
text width=12em, align=center, rounded corners, minimum height=4em]
\tikzstyle{cloud} = [draw, ellipse,fill=blue!20, node distance=3cm,
\tikzstyle{cloud0} = [draw, ellipse,fill=blue!20, node distance=3cm,
minimum height=2em]
%----------------------------------------------------------------------------------
\tikzstyle{decision1} = [diamond, draw, fill=green!20,
\tikzstyle{decision10} = [diamond, draw, fill=green!20,
text width=4.5em, node distance=3cm, inner sep=0pt]
\tikzstyle{block1} = [rectangle, draw, fill=green!20,
\tikzstyle{block10} = [rectangle, draw, fill=green!20,
text width=12em, align=center, rounded corners, minimum height=4em]
\tikzstyle{cloud1} = [draw, ellipse,fill=green!20, node distance=3cm,
\tikzstyle{cloud10} = [draw, ellipse,fill=green!20, node distance=3cm,
minimum height=2em]
%----------------------------------------------------------------------------------
\tikzstyle{decision2} = [diamond, draw, fill=red!20,
\tikzstyle{decision20} = [diamond, draw, fill=red!20,
text width=4.5em, node distance=3cm, inner sep=0pt]
\tikzstyle{block2} = [rectangle, draw, fill=red!20,
\tikzstyle{block20} = [rectangle, draw, fill=red!20,
text width=5em, rounded corners, minimum height=4em]
\tikzstyle{cloud2} = [draw, ellipse,fill=red!20, node distance=3cm,
\tikzstyle{cloud20} = [draw, ellipse,fill=red!20, node distance=3cm,
minimum height=2em]
%---------------------------------------------------------------------------------
......@@ -35,10 +35,10 @@
\begin{tikzpicture}[auto]
% Place nodes left block
\node [block] (dfield) {create distance field\\ $d$};
\node [block, below = 0.8cm of dfield] (sfield) {create speed field\\ $s$};
\node [block, below = 0.8cm of sfield] (nFF) {create navigation floor-field\\ $c$};
\node [block1, below = 0.8cm of nFF] (nVF) {create vector field \\$(-1) \frac{\nabla c}{\left\Vert \nabla c \right\Vert}$};
\node [block0] (dfield) {create distance field\\ $d$};
\node [block0, below = 0.8cm of dfield] (sfield) {create speed field\\ $s$};
\node [block0, below = 0.8cm of sfield] (nFF) {create navigation floor-field\\ $c$};
\node [block10, below = 0.8cm of nFF] (nVF) {create vector field \\$(-1) \frac{\nabla c}{\left\Vert \nabla c \right\Vert}$};
%\node [block, below of=Jsim] (agents) {send/recv agents};
%\node [decision, below of=agents] (done) {done?};
%\node [cloud, below of=done, node distance=3cm] (end) {shutdown \emph{mobsim}};
......@@ -50,7 +50,7 @@
%\path [line] (done) -- node [near start] {yes} (end);
%\path [line] (done) -| node [anchor=south, near start] {no} +(-2.2,0) |- (Msim.west);
% ------- Middle block
\node [block1, right = 2cm of nVF] (wVF) {create vector field\\ $(-1) \nabla d$};
\node [block10, right = 2cm of nVF] (wVF) {create vector field\\ $(-1) \nabla d$};
%\node [block1, below of=m2j] (req) {send agent request};
%\node [decision1, below of=req] (isplace) {is space?};
%\node [block1, below of=isplace, node distance=3cm] (send) {send agent};
......
......@@ -5,9 +5,20 @@
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{fixltx2e}
%\usepackage[pdftex]{graphicx, color}
\usepackage{graphicx}
\usepackage{color}
\usepackage{adjustbox}
\usepackage{pdfpages}
\usepackage{epsfig}
\DeclareGraphicsRule{.pdftex}{pdf}{.pdftex}{}
\usepackage{subfigure}
\usepackage[]{natbib}
\makeatletter
......@@ -18,7 +29,7 @@
\usetikzlibrary{arrows,shadows}
%code snippets
\usepackage{color}
%\usepackage{color}
\usepackage{listings}
\usepackage{courier}
\usepackage{caption}
......@@ -57,9 +68,9 @@
%HTML
%Java
}
%\DeclareCaptionFont{blue}{\color{blue}}
%\DeclareCaptionFont{blue}{\color{blue}}
%\captionsetup[lstlisting]{singlelinecheck=false, labelfont={blue}, textfont={blue}}
%\captionsetup[lstlisting]{singlelinecheck=false, labelfont={blue}, textfont={blue}}
\DeclareCaptionFont{white}{\color{white}}
\DeclareCaptionFormat{listing}{\colorbox[cmyk]{0.43, 0.35, 0.35,0.01}{\parbox{\textwidth}{\hspace{15pt}#1#2#3}}}
\captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white, singlelinecheck=false, margin=0pt, font={bf,footnotesize}}
......@@ -100,8 +111,7 @@
\makeatother
%\author{Arne Graf}
%\title{Automated Routing in Pedestrian Dynamics}
\begin{document}
......@@ -116,37 +126,8 @@ Civil Security and Traffic}
\author{Masterthesis from Arne Graf}
\date{2015-10-06}
\date{2015-10-16}
\pagenumbering{gobble}% Remove page numbers (and reset to 1)
%\maketitle
%\newpage
%\begin{titlepage}
%\centering
%\vspace{3cm}
%
%{\huge
%Automated Routing in Pedestrian Dynamics
%}
%
%\vspace{3 cm}
%Fachhochschule Aachen, Campus Jlich
%
%Medizintechnik und Technomathematik,
%
%Technomathematik
%
%Forschungszentrum Jlich GmbH, JSC,
%
%Civil Security and Traffic
%
%\vspace{3 cm}
%
%Masterthesis from Arne Graf
%
%2015-10-06
%
%\end{titlepage}
\newpage
\input{./TitleTemp}
......@@ -196,7 +177,7 @@ Forschungszentrum J
%Historie: Dietrich's Model in Jupedsim; Bodenfeld warf Frage auf: Welche Diskretisierung (rectGrid, triangulated, how to deal with wall-surfaces), Probleme durch non-smooth Bodenfeld (?); -> Beschluss: Bodenfeld so gestalten, dass es gute Eigenschaften bei der Fugngersimulation verspricht.
%Dieses dann untersuchen und qualifizieren. Durch die Betreuung von M.C. floss die Erfahrung zahlreicher Modelle ein und es gelang bei der Modelfindung ein geeignetes Testmodel neu zu beschreiben.
In this thesis, the effect of an alternate floor-field is analyzed, by using it in a newly composed test-model for pedestrian dynamics. In simulations of pedestrian movement, the routing of agents\footnote{An agent is the representation of a pedestrian in the simulation. Depending on the used model, an agent incorporates some kind of artificial intelligence or basic agent-attributes only (like size, speed attributes, etc.). In the latter case the model takes over the task of navigating agents.} is an integral part. Routing can be seen as the composition of two aspects: the global pathfinding through a geometry and the avoidance of static or dynamic obstacles (like walls or other agents) in a local situation.
In this thesis, the effect of an alternate floor-field is analyzed, by using it in a newly composed test-model for pedestrian dynamics. In simulations of pedestrian movement, the routing of agents\footnote{An agent is the representation of a pedestrian in the simulation.} is an integral part. Routing can be seen as the composition of two aspects: the global pathfinding through a geometry and the avoidance of static or dynamic obstacles (like walls or other agents) in a local situation.
Development of pedestrian simulation shows various models with different answers to the question of navigation. Many of which make use of manually added elements\footnote{like some sort of domain-decomposition, e.g. through helplines} to solve the global pathfinding, which enable the user to simulate crowd movement in that specific geometry. Other models use an algorithm, that will supply a navigation direction for any geometry. The \emph{Gradient Navigation Model}(GNM) described by Dietrich\citep{Dietrich2014} is one of the later. It uses the solution of the Eikonal equation (see chapter \ref{eikonalequation}), which describes a 2-D wave-propagation. The wave starts in the target region and propagates throughout the geometry. Agents are directed in the opposite direction of the gradient of aforementioned solution of the Eikonal equation. The Routing using the plain floor-field will yield non-smooth pathways. This could pose a problem for models, relying on a well-posed problem. In \cite{Dietrich2014}, Dietrich shows the existance and uniqueness of a solution to his problem-formulation by using the theorem of Picard-Lindelf.
%\footnote{Picard-Lindelf theorem: Consider the initial value problem \newline \begin{center}
......@@ -257,18 +238,13 @@ To simulate pedestrian crowds, many models exist with different characteristics.
\label{classes}
\end{figure}
%\begin{figure}[h!]
%\includegraphics[width=1.0\linewidth]{pics/organizationModels.pdf}
%\caption{A possible hierarchical classification of models in pedestrian dynamics in \citep{Chraibi2012}}
%\end{figure}
\emph{Macroscopic} models tackle crowd behavior without the need to characterize individuals, which make up the crowd. The action of a single agent is neglected and it is assumed, that aggregated values are sufficient to describe the crowd behavior. Metrics, e.g. density or flow, are used to describe the dynamic within the system. Thus a crowd is seen as a continuous fluid, which can be modeled by these aggregated observables only. No inter-particle relations are explicitly considered. Given a model, which describes the change of the density throughout a geometry, it can be mathematically captured by an PDE. Larger roadmap- and city-traffic-simulation are fields, where macroscopic models are widely spread and can supply travel times and point out bottlenecks \citep{Emme}. There are limitations to this class of models. They are fast but lack the ability to simulate heterogeneous groups. Nor can they model individual decisions. In a panic situation, it has been observed, that pedestrians follow the crowd, even if other exits are available. A flow-based model would have the pedestrians use all available exits \citep{Marno}.
\emph{Microscopic} models consist of mathematical formulations describing the state and the interactions of every agent. Each agent has a position in the domain and interacts with its environment. It is assumed that the dynamics in any crowd is the result of individual actions. Within the model, these individual actions obviously must be different from the attempt to model the complete, complex system of a person's psychology, which defines its motivation of movement inside a crowd. It is desirable to have few and simple equations to model the agent's motivation. In analogy to Newtonian dynamics, it can be modeled by driving and repelling forces \citep{Helbing2001}. They lead to second order ordinary differential equations.
A popular starting point origins in the modeling of the behavior of electrical charges in an electro-magnetic potential field (see figure \ref{forcesOnAgent}). Charges of the same sign act on each other with a repelling force. This effect is used in the modeling of the natural collision-avoidance of a person to other persons, walls and obstacles in pedestrian dynamics. Superposing a driving force, that acts on the agent, steering it towards its destination, the resulting \emph{force based} model can be described by an ODE.\footnote{This simplified describtion shall suffice for this introduction. For further reference, please see corresponding literature. A comprehensive insight in SFMs is given in \citep{Chraibi2012}}
\begin{figure}[h!]
\includegraphics[width=1.0\linewidth]{pics/forces_on_agent.pdf}
\input{forcesOnAgent.pdf_t}
%\includegraphics[width=1.0\linewidth]{pics/forces_on_agent.pdf}
\caption{Forces acting on agent A from: wall, obstacle and agent B}
\label{forcesOnAgent}
\end{figure}
......@@ -276,26 +252,20 @@ A popular starting point origins in the modeling of the behavior of electrical c
\subsection{ODE based, microscopic models}
%<< Explain different types (social force (2nd order), velocity based (1st order)) >>
%<< velocity based have a sub-group using floor-fields (Dietrich's) >>
%<< yet another model? >>
We focus on ODE-based microscopic models, which are successful in producing system phenomena like congestions in front of bottlenecks and showing good accordance with experimentally determined fundamental diagrams
\footnote{Fundamental diagrams plot the (pedestrian) flux/flow over the (pedestrian) density.}
\footnote{Fundamental diagrams plot the (pedestrian) flow over the (pedestrian) density.}
[Dietrich, 2014].
Agents seem to sway left and right and do not steer as wanted. Various authors try to find new models with enhanced characteristics in terms of directing agents \citep{Moussaid2011}\citep{Chraibi2011}.
The difficult calibration of a model is another important issue. This type of models find their limit, if one is to find one constant set of parameters for various situations. Best results are achieved with a special calibrated set of parameters for each situation. The change of parameter sets would be problematic, if we want to make extensive use of parallel solvers. In terms of ergonomics, a constant set would be more user-friendly.
\emph{Velocity based} models, which often lead to first order ODEs, make up an important sub-group. These models change the agent's velocity directly and thus show much better trajectories in terms of oscillation. The TEST\footnote{substitute name of model}-model of this thesis, is partly derived from the \emph{GNM} \citep{Dietrich2014}, a velocity-based model. Dietrich motivates the creation of his model. He intends to overcome short-comings of both groups, the SFM and the Optimal Step Models, yet have the positive characteristics remain. MISSING SENTENCE.
\emph{Velocity based} models, which often lead to first order ODEs, make up an important sub-group. These models change the agent's velocity directly and thus show much better trajectories in terms of oscillation. The TEST\footnote{substitute name of model}-model of this thesis, is partly derived from the \emph{GNM} \citep{Dietrich2014}, a velocity-based model. Dietrich motivates the creation of his model. He intends to overcome short-comings of both groups, oscillation (SFM) and the difficult mathematical treatment of Optimal Step Models, yet have the positive characteristics remain.
A major step towards this goal is the use of a navigation field, the solution to the Eikonal equation. This approach, introduced by Hartmann \citep{Hartmann2010}, provides routing and navigation information. In the GNM, Dietrich divides the navigation into two components. A static and a dynamic navigation vector are described. The static navigation field comprehends the geometry, the dynamic navigation field integrates pedestrians and mobile obstacles. It is clear, that the dynamic navigation field must be computed for every time-step throughout the simulation.
Besides oscillation and calibration, there is a third issue, on which we will feast in the next chapter: Overlapping. It describes a situation, where an agent's position is invalid either because the agent overlapps with another agent or because his simulated presence overlapps with a wall or even an obstacle. Once an agent is fully clipped through a wall-surface, faulty trajectories are most certain.
These issues highlight the need to develop pedestrian models and search for yet another model, which might overcome some of the shortcomings and can produce as good results as existing models already provide.
\newpage
\section{Modelling}
In the latter, a new model is described,
......@@ -307,7 +277,6 @@ maintaining the positive characteristics of row-formation, stop-and-go
waves and such - like seen in pedestrian crowd behavior.
\end{itemize}
In many of second order models, agents breach wall-surfaces and get stuck inside of walls.
%\footnote{This agent-behavior in simulations has not yet been observed in experiments. Participants asked to do so in advance refused cooperation. (just kidding)}
This undesired phenomenon highlights the challenge in calibrating forces and parameters of existing models, so that agents show valid natural behavior while not getting overlapping in extreme situations. Especially in situations of high crowd density, e.g. when facing bottlenecks, overlapping can occur. The model or the data-post-processing needs to find a special treatment of such artifacts in the data. It leads to inaccuracies in measurements, e.g. in counting and flow-calculation.
\begin{figure}[h!]
\includegraphics[width=1.0\linewidth]{pics/agents_caught01}
......@@ -328,7 +297,7 @@ In order to keep the model simple, repulsive wall forces as seen in Social Force
\subsection*{Definitions:}
Let $\Omega$ be the discret set of gridpoints in the bounded domain, which holds the geometry of the simulation, a subset of $\mathbb{R}^{2}$.The following functions will be used in the model-formulation and shall be introduced:
Let $\Omega$ be the discret set of gridpoints in the bounded domain, which holds the geometry of the simulation, a subset of $\mathbb{R}^{2}$. The following functions will be used in the model-formulation and shall be introduced:
\[ d : \Omega \ni \vec{x} \longrightarrow d(\vec{x}) \in \mathbb{R}, \qquad \Omega \subseteq \mathbb{R}^{2} \]
assigns to each gridpoint in $\Omega$ the distance to the closest wall. It will be used to choose, in which mode the movement-vector candidate will be altered.
\[ P : \mathbb{R}^2 \times \Omega \ni (\vec{v}, \vec{x}) \longrightarrow P(\vec{v}, \vec{x}) \in \mathbb{R}^2 \]
......@@ -340,88 +309,62 @@ limits the length of any inputvector $\vec{v}$ to unit length. If $\left\lVert \
\[ \sum_{i=1}^{n}\vec{v}_{repP,i} : \overset{n}{\underset{i=1}{\otimes}} \mathbb{R}^2_i \ni (\vec{v}_1, ... \vec{v}_n) \longrightarrow \sum_{i=1}^{n}\vec{v}_{repP,i} \in \mathbb{R}^{2} \]
is adding the distance-dependand\footnote{The correlation of distance and force is the Gompertz-function. The function is smooth and adjustable in scale, range of influence and steepness.} repelling force of neighboring agents within a close vicinity. This sum is analog to the SFM model, yet the resulting direction is directly taken and not converted to an acceleration nor to a velocity. The letter $v$ is a hint to being a vector, \emph{not} to being a velocity.
%\begin{tabular}{lllclll}
%$ d $ & : $\Omega $ & $ \ni \vec{x} $ & $ \longrightarrow $ & $ d(\vec{x}) $ & $\in \mathbb{R} \quad $ & $:= \quad $ distance to the closest wall \\
%$ P $ & : $\mathbb{R}^2 \times \Omega $ & $ \ni (\vec{v}, \vec{x}) $ & $ \longrightarrow $ & $ P(\vec{v}, \vec{x}) $ & $\in \mathbb{R}^2 \quad $ & $ := \quad $ orth. proj. of $\vec{v}$ onto closest wall of $\vec{x}$ \\
%$ v_{ff} $ & : $\Omega $ & $ \ni \vec{x} $ & $ \longrightarrow $ & $ v_{ff}(\vec{x}) = \vec{v}_{ff} $ & $ \in \mathbb{R}^2 \quad $ & $:= \quad $ floor-field at position $\vec{x}$ \\
%$ g $ & : $\mathbb{R}^2 $ & $ \ni \vec{v} $ & $ \longrightarrow $ & $ g(\vec{v}) $ & $ \in \mathbb{S}^2 $ & $:= \quad $ proj. onto the unit-sphere in $\mathbb{R}^2$ \\
%\end{tabular}
\subsection*{Constants:}
$\alpha$\\
$\alpha_s$\\
$\alpha_r$\\
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
%\vspace*{1cm}
\newpage
\begin{center}
\textbf{TEST Model:}\\
\end{center}
\begin{align*}
&\Delta\vec{x}_{n}&&= \Delta t\cdot\vec{v}_{n, res}\\
&\vec{v}_{n}&&= \alpha\cdot\vec{v}_{n-1, res} + (1 - \alpha)\cdot g\left(g(\vec{v}_{ff})+g(\sum_{i=1}^n\vec{v}_{repP,i})\right)\\
&\vec{v}_{n, res}&&= \left\{
\begin{aligned}
%&\left(1-\frac{1}{2}\left[(\hat{v}\cdot(-\nabla \hat{d}))+\vert(\hat{v}\cdot(-\nabla \hat{d}))\vert\right]\right) & P(\vec{v}_{n}) \quad &: & d(\vec{x})&& < 0.1\\
&\left(1-\langle\vec{v}_{n},-\nabla d\rangle\right) & P(\vec{v}_{n}) \quad & \textbf{if} \quad && d(\vec{x}) < && \alpha_{h}; \quad \langle\vec{v}_{n},-\nabla d\rangle \ge 0 \\
&\left(1-\langle\vec{v}_{n},-\nabla d\rangle\right) & P(\vec{v}_{n}) \quad & \textbf{if} \quad && d(\vec{x}) < && \alpha_{r}; \quad \langle\vec{v}_{n},-\nabla d\rangle \ge 0 \\
%&\left(1-\frac{1}{2}\left[(\hat{v}\cdot(-\nabla \hat{d}))+\vert(\hat{v}\cdot(-\nabla \hat{d}))\vert\right]\right) & \vec{v}_{n} \quad &: \quad 0.1 < & d(\vec{x})&& < 0.2\\
&\left(1-\langle\vec{v}_{n},-\nabla d\rangle\right) & \vec{v}_{n} \quad & \textbf{if} \quad \alpha_{h} < && d(\vec{x}) < && \alpha_{s} ;\quad \langle\vec{v}_{n},-\nabla d\rangle \ge 0\\
&\left(1-\langle\vec{v}_{n},-\nabla d\rangle\right) & \vec{v}_{n} \quad & \textbf{if} \quad \alpha_{r} < && d(\vec{x}) < && \alpha_{s} ;\quad \langle\vec{v}_{n},-\nabla d\rangle \ge 0\\
& &\vec{v}_{n} \quad & \textbf{else} && &&%& d(\vec{x})&& > 0.2
\end{aligned}
\right.\\
%&\vec{v}_{n, res}&&= \begin{cases}
% \left(1-\frac{1}{2}\left[(\hat{v}\cdot(-\nabla \hat{d}))+\vert(\hat{v}\cdot(-\nabla \hat{d}))\vert\right]\right)\cdot\vec{v}_{n} & \quad : \quad d(\vec{x}) < 0.2,\\
% \vec{v}_{n} & \quad : \quad d(\vec{x}) > 0.2
% \end{cases}\\
%&\vec{v}_{n, res}&&= \begin{cases}
% \left(1-\frac{1}{2}\left[(\hat{v}\cdot(-\nabla \hat{d}))+\vert(\hat{v}\cdot(-\nabla \hat{d}))\vert\right]\right)\cdot\vec{v}_{n} & \quad : \quad d(\vec{x}) < 0.2,\\
% \vec{v}_{n} & \quad : \quad d(\vec{x}) > 0.2
% \end{cases}\\
&\vec{v}_{n}&&= \alpha\cdot\vec{v}_{n-1, res} + (1 - \alpha)\cdot g\left(g(\vec{v}_{ff})+g(\sum_{i=1}^n\vec{v}_{repP,i})\right)
&\Delta\vec{x}_{n}&&= \Delta t\cdot\vec{v}_{n, res}\\
\end{align*}
%
%\vspace*{2cm}
%\begin{alignat}{1}
%\Delta\vec{x}\quad=\quad & \Delta t\cdot\vec{v}_{res}\\
%\vec{v}_{res}\quad=\quad & \left(1-\frac{1}{2}\left[(\vec{v}_{n}\cdot(-\nabla distances)_{n})+\vert(\vec{v}_{n}\cdot(-\nabla distances)_{n})\vert\right]\right)\cdot\vec{v}_{n}\\
%\vec{v}_{n}\quad=\quad & g(g(\vec{v}_{ff})+g(\sum\vec{v}_{repP,i}))\\
%\vec{v}_{ff}\quad=\quad & v_{ff}(\vec{x})\\
%\end{alignat}
%
%\begin{align}
%\Delta\vec{x}\quad= & \quad\Delta t\cdot\vec{v}_{res}\\
%\vec{v}_{res}\quad= & \quad\bigg(1-\frac{1}{2}\bigg[\langle\vec{v}_{n},(-\nabla distances)_{n}\rangle+\big\vert\langle\vec{v}_{n},(-\nabla distances)_{n}\rangle\big\vert\bigg]\bigg)\cdot\vec{v}_{n}\\
%\vec{v}_{n}\quad= & \quad g\big(\quad g(\vec{v}_{ff})+g(\underset{\small i}{\sum}\vec{v}_{repP,i})\quad\big)\\
%\vec{v}_{ff}\quad= & \quad v_{ff}(\vec{x})
%\end{align}
%
%\subsection{Variant Model}
%
%<< short (!) overview over the model-modules >>
%
%The model can be sectioned into these modules:
%
%\begin{itemize}
%\item Floorfield \begin{itemize}
% \item distance-field
% \item enhanced floor-field
% \end{itemize}
%\item Intra Crowd Repulsion
%\item Direction-Calculator
%\item Anti-Overlapping
%\item Speed Calculator
%\end{itemize}
\newpage
%
\begin{figure}[h!]
\begin{center}
%\begin{center}
\input{./modelchart.tex}
\end{center}
%\includepdf[pages={1}]{./modelchart.pdf}
\caption{Calculation of pedestrian movement during one timestep}
%\end{center}
\end{figure}
What might seem curious at first, is the fact, that both, the navigation field $\vec{v}_{ff}$ and the \emph{sum} of pedestrian forces $\sum\vec{v}_{repP,i} $, are restricted to the length of 1 unit by $g$. Then their sum in turn is restricted again. This obviously breaks the principle of superposition of forces. We cannot talk about a force-based model here and loose the analogy to Newton's second law the first time applying $g$ on the sum of forces $\sum\vec{v}_{repP,i}$. The resulting vector indicates a new orientation and a slow-down mechanic, as the vector can be of length $ \le 1 $ unit.
\newpage
The sum of the navigation field (static) and the accumulated pedestrian forces (dynamic) are restricted by $g$ and then weighted by 20\%, the speed vector of the last time-step gets weighted by 80\%. This is done to reduce flickering\footnote{We want to shortly address a second alternative approach. If one is willing to accept flickering agents with fast changing orientations, one could ommit the speed-vector of the time-step $n-1$ and postprocess the trajectories. As we only get positions at discrete time-steps, one could easily create a smooth trajectory by using \emph{B-splines}.} of agents and must be kept in mind, as this approach could result in a tendency to create oscillation in narrow corridors. The weighted sum limits the change of orientation and thus an agent could bounce between two opposing walls as seen in \ref{bounce}. If oscillation should occur in any case, the weight should be shifted away from the last time-step. This way, agents get enabled to turn more aggressive and closely follow the navigation-floor-field.
What might seem curious at first, is the fact, that both, the navigation field $\vec{v}_{ff}$ and the \emph{sum} of pedestrian forces $\sum\vec{v}_{repP,i} $, are restricted to the length of 1 unit by $g$. Then their sum in turn is restricted again. This obviously breaks the principle of superposition of forces. We cannot talk about a force-based model here and loose the analogy to Newton's second law the first time applying $g$ on the sum of forces $\sum\vec{v}_{repP,i}$. The resulting vector indicates a new orientation and a slow-down mechanic, as the vector can be of length $ \le 1 $ unit.
In the next step, we process $\vec{v}_{n}$. It is checked, how distant the next wall is and if the agent is close to any wall, we build the scalar product $\langle\vec{v}_{n},-\nabla \hat{d}\rangle$ to evaluate, if there is a orientation towards the closest wall. In this case, the agent is slowed down. If the agent is already very close to the wall, the velocity-component towards the wall gets neglected. Thus, the agent gets directed to move parallel to the wall.
The sum of the navigation field (static) and the accumulated pedestrian forces (dynamic) are restricted by $g$ and then weighted by 20\%, the speed vector of the last time-step gets weighted by 80\%. This is done to reduce flickering\footnote{We want to shortly address a second alternative approach. If one is willing to accept flickering agents with fast changing orientations, one could ommit the speed-vector of the time-step $n-1$ and postprocess the trajectories. As we only get positions at discrete time-steps, one could easily create a smooth trajectory by using \emph{B-splines}.} of agents and must be kept in mind, as this approach could result in a tendency to create oscillation in narrow corridors. The weighted sum limits the change of orientation and thus an agent could bounce between two opposing walls. If oscillation should occur in any case, the weight should be shifted away from the last time-step. This way, agents get enabled to turn more aggressive and closely follow the navigation-floor-field.
In the next step, we process $\vec{v}_{n}$. It is checked, how distant the next wall is and if the agent is close to any wall, we build the scalar product $\langle\vec{v}_{n},-\nabla \hat{d}\rangle$ to evaluate, if there is a orientation towards the closest wall. In this case, the agent is slowed down.
%
\begin{figure}[h!]
\begin{center}
\input{./slowdown.pdf_t}
%\includegraphics[width=1.\linewidth]{pics/slowdown}
\caption{Slowdown: Reduction of the unit-speed-vector to avoid clipping}
\label{slowdownfig}
\end{center}
\end{figure}
If the agent is already very close to the wall, the velocity-component towards the wall gets neglected. Thus, the agent gets directed to move parallel to the wall.
%
\begin{figure}[h!]
\includegraphics[width=1.\linewidth]{pics/redirect}
\caption{Alteration of the speed-vector to avoid clipping}
\begin{center}
\input{./redirect.pdf_t}
%\includegraphics[width=1.\linewidth]{pics/redirect}
\caption{Redirection of the unit-speed-vector to avoid clipping}
\label{redirectfig}
\end{center}
\end{figure}
\subsection{Eikonal Equation}\label{eikonalequation}
......@@ -429,11 +372,11 @@ In the next step, we process $\vec{v}_{n}$. It is checked, how distant the next
The ``Eikonal equation'' in a domain \textgreek{W}, subset of $\mathbb{R}^{n}$,
\begin{align*}
\vert\nabla u(\vec{x})\vert\quad= & \quad F(\vec{x}),\quad \vec{x}\in\Omega,\\
\mathrm{s.t.}\qquad u|_{\partial\Omega}\quad= & \quad 0.\\
\mathrm{s.t.}\qquad u|_{\partial\Omega}\quad= & \quad 0,\\
\end{align*}
yields the ``time-cost'' $u(\vec{x})$ in a spacial domain, provided a target region within the domain as input as well as a slowness-field $F(\vec{x})$. A valid interpretation of ``time-cost''-iso-lines is to picture a wavefront at a given time $ t $, originating in the target region ($ t=0 $) and propagating throughout the spacial domain \textgreek{W} with the given speed $v=\frac{1}{F(\vec{x})}$ while flowing around any obstacles (see figure \ref{fig:BottleneckObstaclePure}).
\begin{figure}[h!]
\includegraphics[width=1.\linewidth]{pics/BottleneckObstaclePure}
\includegraphics[width=1.\linewidth]{pics/BottleneckUPure}
\caption{Isolines of ``time-cost''.}
\label{fig:BottleneckObstaclePure}
\end{figure}
......@@ -468,7 +411,7 @@ How can an agent ``avoid'' the close vicinity of any wall or obstacle?
\subsection{Distances-Field}
\begin{figure}[h!]
\includegraphics[width=1.\linewidth]{pics/DistanceField2}
\includegraphics[width=1.\linewidth]{pics/DistanceFieldNew}
\caption{Distances field of the bottleneck geometry}
\label{fig:DistanceField2}
\end{figure}
......@@ -486,25 +429,15 @@ Having above question in mind, we first need to introduce and understand the \te
\caption{Usage of the Distances-Field in the vector-fields}
\label{sequenceToVFs}
\end{figure}
\footnote{change "target" to "origin" in figure? easier to understand?}
%\footnote{change "target" to "origin" in figure? easier to understand?}
\paragraph{}
The Direction-to-Wall-Field is a normalized vector-field. Each vector has unit length. The orientation is gained by the negative gradient to the Distances-Field. This way, every given vector at $\vec{x}$ directs to the closest wall of that given grid-point $\vec{x}$.
\paragraph{}
The function value $d(\vec{x})$ will be used to create a slowness-field on the discrete grid. This slowness-field holds the value, which determines, how slow the 2-D wave will propagate over the grid-point in the final \emph{navigation}-field. Points, that are relatively close to a wall, will have a corresponding low value $d(\vec{x})$. Therefore, the 2-D wavefront will slow-down over these points. Routes/Pathways passing these points will take more time and be less optimal in a sense, that combines distances and wall-avoidance. We will refer to the value $u(\vec{x})$ as the \emph{time-cost-value} (\emph{cost} in short).
%Both vector-fields, which will have two different names, are created by using the Fast-Marching algorithm:
%\begin{enumerate}
%\item \emph{Direction-to-Wall-Field}: this vector field holds the normalized direction to the closest wall
%\item \emph{Navigation-Field}: this vector field holds the negative gradient of the altered floor-field (time-cost-field)
%\end{enumerate}
%The \emph{Direction-to-Wall-Field} is the normalized Gradient vector-field of the distances. It can be obtained by starting a wavefront $t = 0$ at all grid-points that represent a wall or an obstacle. The wavefront then propagates in the domain with a homogeneous speed. At $ t = 2/v $ the wavefront holds all grid-points, that are $2m$ away from the closest wall.
<< explain the pre-step incl. the threshold "cut-off"; have some nice pictures >>
\begin{figure}[h!]
\includegraphics[width=1.\linewidth]{pics/transformFF}
\subfigure{\includegraphics[width=1.\linewidth]{pics/BottleneckUPure2}}
\subfigure{\includegraphics[width=1.\linewidth]{pics/BottleneckUEnhanced2}}
\caption{Isolines of a floor-field (above) compared to isolines of the enhanced floor-field (below). Sample trajectories in white.}
\label{fig:transformFF}
\end{figure}
......@@ -521,34 +454,20 @@ To show the performance of the TEST model, we started a simulation in a complex
The trajectories improved and look much more natural. This was achieved without the need to manually adding decomposing help-lines or intermediate navigation goals.
\begin{figure}[h!]
\includegraphics[width = 1.\linewidth]{pics/trajCompare}
\subfigure{\includegraphics[width = .49\linewidth]{pics/compUgly}}
\subfigure{\includegraphics[width = .49\linewidth]{pics/compNice}}
\caption{Comparison between trajectories: Routing with helplines (left) to routing with navigation field (right).}
\end{figure}
\begin{figure}[h!]
\subfigure{\includegraphics[width=.49\linewidth]{pics/Verteilerebene0}}
\subfigure{\includegraphics[width=.49\linewidth]{pics/Verteilerebene2}}
\subfigure{\includegraphics[width=.49\linewidth]{pics/Verteilerebene4}}
\subfigure{\includegraphics[width=.49\linewidth]{pics/Verteilerebene5}}
\subfigure{\includegraphics[width=.49\linewidth]{pics/Ver1}}
\subfigure{\includegraphics[width=.49\linewidth]{pics/Ver2}}
\subfigure{\includegraphics[width=.49\linewidth]{pics/Ver3}}
\subfigure{\includegraphics[width=.49\linewidth]{pics/Ver4}}
\caption{Simulation of a complex geometry with multiple exits and ~ 3000 agents}
\label{fig:verteilerebene}
\end{figure}
%\subsubsection{Distances-Field and repulsive Wall-Forces}
%<< optional? describe in short that the distance field takes responsibility for not
%clipping in two ways: redirect in wall-distance < 0.2; modify floor-field to avoid walls >>
%<< move this section >>
%\subsection{Idea of Separation of a Moving-Vector into Direction and Magnitute}
%\subsubsection{no clipping}
%\subsubsection{Recycling the Distances Field (neg. Gradient must be saved)}
%$\vec{v}_{res}\quad=\quad\bigg(1-\frac{1}{2}\bigg[\langle\vec{v}_{n},(-\nabla distances)_{n}\rangle+\big\vert\langle\vec{v}_{n},(-\nabla distances)_{n}\rangle\big\vert\bigg]\bigg)\cdot\vec{v}_{n}$
\newpage
\section{Verification and Validation}
In this chapter, we want to describe applicable tests to analyze the effect of the \emph{wall-avoid-distance} parameter to the output of the TEST-model. It shall be verified, that we see no overlapping and that the crowd shows typical phenomena, like lane-formation \citep{ZhangQ2011}. Following our set of tests, we will then validate the TEST-model to produce the pedestrian flow in bottleneck experiments, corresponding to empirical data. This verification is widely considered ao the most important criterion to validate simulation results \citep{Seyfried2008}. We will further compare the trajectories with a different model, one using automated triangulation to assist routing. The last test is a mere stress test to the model. We want to see how the model performes in an evacuation setting with a large, crowded geometry.
......@@ -569,25 +488,56 @@ In this chapter, we want to describe applicable tests to analyze the effect of t
\label{test01}
\end{figure}
%\begin{itemize}
%\item alle oder die wichtigsten Testflle
%\item hier auflisten
%\end{itemize}
\subsection{Variation of the Parameter}
\begin{figure}[h!]
\subfigure{\includegraphics[width=1.\textwidth]{pics/Role12_02}}
\subfigure{\includegraphics[width=1.\textwidth]{pics/Role12_16}}
\caption{Bottleneck Experiment:\\above: width: $1.2\,m$, wall-avoid-distance: $0.0\,m$\\below: width: $1.2\,m$, wall-avoid-distance: $1.6\,m$}
\label{varyWAD}
\end{figure}
We take special interest in the following test-case, as it validates the model to yield a fundamental diagram like seen in real world experiments:
The tests demands to simulate a bottleneck experiment several times. This is to be repeated for various bottleneck-widths. The calculated flow through the bottleneck shall match the empirical data.
We have conducted this test for various \emph{wall-avoid-distance} parameter and want to analyze the change in the flow. It can be seen, that the more the agents will gear to avoid obstacles and walls, the lesser the flow will become (see \ref{funddiag}). This result is expectable. It was also shown, that without the enhancement of the floor-field, few agents did \emph{not} pass the bottleneck, but got caught inside of walls.
\begin{figure}[h!]
\subfigure{\includegraphics[width=1.\textwidth]{pics/Role14_04}}
\subfigure{\includegraphics[width=1.\textwidth]{pics/Role25_04}}
\caption{Bottleneck Experiment:\\above: width: $1.4\,m$, wall-avoid-distance: $0.4\,m$\\below: width: $2.5\,m$, wall-avoid-distance: $0.4\,m$}
\label{varyWidth}
\end{figure}
%\begin{figure}[h!]
%\includegraphics[width=1.\textwidth]{pics/Role12_04}
%\caption{Bottleneck Experiment: \\width: $1.2\,m$, wall-avoid-distance: $0.4\,m$}
%\label{funddiag}
%\end{figure}
%
%\begin{figure}[h!]
%\includegraphics[width=1.\textwidth]{pics/Role12_08}
%\caption{Bottleneck Experiment: \\width: $1.2\,m$, wall-avoid-distance: $0.8\,m$}
%\label{funddiag}
%\end{figure}
%
%\begin{figure}[h!]
%\includegraphics[width=1.\textwidth]{pics/Role12_16}
%\caption{Bottleneck Experiment: \\width: $1.2\,m$, wall-avoid-distance: $1.6\,m$}
%\label{funddiag}
%\end{figure}
\begin{figure}[h!]
\includegraphics[width=1.\textwidth]{pics/sim_flow_vs_experimental_data}
\caption{Fundamental diagram with empiric data and simulation results}
\label{funddiag}
\end{figure}
\subsection{Laneformation}
\begin{figure}[h!]
\subfigure{\includegraphics[width=.49\textwidth]{pics/corner0}}
\subfigure{\includegraphics[width=.49\textwidth]{pics/corner1}}
\subfigure{\includegraphics[width=.49\textwidth]{pics/corner2}}
\subfigure{\includegraphics[width=.49\textwidth]{pics/corner3}}
\subfigure{\includegraphics[width=.49\textwidth]{pics/corner4}}
\subfigure{\includegraphics[width=.49\textwidth]{pics/corner5}}
\caption{Bottleneck-Corner Experiment: After the bottleneck, agents pass the corner.}
\label{funddiag}
\end{figure}
\newpage
\section{Conclusion and Outlook}
......
%\documentclass{article}
%
%\usepackage[latin1]{inputenc}
%\usepackage{adjustbox}
%\usepackage{tikz}
%\usetikzlibrary{shapes,arrows}
\usetikzlibrary{shapes,arrows}
\usetikzlibrary{positioning}
%\begin{document}
\begin{adjustbox}{width=\textwidth, height=\textheight, keepaspectratio}
%\pagestyle{empty}
% Define block styles
\tikzstyle{decision} = [diamond, draw, fill=blue!20,
text width=4.5em, node distance=3cm, inner sep=0pt]
text width=4.5em, align=center, inner sep=0pt]
\tikzstyle{block} = [rectangle, draw, fill=blue!20,
text width=12em, align=center, rounded corners, minimum height=4em]
\tikzstyle{cloud} = [draw, ellipse,fill=blue!20, node distance=3cm,
minimum height=2em]
text width=7em, align=center, rounded corners, minimum height=4em]
\tikzstyle{cloud} = [draw, ellipse,fill=blue!20, align=center,
minimum height=3em]
%----------------------------------------------------------------------------------
\tikzstyle{decision1} = [diamond, draw, fill=green!20,
text width=4.5em, node distance=3cm, inner sep=0pt]
\tikzstyle{block1} = [rectangle, draw, fill=green!20,
text width=12em, align=center, rounded corners, minimum height=4em]
\tikzstyle{cloud1} = [draw, ellipse,fill=green!20, node distance=3cm,
minimum height=2em]
%\tikzstyle{decision1} = [diamond, draw, fill=green!20,
% text width=4.5em, node distance=3cm, inner sep=0pt]
%\tikzstyle{block1} = [rectangle, draw, fill=green!20,
% text width=5em, align=center, rounded corners, minimum height=4em]
%\tikzstyle{cloud1} = [draw, ellipse,fill=green!20, node distance=3cm,
% minimum height=2em]
%----------------------------------------------------------------------------------
\tikzstyle{decision2} = [diamond, draw, fill=red!20,
text width=4.5em, node distance=3cm, inner sep=0pt]
\tikzstyle{block2} = [rectangle, draw, fill=red!20,
text width=5em, rounded corners, minimum height=4em]
\tikzstyle{cloud2} = [draw, ellipse,fill=red!20, node distance=3cm,
minimum height=2em]
%\tikzstyle{decision2} = [diamond, draw, fill=red!20,
% text width=4.5em, node distance=3cm, inner sep=0pt]
%\tikzstyle{block2} = [rectangle, draw, fill=red!20,
% text width=5em, rounded corners, minimum height=4em]
%\tikzstyle{cloud2} = [draw, ellipse,fill=red!20, node distance=3cm,
% minimum height=2em]
%---------------------------------------------------------------------------------
\tikzstyle{line} = [draw, -latex, ultra thick]
%
\begin{tikzpicture}[auto]
% Place nodes left block
\node [block] (compi) {get Neighbors of ped $i$};
\node [block, below = 0.8cm of compi] (getj) {get Neighbor j};
\node [decision, below = 0.8cm of getj] (valinf) {is influencing ped $i$?};
\node [cloud] (start) {set timestamp $t$, $i=0$};
\node [block, below = 0.8cm of start] (compi) {get Neighbors of ped $i$, $j=0$, sum$=0$};
\node [block, right = 1.5cm of compi] (getj) {get Neighbor j};
\node [decision, right = 1.5cm of getj] (valinf) {is influencing ped $i$?};
\node [block, below = 0.8cm of valinf] (addinf) {add influence to sum};
\node [decision, below = 0.8cm of addinf] (checkloop) {more neighbors to ped $i$?};
\node [block, below = 0.8cm of checkloop] (calcrep) {calculate $g(sum)$};
\node [decision, left = 1.5cm of addinf] (checkloop) {more neighbors to ped $i$?};
\node [block, below = 1.5cm of compi] (calcrep) {calculate $g(sum)$};
\node [block, below = 0.8cm of calcrep] (calcpuremov) {calculate $g(g(sum) + g(\nabla c))$};
\node [block, below = 0.8cm of calcpuremov] (calcjitter) {calc $\alpha$ oldmov $+ (1-\alpha)$ newmov};
\node [decision, below = 0.8cm of calcjitter] (isslowed) {is in slowdown band $d \leq \alpha_{s}$?};
\node [decision, below = 0.8cm of isslowed] (toWall) {geared towards wall $\langle\vec{v}_{n},-\nabla d\rangle \ge 0$?};
\node [decision, below = 0.8cm of toWall] (isredir) {is in redirection band $d \leq \alpha_{h}$?};
\node [block, below = 0.8cm of isredir] (redir) {redirect to move parallel to wall};
\node [block, below = 0.8cm of redir] (slow) {slowdown with $(1-\langle\vec{v}_{n},-\nabla d\rangle)$};
\node [decision, below = 0.8cm of slow] (checkoutloop) {next pedestrian?}
% Draw edges
\node [block, below = 0.8cm of calcpuremov] (calcjitter) {calc $\alpha oldmov + (1-\alpha) newmov$};
\node [decision, below = 0.8cm of calcjitter] (isslowed) {is in slowdown band}; % $d \leq \alpha_{s}$?};
\node [decision, right = 1.5cm of isslowed] (toWall) {geared towards wall}; % $\langle\vec{v}_{n},-\nabla d\rangle \ge 0$?};
\node [decision, right = 1.5cm of toWall] (isredir) {is in redirection band}; % $d \leq \alpha_{r}$?};
\node [block, below = 1cm of isredir] (redir) {redirect to move parallel to wall};
\node [block, left = 1.5cm of redir] (slow) {slowdown with $(1-\langle\vec{v}_{n},-\nabla d\rangle)$};
\node [block, below = 1cm of isslowed] (mov) {move agent $i$};
\node [decision, below = 0.8cm of mov] (checkoutloop) {next pedestrian?};
%\node [block, right = 1.5cm of checkoutloop] (t+1) {$t=t+1$};
% % Draw edges
\path [line] (start) -- (compi);
\path [line] (compi) -- (getj);
\path [line] (getj) -- (valinf);
\path [line] (valinf) -- (addinf);
\path [line] (valinf) -- node [near start] {yes} (addinf);
\path [line] (valinf) -- node [near start] {no} (checkloop); %+(-3,0) + (0,-4)-| (checkloop.south);
\path [line] (addinf) -- (checkloop);
\path [line] (checkloop) -- node [near start] {yes} (getj);
\path [line] (checkoutloop) -- node [near start] {yes} (compi);
%\path [line] (done) -| node [anchor=south, near start] {no} +(-2.2,0) |- (Msim.west);
% ------- Middle block
%\node [block1, right = 2cm of nVF] (wVF) {create vector field\\ $(-1) \nabla d$};
%\node [block1, below of=m2j] (req) {send agent request};
%\node [decision1, below of=req] (isplace) {is space?};
%\node [block1, below of=isplace, node distance=3cm] (send) {send agent};
%\node [decision1, below of=send] (more) {more agents?};
%\node [cloud1, below of=more, node distance=3cm] (end2) {end};
% Draw edges
%\path [line] (req) -- (isplace);
%\path [line] (isplace) -| node [near start] {no} +(2,-1) |- (end2.east);
%\path [line] (isplace) -- node [near start] {yes} (send);
%\path [line] (send) -- (more);
%\path [line] (more) -- node [near start] {no} (end2);
%\path [line] (more) -| node [anchor=south, near start] {yes} +(-2.2,0) |- (req.west);
% ------- Middle right
%\node [ right of=m2j, node distance=5cm] (j2m) {JuPedSim $\Leftrightarrow$ MATsim};
%\node [block2, below of=j2m] (recvReq) {receive agent request};
%\node [decision2, below of=recvReq] (isplace2) {is space?};
%\node [block2, below of=isplace2, node distance=3cm] (recv) {receive agent};
%\node [block2, below of=recv] (sim) {queue for simulation};
%\node [cloud2, below of=sim, node distance=4cm] (end3) {end};
% Draw edges
%\path [line] (recvReq) -- (isplace2);
%\path [line] (isplace2) -| node [near start] {no} +(2,-1) |- (end3.east);
%\path [line] (isplace2) -- node [near start] {yes} (recv);
%\path [line] (recv) -- (sim);