MengeCrowdSim / Menge

The source code for the Menge crowd simulation framework
Apache License 2.0
138 stars 64 forks source link

It crashes when I run globalNavSwap with roadmap and helbing #116

Closed douglasbandeiraivo closed 5 years ago

douglasbandeiraivo commented 5 years ago

It crashes when I run globalNavSwap examples with roadmap and helbing model. erro01 erro02

curds01 commented 5 years ago

Thanks for posting; we'll take a look at this and see what we come up with.

curds01 commented 5 years ago

I finally got a window to examine it. I've confirmed the crash. The initial diagnosis is that there is a bug in the visibility query for finding the nearest node on the roadmap. I'm going to dig into it and find the bug. I believe this is most likely related to a bug I encountered years ago (but never resolved) in the maze example. In that case, a visibility query falsely reported visible, and, in this case, it's falsely reporting not visible.

In the case of helbing, the repulsive forces are isotropic, so the agents on the left and right of the bottom row get pushed back and out. By pushing their initial position from p_y="-4" to p_y="-3.6", they no longer get pushed into a "bad" location.

I suspect that the agent is ever so slightly intersecting the the obstacles. If that's the case, the query will naturally fail due to the fact that no capsule from agent position to road map vertex will be collision free.

If I'm lucky, that's what the problem is. In this case, it's not a "bug", per se, just a robustness issue. We can't generally prevent agents from penetrating obstacles, but the roadmap path computation should be robust enough to get them out of that configuration.

I'll weigh in later if I confirm/disprove my hypothesis and then subsequently notify of a fix.

curds01 commented 5 years ago

I've essentially determined the cause of the crash here. I have a PR in progress. There are a couple of things I still want to do in the PR, but if you want to take a peek, or steal the commit to address your issues, you can pull it from PR #118. Otherwise, I'll finish it off and then get it merged into master.

Thanks again for calling out this issue.

douglasbandeiraivo commented 5 years ago

Thanks.

Em seg, 1 de abr de 2019 00:35, curds01 notifications@github.com escreveu:

I've essentially determined the cause of the crash here. I have a PR in progress. There are a couple of things I still want to do in the PR, but if you want to take a peek, or steal the commit to address your issues, you can pull it from PR #118 https://github.com/MengeCrowdSim/Menge/pull/118. Otherwise, I'll finish it off and then get it merged into master.

Thanks again for calling out this issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MengeCrowdSim/Menge/issues/116#issuecomment-478423972, or mute the thread https://github.com/notifications/unsubscribe-auth/AMvN09BGbDz2IjOVTtcEYrNBnFl-FwWeks5vcX6AgaJpZM4cG1-4 .