Delete old processor attributes and move the new ones to the original

place
parent e1646ed0
......@@ -80,24 +80,24 @@
"id": 19
} ],
"attributes": {
"org.vadere.simulator.projects.dataprocessing.AttributesVelocityProcessor": {
"org.vadere.state.attributes.processors.AttributesVelocityProcessor": {
"processorId": 2,
"pedestrianPositionProcessorId": 1
},
"org.vadere.simulator.projects.dataprocessing.AttributesPedestrianDensityCountingProcessor": {
"org.vadere.state.attributes.processors.AttributesPedestrianDensityCountingProcessor": {
"processorId": 3,
"pedestrianPositionProcessorId": 1,
"radius": 1.5
},
"org.vadere.simulator.projects.dataprocessing.AttributesPedestrianLastPositionProcessor": {
"org.vadere.state.attributes.processors.AttributesPedestrianLastPositionProcessor": {
"processorId": 4,
"pedestrianPositionProcessorId": 1
},
"org.vadere.simulator.projects.dataprocessing.AttributesPedestrianDensityGaussianProcessor": {
"org.vadere.state.attributes.processors.AttributesPedestrianDensityGaussianProcessor": {
"processorId": 5,
"pedestrianPositionProcessorId": 1
},
"org.vadere.simulator.projects.dataprocessing.AttributesAreaDensityVoronoiProcessor": {
"org.vadere.state.attributes.processors.AttributesAreaDensityVoronoiProcessor": {
"processorId": 6,
"measurementArea": {
"x" : 5.0,
......@@ -114,7 +114,7 @@
"type" : "RECTANGLE"
}
},
"org.vadere.simulator.projects.dataprocessing.AttributesAreaSpeedProcessor": {
"org.vadere.state.attributes.processors.AttributesAreaSpeedProcessor": {
"processorId": 7,
"measurementArea": {
"x" : 5.0,
......@@ -126,28 +126,28 @@
"pedestrianPositionProcessorId": 1,
"pedestrianVelocityProcessorId": 2
},
"org.vadere.simulator.projects.dataprocessing.AttributesPedestrianEvacuationTimeProcessor": {
"org.vadere.state.attributes.processors.AttributesPedestrianEvacuationTimeProcessor": {
"processorId": 10,
"pedestrianStartTimeProcessorId": 8
},
"org.vadere.simulator.projects.dataprocessing.AttributesMeanPedestrianEvacuationTimeProcessor": {
"org.vadere.state.attributes.processors.AttributesMeanPedestrianEvacuationTimeProcessor": {
"processorId": 11,
"pedestrianEvacuationTimeProcessorId": 10
},
"org.vadere.simulator.projects.dataprocessing.AttributesEvacuationTimeProcessor": {
"org.vadere.state.attributes.processors.AttributesEvacuationTimeProcessor": {
"processorId": 12,
"pedestrianEvacuationTimeProcessorId": 10
},
"org.vadere.simulator.projects.dataprocessing.AttributesPedestrianFlowProcessor": {
"org.vadere.state.attributes.processors.AttributesPedestrianFlowProcessor": {
"processorId": 13,
"pedestrianVelocityProcessorId": 2,
"pedestrianDensityProcessorId": 3
},
"org.vadere.simulator.projects.dataprocessing.AttributesPedestrianOverlapProcessor": {
"org.vadere.state.attributes.processors.AttributesPedestrianOverlapProcessor": {
"processorId": 14,
"pedRadius": 0.21
},
"org.vadere.simulator.projects.dataprocessing.AttributesPedestrianWaitingTimeProcessor": {
"org.vadere.state.attributes.processors.AttributesPedestrianWaitingTimeProcessor": {
"processorId": 15,
"waitingArea": {
"x" : 5.0,
......@@ -157,7 +157,7 @@
"type" : "RECTANGLE"
}
},
"org.vadere.simulator.projects.dataprocessing.AttributesPedestrianWaitingEndTimeProcessor": {
"org.vadere.state.attributes.processors.AttributesPedestrianWaitingEndTimeProcessor": {
"processorId": 16,
"waitingArea": {
"x" : 5.0,
......
package org.vadere.simulator.projects.dataprocessing;
import org.vadere.state.attributes.processors.AttributesAreaDensityVoronoiProcessor;
import org.vadere.state.attributes.processors.AttributesProcessor;
public class AreaDensityVoronoiProcessor extends AreaDensityProcessor {
@Override
public void init(final AttributesProcessor attributes, final ProcessorManager manager) {
......
package org.vadere.simulator.projects.dataprocessing;
import org.vadere.state.attributes.processors.AttributesAreaProcessor;
import org.vadere.state.attributes.processors.AttributesProcessor;
import org.vadere.util.geometry.shapes.VRectangle;
public abstract class AreaProcessor<V> extends Processor<TimestepDataKey, V> {
......
......@@ -3,6 +3,8 @@ package org.vadere.simulator.projects.dataprocessing;
import java.util.Map;
import org.vadere.simulator.control.SimulationState;
import org.vadere.state.attributes.processors.AttributesAreaSpeedProcessor;
import org.vadere.state.attributes.processors.AttributesProcessor;
import org.vadere.util.geometry.shapes.VPoint;
public class AreaSpeedProcessor extends AreaProcessor<Double> {
......
package org.vadere.simulator.projects.dataprocessing;
import org.vadere.util.geometry.shapes.VRectangle;
public class AttributesPedestrianWaitingTimeProcessor extends AttributesProcessor {
private VRectangle waitingArea = new VRectangle(0, 0, 1, 1);
public VRectangle getWaitingArea() {
return waitingArea;
}
}
package org.vadere.simulator.projects.dataprocessing;
public class AttributesVelocityProcessor extends AttributesProcessor {
private int pedestrianPositionProcessorId;
private int backSteps = 1;
public int getPedestrianPositionProcessorId() {
return this.pedestrianPositionProcessorId;
}
public void setPedestrianPositionProcessorId(int pedestrianPositionProcessorId) {
this.pedestrianPositionProcessorId = pedestrianPositionProcessorId;
}
public int getBackSteps() {
return this.backSteps;
}
public void setBackSteps(int backSteps) {
this.backSteps = backSteps;
}
}
......@@ -8,6 +8,7 @@ import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.vadere.simulator.projects.io.JsonConverter;
import org.vadere.state.attributes.processors.AttributesProcessor;
import org.vadere.util.reflection.DynamicClassInstantiator;
import java.io.IOException;
......
......@@ -4,6 +4,8 @@ import java.util.Collection;
import java.util.Collections;
import org.vadere.simulator.control.SimulationState;
import org.vadere.state.attributes.processors.AttributesEvacuationTimeProcessor;
import org.vadere.state.attributes.processors.AttributesProcessor;
import org.vadere.state.scenario.Pedestrian;
public class EvacuationTimeProcessor extends Processor<NoDataKey, Double> {
......
......@@ -4,6 +4,8 @@ import java.util.List;
import java.util.stream.Collectors;
import org.vadere.simulator.control.SimulationState;
import org.vadere.state.attributes.processors.AttributesMeanPedestrianEvacuationTimeProcessor;
import org.vadere.state.attributes.processors.AttributesProcessor;
public class MeanPedestrianEvacuationTimeProcessor extends Processor<NoDataKey, Double> {
private PedestrianEvacuationTimeProcessor pedEvacTimeProc;
......
package org.vadere.simulator.projects.dataprocessing;
import org.vadere.state.attributes.processors.AttributesProcessor;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
......
package org.vadere.simulator.projects.dataprocessing;
import org.vadere.state.attributes.processors.AttributesPedestrianDensityCountingProcessor;
import org.vadere.state.attributes.processors.AttributesProcessor;
public class PedestrianDensityCountingProcessor extends PedestrianDensityProcessor {
@Override
......
package org.vadere.simulator.projects.dataprocessing;
import org.vadere.state.attributes.processors.AttributesPedestrianDensityGaussianProcessor;
import org.vadere.state.attributes.processors.AttributesProcessor;
public class PedestrianDensityGaussianProcessor extends PedestrianDensityProcessor {
@Override
......
package org.vadere.simulator.projects.dataprocessing;
import org.vadere.simulator.control.SimulationState;
import org.vadere.state.attributes.processors.AttributesPedestrianDensityProcessor;
import org.vadere.state.attributes.processors.AttributesProcessor;
import org.vadere.state.scenario.Pedestrian;
public abstract class PedestrianDensityProcessor extends Processor<TimestepPedestrianIdDataKey, Double> {
......
......@@ -3,6 +3,7 @@ package org.vadere.simulator.projects.dataprocessing;
import java.util.Collection;
import org.vadere.simulator.control.SimulationState;
import org.vadere.state.attributes.processors.AttributesProcessor;
import org.vadere.state.scenario.Pedestrian;
public class PedestrianEndTimeProcessor extends Processor<PedestrianIdDataKey, Double> {
......
package org.vadere.simulator.projects.dataprocessing;
import org.vadere.simulator.control.SimulationState;
import org.vadere.state.attributes.processors.AttributesPedestrianEvacuationTimeProcessor;
import org.vadere.state.attributes.processors.AttributesProcessor;
import org.vadere.state.scenario.Pedestrian;
public class PedestrianEvacuationTimeProcessor extends Processor<PedestrianIdDataKey, Double> {
......
......@@ -4,6 +4,8 @@ import java.util.Set;
import java.util.stream.Collectors;
import org.vadere.simulator.control.SimulationState;
import org.vadere.state.attributes.processors.AttributesPedestrianFlowProcessor;
import org.vadere.state.attributes.processors.AttributesProcessor;
public class PedestrianFlowProcessor extends Processor<TimestepPedestrianIdDataKey, Double> {
private PedestrianVelocityProcessor pedVelProc;
......
......@@ -3,6 +3,8 @@ package org.vadere.simulator.projects.dataprocessing;
import java.util.Map;
import org.vadere.simulator.control.SimulationState;
import org.vadere.state.attributes.processors.AttributesPedestrianLastPositionProcessor;
import org.vadere.state.attributes.processors.AttributesProcessor;
import org.vadere.util.geometry.shapes.VPoint;
public class PedestrianLastPositionProcessor extends Processor<PedestrianIdDataKey, VPoint> {
......
......@@ -5,6 +5,7 @@ import java.util.Collection;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.models.Model;
import org.vadere.simulator.models.osm.OptimalStepsModel;
import org.vadere.state.attributes.processors.AttributesProcessor;
import org.vadere.state.scenario.Pedestrian;
public class PedestrianOSMStrideLengthProcessor extends Processor<TimestepPedestrianIdDataKey, Double> {
......
......@@ -3,6 +3,8 @@ package org.vadere.simulator.projects.dataprocessing;
import java.util.Map;
import org.vadere.simulator.control.SimulationState;
import org.vadere.state.attributes.processors.AttributesPedestrianOverlapProcessor;
import org.vadere.state.attributes.processors.AttributesProcessor;
import org.vadere.util.geometry.shapes.VPoint;
public class PedestrianOverlapProcessor extends Processor<TimestepPedestrianIdDataKey, Integer> {
......
package org.vadere.simulator.projects.dataprocessing;
import org.vadere.simulator.control.SimulationState;
import org.vadere.state.attributes.processors.AttributesProcessor;
import org.vadere.util.geometry.shapes.VPoint;
import java.util.Map;
......
......@@ -3,6 +3,7 @@ package org.vadere.simulator.projects.dataprocessing;
import java.util.Collection;
import org.vadere.simulator.control.SimulationState;
import org.vadere.state.attributes.processors.AttributesProcessor;
import org.vadere.state.scenario.Pedestrian;
public class PedestrianSourceIdProcessor extends Processor<PedestrianIdDataKey, Integer> {
......
......@@ -3,6 +3,7 @@ package org.vadere.simulator.projects.dataprocessing;
import java.util.Set;
import org.vadere.simulator.control.SimulationState;
import org.vadere.state.attributes.processors.AttributesProcessor;
import org.vadere.state.scenario.Pedestrian;
public class PedestrianStartTimeProcessor extends Processor<PedestrianIdDataKey, Double> {
......
......@@ -3,6 +3,7 @@ package org.vadere.simulator.projects.dataprocessing;
import java.util.Collection;
import org.vadere.simulator.control.SimulationState;
import org.vadere.state.attributes.processors.AttributesProcessor;
import org.vadere.state.scenario.Pedestrian;
public class PedestrianTargetIdProcessor extends Processor<TimestepPedestrianIdDataKey, Integer> {
......
......@@ -4,6 +4,8 @@ import java.util.LinkedList;
import java.util.stream.Stream;
import org.vadere.simulator.control.SimulationState;
import org.vadere.state.attributes.processors.AttributesProcessor;
import org.vadere.state.attributes.processors.AttributesVelocityProcessor;
import org.vadere.state.scenario.Pedestrian;
import org.vadere.util.geometry.shapes.VPoint;
......
......@@ -3,6 +3,8 @@ package org.vadere.simulator.projects.dataprocessing;
import java.util.Map;
import org.vadere.simulator.control.SimulationState;
import org.vadere.state.attributes.processors.AttributesPedestrianWaitingEndTimeProcessor;
import org.vadere.state.attributes.processors.AttributesProcessor;
import org.vadere.util.geometry.shapes.VPoint;
import org.vadere.util.geometry.shapes.VRectangle;
......
......@@ -3,6 +3,8 @@ package org.vadere.simulator.projects.dataprocessing;
import java.util.Map;
import org.vadere.simulator.control.SimulationState;
import org.vadere.state.attributes.processors.AttributesPedestrianWaitingTimeProcessor;
import org.vadere.state.attributes.processors.AttributesProcessor;
import org.vadere.util.geometry.shapes.VPoint;
import org.vadere.util.geometry.shapes.VRectangle;
......
package org.vadere.simulator.projects.dataprocessing;
import org.vadere.simulator.control.SimulationState;
import org.vadere.state.attributes.processors.AttributesProcessor;
import java.util.Collection;
import java.util.Map;
......
......@@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.JsonNode;
import org.vadere.simulator.control.SimulationState;
import org.vadere.simulator.models.Model;
import org.vadere.state.attributes.processors.AttributesProcessor;
import org.vadere.util.io.IOUtils;
import java.util.LinkedHashMap;
......
package org.vadere.simulator.projects.dataprocessing;
package org.vadere.state.attributes.processors;
import org.vadere.util.geometry.shapes.VRectangle;
......
package org.vadere.simulator.projects.dataprocessing;
package org.vadere.state.attributes.processors;
import org.vadere.util.geometry.shapes.VRectangle;
......
package org.vadere.simulator.projects.dataprocessing;
package org.vadere.state.attributes.processors;
public class AttributesAreaSpeedProcessor extends AttributesAreaProcessor {
private int pedestrianPositionProcessorId;
......
package org.vadere.state.attributes.processors;
import org.vadere.state.attributes.Attributes;
public class AttributesDensityCountingProcessor extends Attributes {
private double radius = 1.5;
public double getRadius() {
return radius;
}
}
package org.vadere.state.attributes.processors;
import org.vadere.state.attributes.Attributes;
public class AttributesDensityGaussianProcessor extends Attributes {
private double scale = 10;
private double standardDerivation = 0.7;
private boolean obstacleDensity = true;
public double getScale() {
return scale;
}
public double getStandardDerivation() {
return standardDerivation;
}
public boolean isObstacleDensity() {
return obstacleDensity;
}
}
package org.vadere.state.attributes.processors;
import org.vadere.state.attributes.Attributes;
public class AttributesDensityTest extends Attributes {
private double maxDensity = 6.0;
private double minDensity = 0.0;
private double maxMeanDensity = 6.0;
private double minMeanDensity = 0.0;
private boolean expectFailure = false;
public double getMaxDensity() {
return maxDensity;
}
public double getMaxMeanDensity() {
return maxMeanDensity;
}
public double getMinMeanDensity() {
return minMeanDensity;
}
public double getMinDensity() {
return minDensity;
}
public boolean isExpectFailure() {
return expectFailure;
}
}
package org.vadere.state.attributes.processors;
import org.vadere.state.attributes.Attributes;
import org.vadere.util.geometry.shapes.VRectangle;
public class AttributesDensityVoronoiProcessor extends Attributes {
private VRectangle measurementArea = new VRectangle(0, 0, 1, 1);
private VRectangle voronoiArea = new VRectangle(0, 0, 1, 1);
public VRectangle getMeasurementArea() {
return measurementArea;
}
public VRectangle getVoronoiArea() {
return voronoiArea;
}
}
package org.vadere.simulator.projects.dataprocessing;
package org.vadere.state.attributes.processors;
public class AttributesEvacuationTimeProcessor extends AttributesProcessor {
private int pedestrianEvacuationTimeProcessorId;
......
package org.vadere.state.attributes.processors;
import org.vadere.state.attributes.Attributes;
/**
* Attributes tested by the PedestrianEvacuationTimeTest.
* <br>
* maxEvacuationTime: maximum waiting time each pedestrian is allowed to evacuate.<br>
* maxEvacuationTimeMean: maximum of mean waiting time the pedestrians are allowed to evacuate.<br>
* minEvacuationTime: minimum waiting time each pedestrian is allowed to evacuate.<br>
* minEvacuationTimeMean: minimum of mean waiting time the pedestrians are allowed to evacuate.<br>
* expectFailure: true if the test should fail with the current setup.
*
*
*/
public class AttributesEvacuationTimeTest extends Attributes {
private double maxEvacuationTime = 10.0;
private double maxEvacuationTimeMean = 5.0;
private double minEvacuationTime = 0.0;
private double minEvacuationTimeMean = 0.0;
private boolean expectFailure = false;
public double getMaxEvacuationTime() {
return maxEvacuationTime;
}
public double getMaxEvacuationTimeMean() {
return maxEvacuationTimeMean;
}
public double getMinEvacuationTime() {
return minEvacuationTime;
}
public double getMinEvacuationTimeMean() {
return minEvacuationTimeMean;
}
public boolean isExpectFailure() {
return expectFailure;
}
}
package org.vadere.state.attributes.processors;
import org.vadere.state.attributes.Attributes;
public class AttributesFloorFieldProcessor extends Attributes {
private int targetId = 1;
public int getTargetId() {
return targetId;
}
}
package org.vadere.simulator.projects.dataprocessing;
package org.vadere.state.attributes.processors;
public class AttributesMeanPedestrianEvacuationTimeProcessor extends AttributesProcessor {
private int pedestrianEvacuationTimeProcessorId;
......
package org.vadere.state.attributes.processors;
import org.vadere.state.attributes.Attributes;
public class AttributesOverlapProcessor extends Attributes {
private double pedRadius = 0.2;
public double getPedRadius() {
return pedRadius;
}
}