Commit 46c443a6 authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier
Browse files

In "OSMBehaviorController", added TODO which must be discussed with Gerta

parent 0f71c2f1
......@@ -5,7 +5,6 @@ import org.vadere.state.psychology.perception.types.Bang;
import org.vadere.state.psychology.perception.types.ElapsedTime;
import org.vadere.state.scenario.Pedestrian;
import org.vadere.state.scenario.Topography;
import org.vadere.state.simulation.FootstepHistory;
import org.vadere.util.geometry.shapes.VPoint;
import java.util.Collection;
......@@ -35,10 +34,8 @@ public class ThreatCognitionModel implements ICognitionModel {
for (Pedestrian pedestrian : pedestrians) {
if (pedestrian.getMostImportantStimulus() instanceof Bang) {
// I.e., pedestrian is inside bang radius.
} else if (pedestrian.getMostImportantStimulus() instanceof ElapsedTime) {
if (pedestrian.getPerceivedThreat() != null) {
......@@ -13,7 +13,10 @@ import org.vadere.state.psychology.cognition.SelfCategory;
import org.vadere.state.psychology.perception.types.Bang;
import org.vadere.state.psychology.perception.types.ChangeTarget;
import org.vadere.state.psychology.perception.types.Stimulus;
import org.vadere.state.scenario.*;
import org.vadere.state.scenario.Pedestrian;
import org.vadere.state.scenario.ScenarioElement;
import org.vadere.state.scenario.Target;
import org.vadere.state.scenario.Topography;
import org.vadere.state.simulation.FootStep;
import org.vadere.util.geometry.shapes.VPoint;
import org.vadere.util.geometry.shapes.Vector2D;
......@@ -22,7 +25,6 @@ import org.vadere.util.logging.Logger;
import java.util.LinkedList;
import java.util.List;
* A class to encapsulate the behavior of a single {@link PedestrianOSM}.
......@@ -148,6 +150,9 @@ public class OSMBehaviorController {
* In dangerous situation humans tend to escape to familiar places (safe zones).
* A pedestrian selects the target which is closest to its source as safe zone.
* Or if pedestrian has no target, select closest target as safe zone.
* TODO: Clarify with Gerta if this is really a plausible assumption for safe zones.
* An easier approach is to just use the closest target as safe zone.
public void changeTargetToSafeZone(PedestrianOSM pedestrian, Topography topography) {
if (pedestrian.getCombinedPotentialStrategy() instanceof TargetRepulsionStrategy) {
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