Commit 44679653 authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier
Browse files

Call "pedestrian.setTimeOfNextStep()" in "OSMBehaviorController.changeTarget()"

parent 52af98fe
......@@ -198,6 +198,9 @@ public class OSMBehaviorController {
ChangeTarget.class.getSimpleName(),
mostImportantStimulus.getClass().getSimpleName()));
}
// Set time of next step. Otherwise, the internal OSM event queue hangs endlessly.
pedestrian.setTimeOfNextStep(pedestrian.getTimeOfNextStep() + pedestrian.getDurationNextStep());
}
@Nullable
......
......@@ -72,8 +72,6 @@ public class UpdateSchemeEventDriven implements UpdateSchemeOSM {
osmBehaviorController.wait(pedestrian, timeStepInSec);
} else if (selfCategory == SelfCategory.CHANGE_TARGET) {
osmBehaviorController.changeTarget(pedestrian, topography);
// Set time of next step. Otherwise, the internal OSM event queue hangs endlessly.
pedestrian.setTimeOfNextStep(pedestrian.getTimeOfNextStep() + pedestrian.getDurationNextStep());
}
}
......
......@@ -69,8 +69,6 @@ public class UpdateSchemeSequential implements UpdateSchemeOSM {
osmBehaviorController.wait(pedestrian, timeStepInSec);
} else if (selfCategory == SelfCategory.CHANGE_TARGET) {
osmBehaviorController.changeTarget(pedestrian, topography);
// Set time of next step. Otherwise, the internal OSM event queue hangs endlessly.
pedestrian.setTimeOfNextStep(pedestrian.getTimeOfNextStep() + pedestrian.getDurationNextStep());
}
}
......
......@@ -77,8 +77,6 @@ public class UpdateSchemeEventDriven implements DynamicElementAddListener, Dynam
osmBehaviorController.wait(pedestrian, timeStepInSec);
} else if (selfCategory == SelfCategory.CHANGE_TARGET) {
osmBehaviorController.changeTarget(pedestrian, topography);
// Set time of next step. Otherwise, the internal OSM event queue hangs endlessly.
pedestrian.setTimeOfNextStep(pedestrian.getTimeOfNextStep() + pedestrian.getDurationNextStep());
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment