Commit 4c6e2c44 authored by Christina's avatar Christina
Browse files

add dummy step to update scheme (OSM)

parent e94767d7
Pipeline #588799 passed with stages
in 126 minutes and 31 seconds
......@@ -6,6 +6,7 @@ import org.vadere.simulator.models.osm.PedestrianOSM;
import org.vadere.state.psychology.cognition.SelfCategory;
import org.vadere.state.scenario.Pedestrian;
import org.vadere.state.scenario.Topography;
import org.vadere.state.simulation.FootStep;
import java.util.Comparator;
import java.util.PriorityQueue;
......@@ -70,8 +71,10 @@ public class UpdateSchemeEventDriven implements UpdateSchemeOSM {
osmBehaviorController.makeStepToTarget(pedestrian, topography);
} else if (selfCategory == SelfCategory.WAIT) {
osmBehaviorController.wait(pedestrian, topography, timeStepInSec);
pedestrian.getTrajectory().add(new FootStep(pedestrian.getLastPosition(), pedestrian.getLastPosition(), currentTimeInSec, pedestrian.getTimeOfNextStep()));
} else if (selfCategory == SelfCategory.CHANGE_TARGET) {
osmBehaviorController.changeTarget(pedestrian, topography);
pedestrian.getTrajectory().add(new FootStep(pedestrian.getLastPosition(), pedestrian.getLastPosition(), currentTimeInSec, pedestrian.getTimeOfNextStep()));
}
}
......
......@@ -6,6 +6,7 @@ import org.vadere.simulator.models.osm.PedestrianOSM;
import org.vadere.state.psychology.cognition.SelfCategory;
import org.vadere.state.scenario.Pedestrian;
import org.vadere.state.scenario.Topography;
import org.vadere.state.simulation.FootStep;
import java.util.Collection;
import java.util.HashSet;
......@@ -66,8 +67,10 @@ public class UpdateSchemeSequential implements UpdateSchemeOSM {
stepForward(pedestrian, currentTimeInSec, timeStepInSec);
} else if (selfCategory == SelfCategory.WAIT) {
osmBehaviorController.wait(pedestrian, topography, timeStepInSec);
pedestrian.getTrajectory().add(new FootStep(pedestrian.getLastPosition(), pedestrian.getLastPosition(), currentTimeInSec, pedestrian.getTimeOfNextStep()));
} else if (selfCategory == SelfCategory.CHANGE_TARGET) {
osmBehaviorController.changeTarget(pedestrian, topography);
pedestrian.getTrajectory().add(new FootStep(pedestrian.getLastPosition(), pedestrian.getLastPosition(), currentTimeInSec, pedestrian.getTimeOfNextStep()));
}
}
......@@ -79,6 +82,8 @@ public class UpdateSchemeSequential implements UpdateSchemeOSM {
}
}
@Override
public void elementAdded(Pedestrian element) {}
......
......@@ -10,6 +10,8 @@ import org.vadere.state.psychology.perception.ThreatMemory;
import org.vadere.state.scenario.Pedestrian;
import org.vadere.state.simulation.FootStep;
import java.util.LinkedList;
/**
* Log {@link Pedestrian}'s current {@link PsychologyStatus} except its {@link ThreatMemory}.
*/
......@@ -34,7 +36,7 @@ public class FootStepPsychologyStatusProcessor extends DataProcessor<EventtimePe
}
}
}
private String psychologyStatusToString(Pedestrian pedestrian) {
String statusAsString = String.format("%s %s %s %s",
pedestrian.getMostImportantStimulus().toStringForOutputProcessor(),
......
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