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

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
protected void doUpdate(final SimulationState state) {
// TODO: Clarify with Bene if it ensured, that "pedestrianTrajectoryProcessor.doUpdate()"
// is always invoked automatically by underlying processor manager.
AttributesSpeedInAreaProcessor processorAttributes = (AttributesSpeedInAreaProcessor) this.getAttributes();
for (Pedestrian pedestrian : state.getTopography().getElements(Pedestrian.class)) {
double speed = -1;
if (measurementArea.getShape().contains(pedestrian.getPosition())) {
// Use pedestrian's trajectory to calculate the speed.
VTrajectory wholeTrajectory = pedestrianTrajectoryProcessor.getValue(new PedestrianIdKey(pedestrian.getId()));
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