Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
vadere
vadere
Commits
b32529ce
Commit
b32529ce
authored
Jul 30, 2020
by
Christina
Browse files
run strategy layer without GUI tab
parent
ea50f29a
Pipeline
#301564
failed with stages
in 1 minute and 35 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Scenarios/Demos/Density_controller/scenarios/Abstract2.scenario
deleted
100644 → 0
View file @
ea50f29a
{
"name" : "Abstract2",
"description" : "",
"release" : "1.13",
"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 ]
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepOutputFile",
"filename" : "densities.csv",
"processors" : [ 5, 6, 7, 8 ]
} ],
"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
}
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.AreaDensityCountingProcessor",
"id" : 5,
"attributesType" : "org.vadere.state.attributes.processor.AttributesAreaDensityCountingProcessor",
"attributes" : {
"measurementAreaId" : 2001,
"countsInsteadOfDensity" : false
}
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.AreaDensityCountingProcessor",
"id" : 6,
"attributesType" : "org.vadere.state.attributes.processor.AttributesAreaDensityCountingProcessor",
"attributes" : {
"measurementAreaId" : 2002,
"countsInsteadOfDensity" : false
}
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.AreaDensityCountingProcessor",
"id" : 7,
"attributesType" : "org.vadere.state.attributes.processor.AttributesAreaDensityCountingProcessor",
"attributes" : {
"measurementAreaId" : 2003,
"countsInsteadOfDensity" : false
}
}, {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.AreaDensityCountingProcessor",
"id" : 8,
"attributesType" : "org.vadere.state.attributes.processor.AttributesAreaDensityCountingProcessor",
"attributes" : {
"measurementAreaId" : 1000,
"countsInsteadOfDensity" : false
}
} ],
"isTimestamped" : false,
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
"strategyModel" : null,
"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,
"cacheType" : "NO_CACHE",
"cacheDir" : "",
"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",
"width" : 0.2,
"height" : 1.0
}
}
},
"attributesSimulation" : {
"finishTime" : 1000.0,
"simTimeStepLength" : 0.4,
"realTimeSimTimeRatio" : 0.1,
"writeSimulationData" : true,
"visualizationEnabled" : true,
"printFPS" : false,
"digitsPerCoordinate" : 2,
"useFixedSeed" : true,
"fixedSeed" : 2617225706430579811,
"simulationSeed" : 0
},
"attributesPsychology" : {
"usePsychologyLayer" : false,
"psychologyLayer" : {
"perception" : "SimplePerceptionModel",
"cognition" : "SimpleCognitionModel"
}
},
"topography" : {
"attributes" : {
"bounds" : {
"x" : 0.0,
"y" : 0.0,
"width" : 80.0,
"height" : 50.5
},
"boundingBoxWidth" : 0.5,
"bounded" : true,
"referenceCoordinateSystem" : null
},
"obstacles" : [ {
"shape" : {
"x" : 35.0,
"y" : 3.5,
"width" : 17.0,
"height" : 36.5,
"type" : "RECTANGLE"
},
"id" : 5
}, {
"shape" : {
"x" : 15.0,
"y" : 3.5,
"width" : 17.0,
"height" : 36.5,
"type" : "RECTANGLE"
},
"id" : 6
}, {
"shape" : {
"x" : 0.0,
"y" : 3.5,
"width" : 12.0,
"height" : 36.5,
"type" : "RECTANGLE"
},
"id" : 7
}, {
"shape" : {
"type" : "POLYGON",
"points" : [ {
"x" : 55.0,
"y" : 40.0
}, {
"x" : 79.5,
"y" : 40.0
}, {
"x" : 79.5,
"y" : 3.5
}, {
"x" : 74.4,
"y" : 3.5
}, {
"x" : 74.4,
"y" : 20.0
}, {
"x" : 59.9,
"y" : 20.0
}, {
"x" : 59.9,
"y" : 3.5
}, {
"x" : 54.9,
"y" : 3.5
} ]
},
"id" : 8
} ],
"measurementAreas" : [ {
"shape" : {
"x" : 68.0,
"y" : 40.0,
"width" : 10.0,
"height" : 10.0,
"type" : "RECTANGLE"
},
"id" : 1000
}, {
"shape" : {
"x" : 12.0,
"y" : 8.0,
"width" : 3.0,
"height" : 30.0,
"type" : "RECTANGLE"
},
"id" : 2001
}, {
"shape" : {
"x" : 32.0,
"y" : 8.0,
"width" : 3.0,
"height" : 30.0,
"type" : "RECTANGLE"
},
"id" : 2002
}, {
"shape" : {
"x" : 52.0,
"y" : 8.0,
"width" : 3.0,
"height" : 30.0,
"type" : "RECTANGLE"
},
"id" : 2003
}, {
"shape" : {
"x" : 55.5,
"y" : 0.5,
"width" : 17.0,
"height" : 3.0,
"type" : "RECTANGLE"
},
"id" : 1
} ],
"stairs" : [ ],
"targets" : [ {
"id" : 1,
"absorbing" : true,
"shape" : {
"x" : 72.6,
"y" : 42.7,
"width" : 5.0,
"height" : 5.0,
"type" : "RECTANGLE"
},
"waitingTime" : 20.0,
"waitingTimeYellowPhase" : 0.0,
"parallelWaiters" : 0,
"individualWaiting" : true,
"deletionDistance" : 0.1,
"startingWithRedLight" : false,
"nextSpeed" : -1.0
}, {
"id" : 2001,
"absorbing" : false,
"shape" : {
"x" : 12.0,
"y" : 6.0,
"width" : 3.0,
"height" : 1.0,
"type" : "RECTANGLE"
},
"waitingTime" : 0.0,
"waitingTimeYellowPhase" : 0.0,
"parallelWaiters" : 0,
"individualWaiting" : true,
"deletionDistance" : 0.1,
"startingWithRedLight" : false,
"nextSpeed" : -1.0
}, {
"id" : 2003,
"absorbing" : false,
"shape" : {
"x" : 52.0,
"y" : 6.0,
"width" : 3.0,
"height" : 1.0,
"type" : "RECTANGLE"
},
"waitingTime" : 0.0,
"waitingTimeYellowPhase" : 0.0,
"parallelWaiters" : 0,
"individualWaiting" : true,
"deletionDistance" : 0.1,
"startingWithRedLight" : false,
"nextSpeed" : -1.0
}, {
"id" : 2002,
"absorbing" : false,
"shape" : {
"x" : 32.0,
"y" : 6.0,
"width" : 3.0,
"height" : 1.0,
"type" : "RECTANGLE"
},
"waitingTime" : 0.0,
"waitingTimeYellowPhase" : 0.0,
"parallelWaiters" : 0,
"individualWaiting" : true,
"deletionDistance" : 0.1,
"startingWithRedLight" : false,
"nextSpeed" : -1.0
}, {
"id" : 2004,
"absorbing" : false,
"shape" : {
"x" : 60.1,
"y" : 19.2,
"width" : 14.0,
"height" : 0.5,
"type" : "RECTANGLE"
},
"waitingTime" : 0.0,
"waitingTimeYellowPhase" : 0.0,
"parallelWaiters" : 0,
"individualWaiting" : true,
"deletionDistance" : 0.1,
"startingWithRedLight" : false,
"nextSpeed" : -1.0
}, {
"id" : 5001,
"absorbing" : false,
"shape" : {
"x" : 64.2,
"y" : 14.0,
"width" : 5.0,
"height" : 5.0,
"type" : "RECTANGLE"
},
"waitingTime" : 30.0,
"waitingTimeYellowPhase" : 0.0,
"parallelWaiters" : 0,
"individualWaiting" : true,
"deletionDistance" : 0.1,
"startingWithRedLight" : false,
"nextSpeed" : -1.0
} ],
"targetChangers" : [ {
"id" : 4,
"shape" : {
"x" : 12.0,
"y" : 4.5,
"width" : 3.0,
"height" : 1.5,
"type" : "RECTANGLE"
},
"reachDistance" : 0.0,
"changeAlgorithmType" : "SELECT_LIST",
"nextTarget" : [ 1 ],
"probabilityToChangeTarget" : [ 1.0 ]
}, {
"id" : 4,
"shape" : {
"x" : 32.0,
"y" : 4.5,
"width" : 3.0,
"height" : 1.5,
"type" : "RECTANGLE"
},
"reachDistance" : 0.0,
"changeAlgorithmType" : "SELECT_LIST",
"nextTarget" : [ 1 ],
"probabilityToChangeTarget" : [ 1.0 ]
}, {
"id" : 4,
"shape" : {
"x" : 52.0,
"y" : 4.5,
"width" : 3.0,
"height" : 1.5,
"type" : "RECTANGLE"
},
"reachDistance" : 0.0,
"changeAlgorithmType" : "SELECT_LIST",
"nextTarget" : [ 1 ],
"probabilityToChangeTarget" : [ 1.0 ]
}, {
"id" : 9,
"shape" : {
"x" : 60.0,
"y" : 9.3,
"width" : 14.1,
"height" : 4.0,
"type" : "RECTANGLE"
},
"reachDistance" : 0.0,
"changeAlgorithmType" : "SELECT_LIST",
"nextTarget" : [ 5001, 2002 ],
"probabilityToChangeTarget" : [ 1.0 ]
} ],
"absorbingAreas" : [ ],
"sources" : [ {
"id" : 1,
"shape" : {
"x" : 72.5,
"y" : 0.5,
"width" : 5.0,
"height" : 3.0,
"type" : "RECTANGLE"
},
"interSpawnTimeDistribution" : "org.vadere.state.scenario.NegativeExponentialDistribution",
"distributionParameters" : [ 2.5 ],
"spawnNumber" : 5,
"maxSpawnNumberTotal" : -1,
"startTime" : 0.0,
"endTime" : 1000.0,
"spawnAtRandomPositions" : false,
"spawnAtGridPositionsCA" : false,
"useFreeSpaceOnly" : true,
"targetIds" : [ 2003 ],
"groupSizeDistribution" : [ 1.0 ],
"dynamicElementType" : "PEDESTRIAN",
"attributesPedestrian" : null
}, {
"id" : 2,
"shape" : {
"x" : 77.5,
"y" : 0.5,
"width" : 1.0,
"height" : 3.0,
"type" : "RECTANGLE"
},
"interSpawnTimeDistribution" : "org.vadere.state.scenario.NegativeExponentialDistribution",
"distributionParameters" : [ 100.0 ],
"spawnNumber" : 1,
"maxSpawnNumberTotal" : -1,
"startTime" : 0.0,
"endTime" : 1000.0,
"spawnAtRandomPositions" : false,
"spawnAtGridPositionsCA" : false,
"useFreeSpaceOnly" : true,
"targetIds" : [ 2002 ],
"groupSizeDistribution" : [ 1.0 ],
"dynamicElementType" : "PEDESTRIAN",
"attributesPedestrian" : null
}, {
"id" : 3,
"shape" : {
"x" : 78.5,
"y" : 0.5,
"width" : 1.0,
"height" : 3.0,
"type" : "RECTANGLE"
},
"interSpawnTimeDistribution" : "org.vadere.state.scenario.NegativeExponentialDistribution",
"distributionParameters" : [ 200.0 ],
"spawnNumber" : 1,
"maxSpawnNumberTotal" : -1,
"startTime" : 50.0,
"endTime" : 1000.0,
"spawnAtRandomPositions" : false,
"spawnAtGridPositionsCA" : false,
"useFreeSpaceOnly" : true,
"targetIds" : [ 2001 ],
"groupSizeDistribution" : [ 1.0 ],
"dynamicElementType" : "PEDESTRIAN",
"attributesPedestrian" : null
} ],
"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/Density_controller/scenarios/AbstractThreeCorridors.scenario
View file @
b32529ce
...
...
@@ -73,8 +73,11 @@
"isWriteMetaData" : false
},
"scenario" : {
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
"strategyModel" : "\"RouteChoiceThreeCorridors\"",
"attributesStrategy" : {
"useStrategyModel" : false,
"strategyModel" : "RouteChoiceThreeCorridors"
},
"mainModel" : "org.vadere.simulator.models.osm.OptimalStepsModel",
"attributesModel" : {
"org.vadere.state.attributes.models.AttributesOSM" : {
"stepCircleResolution" : 4,
...
...
@@ -527,4 +530,4 @@
},
"stimulusInfos" : [ ]
}
}
\ No newline at end of file
}
VadereGui/tests/org/vadere/gui/vadere/TestProjectWriterAndReader.java
View file @
b32529ce
...
...
@@ -11,6 +11,7 @@ import org.vadere.simulator.projects.io.IOVadere;
import
org.vadere.simulator.projects.io.JsonConverter
;
import
org.vadere.state.attributes.Attributes
;
import
org.vadere.state.attributes.AttributesSimulation
;
import
org.vadere.state.attributes.AttributesStrategyModel
;
import
org.vadere.state.attributes.models.AttributesFloorField
;
import
org.vadere.state.attributes.models.AttributesOSM
;
import
org.vadere.state.attributes.models.AttributesPotentialCompact
;
...
...
@@ -47,9 +48,9 @@ public class TestProjectWriterAndReader {
attributes
.
add
(
new
AttributesFloorField
());
attributes
.
add
(
new
AttributesPotentialOSM
());
LinkedList
<
Scenario
>
tests
=
new
LinkedList
<>();
tests
.
add
(
new
Scenario
(
new
ScenarioStore
(
testName
+
"1"
,
""
,
OptimalStepsModel
.
class
.
getName
(),
attributes
,
new
AttributesSimulation
(),
new
Topography
())));
tests
.
add
(
new
Scenario
(
new
ScenarioStore
(
testName
+
"2"
,
""
,
OptimalStepsModel
.
class
.
getName
(),
attributes
,
new
AttributesSimulation
(),
new
Topography
())));
tests
.
add
(
new
Scenario
(
new
ScenarioStore
(
testName
+
"3"
,
""
,
OptimalStepsModel
.
class
.
getName
(),
attributes
,
new
AttributesSimulation
(),
new
Topography
())));
tests
.
add
(
new
Scenario
(
new
ScenarioStore
(
testName
+
"1"
,
""
,
OptimalStepsModel
.
class
.
getName
(),
attributes
,
new
AttributesSimulation
(),
new
Topography
()
,
new
AttributesStrategyModel
()
)));
tests
.
add
(
new
Scenario
(
new
ScenarioStore
(
testName
+
"2"
,
""
,
OptimalStepsModel
.
class
.
getName
(),
attributes
,
new
AttributesSimulation
(),
new
Topography
()
,
new
AttributesStrategyModel
()
)));
tests
.
add
(
new
Scenario
(
new
ScenarioStore
(
testName
+
"3"
,
""
,
OptimalStepsModel
.
class
.
getName
(),
attributes
,
new
AttributesSimulation
(),
new
Topography
()
,
new
AttributesStrategyModel
()
)));
testProject
=
new
VadereProject
(
testProjectName
,
tests
,
Paths
.
get
(
"."
));
}
...
...
VadereSimulator/src/org/vadere/simulator/control/simulation/Simulation.java
View file @
b32529ce
...
...
@@ -425,7 +425,7 @@ public class Simulation {
private
void
updateStrategyLayer
(
double
simTimeInSec
)
{
if
(
s
trategyModel
!=
null
)
{
if
(
s
cenarioStore
.
getAttributesStrategyModel
().
isUseStrategyModel
()
)
{
Collection
<
Pedestrian
>
pedestrians
=
topography
.
getElements
(
Pedestrian
.
class
);
if
(
simTimeInSec
==
startTimeInSec
)
{
...
...
VadereSimulator/src/org/vadere/simulator/control/strategy/helpers/StrategyModelBuilder.java
View file @
b32529ce
...
...
@@ -10,14 +10,13 @@ public class StrategyModelBuilder {
public
static
final
String
JAVA_PACKAGE_SEPARATOR
=
"."
;
public
static
IStrategyModel
instantiateModel
(
ScenarioStore
scenarioStore
)
{
String
simpleClassName
=
scenarioStore
.
getStrategyModel
();
String
simpleClassName
=
scenarioStore
.
getAttributesStrategyModel
().
getStrategyModel
();
if
(
simpleClassName
!=
null
)
{
String
classSearchPath
=
"org.vadere.simulator.models.strategy"
;
String
fullyQualifiedClassName
=
classSearchPath
+
JAVA_PACKAGE_SEPARATOR
+
simpleClassName
.
replaceAll
(
"\""
,
""
)
;
String
fullyQualifiedClassName
=
classSearchPath
+
JAVA_PACKAGE_SEPARATOR
+
simpleClassName
;
DynamicClassInstantiator
<
IStrategyModel
>
instantiator
=
new
DynamicClassInstantiator
<>();
IStrategyModel
strategyModel
=
instantiator
.
createObject
(
fullyQualifiedClassName
);
return
strategyModel
;
}
else
{
...
...
VadereSimulator/src/org/vadere/simulator/projects/ScenarioStore.java
View file @
b32529ce
...
...
@@ -7,6 +7,7 @@ import org.vadere.simulator.projects.io.JsonConverter;
import
org.vadere.state.attributes.Attributes
;
import
org.vadere.state.attributes.AttributesPsychology
;
import
org.vadere.state.attributes.AttributesSimulation
;
import
org.vadere.state.attributes.AttributesStrategyModel
;
import
org.vadere.state.attributes.scenario.AttributesCar
;
import
org.vadere.state.psychology.perception.json.StimulusInfoStore
;
import
org.vadere.state.scenario.Topography
;
...
...
@@ -31,27 +32,27 @@ public class ScenarioStore {
private
String
name
;