Commit 02dfe886 authored by Marion Goedel's avatar Marion Goedel

Renamed time_step_keys in ParadeLengthProcessor

parent 0ab7b9a7
Pipeline #264790 passed with stages
in 131 minutes and 17 seconds
......@@ -74,16 +74,16 @@ public class ParadeLengthProcessor extends DataProcessor<TimestepKey, Double> {
int timestepFirstLeaves = (int) Math.round(timeFirstLeaves / simTimeStepLength);
// find all timesteps between timeAllSpawned and timeFirstLeaves
Set<TimestepPedestrianIdKey> time_step_keys = pedestrianPotentialProcessor.getKeys().stream().
Set<TimestepPedestrianIdKey> timestepKeys = pedestrianPotentialProcessor.getKeys().stream().
filter(key -> (key.getTimestep() >= timestepAllSpawned && key.getTimestep() < timestepFirstLeaves)).collect(Collectors.toSet());
Set<Integer> timesteps = new HashSet<>();
time_step_keys.stream().forEach(key -> timesteps.add(key.getTimestep()));
timestepKeys.stream().forEach(key -> timesteps.add(key.getTimestep()));
// for each time step between timestepAllSpawned and timestepFirstLeaves, calculate the parade length
for (Integer timestep : timesteps) {
// get all TimestepPedestrianIdKey in potential for this timestep
List<TimestepPedestrianIdKey> timestepKeyi = time_step_keys.stream().filter(key -> key.getTimestep().equals(timestep)).collect(Collectors.toList());
List<TimestepPedestrianIdKey> timestepKeyi = timestepKeys.stream().filter(key -> key.getTimestep().equals(timestep)).collect(Collectors.toList());
calculateParadeLengthPerTimestep(timestepKeyi, timestep.intValue());
}
......
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