%In dieser Arbeit wird genommen: Model von Felix, Bodenfeld von Madrid, Code adaptiert von Leonardo Andrés Zepeda Núñez.
%Es wird ein Testmodel beschrieben, welches den Einfluß des Madrid-Bodenfeldes untersucht.
%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 Fußgängersimulation 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.} 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-Lindel{\"o}f.
%\footnote{Picard-Lindelöf theorem: Consider the initial value problem \newline \begin{center}
%\end{center} Suppose $f$ is uniformly Lipschitz continuous in y and continuous in $t$. Then, for some value $\epsilon > 0$, there exists a unique solution $y(t)$ to the initial value problem on the interval $[t_0 - \epsilon, t_0 + \epsilon]$.}
To apply this theorem, Lipschitz-continuous first derivatives of the input-functions must exist. This contradicts with non-smooth pathways in a plain floor-field. He solves that problem by the use of a mollifier, which basically takes a locally integrable function and returns a smooth approximation. Thus he creates a well-posed problem.
In this thesis, an enhanced floor-field is described, which addresses aforementioned issue (non-smoothness) as a welcome side-effect. A research-group at the Universidad Carlos III de Madrid \citep{Madrid} is working on safe navigation of robots. Since agents should not follow paths, which come close to any obstacle, a distance-field is created and used in the Fast-Marching algorithm, resulting in \emph{smooth} pathways, which favor a certain distance to walls. The researchers take that approach even further, by transforming any geometry into a skeleton (again using the distance-field) and thus having the domain in which the 2-D wave propagates reduced dramatically. Their intent is to re-calculate the floor-field in real-time using it for the reduced view-field of a robot's sensors.
Our interest in this sleight of hand is different. We take special interest in the behavior of agents close to obstacles. The enhanced floor-field itself yields pathways, which show a wall-repulsive character in the negative gradient close to walls. This component enables us to formulate a new model. It is implemented in JuPedSim\cite{jupedsim}, a simulation suit for pedestrian simulation, developed at the J{\"u}lich Supercomputing Centre, Forschungszentrum J{\"u}lich GmbH. It is verified and validated with respect to empirical data. The results seen in the simulations show remarkably good behavior. The model is easy to use, fast and shows an organic routing through complex geometries. The extent to which we alter the floor-field is subject to our analysis.
%<< big picture: micor-/macroscopic models, cell automata/ODE-based, take a closer look in next chapter >>
Pedestrian dynamics defines a field of research trying to understand the kinematic and mechanic of pedestrian crowd movement. Understanding, how crowds react in different geometries under various circumstances, enables a safer design of our environment, to best fit the needs of civil and security engineering. Results are applied to safely conduct large events, to create architecture, through which large crowds can safely be moved and to optimize evacuation time in case of an emergency. At the annual hajj\footnote{Islamic pilgramage to Mecca, Saudi-Arabia.} in Mecca in 2015, a tragic panic started, when two crowds from opposite directions met on a street, 12 meter wide. Saudi authorities state that more than 700 pilgrims died in a stampede and at least 860 more had been injured.\footnote{BBC News, September 25th}
Pedestrian dynamics provides approaches to plan large events by calculating estimates for capacities of given geometries, researching crowd behavior and applying research results in new designs of civil engineering.
To simulate pedestrian crowds, many models exist with different characteristics. Predtetschenskii and Milinkskii \citep{Predtechenskii1971} are pioneers in pedestrian dynamics, conducting experiments as early as 1969. Few years later, Hirai and Tarui \citep{Hirai1975} implemented the first force-based model to simulate crowd behavior. Since then, new models have been described throughout the decades. To maintain orientation, these models can be grouped into classes in the following manner (see figure \ref{classes}):
\begin{figure}[h!]
\begin{center}
\tikzstyle{block} = [draw, rectangle, rounded
corners, minimum height=2em,fill=blue!10,text width=8em, text centered]
\node [block, name=micro, right of=macro] {Microscopic};
\node [block, name=meso, right of=micro] {Mesoscopic};
%\node [block, name=dis, below= 0.8cm of macro] {Discrete};
%\node [block, name=con, right of=dis] {Continuous};
%\node [block, name=mix, right of=con] {Mixed};
\node [block, name=rule, below= 0.8cm of macro] {Rule-based};
\node [block, name=ode, right of=rule] {ODE-based};
\node [block, name=hybr, right of=ode] {Hybrid};
\node [block, name=force, below = 0.8cm of rule] {Force-based};
\node [block, name=vel, right of=force] {Velocity-based};
\node [block, name=other, right of = vel] {other};
\draw [->] (micro) -- (rule);
\draw [->] (micro) -- (ode);
\draw [->] (micro) -- (hybr);
%\draw [->] (con) -- (rule);
%\draw [->] (con) -- (ode);
%\draw [->] (con) -- (hybr);
\draw [->] (ode) -- (force);
\draw [->] (ode) -- (vel);
\draw [->] (ode) -- (other);
\end{tikzpicture}
\end{center}
\caption{A possible hierarchical classification of models in pedestrian dynamics in \citep{Chraibi2012}}
\label{classes}
\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}}
\caption{Forces acting on agent A from: wall, obstacle and agent B}
\label{forcesOnAgent}
\end{figure}
\newline Force-based and velocity-based models are subject of this thesis, so we turn to ODE-based models, which is the super-class to both.
\subsection{ODE based, microscopic models}
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) 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, 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 focus 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.
In this thesis, an altered usage of an enhanced floor-field was shown, integrated in a suitable new TEST-model. The \emph{wall-avoid-distance} parameter was analyzed and shown to be able to show good convergence to empirical data. During the course of the work process, it became clear how versatile and powerful floor-fields can be. Not only in the current state, they can provide valuable assistance to pedestrian models, but they can be further developed to fit into much more contexts.
\subsection{Floor-field}
\subsubsection{Multiple Goals }
The floor-field is a useful tool in routing of pedestrians through any geometry. To unfold its full power, one can imagine to calculate a floor-field for each of many atomic goals\footnote{An atomic goal would be a single exit door, whereas a destination could consists of a set of doors/exits.}. The combination of many floor-fields, each corresponding to an atomic goal, can easily be managed by selecting the direction vector of the one floor-field, that provides the minimal time-cost of an active set of floor-fields evaluated at the grid-point of the current agent's position. Dynamic in-world events in a simulation could alter the set of active floor-fields. This way, models can implement navigation in a dynamically changing world. It can be also used, to be a tool in a simulation suit, which has agents change their destination during runtime. This would be realized by simply changing the active set to the floor-fields corresponding to the new destination.
<< Verteilerebene(?) oder etwas kleinere Geometrie mit mehreren Ausgaengen: Nebeneinander 2-4 Vectorfelder nebeneinander >>
\subsubsection{Multiple Floors}
In the current state, the floor-field provides time-cost on a discrete grid, a rectangular grid with equidistant spacing in each dimension. The grid-points are stored in a one-dimensional array by the row-major order. In a arrangement like this, it is easy to formulate 4-neighboring\footnote{Grid-points north, south, east and west to the current are called 4-neighbors.} relations. These values are easily accessed, if you are provided the stride value, namely how much grid-points make up the length of both dimensions in a 2-D world. The Fast-Marching algorithm needs the time-cost values of the 4-neighborhood.
This will change, if you need to simulate in a building with multiple floors, which are connected via stairs. We need to introduce a third dimension, which can be treated equally handy inside each floor. Any position, projected onto the x-y-plane, may not be unique anymore. On the other hand, it would be a waste of memory, if a third dimension would be introduced\footnote{As we are interested in points representing the floor of a room, all the volume (air) above would be not used.} introduced, to represent the hull-cube circumscribing a building.
One is to find a solution, which describes the geometry of the rooms in a memory-efficient way and yet be able to comfortably access the 4-neighbors' time-cost value.
%\subsection{Usage in JuPedSim}
%\subsection{Floor-fields in Triangulated Domains}
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.
\subsection{Basic Tests}
%The validation of a model is a complex task and makes up a separate research field. Researchers in the field of Civil Engineering are working on various approaches on how to validate a model. The research group, CST - Pedestrian Dynamics and Traffic Simulation, is developing a set of test-cases any serious model should aim to pass. Tests include the behavior of a single moving agent passing static objects like a dummy agent or an obstacle. (see figure \ref{test01})
%The TEST-model, implemented in its current state in the simulation-suit JuPedSim\citep{jupedsim}, passed applicable tests and it was shown, that the basic mechanics of the routing are working as specified. Yet to complete validation of the model, the floorfield needs to support multiple destinations.
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.