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

[WIP] Added TODO in "SelfCatThreatModel"

parent ecf693ca
......@@ -59,14 +59,12 @@ public class ThreatCognitionModel implements ICognitionModel {
testIfInsideOrOutsideThreatArea(pedestrian);
} else { // These agents did not perceive a threat but are aware of other threatened agents.
// TODO: Pedestrians must be spawned with a random "GroupMembership".
if (pedestrian.getGroupMembership() == GroupMembership.OUT_GROUP) {
pedestrian.setSelfCategory(SelfCategory.TARGET_ORIENTED);
} else if (pedestrian.getGroupMembership() == GroupMembership.IN_GROUP) {
imitateThreatenedPedestrianIfPresent(pedestrian);
} else {
throw new IllegalArgumentException("Can only process \"OUT_GROUP\" and \"IN_GROUP\" group membership!");
throw new IllegalArgumentException("Can only process \"IN_GROUP\" and \"OUT_GROUP\" group membership!");
}
}
}
......
......@@ -102,6 +102,9 @@ public class SelfCatThreatModel implements MainModel {
noSpeedAdjusters, stepCircleOptimizer.clone());
pedestrian.setPosition(position);
// TODO: Call "pedestrian.setGroupMembership()" based on a (binomial?) distribution
// which can be configured in JSON file (similar to "TargetChanger").
return pedestrian;
}
......
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