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 33e3de47 authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier
Browse files

Added "searchRadius" to "AttributesAgent" and use it "OSMBehaviorController".

parent 3b5f89bd
{
"name" : "01-ExperimentSetup-OSMEventDriven",
"description" : "",
"release" : "0.7",
"release" : "0.8",
"processWriters" : {
"files" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOutputFile",
......@@ -89,7 +89,7 @@
}
},
"attributesSimulation" : {
"finishTime" : 100.0,
"finishTime" : 60.0,
"simTimeStepLength" : 0.4,
"realTimeSimTimeRatio" : 0.1,
"writeSimulationData" : true,
......
{
"name" : "01-ExperimentSetup-OSMSequential",
"description" : "",
"release" : "0.7",
"release" : "0.8",
"processWriters" : {
"files" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOutputFile",
......@@ -89,7 +89,7 @@
}
},
"attributesSimulation" : {
"finishTime" : 100.0,
"finishTime" : 60.0,
"simTimeStepLength" : 0.4,
"realTimeSimTimeRatio" : 0.1,
"writeSimulationData" : true,
......
......@@ -156,9 +156,8 @@ public class OSMBehaviorController {
private List<Pedestrian> getClosestPedestriansWhichAreCloserToTarget(PedestrianOSM pedestrian, Topography topography) {
VPoint positionOfPedestrian = pedestrian.getPosition();
// TODO Maybe, extract search radius as configurable attribute.
List<Pedestrian> closestPedestrians = topography.getSpatialMap(Pedestrian.class)
.getObjects(positionOfPedestrian, pedestrian.getRadius() * 5);
.getObjects(positionOfPedestrian, pedestrian.getAttributes().getSearchRadius());
// Filter out "me" and pedestrians which are farer away from target than "me".
closestPedestrians = closestPedestrians.stream()
......
......@@ -34,6 +34,9 @@ public class AttributesAgent extends AttributesDynamicElement {
// store n last foot steps for speed calculation
private int footStepsToStore = 10;
// agents search for other scenario elements (e.g., other agents) within this radius
private double searchRadius = 1.0;
public AttributesAgent() {
this(-1);
}
......@@ -55,6 +58,7 @@ public class AttributesAgent extends AttributesDynamicElement {
this.maximumSpeed = other.maximumSpeed;
this.acceleration = other.acceleration;
this.footStepsToStore = other.footStepsToStore;
this.searchRadius = other.searchRadius;
}
// Getters...
......@@ -89,6 +93,8 @@ public class AttributesAgent extends AttributesDynamicElement {
public int getFootStepsToStore() { return footStepsToStore; }
public double getSearchRadius() { return searchRadius; }
// Setters...
public void setRadius(double radius) {
......@@ -130,4 +136,9 @@ public class AttributesAgent extends AttributesDynamicElement {
checkSealed();
this.footStepsToStore = footStepsToStore;
}
public void setSearchRadius(double searchRadius) {
checkSealed();
this.searchRadius = searchRadius;
}
}
......@@ -39,9 +39,8 @@ public class Pedestrian extends Agent {
private ScenarioElementType type = ScenarioElementType.PEDESTRIAN; // TODO used at all? For JSON de-/serialization? Car does NOT have this field. remove if unused!
// Constructors
@SuppressWarnings("unused")
private Pedestrian() {
// TODO constructor may be required for Jackson?
// Default constructor required for JSON de-/serialization.
this(new AttributesAgent());
}
......
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