Commit d968c6e0 authored by Stefan Schuhbaeck's avatar Stefan Schuhbaeck

fix eventInfos in jolt transformation

parent 7d64df7a
Pipeline #81372 failed with stages
in 110 minutes and 45 seconds
{ {
"name" : "wait_event_2_sources_2_targets_osm_sequential", "name" : "wait_event_2_sources_2_targets_osm_sequential",
"description" : "", "description" : "",
"release" : "0.6", "release" : "0.7",
"commithash" : "45917996dc1d7ac7f31aff96d40e2886d36a5cd3", "commithash" : "45917996dc1d7ac7f31aff96d40e2886d36a5cd3",
"processWriters" : { "processWriters" : {
"files" : [ { "files" : [ {
...@@ -89,7 +89,9 @@ ...@@ -89,7 +89,9 @@
"targetPotentialModel" : "org.vadere.simulator.models.potential.fields.PotentialFieldTargetGrid", "targetPotentialModel" : "org.vadere.simulator.models.potential.fields.PotentialFieldTargetGrid",
"pedestrianPotentialModel" : "org.vadere.simulator.models.potential.PotentialFieldPedestrianCompactSoftshell", "pedestrianPotentialModel" : "org.vadere.simulator.models.potential.PotentialFieldPedestrianCompactSoftshell",
"obstaclePotentialModel" : "org.vadere.simulator.models.potential.PotentialFieldObstacleCompactSoftshell", "obstaclePotentialModel" : "org.vadere.simulator.models.potential.PotentialFieldObstacleCompactSoftshell",
"submodels" : [ ] "submodels" : [ ],
"minStepLength" : "0.4625",
"maxStepDuration" : "1.7976931348623157E308"
}, },
"org.vadere.state.attributes.models.AttributesPotentialCompactSoftshell" : { "org.vadere.state.attributes.models.AttributesPotentialCompactSoftshell" : {
"pedPotentialIntimateSpaceWidth" : 0.45, "pedPotentialIntimateSpaceWidth" : 0.45,
...@@ -114,6 +116,18 @@ ...@@ -114,6 +116,18 @@
"fixedSeed" : 1, "fixedSeed" : 1,
"simulationSeed" : 1 "simulationSeed" : 1
}, },
"eventInfos" : [ {
"eventTimeframe" : {
"startTime" : 10.0,
"endTime" : 60.0,
"repeat" : false,
"waitTimeBetweenRepetition" : 0.0
},
"events" : [ {
"type" : "WaitEvent",
"targets" : [ ]
} ]
} ],
"topography" : { "topography" : {
"attributes" : { "attributes" : {
"bounds" : { "bounds" : {
...@@ -203,7 +217,6 @@ ...@@ -203,7 +217,6 @@
"groupSizeDistribution" : [ 1.0 ], "groupSizeDistribution" : [ 1.0 ],
"dynamicElementType" : "PEDESTRIAN" "dynamicElementType" : "PEDESTRIAN"
} ], } ],
"dynamicElements" : [ ],
"attributesPedestrian" : { "attributesPedestrian" : {
"radius" : 0.195, "radius" : 0.195,
"densityDependentSpeed" : false, "densityDependentSpeed" : false,
...@@ -213,19 +226,8 @@ ...@@ -213,19 +226,8 @@
"maximumSpeed" : 2.2, "maximumSpeed" : 2.2,
"acceleration" : 2.0 "acceleration" : 2.0
}, },
"attributesCar" : null "attributesCar" : null,
}, "dynamicElements" : [ ]
"eventInfos" : [ { }
"eventTimeframe" : {
"startTime" : 10.0,
"endTime" : 60.0,
"repeat" : false,
"waitTimeBetweenRepetition" : 0.0
},
"events" : [ {
"type" : "WaitEvent",
"targets" : [ ]
} ]
} ]
} }
} }
\ No newline at end of file
{ {
"name" : "wait_in_area_event_2_sources_2_targets_bhm", "name" : "wait_in_area_event_2_sources_2_targets_bhm",
"description" : "", "description" : "",
"release" : "0.6", "release" : "0.7",
"commithash" : "45917996dc1d7ac7f31aff96d40e2886d36a5cd3", "commithash" : "45917996dc1d7ac7f31aff96d40e2886d36a5cd3",
"processWriters" : { "processWriters" : {
"files" : [ { "files" : [ {
...@@ -104,6 +104,25 @@ ...@@ -104,6 +104,25 @@
"fixedSeed" : 1, "fixedSeed" : 1,
"simulationSeed" : 1 "simulationSeed" : 1
}, },
"eventInfos" : [ {
"eventTimeframe" : {
"startTime" : 10.0,
"endTime" : 60.0,
"repeat" : false,
"waitTimeBetweenRepetition" : 0.0
},
"events" : [ {
"type" : "WaitInAreaEvent",
"targets" : [ ],
"area" : {
"x" : 15.0,
"y" : 0.0,
"width" : 6.0,
"height" : 8.0,
"type" : "RECTANGLE"
}
} ]
} ],
"topography" : { "topography" : {
"attributes" : { "attributes" : {
"bounds" : { "bounds" : {
...@@ -193,7 +212,6 @@ ...@@ -193,7 +212,6 @@
"groupSizeDistribution" : [ 1.0 ], "groupSizeDistribution" : [ 1.0 ],
"dynamicElementType" : "PEDESTRIAN" "dynamicElementType" : "PEDESTRIAN"
} ], } ],
"dynamicElements" : [ ],
"attributesPedestrian" : { "attributesPedestrian" : {
"radius" : 0.195, "radius" : 0.195,
"densityDependentSpeed" : false, "densityDependentSpeed" : false,
...@@ -203,26 +221,8 @@ ...@@ -203,26 +221,8 @@
"maximumSpeed" : 2.2, "maximumSpeed" : 2.2,
"acceleration" : 2.0 "acceleration" : 2.0
}, },
"attributesCar" : null "attributesCar" : null,
}, "dynamicElements" : [ ]
"eventInfos" : [ { }
"eventTimeframe" : {
"startTime" : 10.0,
"endTime" : 60.0,
"repeat" : false,
"waitTimeBetweenRepetition" : 0.0
},
"events" : [ {
"type" : "WaitInAreaEvent",
"targets" : [ ],
"area" : {
"x" : 15.0,
"y" : 0.0,
"width" : 6.0,
"height" : 8.0,
"type" : "RECTANGLE"
}
} ]
} ]
} }
} }
\ No newline at end of file
{ {
"name" : "wait_in_area_event_2_sources_2_targets_osm_sequential", "name" : "wait_in_area_event_2_sources_2_targets_osm_sequential",
"description" : "", "description" : "",
"release" : "0.6", "release" : "0.7",
"commithash" : "45917996dc1d7ac7f31aff96d40e2886d36a5cd3", "commithash" : "45917996dc1d7ac7f31aff96d40e2886d36a5cd3",
"processWriters" : { "processWriters" : {
"files" : [ { "files" : [ {
...@@ -89,7 +89,9 @@ ...@@ -89,7 +89,9 @@
"targetPotentialModel" : "org.vadere.simulator.models.potential.fields.PotentialFieldTargetGrid", "targetPotentialModel" : "org.vadere.simulator.models.potential.fields.PotentialFieldTargetGrid",
"pedestrianPotentialModel" : "org.vadere.simulator.models.potential.PotentialFieldPedestrianCompactSoftshell", "pedestrianPotentialModel" : "org.vadere.simulator.models.potential.PotentialFieldPedestrianCompactSoftshell",
"obstaclePotentialModel" : "org.vadere.simulator.models.potential.PotentialFieldObstacleCompactSoftshell", "obstaclePotentialModel" : "org.vadere.simulator.models.potential.PotentialFieldObstacleCompactSoftshell",
"submodels" : [ ] "submodels" : [ ],
"minStepLength" : "0.4625",
"maxStepDuration" : "1.7976931348623157E308"
}, },
"org.vadere.state.attributes.models.AttributesPotentialCompactSoftshell" : { "org.vadere.state.attributes.models.AttributesPotentialCompactSoftshell" : {
"pedPotentialIntimateSpaceWidth" : 0.45, "pedPotentialIntimateSpaceWidth" : 0.45,
...@@ -114,6 +116,25 @@ ...@@ -114,6 +116,25 @@
"fixedSeed" : 1, "fixedSeed" : 1,
"simulationSeed" : 1 "simulationSeed" : 1
}, },
"eventInfos" : [ {
"eventTimeframe" : {
"startTime" : 10.0,
"endTime" : 60.0,
"repeat" : false,
"waitTimeBetweenRepetition" : 0.0
},
"events" : [ {
"type" : "WaitInAreaEvent",
"targets" : [ ],
"area" : {
"x" : 15.0,
"y" : 0.0,
"width" : 6.0,
"height" : 8.0,
"type" : "RECTANGLE"
}
} ]
} ],
"topography" : { "topography" : {
"attributes" : { "attributes" : {
"bounds" : { "bounds" : {
...@@ -203,7 +224,6 @@ ...@@ -203,7 +224,6 @@
"groupSizeDistribution" : [ 1.0 ], "groupSizeDistribution" : [ 1.0 ],
"dynamicElementType" : "PEDESTRIAN" "dynamicElementType" : "PEDESTRIAN"
} ], } ],
"dynamicElements" : [ ],
"attributesPedestrian" : { "attributesPedestrian" : {
"radius" : 0.195, "radius" : 0.195,
"densityDependentSpeed" : false, "densityDependentSpeed" : false,
...@@ -213,26 +233,8 @@ ...@@ -213,26 +233,8 @@
"maximumSpeed" : 2.2, "maximumSpeed" : 2.2,
"acceleration" : 2.0 "acceleration" : 2.0
}, },
"attributesCar" : null "attributesCar" : null,
}, "dynamicElements" : [ ]
"eventInfos" : [ { }
"eventTimeframe" : {
"startTime" : 10.0,
"endTime" : 60.0,
"repeat" : false,
"waitTimeBetweenRepetition" : 0.0
},
"events" : [ {
"type" : "WaitInAreaEvent",
"targets" : [ ],
"area" : {
"x" : 15.0,
"y" : 0.0,
"width" : 6.0,
"height" : 8.0,
"type" : "RECTANGLE"
}
} ]
} ]
} }
} }
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
...@@ -31,7 +31,7 @@ public class JoltTransformV1toV2 extends JoltTransformation { ...@@ -31,7 +31,7 @@ public class JoltTransformV1toV2 extends JoltTransformation {
putObject(sortedRoot, source, "release"); putObject(sortedRoot, source, "release");
putObject(sortedRoot, source, "commithash"); putObject(sortedRoot, source, "commithash");
putObject(sortedRoot, source, "processWriters", "files", "processors", "isTimestamped"); putObject(sortedRoot, source, "processWriters", "files", "processors", "isTimestamped");
putObject(sortedRoot, source, "scenario", "mainModel", "attributesModel", "attributesSimulation", "topography"); putObject(sortedRoot, source, "scenario", "mainModel", "attributesModel", "attributesSimulation", "eventInfos", "topography");
return StateJsonConverter.deserializeToNode(sortedRoot); return StateJsonConverter.deserializeToNode(sortedRoot);
} }
......
...@@ -183,10 +183,10 @@ public abstract class JoltTransformation implements JsonNodeExplorer{ ...@@ -183,10 +183,10 @@ public abstract class JoltTransformation implements JsonNodeExplorer{
LinkedHashMap<Object, Object> parent = (LinkedHashMap<Object, Object>) obj; LinkedHashMap<Object, Object> parent = (LinkedHashMap<Object, Object>) obj;
for (String childKey : children) { for (String childKey : children) {
Object childObj = parent.get(childKey); Object childObj = parent.get(childKey);
if (childObj == null) { if (childObj != null) {
throw new MigrationException("Object with Key " + key + " does not has child with key" + childKey); // throw new MigrationException("Object with Key " + key + " does not has child with key" + childKey);
node.put(childKey, childObj);
} }
node.put(childKey, childObj);
} }
obj = node; obj = node;
} }
......
{
"name" : "wait_event_2_sources_2_targets_osm_sequential",
"description" : "",
"release" : "0.6",
"commithash" : "45917996dc1d7ac7f31aff96d40e2886d36a5cd3",
"processWriters" : {
"files" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOutputFile",
"filename" : "density.txt",
"processors" : [ 1 ]
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOverlapOutputFile",
"filename" : "out.txt",
"processors" : [ 3 ]
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.NoDataKeyOutputFile",
"filename" : "out1.txt",
"processors" : [ 4 ]
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOutputFile",
"filename" : "postvis.trajectories",
"processors" : [ 1, 2 ]
} ],
"processors" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.PedestrianDensityCountingProcessor",
"id" : 1,
"attributesType" : "org.vadere.state.attributes.processor.AttributesPedestrianDensityCountingProcessor",
"attributes" : {
"pedestrianPositionProcessorId" : 2,
"radius" : 1.5
}
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.PedestrianPositionProcessor",
"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.MaxOverlapProcessor",
"id" : 5,
"attributesType" : "org.vadere.state.attributes.processor.AttributesMaxOverlapProcessor",
"attributes" : {
"pedestrianOverlapProcessorId" : 3
}
} ],
"isTimestamped" : true
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
"attributesModel" : {
"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"
}
},
"org.vadere.state.attributes.models.AttributesOSM" : {
"stepCircleResolution" : 18,
"numberOfCircles" : 1,
"varyStepDirection" : false,
"stepLengthIntercept" : 0.4625,
"stepLengthSlopeSpeed" : 0.2345,
"stepLengthSD" : 0.036,
"movementThreshold" : 0.0,
"optimizationType" : "DISCRETE",
"movementType" : "ARBITRARY",
"dynamicStepLength" : false,
"updateType" : "SEQUENTIAL",
"seeSmallWalls" : false,
"minimumStepLength" : 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
}
},
"attributesSimulation" : {
"finishTime" : 150.0,
"simTimeStepLength" : 0.4,
"realTimeSimTimeRatio" : 0.0,
"writeSimulationData" : true,
"visualizationEnabled" : true,
"printFPS" : false,
"digitsPerCoordinate" : 2,
"useFixedSeed" : true,
"fixedSeed" : 1,
"simulationSeed" : 1
},
"topography" : {
"attributes" : {
"bounds" : {
"x" : 0.0,
"y" : 0.0,
"width" : 40.0,
"height" : 16.0
},
"boundingBoxWidth" : 0.5,
"bounded" : true
},
"obstacles" : [ ],
"stairs" : [ ],
"targets" : [ {
"id" : 1,
"absorbing" : true,
"shape" : {
"x" : 36.0,
"y" : 10.5,
"width" : 2.5,
"height" : 4.5,
"type" : "RECTANGLE"
},
"waitingTime" : 0.0,
"waitingTimeYellowPhase" : 0.0,
"parallelWaiters" : 0,
"individualWaiting" : true,
"deletionDistance" : 0.1,
"startingWithRedLight" : false,
"nextSpeed" : -1.0
}, {
"id" : 2,
"absorbing" : true,
"shape" : {
"x" : 36.0,
"y" : 1.0,
"width" : 2.5,
"height" : 4.5,
"type" : "RECTANGLE"
},
"waitingTime" : 0.0,
"waitingTimeYellowPhase" : 0.0,
"parallelWaiters" : 0,
"individualWaiting" : true,
"deletionDistance" : 0.1,
"startingWithRedLight" : false,
"nextSpeed" : -1.0
} ],
"sources" : [ {
"id" : 1,
"shape" : {
"x" : 1.0,
"y" : 10.5,
"width" : 2.5,
"height" : 4.5,
"type" : "RECTANGLE"
},
"interSpawnTimeDistribution" : "org.vadere.state.scenario.ConstantDistribution",
"distributionParameters" : [ 1.0 ],
"spawnNumber" : 10,
"maxSpawnNumberTotal" : -1,
"startTime" : 0.0,
"endTime" : 0.0,
"spawnAtRandomPositions" : false,
"useFreeSpaceOnly" : true,
"targetIds" : [ 1 ],
"groupSizeDistribution" : [ 1.0 ],
"dynamicElementType" : "PEDESTRIAN"
}, {
"id" : 2,
"shape" : {
"x" : 1.0,
"y" : 1.0,
"width" : 2.5,
"height" : 4.5,
"type" : "RECTANGLE"
},
"interSpawnTimeDistribution" : "org.vadere.state.scenario.ConstantDistribution",
"distributionParameters" : [ 1.0 ],
"spawnNumber" : 10,
"maxSpawnNumberTotal" : -1,
"startTime" : 0.0,
"endTime" : 0.0,
"spawnAtRandomPositions" : false,
"useFreeSpaceOnly" : true,
"targetIds" : [ 2 ],
"groupSizeDistribution" : [ 1.0 ],
"dynamicElementType" : "PEDESTRIAN"
} ],
"dynamicElements" : [ ],
"attributesPedestrian" : {
"radius" : 0.195,
"densityDependentSpeed" : false,
"speedDistributionMean" : 1.34,
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0
},
"attributesCar" : null
},
"eventInfos" : [ {
"eventTimeframe" : {
"startTime" : 10.0,
"endTime" : 60.0,
"repeat" : false,
"waitTimeBetweenRepetition" : 0.0
},
"events" : [ {
"type" : "WaitEvent",
"targets" : [ ]
} ]
} ]
}
}
\ No newline at end of file
{
"name" : "wait_in_area_event_2_sources_2_targets_bhm",
"description" : "",
"release" : "0.6",
"commithash" : "45917996dc1d7ac7f31aff96d40e2886d36a5cd3",
"processWriters" : {
"files" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOutputFile",
"filename" : "density.txt",
"processors" : [ 1 ]
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOverlapOutputFile",
"filename" : "out.txt",
"processors" : [ 3 ]
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.NoDataKeyOutputFile",
"filename" : "out1.txt",
"processors" : [ 4 ]
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOutputFile",
"filename" : "postvis.trajectories",
"processors" : [ 1, 2 ]
} ],
"processors" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.PedestrianDensityCountingProcessor",
"id" : 1,
"attributesType" : "org.vadere.state.attributes.processor.AttributesPedestrianDensityCountingProcessor",
"attributes" : {
"pedestrianPositionProcessorId" : 2,
"radius" : 1.5
}
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.PedestrianPositionProcessor",
"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.MaxOverlapProcessor",
"id" : 5,
"attributesType" : "org.vadere.state.attributes.processor.AttributesMaxOverlapProcessor",
"attributes" : {
"pedestrianOverlapProcessorId" : 3
}
} ],
"isTimestamped" : true
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.bhm.BehaviouralHeuristicsModel",
"attributesModel" : {
"org.vadere.state.attributes.models.AttributesBHM" : {
"stepLengthIntercept" : 0.4625,
"stepLengthSlopeSpeed" : 0.2345,
"stepLengthSD" : 0.036,