Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
V
vadere
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
110
Issues
110
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
4
Merge Requests
4
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vadere
vadere
Commits
26e99ade
Commit
26e99ade
authored
Jul 31, 2020
by
Christina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added sort
parent
450550be
Pipeline
#301894
failed with stages
in 2 minutes and 4 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
146 additions
and
4 deletions
+146
-4
Scenarios/Demos/Density_controller/scenarios/AbstractThreeCorridors.scenario
...sity_controller/scenarios/AbstractThreeCorridors.scenario
+1
-1
Scenarios/Demos/Density_controller/scenarios/New_scenario.scenario
.../Demos/Density_controller/scenarios/New_scenario.scenario
+122
-0
Scenarios/Demos/SocialDistancing/SocialDistancingBottleneck/scenarios/bottleneck_2m.scenario
...cialDistancingBottleneck/scenarios/bottleneck_2m.scenario
+6
-2
VadereSimulator/src/org/vadere/simulator/projects/migration/jsontranformation/AbstractJsonTransformation.java
...gration/jsontranformation/AbstractJsonTransformation.java
+17
-1
No files found.
Scenarios/Demos/Density_controller/scenarios/AbstractThreeCorridors.scenario
View file @
26e99ade
...
...
@@ -530,4 +530,4 @@
},
"stimulusInfos" : [ ]
}
}
}
\ No newline at end of file
Scenarios/Demos/Density_controller/scenarios/New_scenario.scenario
0 → 100644
View file @
26e99ade
{
"name" : "New_scenario",
"description" : "",
"release" : "1.14",
"processWriters" : {
"files" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.EventtimePedestrianIdOutputFile",
"filename" : "postvis.traj",
"processors" : [ 1, 2 ]
}, {
"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.FootStepProcessor",
"id" : 1
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.FootStepTargetIDProcessor",
"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
}
} ],
"isTimestamped" : true,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : null,
"attributesModel" : { },
"attributesSimulation" : {
"finishTime" : 500.0,
"simTimeStepLength" : 0.4,
"realTimeSimTimeRatio" : 0.1,
"writeSimulationData" : true,
"visualizationEnabled" : true,
"printFPS" : false,
"digitsPerCoordinate" : 2,
"useFixedSeed" : true,
"fixedSeed" : 5663626838207873416,
"simulationSeed" : 0
},
"attributesPsychology" : {
"usePsychologyLayer" : false,
"psychologyLayer" : {
"perception" : "SimplePerceptionModel",
"cognition" : "SimpleCognitionModel"
}
},
"attributesStrategy" : {
"useStrategyModel" : false,
"strategyModel" : null
},
"topography" : {
"attributes" : {
"bounds" : {
"x" : 0.0,
"y" : 0.0,
"width" : 10.0,
"height" : 10.0
},
"boundingBoxWidth" : 0.5,
"bounded" : true,
"referenceCoordinateSystem" : null
},
"obstacles" : [ ],
"measurementAreas" : [ ],
"stairs" : [ ],
"targets" : [ ],
"targetChangers" : [ ],
"absorbingAreas" : [ ],
"sources" : [ ],
"dynamicElements" : [ ],
"attributesPedestrian" : {
"radius" : 0.2,
"densityDependentSpeed" : false,
"speedDistributionMean" : 1.34,
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0,
"footstepHistorySize" : 4,
"searchRadius" : 1.0,
"walkingDirectionCalculation" : "BY_TARGET_CENTER",
"walkingDirectionSameIfAngleLessOrEqual" : 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,
"footstepHistorySize" : 4,
"searchRadius" : 1.0,
"walkingDirectionCalculation" : "BY_TARGET_CENTER",
"walkingDirectionSameIfAngleLessOrEqual" : 45.0,
"length" : 4.5,
"width" : 1.7,
"direction" : {
"x" : 1.0,
"y" : 0.0
}
}
},
"stimulusInfos" : [ ]
}
}
\ No newline at end of file
Scenarios/Demos/SocialDistancing/SocialDistancingBottleneck/scenarios/bottleneck_2m.scenario
View file @
26e99ade
{
"name" : "bottleneck_2m",
"description" : "",
"release" : "1.1
3
",
"release" : "1.1
4
",
"processWriters" : {
"files" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.EventtimePedestrianIdOutputFile",
...
...
@@ -192,6 +192,10 @@
"cognition" : "SimpleCognitionModel"
}
},
"attributesStrategy" : {
"useStrategyModel" : false,
"strategyModel" : null
},
"topography" : {
"attributes" : {
"bounds" : {
...
...
@@ -306,4 +310,4 @@
},
"stimulusInfos" : [ ]
}
}
}
\ No newline at end of file
VadereSimulator/src/org/vadere/simulator/projects/migration/jsontranformation/AbstractJsonTransformation.java
View file @
26e99ade
...
...
@@ -3,6 +3,7 @@ package org.vadere.simulator.projects.migration.jsontranformation;
import
com.fasterxml.jackson.databind.JsonNode
;
import
com.fasterxml.jackson.databind.node.ObjectNode
;
import
org.vadere.state.attributes.AttributesStrategyModel
;
import
org.vadere.util.version.Version
;
import
org.vadere.simulator.projects.Scenario
;
import
org.vadere.simulator.projects.io.JsonConverter
;
...
...
@@ -133,7 +134,9 @@ public abstract class AbstractJsonTransformation implements JsonTransformation,
// choose sort order based on targetVersion.
public
JsonNode
sort
(
JsonNode
node
)
{
if
(
getTargetVersion
().
equalOrBigger
(
Version
.
V1_7
))
{
if
(
getTargetVersion
().
equalOrBigger
(
Version
.
V1_14
))
{
node
=
sort_since_V1_14
(
node
);
}
else
if
(
getTargetVersion
().
equalOrBigger
(
Version
.
V1_7
)){
node
=
sort_since_V1_7
(
node
);
}
else
if
(
getTargetVersion
().
equalOrBigger
(
Version
.
V1_5
)){
node
=
sort_since_V1_5
(
node
);
...
...
@@ -146,6 +149,19 @@ public abstract class AbstractJsonTransformation implements JsonTransformation,
return
node
;
}
private
JsonNode
sort_since_V1_14
(
JsonNode
node
)
{
LinkedHashMap
source
=
(
LinkedHashMap
)
StateJsonConverter
.
convertJsonNodeToObject
(
node
);
LinkedHashMap
<
Object
,
Object
>
sortedRoot
=
new
LinkedHashMap
<>();
putObject
(
sortedRoot
,
source
,
"name"
);
putObject
(
sortedRoot
,
source
,
"description"
);
putObject
(
sortedRoot
,
source
,
"release"
);
putObject
(
sortedRoot
,
source
,
"commithash"
);
putObject
(
sortedRoot
,
source
,
"processWriters"
,
"files"
,
"processors"
,
"isTimestamped"
,
"isWriteMetaData"
);
putObject
(
sortedRoot
,
source
,
"scenario"
,
"mainModel"
,
"attributesModel"
,
AttributesSimulation
.
JSON_KEY
,
AttributesPsychology
.
JSON_KEY
,
AttributesStrategyModel
.
JSON_KEY
,
"topography"
,
"stimulusInfos"
);
return
StateJsonConverter
.
deserializeToNode
(
sortedRoot
);
}
private
JsonNode
sort_since_V1_7
(
JsonNode
node
)
{
LinkedHashMap
source
=
(
LinkedHashMap
)
StateJsonConverter
.
convertJsonNodeToObject
(
node
);
LinkedHashMap
<
Object
,
Object
>
sortedRoot
=
new
LinkedHashMap
<>();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment