MengeCrowdSim / Menge

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

Parameters in `AgentProfile` #104

Closed zhangl64 closed 6 years ago

zhangl64 commented 6 years ago

@MengeCrowdSim I would like to ask a question about some default settings in AgentProfile in XML files, e.g., fundDiagS.xml:

r="0.19" pref_speed="1.04" max_speed="2" max_accel="5"

Are there any references for these settings, for example, is the maximum acceleration rate verified? Thanks.

MengeCrowdSim commented 6 years ago

First, sorry for the lack of documentation. It keeps haunting me. Second, what do you mean by "verified"? The maximum acceleration is used to truncate the velocity prior to updating agent state. So, the agent model uses the preferred velocity to compute an actual velocity -- if the change of velocity (over the fixed time step) exceeds that allowable by max_accel, it is truncated. So, it has a couple of issues:

  1. It's incredibly naive, and
  2. if the agent model produces a collision-free velocity, truncating it may no longer be collision free.

But, those are the details of max_accel. Does that make sense?

zhangl64 commented 6 years ago

Thanks for your quick reply @MengeCrowdSim . It makes perfect sense to me. I was just wondering how the value of the acceleration (in this case, 5) was chosen? For instance, why is it not 3 or 4? Is it based on some reference, or empirical experience, or just an arbitrary number (like a place-holder)? Many thanks!

MengeCrowdSim commented 6 years ago

Ah...I see. You can largely consider it a place holder. It's not physically or psychologically justified. In many ways, it just ends up serving as a low-pass filter if a model introduces high-frequency noise. Make it too small, and agents "skate" into walls, unable to turn quickly enough. Make it too large, and everything can become jittery.

If this interferes with your model, or your model handles acceleration constraints already, you can just make this a huge value such that in practice, it never truncates.

Ideally, we should have an anisotropic, physically- and psychologically-derived model that governs how people accelerate (both in starting from a walk, and stopping). But right now, it's just a stop gap.

zhangl64 commented 6 years ago

Got it :) thanks a lot @MengeCrowdSim