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

Commit d23293c8 authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier

Handle salient behavior in "UpdateSchemeSequential" and reduced...

Handle salient behavior in "UpdateSchemeSequential" and reduced "requiredFootSteps" from "5" to "2" in "SalientBehaviorCognition".
parent 79832611
{
"name" : "01-ExperimentSetup",
"name" : "01-ExperimentSetup-OSMEventDriven",
"description" : "",
"release" : "0.7",
"processWriters" : {
......@@ -175,7 +175,8 @@
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0
"acceleration" : 2.0,
"footStepsToStore" : 10
},
"idAsTarget" : -1,
"isChild" : false,
......@@ -210,7 +211,8 @@
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0
"acceleration" : 2.0,
"footStepsToStore" : 10
},
"idAsTarget" : -1,
"isChild" : false,
......@@ -245,7 +247,8 @@
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0
"acceleration" : 2.0,
"footStepsToStore" : 10
},
"idAsTarget" : -1,
"isChild" : false,
......@@ -280,7 +283,8 @@
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0
"acceleration" : 2.0,
"footStepsToStore" : 10
},
"idAsTarget" : -1,
"isChild" : false,
......@@ -315,7 +319,8 @@
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0
"acceleration" : 2.0,
"footStepsToStore" : 10
},
"idAsTarget" : -1,
"isChild" : false,
......@@ -350,7 +355,8 @@
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0
"acceleration" : 2.0,
"footStepsToStore" : 10
},
"idAsTarget" : -1,
"isChild" : false,
......@@ -385,7 +391,8 @@
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0
"acceleration" : 2.0,
"footStepsToStore" : 10
},
"idAsTarget" : -1,
"isChild" : false,
......@@ -420,7 +427,8 @@
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0
"acceleration" : 2.0,
"footStepsToStore" : 10
},
"idAsTarget" : -1,
"isChild" : false,
......@@ -455,7 +463,8 @@
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0
"acceleration" : 2.0,
"footStepsToStore" : 10
},
"idAsTarget" : -1,
"isChild" : false,
......@@ -490,7 +499,8 @@
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0
"acceleration" : 2.0,
"footStepsToStore" : 10
},
"idAsTarget" : -1,
"isChild" : false,
......@@ -525,7 +535,8 @@
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0
"acceleration" : 2.0,
"footStepsToStore" : 10
},
"idAsTarget" : -1,
"isChild" : false,
......@@ -560,7 +571,8 @@
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0
"acceleration" : 2.0,
"footStepsToStore" : 10
},
"idAsTarget" : -1,
"isChild" : false,
......@@ -595,7 +607,8 @@
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0
"acceleration" : 2.0,
"footStepsToStore" : 10
},
"idAsTarget" : -1,
"isChild" : false,
......@@ -617,7 +630,8 @@
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0
"acceleration" : 2.0,
"footStepsToStore" : 10
},
"teleporter" : null,
"attributesCar" : {
......@@ -629,6 +643,7 @@
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0,
"footStepsToStore" : 10,
"length" : 4.5,
"width" : 1.7,
"direction" : {
......
......@@ -33,7 +33,7 @@ public class SalientBehaviorCognition {
for (Pedestrian pedestrian : pedestrians) {
// TODO: Maybe, add following variables as attribute to "AttributesAgent".
int requiredFootSteps = 5;
int requiredFootSteps = 2;
double requiredSpeedInMetersPerSecondToBeCooperative = 0.05;
LastFootSteps lastFootSteps = pedestrian.getFootSteps().getLastFootSteps();
......
......@@ -4,6 +4,7 @@ import org.jetbrains.annotations.NotNull;
import org.vadere.simulator.models.osm.OSMBehaviorController;
import org.vadere.simulator.models.osm.PedestrianOSM;
import org.vadere.simulator.models.potential.combinedPotentials.CombinedPotentialStrategy;
import org.vadere.state.behavior.SalientBehavior;
import org.vadere.state.events.types.*;
import org.vadere.state.scenario.Pedestrian;
import org.vadere.state.scenario.Target;
......@@ -45,9 +46,13 @@ public class UpdateSchemeSequential implements UpdateSchemeOSM {
pedestrian.clearStrides();
pedestrian.setTimeCredit(pedestrian.getTimeCredit() + timeStepInSec);
while (pedestrian.getTimeCredit() > pedestrian.getDurationNextStep()) {
pedestrian.updateNextPosition();
osmBehaviorController.makeStep(pedestrian, topography, timeStepInSec);
if (pedestrian.getSalientBehavior() == SalientBehavior.TARGET_ORIENTED) {
while (pedestrian.getTimeCredit() > pedestrian.getDurationNextStep()) {
pedestrian.updateNextPosition();
osmBehaviorController.makeStep(pedestrian, topography, timeStepInSec);
}
} else if (pedestrian.getSalientBehavior() == SalientBehavior.COOPERATIVE) {
osmBehaviorController.swapWithClosestCooperativePedestrian(pedestrian, topography);
}
} else if (mostImportantEvent instanceof WaitEvent || mostImportantEvent instanceof WaitInAreaEvent) {
......
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