[GroupModel] Agents get stuck in the event queue
Summary
In some cases, groups split up significantly due to crowdedness. Here, when an agent gets very far from the group, a nextstep time again is given according to the infinity maximum value (by default). This occurs in the getDurationNextStep function (line 398, pedestrianOSM). The agents desired speed is slowed down so much that the maximum duration of the next step becomes lower than the division of the desiredStepSize and the desiredSpeed.
What is the current bug behavior?
What happens now is that the if statement on line 31 (CentroidGroupSpeedAdjuster) is true, so the local variable result gets assigned the minimum value of a double. This is then multiplied by the orginalSpeed and returned as the adjusted and thus desired speed. I think this is not behavior that we want, because this leads to a very, very, low desired speed. Thereby invoking the setting of the maximum step length duration as the next step time, which by default is infinite. This causes problems with the event queue. I hypothesize that this waiting behavior in the current event-driven implementation, with the default infinite maximum step duration, often could lead to problems due to the event queue.
What is the expected correct behavior?
When the maximum step duration is set to for example 10 (seconds), the desired behavior occurs and the agents far ahead slows down significantly but does not become stuck. If this is not done, and the infinite number is given, the others of the group actually do reach their target but the member ahead just gets stuck in the event queue.
Possible solutions
- Set the maximum step duration default to an appropriate lower value, 10 seconds seems like a ok first guess. When the maximum step duration is set to for example 10 (seconds), the desired behavior occurs and the agents far ahead slows down significantly but does not become stuck. If this is not done, and the infinite number is given, the others of the group actually do reach their target but the member ahead just gets stuck in the event queue.
- Update the CentroidGroupSpeedAdjuster to not return such a low value for the desired speed when a group member is far ahead but no obstacle is in between.