Notice to GitKraken users: A vulnerability has been found in the SSH key generation of GitKraken versions 7.6.0 to 8.0.0 (https://www.gitkraken.com/blog/weak-ssh-key-fix). If you use GitKraken and have generated a SSH key using one of these versions, please remove it both from your local workstation and from your LRZ GitLab profile.

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

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

After discussing with Gerta, removed two TODOs in "OSMBehaviorController.java"...

After discussing with Gerta, removed two TODOs in "OSMBehaviorController.java" and commented on current implementation
parent d06e01a9
......@@ -138,6 +138,17 @@ public class OSMBehaviorController {
pedestrian.setTimeOfNextStep(stepEndTime);
}
/**
* Maximize distance to the threat (a threat) and increase speed.
*
* Watch out: The focus is the behavioral change here and not the exact speed-up. The exact speed-up factor
* requires empirical data.
*
* In future: Requires data for calibration.
*
* @param pedestrian The pedestrian which escapes from a {@link Threat}.
* @param topography The topography which is used to derive the location of the {@link Threat}.
*/
public void changeToTargetRepulsionStrategyAndIncreaseSpeed(PedestrianOSM pedestrian, Topography topography) {
if (pedestrian.getThreatMemory().isLatestThreatUnhandled()) {
Threat threat = pedestrian.getThreatMemory().getLatestThreat();
......@@ -149,7 +160,6 @@ public class OSMBehaviorController {
pedestrian.setTargets(nextTarget);
pedestrian.setCombinedPotentialStrategy(CombinedPotentialStrategy.TARGET_REPULSION_STRATEGY);
// TODO: Maybe, sample speed-up from a distribution or define it as a configurable attribute.
double escapeSpeed = pedestrian.getFreeFlowSpeed() * 2.0;
pedestrian.setFreeFlowSpeed(escapeSpeed);
......@@ -162,8 +172,8 @@ public class OSMBehaviorController {
* 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.
* Watch out: This is our current definition of a safe zone. Maybe, this mus be
* adjusted in the future when more empirical data about safe zones is available.
*/
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