# Sensitivity Analysis for Microscopic Crowd Simulation
## 2 Materials and Methods
### Crowd Simulation with the Optimal Steps Model  
The Optimal Steps Model [2; 11; 12] is based on a natural discretization, the stepping behavior. The model describes every step of an agent (virtual pedestrian). Each agent optimizes its next position on a disc around its current position. The radius of the disc models that agents' step length. The utility \(U_{l}\) of an agent \(l\) is maximized according to the idea of the homo economics or economic man by [PERSON] [37]. It considers three goals that are also represented by utility functions: reaching the agent's destination based on the distance between the current position of the agent and its destination,\(U_{t}(x)\), avoiding obstacles, \(U_{o,j}\), and keeping a distance from other pedestrians, \(U_{p,l,i}\)[12; 13]. The utility \(U_{l}\) is a superposition of the three sub-utilities:  
\[U_{l}(x)=U_{t}(x)+\sum_{i=1,l;\
eq l}^{n}U_{p,l,j}(x)+\max_{j\in\{1,\dots,m\}}U_ {o,j}(x). \tag{1}\]  
The full utility for an arbitrary agent in the bottleneck scenario is visualized in Figure 1. Agents that are regarded for the personal space utility \(U_{p,l,i}\) of agent \(l\) can be identified by the strong gradient in the utility around them.  
The target utility \(U_{t}(x)\) encodes the distance to the agent's destination and can be interpreted as a cognitive map of the environment [13]. The distance to the destination is measured in the geodesic distance that considers obstacles, so that agents do not get stuck in more complex topographies. We solve the eikonal equation with the Fast Marching Method [38] to obtain the geodesic distances from all targets to every (grid) point in the topography.  
While the floor field \(U_{t}(x)\) is calculated for the complete topography either once at the beginning of the simulation (static floor field) or at each simulation step (dynamic floor field) and belongs to a certain target or a list of targets that belong together, the combined utility \(U_{l}\) belongs to agent \(l\) and it is only evaluated at current and prospective positions of agent \(l\).  
Each agent is assigned a personal space utility \(U_{p,l,i}\) that represents pedestrians' need for personal space in order to avoid collisions between agents. The implementation takes up the theory of (inter-) personal space by [PERSON] [39], as described in [12]. Accordingly, the agent utility is divided into three parts, the intimate space--reserved for children and partners, the personal space, and the social space. More details can be found in Appendix A.1. Analogously, the behavior of agents around obstacles is handled by the utility function \(U_{o,j}\) (see Appendix A.2).  
Each agent in the simulation is assigned a free-flow speed. The free-flow speed is presumed to be the natural speed of an agent when the path is free. The agent accelerates to its free-flow speed if it moves unhindered through a free space. From the free-flow speed, a step length and step frequency are derived [11]. Based on the step frequency, steps of each agent are added to an event queue. This event queue enables a (pseudo-) continuous timeline. At a fixed rate, typically every \(0.4\,s\), the accumulated events are processed in their order in the queue. For each event of an agent, the next position is calculated by maximizing the utility while using the Nelder-Mead method.  
Figure 1: Utility of possible positions in the topography for a selected agent (white) modeling the goals of the agent: reaching its destination (orange square), avoiding obstacles (light gray areas), and keeping a distance to other agents (blue). Here, the (dark) gray areas contain the all positions with a low utility, not only the obstacle itself.