PedestrianDynamics / jupedsim

JuPedSim is an open source pedestrian dynamics simulator
http://jupedsim.org
Other
39 stars 27 forks source link

JPSreport - Method A failed #669

Closed anna-braun closed 4 years ago

anna-braun commented 4 years ago

When I tried to analyse my trajectories with JPSreport - method A, a segmentation fault occurs. The Problem might be the high ID numbers from the agents, which result from the sources in the simulation. 00-report_test.zip

gjaeger commented 4 years ago

@anna-braun Can you upload your jpscore-files?

gjaeger commented 4 years ago

The result:

----
JuPedSim - JPSreport
Current date   : Tue Feb 04 14:31:12 2020
Version        : 0.8.4
Compiler       : clang++ (11.0.0)
Commit hash    : v0.8.4-914-g76e9cdbc
Commit date    : Fri Jan 31 10:13:43 2020
Branch         : master
INFO:   Parsing the ini file <13-report-ini-SB-2-offen_x_Minuten-4-HiVo.xml>
INFO:   logfile </Users/gjaeger/Documents/Simulationen/JPSreport_Anna/14-report_output/log.txt>
lineNr 100000
lineNr 200000
lineNr 300000
Check failed in file /usr/local/include/boost/numeric/ublas/functional.hpp at line 1418:
i < size_i
libc++abi.dylib: terminating with uncaught exception of type boost::numeric::ublas::bad_index: bad index
zsh: abort       13-report-ini-SB-2-offen_x_Minuten-4-HiVo.xml

The problem is based on the agent ID for agents from sources.

It's an addressing error In Method_A.cpp, line 145. When using sources, there is a step in the numbering of the agents.

In my opinion it is not a problem of jpsreport. The reason for this is due to jpscore.

gjaeger commented 4 years ago

@anna-braun Method A calculates the mean value of flow and density over time. The period of time desripted the time when the first and last pedestrians pass the location. The time period can be of varying length. The results are written to the file FDFlowVelocity_traj_.

In addition to this calculation, a cumulative count of persons is performed. The results are written to the file Flow_NT_traj_. The direction of movement is not yet considered.

If the PR #670 fixes this issue, you can analyze uni-directional flows with method A. For your analysis you can use the output of the file Flow_NT_traj_.

@chraibi , @zeroset and @schroedtert: Perhaps it makes sense if we split the output of method A. On the one hand the output of flow and density. On the other side a new method for counting. Then we could also consider the direction of movement.

Any suggestions?

anna-braun commented 4 years ago

Flow_NT_traj_ is what I need, yes. If this does not really belong to Method A, it could make sense to split it to a new method counting in the future.
But as PR #670 does still not work for me, this should be fixed first..

chraibi commented 4 years ago

@anna-braun please try again. I think this is now fixed.

However, there is something wrong with the trajectories. Pedestrian 1 is missing at frame 105. 🤔

Screenshot 2020-02-11 01 02 42 Screenshot 2020-02-11 01 03 01

So, consequently jpsreport will stop with the error

Error:  The trajectory of ped with ID <1> is not continuous. Please modify the trajectory file!
Error:   actual_totalfame = <966>, expected_totalframe = <967>
gjaeger commented 4 years ago

I can't reproduce the missing frame 105 from agent 1 (PR #670 commit 3416493).

excerpt from Trajektorien_Bahnsteig-SB-2-offen_x_Minuten-4-HiVo.txt: missing_frame

@chraibi Can you check your trajectory file again?