Commit 89655d3e authored by Mario Teixeira Parente's avatar Mario Teixeira Parente
Browse files

Remove word 'Data' in concrete DataKey subclasses

parent 37954baa
......@@ -5,10 +5,10 @@ package org.vadere.simulator.projects.dataprocessing.datakey;
*
*/
public class PedestrianIdDataKey implements DataKey<PedestrianIdDataKey> {
public class PedestrianIdKey implements DataKey<PedestrianIdKey> {
private final int pedestrianId;
public PedestrianIdDataKey(int pedestrianId) {
public PedestrianIdKey(int pedestrianId) {
this.pedestrianId = pedestrianId;
}
......@@ -36,14 +36,14 @@ public class PedestrianIdDataKey implements DataKey<PedestrianIdDataKey> {
return false;
if (getClass() != obj.getClass())
return false;
PedestrianIdDataKey other = (PedestrianIdDataKey) obj;
PedestrianIdKey other = (PedestrianIdKey) obj;
if (pedestrianId != other.pedestrianId)
return false;
return true;
}
@Override
public int compareTo(PedestrianIdDataKey o) {
public int compareTo(PedestrianIdKey o) {
return Integer.compare(pedestrianId, o.pedestrianId);
}
......
......@@ -5,14 +5,14 @@ package org.vadere.simulator.projects.dataprocessing.datakey;
*
*/
public class TimestepDataKey implements DataKey<TimestepDataKey> {
public class TimestepKey implements DataKey<TimestepKey> {
private final int timestep;
public TimestepDataKey(int timestep) {
public TimestepKey(int timestep) {
this.timestep = timestep;
}
@Override
public int compareTo(final TimestepDataKey o) {
public int compareTo(final TimestepKey o) {
return Integer.compare(timestep, o.timestep);
}
......@@ -36,7 +36,7 @@ public class TimestepDataKey implements DataKey<TimestepDataKey> {
return false;
if (getClass() != obj.getClass())
return false;
TimestepDataKey other = (TimestepDataKey) obj;
TimestepKey other = (TimestepKey) obj;
if (timestep != other.timestep)
return false;
return true;
......
......@@ -5,11 +5,11 @@ package org.vadere.simulator.projects.dataprocessing.datakey;
*
*/
public class TimestepPedestrianIdDataKey implements DataKey<TimestepPedestrianIdDataKey> {
public class TimestepPedestrianIdKey implements DataKey<TimestepPedestrianIdKey> {
private final int timestep;
private final int pedestrianId;
public TimestepPedestrianIdDataKey(int timestep, int pedestrianId) {
public TimestepPedestrianIdKey(int timestep, int pedestrianId) {
this.timestep = timestep;
this.pedestrianId = pedestrianId;
}
......@@ -23,7 +23,7 @@ public class TimestepPedestrianIdDataKey implements DataKey<TimestepPedestrianId
}
@Override
public int compareTo(TimestepPedestrianIdDataKey o) {
public int compareTo(TimestepPedestrianIdKey o) {
int result = Integer.compare(timestep, o.timestep);
if (result == 0) {
return Integer.compare(pedestrianId, o.pedestrianId);
......@@ -32,7 +32,7 @@ public class TimestepPedestrianIdDataKey implements DataKey<TimestepPedestrianId
}
public static String[] getHeaders() {
return new String[] { TimestepDataKey.getHeader(), PedestrianIdDataKey.getHeader() };
return new String[] { TimestepKey.getHeader(), PedestrianIdKey.getHeader() };
}
@Override
......@@ -52,7 +52,7 @@ public class TimestepPedestrianIdDataKey implements DataKey<TimestepPedestrianId
return false;
if (getClass() != obj.getClass())
return false;
TimestepPedestrianIdDataKey other = (TimestepPedestrianIdDataKey) obj;
TimestepPedestrianIdKey other = (TimestepPedestrianIdKey) obj;
if (pedestrianId != other.pedestrianId)
return false;
if (timestep != other.timestep)
......
package org.vadere.simulator.projects.dataprocessing.outputfile;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdKey;
/**
* @author Mario Teixeira Parente
*
*/
public class PedestrianIdOutputFile extends OutputFile<PedestrianIdDataKey> {
public class PedestrianIdOutputFile extends OutputFile<PedestrianIdKey> {
public PedestrianIdOutputFile() {
super(PedestrianIdDataKey.getHeader());
super(PedestrianIdKey.getHeader());
}
}
package org.vadere.simulator.projects.dataprocessing.outputfile;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepKey;
/**
* @author Mario Teixeira Parente
*
*/
public class TimestepOutputFile extends OutputFile<TimestepDataKey> {
public class TimestepOutputFile extends OutputFile<TimestepKey> {
public TimestepOutputFile() {
super("hdfkh");
......
package org.vadere.simulator.projects.dataprocessing.outputfile;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdKey;
/**
* @author Mario Teixeira Parente
*
*/
public class TimestepPedestrianIdOutputFile extends OutputFile<TimestepPedestrianIdDataKey> {
public class TimestepPedestrianIdOutputFile extends OutputFile<TimestepPedestrianIdKey> {
public TimestepPedestrianIdOutputFile() {
super(TimestepPedestrianIdDataKey.getHeaders());
super(TimestepPedestrianIdKey.getHeaders());
}
@Override
public String[] toStrings(final TimestepPedestrianIdDataKey key) {
public String[] toStrings(final TimestepPedestrianIdKey key) {
return new String[] { Integer.toString(key.getTimestep()), Integer.toString(key.getPedestrianId()) };
}
}
package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepKey;
import org.vadere.state.attributes.processor.AttributesAreaProcessor;
import org.vadere.util.geometry.shapes.VRectangle;
......@@ -10,7 +10,7 @@ import org.vadere.util.geometry.shapes.VRectangle;
*
*/
public abstract class AreaDataProcessor<V> extends DataProcessor<TimestepDataKey, V> {
public abstract class AreaDataProcessor<V> extends DataProcessor<TimestepKey, V> {
private VRectangle measurementArea;
protected AreaDataProcessor(final String... headers) {
......
package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepKey;
/**
* @author Mario Teixeira Parente
......@@ -18,6 +18,6 @@ public abstract class AreaDensityProcessor extends AreaDataProcessor<Double> {
@Override
protected void doUpdate(final SimulationState state) {
this.addValue(new TimestepDataKey(state.getStep()), this.densAlg.getDensity(state));
this.addValue(new TimestepKey(state.getStep()), this.densAlg.getDensity(state));
}
}
......@@ -2,9 +2,9 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdKey;
import org.vadere.state.attributes.processor.AttributesAreaSpeedProcessor;
import org.vadere.util.geometry.shapes.VPoint;
......@@ -30,22 +30,22 @@ public class AreaSpeedProcessor extends AreaDataProcessor<Double> {
this.pedPosProc.update(state);
this.pedVelProc.update(state);
Map<PedestrianIdDataKey, VPoint> positionMap = this.pedPosProc.getPositions(new TimestepDataKey(step));
Map<PedestrianIdKey, VPoint> positionMap = this.pedPosProc.getPositions(new TimestepKey(step));
int pedCount = 0;
double sumVelocities = 0.0;
for (Map.Entry<PedestrianIdDataKey, VPoint> entry : positionMap.entrySet()) {
for (Map.Entry<PedestrianIdKey, VPoint> entry : positionMap.entrySet()) {
final int pedId = entry.getKey().getPedestrianId();
final VPoint pos = entry.getValue();
if (getMeasurementArea().contains(pos)) {
sumVelocities += this.pedVelProc.getValue(new TimestepPedestrianIdDataKey(step, pedId));
sumVelocities += this.pedVelProc.getValue(new TimestepPedestrianIdKey(step, pedId));
pedCount++;
}
}
this.addValue(new TimestepDataKey(step), sumVelocities / pedCount);
this.addValue(new TimestepKey(step), sumVelocities / pedCount);
}
@Override
......
......@@ -2,7 +2,7 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdKey;
import org.vadere.state.attributes.processor.AttributesPedestrianDensityProcessor;
import org.vadere.state.scenario.Pedestrian;
......@@ -11,7 +11,7 @@ import org.vadere.state.scenario.Pedestrian;
*
*/
public abstract class PedestrianDensityProcessor extends DataProcessor<TimestepPedestrianIdDataKey, Double> {
public abstract class PedestrianDensityProcessor extends DataProcessor<TimestepPedestrianIdKey, Double> {
private PedestrianPositionProcessor pedPosProc;
private IPointDensityAlgorithm densAlg;
......@@ -25,7 +25,7 @@ public abstract class PedestrianDensityProcessor extends DataProcessor<TimestepP
this.pedPosProc.update(state);
state.getTopography().getElements(Pedestrian.class).stream()
.forEach(ped -> this.addValue(new TimestepPedestrianIdDataKey(state.getStep(), ped.getId()),
.forEach(ped -> this.addValue(new TimestepPedestrianIdKey(state.getStep(), ped.getId()),
this.densAlg.getDensity(ped.getPosition(), state)));
}
......
......@@ -2,7 +2,7 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdKey;
import org.vadere.state.scenario.Pedestrian;
import java.util.Collection;
......@@ -12,7 +12,7 @@ import java.util.Collection;
*
*/
public class PedestrianEndTimeProcessor extends DataProcessor<PedestrianIdDataKey, Double> {
public class PedestrianEndTimeProcessor extends DataProcessor<PedestrianIdKey, Double> {
public PedestrianEndTimeProcessor() {
super("endTime");
}
......@@ -33,7 +33,7 @@ public class PedestrianEndTimeProcessor extends DataProcessor<PedestrianIdDataKe
}
private void setValues(Collection<Pedestrian> peds, double value) {
peds.stream().map(ped -> new PedestrianIdDataKey(ped.getId()))
peds.stream().map(ped -> new PedestrianIdKey(ped.getId()))
.forEach(key -> this.addValue(key, value));
}
}
......@@ -2,7 +2,7 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdKey;
import org.vadere.state.attributes.processor.AttributesPedestrianEvacuationTimeProcessor;
import org.vadere.state.scenario.Pedestrian;
......@@ -11,7 +11,7 @@ import org.vadere.state.scenario.Pedestrian;
*
*/
public class PedestrianEvacuationTimeProcessor extends DataProcessor<PedestrianIdDataKey, Double> {
public class PedestrianEvacuationTimeProcessor extends DataProcessor<PedestrianIdKey, Double> {
private PedestrianStartTimeProcessor pedStTimeProc;
public PedestrianEvacuationTimeProcessor() {
......@@ -23,14 +23,14 @@ public class PedestrianEvacuationTimeProcessor extends DataProcessor<PedestrianI
this.pedStTimeProc.update(state);
state.getTopography().getElements(Pedestrian.class).stream()
.map(ped -> new PedestrianIdDataKey(ped.getId()))
.map(ped -> new PedestrianIdKey(ped.getId()))
.forEach(key -> this.addValue(key, state.getSimTimeInSec() - this.pedStTimeProc.getValue(key)));
}
@Override
public void postLoop(final SimulationState state) {
state.getTopography().getElements(Pedestrian.class).stream()
.map(ped -> new PedestrianIdDataKey(ped.getId()))
.map(ped -> new PedestrianIdKey(ped.getId()))
.forEach(key -> this.addValue(key, Double.NaN));
}
......
......@@ -2,7 +2,7 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdKey;
import org.vadere.state.attributes.processor.AttributesPedestrianFlowProcessor;
import java.util.Set;
......@@ -13,7 +13,7 @@ import java.util.stream.Collectors;
*
*/
public class PedestrianFlowProcessor extends DataProcessor<TimestepPedestrianIdDataKey, Double> {
public class PedestrianFlowProcessor extends DataProcessor<TimestepPedestrianIdKey, Double> {
private PedestrianVelocityProcessor pedVelProc;
private PedestrianDensityProcessor pedDensProc;
......@@ -26,9 +26,9 @@ public class PedestrianFlowProcessor extends DataProcessor<TimestepPedestrianIdD
this.pedVelProc.update(state);
this.pedDensProc.update(state);
Set<TimestepPedestrianIdDataKey> keys = this.pedVelProc.getKeys().stream().filter(key -> key.getTimestep() == state.getStep()).collect(Collectors.toSet());
Set<TimestepPedestrianIdKey> keys = this.pedVelProc.getKeys().stream().filter(key -> key.getTimestep() == state.getStep()).collect(Collectors.toSet());
for (TimestepPedestrianIdDataKey key : keys) {
for (TimestepPedestrianIdKey key : keys) {
double velocity = this.pedVelProc.getValue(key);
double density = this.pedDensProc.getValue(key);
......
......@@ -2,8 +2,8 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdKey;
import org.vadere.state.attributes.processor.AttributesPedestrianLastPositionProcessor;
import org.vadere.util.geometry.shapes.VPoint;
......@@ -14,7 +14,7 @@ import java.util.Map;
*
*/
public class PedestrianLastPositionProcessor extends DataProcessor<PedestrianIdDataKey, VPoint> {
public class PedestrianLastPositionProcessor extends DataProcessor<PedestrianIdKey, VPoint> {
private PedestrianPositionProcessor pedPosProc;
public PedestrianLastPositionProcessor() {
......@@ -26,8 +26,8 @@ public class PedestrianLastPositionProcessor extends DataProcessor<PedestrianIdD
this.pedPosProc.update(state);
Map<Integer, VPoint> pedPosMap = state.getPedestrianPositionMap();
pedPosMap.keySet().forEach(pedId -> this.addValue(new PedestrianIdDataKey(pedId),
this.pedPosProc.getValue(new TimestepPedestrianIdDataKey(state.getStep(), pedId))));
pedPosMap.keySet().forEach(pedId -> this.addValue(new PedestrianIdKey(pedId),
this.pedPosProc.getValue(new TimestepPedestrianIdKey(state.getStep(), pedId))));
}
@Override
......@@ -39,7 +39,7 @@ public class PedestrianLastPositionProcessor extends DataProcessor<PedestrianIdD
}
@Override
public String[] toStrings(final PedestrianIdDataKey key) {
public String[] toStrings(final PedestrianIdKey key) {
VPoint pos = this.getValue(key);
return new String[] { Double.toString(pos.x), Double.toString(pos.y) };
......
......@@ -4,7 +4,7 @@ import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.models.Model;
import org.vadere.simulator.models.osm.OptimalStepsModel;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdKey;
import org.vadere.state.scenario.Pedestrian;
import java.util.Collection;
......@@ -14,7 +14,7 @@ import java.util.Collection;
*
*/
public class PedestrianOSMStrideLengthProcessor extends DataProcessor<TimestepPedestrianIdDataKey, Double> {
public class PedestrianOSMStrideLengthProcessor extends DataProcessor<TimestepPedestrianIdKey, Double> {
private OptimalStepsModel osm;
public PedestrianOSMStrideLengthProcessor() {
......@@ -27,7 +27,7 @@ public class PedestrianOSMStrideLengthProcessor extends DataProcessor<TimestepPe
protected void doUpdate(final SimulationState state) {
Collection<Pedestrian> peds = state.getTopography().getElements(Pedestrian.class);
// TODO: if osm != null then compute stridelength
peds.forEach(ped -> this.addValue(new TimestepPedestrianIdDataKey(state.getStep(), ped.getId()), this.osm == null ? Double.NaN : 0.0));
peds.forEach(ped -> this.addValue(new TimestepPedestrianIdKey(state.getStep(), ped.getId()), this.osm == null ? Double.NaN : 0.0));
// TODO Use this comment from the old implementation for this implementation
// @Override
......
......@@ -2,7 +2,7 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdKey;
import org.vadere.state.attributes.processor.AttributesPedestrianOverlapProcessor;
import org.vadere.util.geometry.shapes.VPoint;
......@@ -13,7 +13,7 @@ import java.util.Map;
*
*/
public class PedestrianOverlapProcessor extends DataProcessor<TimestepPedestrianIdDataKey, Integer> {
public class PedestrianOverlapProcessor extends DataProcessor<TimestepPedestrianIdKey, Integer> {
private double pedRadius;
public PedestrianOverlapProcessor() {
......@@ -24,7 +24,7 @@ public class PedestrianOverlapProcessor extends DataProcessor<TimestepPedestrian
protected void doUpdate(final SimulationState state) {
Map<Integer, VPoint> pedPosMap = state.getPedestrianPositionMap();
pedPosMap.entrySet().forEach(entry -> this.addValue(new TimestepPedestrianIdDataKey(state.getStep(), entry.getKey()), this.calculateOverlaps(pedPosMap, entry.getValue())));
pedPosMap.entrySet().forEach(entry -> this.addValue(new TimestepPedestrianIdKey(state.getStep(), entry.getKey()), this.calculateOverlaps(pedPosMap, entry.getValue())));
}
@Override
......
......@@ -2,9 +2,9 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepKey;
import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianIdKey;
import org.vadere.util.geometry.shapes.VPoint;
import java.util.Map;
......@@ -16,16 +16,16 @@ import java.util.stream.Collectors;
*
*/
public class PedestrianPositionProcessor extends DataProcessor<TimestepPedestrianIdDataKey, VPoint> {
public class PedestrianPositionProcessor extends DataProcessor<TimestepPedestrianIdKey, VPoint> {
public PedestrianPositionProcessor() {
super("x", "y");
}
public Map<PedestrianIdDataKey, VPoint> getPositions(TimestepDataKey timestepKey) {
public Map<PedestrianIdKey, VPoint> getPositions(TimestepKey timestepKey) {
return this.getData().entrySet().stream()
.filter(e -> e.getKey().equals(timestepKey))
.collect(Collectors.toMap(e -> new PedestrianIdDataKey(e.getKey().getPedestrianId()), e -> e.getValue()));
.collect(Collectors.toMap(e -> new PedestrianIdKey(e.getKey().getPedestrianId()), e -> e.getValue()));
}
@Override
......@@ -37,7 +37,7 @@ public class PedestrianPositionProcessor extends DataProcessor<TimestepPedestria
Integer pedId = entry.getKey();
VPoint pos = entry.getValue();
this.addValue(new TimestepPedestrianIdDataKey(timeStep, pedId), pos);
this.addValue(new TimestepPedestrianIdKey(timeStep, pedId), pos);
}
}
......@@ -45,7 +45,7 @@ public class PedestrianPositionProcessor extends DataProcessor<TimestepPedestria
public void init(final ProcessorManager manager) {}
@Override
public String[] toStrings(TimestepPedestrianIdDataKey key) {
public String[] toStrings(TimestepPedestrianIdKey key) {
VPoint p = this.getValue(key);
return new String[] { Double.toString(p.x), Double.toString(p.y) };
......
......@@ -2,7 +2,7 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdKey;
import org.vadere.state.scenario.Pedestrian;
import org.vadere.state.scenario.Source;
......@@ -13,7 +13,7 @@ import java.util.Collection;
*
*/
public class PedestrianSourceIdProcessor extends DataProcessor<PedestrianIdDataKey, Integer> {
public class PedestrianSourceIdProcessor extends DataProcessor<PedestrianIdKey, Integer> {
public PedestrianSourceIdProcessor() {
super("sourceId");
......@@ -26,7 +26,7 @@ public class PedestrianSourceIdProcessor extends DataProcessor<PedestrianIdDataK
peds.forEach(p -> {
final Source s = p.getSource();
final int sourceId = (s == null) ? -1 : s.getId();
this.addValue(new PedestrianIdDataKey(p.getId()), sourceId);
this.addValue(new PedestrianIdKey(p.getId()), sourceId);
});
}
......
......@@ -2,7 +2,7 @@ package org.vadere.simulator.projects.dataprocessing.processor;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.projects.dataprocessing.ProcessorManager;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdDataKey;
import org.vadere.simulator.projects.dataprocessing.datakey.PedestrianIdKey;
import org.vadere.state.scenario.Pedestrian;
import java.util.Set;
......@@ -12,7 +12,7 @@ import java.util.Set;
*
*/
public class PedestrianStartTimeProcessor extends DataProcessor<PedestrianIdDataKey, Double> {
public class PedestrianStartTimeProcessor extends DataProcessor<PedestrianIdKey, Double> {
public PedestrianStartTimeProcessor() {
super("startTime");
......@@ -21,7 +21,7 @@ public class PedestrianStartTimeProcessor extends DataProcessor<PedestrianIdData
@Override
protected void doUpdate(final SimulationState state) {
state.getTopography().getElements(Pedestrian.class).stream()
.forEach(ped -> this.update(new PedestrianIdDataKey(ped.getId()), state.getSimTimeInSec()));
.forEach(ped -> this.update(new PedestrianIdKey(ped.getId()), state.getSimTimeInSec()));
}
@Override
......@@ -29,8 +29,8 @@ public class PedestrianStartTimeProcessor extends DataProcessor<PedestrianIdData
// No initialization needed
}
private void update(PedestrianIdDataKey pedIdKey, double startTime) {
Set<PedestrianIdDataKey> keys = this.getKeys();