Commit 6c604b86 authored by Stefan Schuhbaeck's avatar Stefan Schuhbaeck
Browse files

fix erros in v0 - > v1 --Identity--> v1

parent 5a38031c
...@@ -5,8 +5,7 @@ ...@@ -5,8 +5,7 @@
"name": "&", "name": "&",
"description": "&", "description": "&",
"release": "&", "release": "&",
"topographyhash": "&", "commithash": "&",
"attributeshash": "&",
"processWriters": { "processWriters": {
"*": { "*": {
"*": "processWriters[&1].&" "*": "processWriters[&1].&"
...@@ -250,10 +249,26 @@ ...@@ -250,10 +249,26 @@
"spec": { "spec": {
"name": "", "name": "",
"description": "", "description": "",
"release": "", "release": "0.1",
"topographyhash": "", "commithash": "warning: no commit hash",
"attributeshash": "", "processWriters": {
"processWriters": [], "files[]": {
"0": {
"type": "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOutputFile",
"filename": "postvis.trajectories",
"processors": [
1
]
}
},
"processors[]": {
"0": {
"type": "org.vadere.simulator.projects.dataprocessing.processor.PedestrianPositionProcessor",
"id": 1
}
},
"isTimestamped": "true"
},
"vadere": { "vadere": {
"mainModel": "null", "mainModel": "null",
"attributesModel": {}, "attributesModel": {},
......
{
"topographyhash": "4cd0fdc685fc51e4ae57d0514b3d325d4f2e1340",
"name": "Test1",
"processWriters": [],
"attributeshash": "af732ad440af7f01cd0cc12608657058fd55f8a8",
"vadere": {
"attributesModel": {
"OPTIMAL_STEPS_MODEL": {
"stepCircleResolution": 18.0,
"numberOfCircles": 1.0,
"varyStepDirection": false,
"stepLengthIntercept": 0.4625,
"stepLengthSlopeSpeed": 0.2345,
"stepLengthSD": 0.036,
"movementThreshold": 0.0,
"optimizationType": "DISCRETE",
"movementType": "ARBITRARY",
"dynamicStepLength": false,
"updateType": "EVENT_DRIVEN",
"seeSmallWalls": false
},
"FLOORFIELD": {
"createMethod": "HIGH_ACCURACY_FAST_MARCHING",
"potentialFieldResolution": 0.1,
"obstacleGridPenalty": 0.1,
"targetAttractionStrength": 1.0,
"timeCostAttributes": {
"standardDerivation": 0.7,
"pedestrianTorso": 0.4,
"meanSpeed": 1.34,
"type": "UNIT",
"obstacleDensityWeight": 3.5,
"pedestrianSameTargetDensityWeight": 3.5,
"pedestrianOtherTargetDensityWeight": 3.5,
"pedestrianWeight": 3.5,
"queueWidthLoading": 1.0,
"pedestrianDynamicWeight": 6.0,
"loadingType": "CONSTANT"
}
},
"POTENTIAL_COMPACT_SUPPORT": {
"pedPotentialWidth": 0.5,
"pedPotentialHeight": 12.6,
"obstPotentialWidth": 0.25,
"obstPotentialHeight": 20.1,
"visionFieldAngle": 1.8849555921538759,
"visionFieldRadius": 5.0,
"numPedConsidered": 5.0
}
},
"attributesPedestrian": {
"radius": 0.195,
"densityDependentSpeed": false,
"speedDistributionMean": 1.34,
"speedDistributionStandardDeviation": 0.0,
"minimumSpeed": 0.3,
"maximumSpeed": 3.0,
"acceleration": 2.0,
"id": -1
},
"attributesSimulation": {
"simTimeStepLength": 0.4,
"realTimeSimTimeRatio": 0.1,
"writeSimulationData": true,
"visualizationEnabled": true,
"printFPS": false,
"needsBoundary": false,
"digitsPerCoordinate": 2,
"useRandomSeed": true,
"randomSeed": 1
},
"topography": {
"attributes": {
"finishTime": 60.0,
"bounds": {
"x": 0.0,
"y": 0.0,
"width": 10.0,
"height": 10.0
},
"boundingBoxWidth": 0.5,
"bounded": true
},
"obstacles": [
{
"shape": {
"x": 3.9,
"y": 8.0,
"width": 2.2,
"height": 1.1,
"type": "RECTANGLE"
},
"id": -1
}
],
"stairs": [],
"targets": [
{
"id": 1,
"absorbing": true,
"shape": {
"x": 8.0,
"y": 1.0,
"width": 1.0,
"height": 1.0,
"type": "RECTANGLE"
},
"waitingTime": 0.0,
"parallelWaiters": 0
}
],
"sources": [
{
"id": 2,
"shape": {
"x": 1.0,
"y": 8.0,
"width": 1.0,
"height": 1.0,
"type": "RECTANGLE"
},
"spawnDelay": 1.0,
"spawnNumber": 1,
"startTime": 0.0,
"endTime": 40.0,
"spawnAtRandomPositions": false,
"useFreeSpaceOnly": false,
"targetIds": [
1
]
}
],
"dynamicElements": [],
"pedestrians": []
}
},
"commithash": "c45f1d26328baaec22418c15e6351a059e910f5f"
}
\ No newline at end of file
...@@ -14,11 +14,13 @@ import org.vadere.state.util.StateJsonConverter; ...@@ -14,11 +14,13 @@ import org.vadere.state.util.StateJsonConverter;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import joptsimple.internal.Strings;
public class JoltTest { public class JoltTest {
public static void main(String[] args) { public static void main(String[] args) {
new JoltTest().attr(); new JoltTest().run2();
} }
public void run() { public void run() {
...@@ -68,11 +70,13 @@ public class JoltTest { ...@@ -68,11 +70,13 @@ public class JoltTest {
public void run2() { public void run2() {
List chainrSpecJson = JsonUtils.classpathToList("/WithDots_transform_v2_to_v3.json"); List chainrSpecJson = JsonUtils.classpathToList("/transform_v0_to_v1.json");
Chainr chainr = Chainr.fromSpec(chainrSpecJson); Chainr chainr = Chainr.fromSpec(chainrSpecJson);
List identity = JsonUtils.classpathToList("/identity_v1.json");
Chainr identityTransform = Chainr.fromSpec(identity);
Object inputJson = JsonUtils.classpathToObject("/WithDotsscenario_test.json"); Object inputJson = JsonUtils.classpathToObject("/test.json");
Object transformedOutput = chainr.transform(inputJson); Object transformedOutput = chainr.transform(inputJson);
...@@ -82,10 +86,11 @@ public class JoltTest { ...@@ -82,10 +86,11 @@ public class JoltTest {
// String[] inarr = in.split(System.getProperty("line.separator")); // String[] inarr = in.split(System.getProperty("line.separator"));
// String[] outarr = out.split(System.getProperty("line.separator")); // String[] outarr = out.split(System.getProperty("line.separator"));
// System.out.println(Strings.repeat('#', 120));
// Diffy diffy = new Diffy(); System.out.println(JsonUtils.toPrettyJsonString(identityTransform.transform(transformedOutput)));
// Diffy.Result res = diffy.diff(inputJson, transformedOutput); Diffy diffy = new Diffy();
// System.out.println(res.toString()); Diffy.Result res = diffy.diff(transformedOutput, identityTransform.transform(transformedOutput));
System.out.println(res.toString());
//todo leere Attribute //todo leere Attribute
// //
......
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