JuPedSim / jpsreport

Analysis tool
https://www.jupedsim.org/jpsreport_introduction.html
Other
3 stars 9 forks source link

Method A | flow over time #155

Closed gjaeger closed 5 years ago

gjaeger commented 5 years ago

JuPedSim - JPSreport

Version : 0.8.4 Compiler : g++ (8.3.0) Commit hash : v0.8.3-119-gbc8ced4 Branch : develop

For Method A (Zhang, p. 48), the flow over time can be calculated as:

eq31

In Method_A.cpp line 232, the flow over time flow rate is calculated as:

double flow_rate=fps*(N2-N1)*1.00/(t_N2-t_N1)

Two questions:

  1. Why is the framerate fps included in the calculation?
  2. Why is the numerator multiplied by one?
chraibi commented 5 years ago
  1. Since t_N2 and t_N1 are integers, I assume that they correspond to frames. flow_rate is in seconds, hence the multiplication with fps.

  2. I think someone wanted to force an integer -> double conversion (sounds like a Python 2 trick ^^).

gjaeger commented 5 years ago

Thank you. This answers my questions.