Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit cf211e65 authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier
Browse files

In "PedestrianSpeedInAreaProcessor", use "PedestrianVelocityProcessor" instead...

In "PedestrianSpeedInAreaProcessor", use "PedestrianVelocityProcessor" instead of "pedestrian.getVelocity()".
parent 798b301c
Pipeline #112012 failed with stages
in 86 minutes and 21 seconds
......@@ -2,7 +2,6 @@
"name" : "01-ExperimentSetup-OSMEventDriven-SBDisabled",
"description" : "",
"release" : "0.9",
"commithash" : "cdf35b188206df9a7fed0cf7362063d21a8b682e",
"processWriters" : {
"files" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOutputFile",
......
......@@ -2,7 +2,6 @@
"name" : "02-ExperimentSetup-OSMEventDriven-SBEnabled",
"description" : "",
"release" : "0.9",
"commithash" : "cdf35b188206df9a7fed0cf7362063d21a8b682e",
"processWriters" : {
"files" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOutputFile",
......
......@@ -2,7 +2,6 @@
"name" : "03-ExperimentSetup-OSMEventDriven-SBEnabled-PSAdapted",
"description" : "",
"release" : "0.9",
"commithash" : "cdf35b188206df9a7fed0cf7362063d21a8b682e",
"processWriters" : {
"files" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOutputFile",
......
......@@ -2,7 +2,6 @@
"name" : "04-ExperimentSetup-OSMSequential-SBEnabled",
"description" : "",
"release" : "0.9",
"commithash" : "cdf35b188206df9a7fed0cf7362063d21a8b682e",
"processWriters" : {
"files" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOutputFile",
......
......@@ -2,7 +2,6 @@
"name" : "05-UnidirectionalFlow-OSMSequential-SBEnabled",
"description" : "",
"release" : "0.9",
"commithash" : "cdf35b188206df9a7fed0cf7362063d21a8b682e",
"processWriters" : {
"files" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOutputFile",
......
......@@ -2,7 +2,6 @@
"name" : "06-CounterFlow-OSMSequential-SBDisabled",
"description" : "",
"release" : "0.9",
"commithash" : "cdf35b188206df9a7fed0cf7362063d21a8b682e",
"processWriters" : {
"files" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOutputFile",
......
......@@ -2,7 +2,6 @@
"name" : "07-CounterFlow-OSMSequential-SBEnabled",
"description" : "",
"release" : "0.9",
"commithash" : "cdf35b188206df9a7fed0cf7362063d21a8b682e",
"processWriters" : {
"files" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOutputFile",
......
......@@ -2,7 +2,6 @@
"name" : "08-CounterFlow-OSMSequential-SBEnabled-SearchRadiusAdapted",
"description" : "",
"release" : "0.9",
"commithash" : "cdf35b188206df9a7fed0cf7362063d21a8b682e",
"processWriters" : {
"files" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOutputFile",
......
{
"name" : "TestProcessor",
"description" : "",
"release" : "0.9",
"processWriters" : {
"files" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOutputFile",
"filename" : "postvis.trajectories",
"processors" : [ 1, 2, 6 ]
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOverlapOutputFile",
"filename" : "overlaps.csv",
"processors" : [ 3 ]
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.NoDataKeyOutputFile",
"filename" : "overlapCount.txt",
"processors" : [ 4 ]
} ],
"processors" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.PedestrianPositionProcessor",
"id" : 1
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.PedestrianTargetIdProcessor",
"id" : 2
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.PedestrianOverlapProcessor",
"id" : 3
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.NumberOverlapsProcessor",
"id" : 4,
"attributesType" : "org.vadere.state.attributes.processor.AttributesNumberOverlapsProcessor",
"attributes" : {
"pedestrianOverlapProcessorId" : 3
}
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.PedestrianVelocityProcessor",
"id" : 5,
"attributesType" : "org.vadere.state.attributes.processor.AttributesPedestrianVelocityProcessor",
"attributes" : {
"pedestrianPositionProcessorId" : 1,
"backSteps" : 1
}
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.PedestrianSpeedInAreaProcessor",
"id" : 6,
"attributesType" : "org.vadere.state.attributes.processor.AttributesSpeedInAreaProcessor",
"attributes" : {
"measurementAreaId" : 1,
"pedestrianVelocityProcessorId" : 5
}
} ],
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
"attributesModel" : {
"org.vadere.state.attributes.models.AttributesOSM" : {
"stepCircleResolution" : 4,
"numberOfCircles" : 1,
"optimizationType" : "NELDER_MEAD",
"varyStepDirection" : true,
"movementType" : "ARBITRARY",
"stepLengthIntercept" : 0.4625,
"stepLengthSlopeSpeed" : 0.2345,
"stepLengthSD" : 0.036,
"movementThreshold" : 0.0,
"minStepLength" : 0.1,
"minimumStepLength" : true,
"maxStepDuration" : 1.7976931348623157E308,
"dynamicStepLength" : true,
"updateType" : "EVENT_DRIVEN",
"seeSmallWalls" : false,
"targetPotentialModel" : "org.vadere.simulator.models.potential.fields.PotentialFieldTargetGrid",
"pedestrianPotentialModel" : "org.vadere.simulator.models.potential.PotentialFieldPedestrianCompactSoftshell",
"obstaclePotentialModel" : "org.vadere.simulator.models.potential.PotentialFieldObstacleCompactSoftshell",
"submodels" : [ ]
},
"org.vadere.state.attributes.models.AttributesPotentialCompactSoftshell" : {
"pedPotentialIntimateSpaceWidth" : 0.45,
"pedPotentialPersonalSpaceWidth" : 1.2,
"pedPotentialHeight" : 50.0,
"obstPotentialWidth" : 0.8,
"obstPotentialHeight" : 6.0,
"intimateSpaceFactor" : 1.2,
"personalSpacePower" : 1,
"intimateSpacePower" : 1
},
"org.vadere.state.attributes.models.AttributesFloorField" : {
"createMethod" : "HIGH_ACCURACY_FAST_MARCHING",
"potentialFieldResolution" : 0.1,
"obstacleGridPenalty" : 0.1,
"targetAttractionStrength" : 1.0,
"timeCostAttributes" : {
"standardDeviation" : 0.7,
"type" : "UNIT",
"obstacleDensityWeight" : 3.5,
"pedestrianSameTargetDensityWeight" : 3.5,
"pedestrianOtherTargetDensityWeight" : 3.5,
"pedestrianWeight" : 3.5,
"queueWidthLoading" : 1.0,
"pedestrianDynamicWeight" : 6.0,
"loadingType" : "CONSTANT"
}
}
},
"attributesSimulation" : {
"finishTime" : 30.0,
"simTimeStepLength" : 0.4,
"realTimeSimTimeRatio" : 0.1,
"writeSimulationData" : true,
"visualizationEnabled" : true,
"printFPS" : false,
"digitsPerCoordinate" : 2,
"useFixedSeed" : true,
"fixedSeed" : -4846208968571738224,
"simulationSeed" : 0,
"useSalientBehavior" : false
},
"topography" : {
"attributes" : {
"bounds" : {
"x" : 0.0,
"y" : 0.0,
"width" : 20.0,
"height" : 10.0
},
"boundingBoxWidth" : 0.5,
"bounded" : true
},
"obstacles" : [ ],
"measurementAreas" : [ {
"shape" : {
"x" : 2.8,
"y" : 2.2,
"width" : 7.2,
"height" : 5.9,
"type" : "RECTANGLE"
},
"id" : 1
} ],
"stairs" : [ ],
"targets" : [ {
"id" : 1,
"absorbing" : true,
"shape" : {
"x" : 17.4,
"y" : 3.7,
"width" : 1.6,
"height" : 3.6,
"type" : "RECTANGLE"
},
"waitingTime" : 0.0,
"waitingTimeYellowPhase" : 0.0,
"parallelWaiters" : 0,
"individualWaiting" : true,
"deletionDistance" : 0.1,
"startingWithRedLight" : false,
"nextSpeed" : -1.0
} ],
"absorbingAreas" : [ ],
"sources" : [ ],
"dynamicElements" : [ {
"source" : null,
"targetIds" : [ 1 ],
"position" : {
"x" : 1.0,
"y" : 5.6
},
"velocity" : {
"x" : 0.0,
"y" : 0.0
},
"nextTargetListIndex" : 0,
"freeFlowSpeed" : 1.7573879731780782,
"attributes" : {
"id" : -1,
"radius" : 0.2,
"densityDependentSpeed" : false,
"speedDistributionMean" : 1.34,
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0,
"footStepsToStore" : 4,
"searchRadius" : 1.0,
"angleCalculationType" : "USE_CENTER",
"targetOrientationAngleThreshold" : 45.0
},
"idAsTarget" : -1,
"isChild" : false,
"isLikelyInjured" : false,
"mostImportantEvent" : null,
"salientBehavior" : "TARGET_ORIENTED",
"groupIds" : [ ],
"trajectory" : {
"footSteps" : [ ]
},
"groupSizes" : [ ],
"modelPedestrianMap" : null,
"type" : "PEDESTRIAN"
} ],
"attributesPedestrian" : {
"radius" : 0.2,
"densityDependentSpeed" : false,
"speedDistributionMean" : 1.34,
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0,
"footStepsToStore" : 4,
"searchRadius" : 1.0,
"angleCalculationType" : "USE_CENTER",
"targetOrientationAngleThreshold" : 45.0
},
"teleporter" : null,
"attributesCar" : {
"id" : -1,
"radius" : 0.2,
"densityDependentSpeed" : false,
"speedDistributionMean" : 1.34,
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0,
"footStepsToStore" : 4,
"searchRadius" : 1.0,
"angleCalculationType" : "USE_CENTER",
"targetOrientationAngleThreshold" : 45.0,
"length" : 4.5,
"width" : 1.7,
"direction" : {
"x" : 1.0,
"y" : 0.0
}
}
},
"eventInfos" : [ ]
}
}
\ No newline at end of file
......@@ -9,6 +9,7 @@ import org.vadere.simulator.projects.dataprocessing.datakey.TimestepPedestrianId
import org.vadere.state.attributes.processor.AttributesAreaProcessor;
import org.vadere.state.attributes.processor.AttributesPedestrianVelocityProcessor;
import org.vadere.state.attributes.processor.AttributesProcessor;
import org.vadere.state.attributes.processor.AttributesSpeedInAreaProcessor;
import org.vadere.state.scenario.MeasurementArea;
import org.vadere.state.scenario.Pedestrian;
import org.vadere.util.geometry.shapes.VPoint;
......@@ -52,34 +53,42 @@ public class PedestrianSpeedInAreaProcessor extends DataProcessor<TimestepPedest
// Variables
private MeasurementArea measurementArea;
private PedestrianVelocityProcessor pedestrianVelocityProcessor;
// Constructors
public PedestrianSpeedInAreaProcessor() {
super("speedInArea");
// "measurementArea" is initialized in "init()" method by evaluating the area id.
// "measurementArea" and "pedestrianVelocityProcessor"
// are initialized in "init()" method.
}
// Getter
public MeasurementArea getMeasurementArea() {
return this.measurementArea;
}
public PedestrianVelocityProcessor getPedestrianVelocityProcessor() { return pedestrianVelocityProcessor; }
// Methods (overridden)
@Override
public void init(final ProcessorManager manager) {
super.init(manager);
AttributesAreaProcessor processorAttributes = (AttributesAreaProcessor) this.getAttributes();
this.measurementArea = manager.getMeasurementArea(processorAttributes.getMeasurementAreaId());
AttributesSpeedInAreaProcessor processorAttributes = (AttributesSpeedInAreaProcessor) this.getAttributes();
measurementArea = manager.getMeasurementArea(processorAttributes.getMeasurementAreaId());
pedestrianVelocityProcessor = (PedestrianVelocityProcessor) manager.getProcessor(processorAttributes.getPedestrianVelocityProcessorId());
if (measurementArea == null)
throw new RuntimeException(String.format("MeasurementArea with index %d does not exist.", processorAttributes.getMeasurementAreaId()));
if (pedestrianVelocityProcessor == null)
throw new RuntimeException(String.format("PedestrianVelocityProcessor with index %d does not exist.", processorAttributes.getPedestrianVelocityProcessorId()));
}
@Override
public AttributesProcessor getAttributes() {
if (super.getAttributes() == null) {
setAttributes(new AttributesAreaProcessor());
setAttributes(new AttributesSpeedInAreaProcessor());
}
return super.getAttributes();
......@@ -87,14 +96,18 @@ public class PedestrianSpeedInAreaProcessor extends DataProcessor<TimestepPedest
@Override
protected void doUpdate(final SimulationState state) {
// TODO: "pedestrianVelocityProcessor.doUpdate()" is called by top-level process manager automatically.
// Clarify with Bene if correct update order is always ensured!
for (Pedestrian pedestrian : state.getTopography().getElements(Pedestrian.class)) {
double speed = pedestrian.getVelocity().distanceToOrigin();
TimestepPedestrianIdKey rowKey = new TimestepPedestrianIdKey(state.getStep(), pedestrian.getId());
double speed = pedestrianVelocityProcessor.getValue(rowKey);
if (measurementArea.getShape().contains(pedestrian.getPosition()) == false) {
speed = 0;
}
this.putValue(new TimestepPedestrianIdKey(state.getStep(), pedestrian.getId()), speed);
this.putValue(rowKey, speed);
}
}
......
package org.vadere.state.attributes.processor;
/**
* @author Mario Teixeira Parente
*/
public class AttributesSpeedInAreaProcessor extends AttributesProcessor {
// Variables
private int measurementAreaId = -1;
private int pedestrianVelocityProcessorId = -1;
// Getter
public int getMeasurementAreaId() {
return this.measurementAreaId;
}
public int getPedestrianVelocityProcessorId() {
return this.pedestrianVelocityProcessorId;
}
// Setter
public void setMeasurementAreaId(int measurementAreaId) {
checkSealed();
this.measurementAreaId = measurementAreaId;
}
public void setPedestrianVelocityProcessorId(int pedestrianVelocityProcessorId) {
checkSealed();
this.pedestrianVelocityProcessorId = pedestrianVelocityProcessorId;
}
}
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