Skip to content

Problems with combination of TargetChanger and Groups

Summary

If a TargetChanger is used while groups are presents, agents get stuck in the simulation.

What is the current bug behavior?

In my TargetChanger I set the probability probabilityToChangeTarget < 1.0, therefore not everyone's target was changed. I assume that group members suddenly had different targets and no way of coping with the situation.

What is the expected correct behavior?

One workaround would be to change the target for all group members if one group member has a changed target. Another option would be to throw a coin on what to do. Both options will not satisfy the chosen probabilityToChangeTarget.

Steps to reproduce

Create a scenario with a TargetChanger and groups.

Relevant data

  • Scenarios\Demos\S2UCRE\scenarios\MWE_groups_target_changer.scenario [OK]
  • Scenarios\Demos\S2UCRE\scenarios\s2ucre_static_waiting_less_targets_groups.scenario [FAILS] Note, for a small scenario, the problem cannot be observed: MWE_groups_target_changer

Starting point

My best guess: Check how the TargetChangerController assigns the news targets - if a pedestrian is part of the group - find a way to handle it consistently for all group members. Note that, you can check if a Pedestrian is part of a group with .getGroupIds, but you can only access the groups from the mainModel (in State).

Edited by Ghost User
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information