PedestrianDynamics / jupedsim

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

Error in sources (when using overlapping sources) #303

Closed chraibi closed 4 years ago

chraibi commented 5 years ago

Summary

When using overlapping sources in larger geometries the program fails with a Segmentation fault in the VelocityModel when accessing the position of the neighbors.

Inifile + Geometry file to reproduce bug

Personen_ini.xml

Bahnsteige.xml

anna-braun commented 4 years ago

@chraibi The Error changed, it's not a segmentation fault any longer: Bildschirmfoto 2019-12-20 um 14 30 24 We do not really know if it is a problem of overlapping sources, as the problem also occurs for single sources. Here are the data which create the current error. test-wh-20200113.zip

chraibi commented 4 years ago

We do not really know if it is a problem of overlapping sources, as the problem also occurs for single sources.

The first question for me is, is it a source problem at all?

removing the sources gives me the following errors

[2020-01-14 21:43:30.153] [error] in AddTarget: calling FinalizeTargetLine

log.txt

[2020-01-14 21:46:58.170] [info] Starting JuPedSim - JPScore
[2020-01-14 21:46:58.175] [info] Version 0.8.4
[2020-01-14 21:46:58.175] [info] Commit id v0.8.4-932-gc9e6c7c3
[2020-01-14 21:46:58.175] [info] Commit date Tue Jan 14 21:15:12 2020
[2020-01-14 21:46:58.175] [info] Build from branch 595_sources
anna-braun commented 4 years ago

@chraibi I have this error, too (master branch, today 09:30h). I guess this is the floor field router problem from PR #623 (@schroedtert ?).
When I do the simulation without sources, I have this error as well, but the simulation does not crash as it happens when using one or more sources, so it seems to be a problem of the sources.

schroedtert commented 4 years ago

No this is not the FF problem, this is solved with #623. This is the error, that the sources created pedestrians at (0,0) and this point is not inside the room.

schroedtert commented 4 years ago

Just a question, do source have the possibility to be distributed in a specific room? I couldn't find this parameter in the documentation.

<group group_id="901" agent_parameter_id="1" room_id="0" subroom_id="1" number="1" goal_id="901" router_id="1" />

anna-braun commented 4 years ago

@schroedtert The (sub)room is defined in the group as you show it in the example.
In the sources you can only give a start position, the (sub)room is taken from the group. <source id="901" caption="source_1-gl_9" group_id="901" time_min="0" time_max="6000" frequency="10" N_create="1" agents_max="40" x_min="93" x_max="97" y_min="0" y_max="5" greedy="true"/>

schroedtert commented 4 years ago

Sorry, my bad, looked in the wrong file.

schroedtert commented 4 years ago

https://github.com/JuPedSim/jpscore/blob/ba513cbabf4be5153d18cc6c75e4c9dfcac17e08/libcore/src/pedestrian/AgentsSource.cpp#L220-L251

emptyPositions is never set, hence the pedestrians are always created at (0,0). The check if the point is inside the geometry is only done in the FF Router, resulting in the assert error. I changed the demo by shifting it 5m to the right (x = x + 5) and using the FF Router gives the same error. demo-sources-shifted.zip