11.08., 9:00 - 11:00: Due to updates GitLab will be unavailable for some minutes between 09:00 and 11:00.

Commit 05e521aa authored by Christina's avatar Christina

Merge remote-tracking branch 'origin/master' into number_instead_mean_time

parents e60fbdda 4be8e49f
Pipeline #262033 passed with stages
in 153 minutes and 37 seconds
......@@ -56,6 +56,12 @@ public class ThreatCognitionModel implements ICognitionModel {
// Current stimulus is a threat => store it and make clear that pedestrian is inside threat area.
pedestrian.getThreatMemory().add((Threat) stimulus);
pedestrian.setSelfCategory(SelfCategory.INSIDE_THREAT_AREA);
// Gerta suggests to apply SelfCategory.OUTSIDE_THREAT_AREA
// so that agents directly search a safe zone if they are blocked by a wall.
if (pedestrianIsBlockedByObstacle(pedestrian, topography)) {
pedestrian.setSelfCategory(SelfCategory.OUTSIDE_THREAT_AREA);
}
}
private boolean isNewThreatForPedestrian(Pedestrian pedestrian, Threat threat) {
......@@ -96,7 +102,8 @@ public class ThreatCognitionModel implements ICognitionModel {
boolean pedestrianIsInsideThreatArea = (distanceToThreat <= latestThreat.getRadius());
boolean pedestrianIsBlockedByObstacle = pedestrianIsBlockedByObstacle(pedestrian, topography);
// Gerta suggests to apply SelfCategory.OUTSIDE_THREAT_AREA to agents if they are blocked by a wall.
// Gerta suggests to apply SelfCategory.OUTSIDE_THREAT_AREA
// so that agents directly search a safe zone if they are blocked by a wall.
if (pedestrianIsInsideThreatArea && pedestrianIsBlockedByObstacle == false) {
pedestrian.setSelfCategory(SelfCategory.INSIDE_THREAT_AREA);
} else {
......
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