Commit fe5bce10 authored by Arne Graf's avatar Arne Graf

modelflow not compiling

parent 0759acc6
...@@ -350,18 +350,18 @@ is adding the distance-dependand\footnote{The correlation of distance and force ...@@ -350,18 +350,18 @@ is adding the distance-dependand\footnote{The correlation of distance and force
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
%\vspace*{1cm} %\vspace*{1cm}
\newpage
\begin{align*} \begin{center}
&\textbf{TEST Model:}\\ \textbf{TEST Model:}\\
\end{align*} \end{center}
\begin{align*} \begin{align*}
&\Delta\vec{x}_{n}&&= \Delta t\cdot\vec{v}_{n, res}\\ &\Delta\vec{x}_{n}&&= \Delta t\cdot\vec{v}_{n, res}\\
&\vec{v}_{n, res}&&= \left\{ &\vec{v}_{n, res}&&= \left\{
\begin{aligned} \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-\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 \hat{d}\rangle\right) & P(\vec{v}_{n}) \quad & \textbf{if} \quad && d(\vec{x}) < && 0.1; \quad \langle\vec{v}_{n},-\nabla \hat{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_{h}; \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-\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 \hat{d}\rangle\right) & \vec{v}_{n} \quad & \textbf{if} \quad 0.1 < && d(\vec{x}) < && 0.2 ;\quad \langle\vec{v}_{n},-\nabla \hat{d}\rangle \ge 0\\ &\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\\
& &\vec{v}_{n} \quad & \textbf{else} && &&%& d(\vec{x})&& > 0.2 & &\vec{v}_{n} \quad & \textbf{else} && &&%& d(\vec{x})&& > 0.2
\end{aligned} \end{aligned}
\right.\\ \right.\\
...@@ -373,30 +373,30 @@ is adding the distance-dependand\footnote{The correlation of distance and force ...@@ -373,30 +373,30 @@ is adding the distance-dependand\footnote{The correlation of distance and force
% \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,\\ % \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 % \vec{v}_{n} & \quad : \quad d(\vec{x}) > 0.2
% \end{cases}\\ % \end{cases}\\
&\vec{v}_{n}&&= 0.8\cdot\vec{v}_{n-1, res} + 0.2\cdot g\left(g(\vec{v}_{ff})+g(\sum_{i=1}^n\vec{v}_{repP,i})\right) &\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)
\end{align*} \end{align*}
%
\vspace*{2cm} %\vspace*{2cm}
%\begin{alignat}{1} %\begin{alignat}{1}
%\Delta\vec{x}\quad=\quad & \Delta t\cdot\vec{v}_{res}\\ %\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}_{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}_{n}\quad=\quad & g(g(\vec{v}_{ff})+g(\sum\vec{v}_{repP,i}))\\
%\vec{v}_{ff}\quad=\quad & v_{ff}(\vec{x})\\ %\vec{v}_{ff}\quad=\quad & v_{ff}(\vec{x})\\
%\end{alignat} %\end{alignat}
%
%\begin{align} %\begin{align}
%\Delta\vec{x}\quad= & \quad\Delta t\cdot\vec{v}_{res}\\ %\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}_{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}_{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}) %\vec{v}_{ff}\quad= & \quad v_{ff}(\vec{x})
%\end{align} %\end{align}
%
%\subsection{Variant Model} %\subsection{Variant Model}
%
%<< short (!) overview over the model-modules >> %<< short (!) overview over the model-modules >>
%
%The model can be sectioned into these modules: %The model can be sectioned into these modules:
%
%\begin{itemize} %\begin{itemize}
%\item Floorfield \begin{itemize} %\item Floorfield \begin{itemize}
% \item distance-field % \item distance-field
...@@ -407,7 +407,12 @@ is adding the distance-dependand\footnote{The correlation of distance and force ...@@ -407,7 +407,12 @@ is adding the distance-dependand\footnote{The correlation of distance and force
%\item Anti-Overlapping %\item Anti-Overlapping
%\item Speed Calculator %\item Speed Calculator
%\end{itemize} %\end{itemize}
%
\begin{figure}[h!]
\begin{center}
\input{./modelchart.tex}
\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. 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.
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. 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.
......
...@@ -35,22 +35,30 @@ ...@@ -35,22 +35,30 @@
\begin{tikzpicture}[auto] \begin{tikzpicture}[auto]
% Place nodes left block % Place nodes left block
\node [block] (dfield) {create distance field\\ $d$}; \node [block] (compi) {get Neighbors of ped $i$};
\node [block, below = 0.8cm of dfield] (sfield) {create speed field\\ $s$}; \node [block, below = 0.8cm of compi] (getj) {get Neighbor j};
\node [block, below = 0.8cm of sfield] (nFF) {create navigation floor-field\\ $c$}; \node [decision, below = 0.8cm of getj] (valinf) {is influencing ped $i$?};
\node [block1, below = 0.8cm of nFF] (nVF) {create vector field \\$(-1) \frac{\nabla c}{\left\Vert \nabla c \right\Vert}$}; \node [block, below = 0.8cm of valinf] (addinf) {add influence to sum};
%\node [block, below of=Jsim] (agents) {send/recv agents}; \node [decision, below = 0.8cm of addinf] (checkloop) {more neighbors to ped $i$?};
%\node [decision, below of=agents] (done) {done?}; \node [block, below = 0.8cm of checkloop] (calcrep) {calculate $g(sum)$};
%\node [cloud, below of=done, node distance=3cm] (end) {shutdown \emph{mobsim}}; \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 % Draw edges
\path [line] (dfield) -- (sfield); \path [line] (compi) -- (getj);
\path [line] (sfield) -- (nFF); \path [line] (getj) -- (valinf);
\path [line] (nFF) -- (nVF); \path [line] (valinf) -- (addinf);
%\path [line] (agents) -- (done); \path [line] (addinf) -- (checkloop);
%\path [line] (done) -- node [near start] {yes} (end); \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); %\path [line] (done) -| node [anchor=south, near start] {no} +(-2.2,0) |- (Msim.west);
% ------- Middle block % ------- Middle block
\node [block1, right = 2cm of nVF] (wVF) {create vector field\\ $(-1) \nabla d$}; %\node [block1, right = 2cm of nVF] (wVF) {create vector field\\ $(-1) \nabla d$};
%\node [block1, below of=m2j] (req) {send agent request}; %\node [block1, below of=m2j] (req) {send agent request};
%\node [decision1, below of=req] (isplace) {is space?}; %\node [decision1, below of=req] (isplace) {is space?};
%\node [block1, below of=isplace, node distance=3cm] (send) {send agent}; %\node [block1, below of=isplace, node distance=3cm] (send) {send agent};
...@@ -76,7 +84,7 @@ ...@@ -76,7 +84,7 @@
%\path [line] (isplace2) -- node [near start] {yes} (recv); %\path [line] (isplace2) -- node [near start] {yes} (recv);
%\path [line] (recv) -- (sim); %\path [line] (recv) -- (sim);
%\path [line] (sim) -- (end3); %\path [line] (sim) -- (end3);
\path [line] (dfield) -| node [near start] {} (wVF); %\path [line] (dfield) -| node [near start] {} (wVF);
\end{tikzpicture} \end{tikzpicture}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment