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

Commit 6db103d9 authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier

Fixed TODO in "PedestrianSpeedInAreaProcessor".

parent a97e1ed7
Pipeline #113016 passed with stages
in 154 minutes and 1 second
...@@ -120,15 +120,12 @@ public class PedestrianSpeedInAreaProcessor extends DataProcessor<TimestepPedest ...@@ -120,15 +120,12 @@ public class PedestrianSpeedInAreaProcessor extends DataProcessor<TimestepPedest
@Override @Override
protected void doUpdate(final SimulationState state) { protected void doUpdate(final SimulationState state) {
// TODO: Clarify with Bene if it ensured, that "pedestrianTrajectoryProcessor.doUpdate()" pedestrianTrajectoryProcessor.update(state);
// is always invoked automatically by underlying processor manager.
AttributesSpeedInAreaProcessor processorAttributes = (AttributesSpeedInAreaProcessor) this.getAttributes();
for (Pedestrian pedestrian : state.getTopography().getElements(Pedestrian.class)) { for (Pedestrian pedestrian : state.getTopography().getElements(Pedestrian.class)) {
double speed = -1; double speed = -1;
if (measurementArea.getShape().contains(pedestrian.getPosition())) { if (measurementArea.getShape().contains(pedestrian.getPosition())) {
// Use pedestrian's trajectory to calculate the speed.
VTrajectory wholeTrajectory = pedestrianTrajectoryProcessor.getValue(new PedestrianIdKey(pedestrian.getId())); VTrajectory wholeTrajectory = pedestrianTrajectoryProcessor.getValue(new PedestrianIdKey(pedestrian.getId()));
VTrajectory cuttedTrajectory = wholeTrajectory.cut(measurementArea.asVRectangle()); VTrajectory cuttedTrajectory = wholeTrajectory.cut(measurementArea.asVRectangle());
......
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