Commit 8a155ddf authored by Christina's avatar Christina
Browse files

refactored

parent 916e7c5d
Pipeline #261908 passed with stages
in 151 minutes and 55 seconds
......@@ -30,8 +30,7 @@ public class NumberOfGeneratedPedsProcessor extends DataProcessor<TimestepKey, D
if ( t + 1e-7 >= getAttributes().getStartTime() && t - 1e-7 <= getAttributes().getEndTime() ) {
int numAgentsGen;
Collection<Pedestrian> peds2 = state.getTopography().getElements(Pedestrian.class);
List<Integer> newPedIds = peds2.stream().map(Agent::getId).collect(Collectors.toList());
List<Integer> newPedIds = state.getTopography().getElements(Pedestrian.class).stream().map(Agent::getId).collect(Collectors.toList());
if (this.getPedsIds() == null){
numAgentsGen = newPedIds.size();
......
......@@ -2,7 +2,7 @@ package org.vadere.state.attributes.processor;
public class AttributesNumberOfGeneratedPedsProcessor extends AttributesProcessor {
private double startTime = 10.0;
private double startTime = 0.0;
private double endTime = -1; // -1 until simulation finished
......@@ -14,7 +14,7 @@ public class AttributesNumberOfGeneratedPedsProcessor extends AttributesProcesso
if (endTime >= startTime - 1e-7)
return endTime;
else
return Float.POSITIVE_INFINITY;
return Double.MAX_VALUE;
}
}
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