Skip to main content

Simulation Configuration

Options for Simulation Configuration​

This is a list of all the attributes that can be defined in different sections of the simulation configuration.

Execution​

The simulation is executed in parallel if multiple processors are available. Sometimes it's handy to switch to a sequential execution to evade problems with locks or synchronization.

Therefore use in top level config option execution the maxProcessCount property and set it to 1.

{
"execution": {
"maxProcessCount": 1
},
"globals": {
// ...
}
}

Globals​

The globals options define general settings for the simulation like everything around the simulation time.

PropertyTypeDefaultRequiredConstraintsExcludes
idStringmodel_name + _ + timestamp☑No special characters
stepsInteger1☐value ≥ 0startTime; endTime
startTimeDateTimenow☐value > endTimesteps
endTimeDateTimenull☐value > startTimesteps
deltaTInteger1☑value > 0
deltaTUnitTimeUnitseconds☐one of: milliseconds, seconds, minutes, hours, days, months, years

Here is an example:

{
"globals": {
"startTime": "2020-01-01T00:00:00",
"endTime": "2020-01-01T01:00:00",
"deltaT": 1,
"deltaTUnit": "seconds",
"console": true,
"output": "csv",
"options": {
"delimiter": ";",
"numberFormat": "F2"
}
}
}

startTime: the start time of the simulation

endTime: the end time of the simulation

deltaT: the length of a single time step

deltaTUnit: the unit of a single time step

console: if true, the simulation progress is displayed in the terminal

output: the medium into which simulation output data is stored

​ Note: if output is set to csv, then the key options can be used to define further details such as the delimiter and the numberFormat.


Output​

PropertyTypeDefaultRequiredConstraints
outputOutputOptionnone☐one of: none, CSV, MongoDB, redis, postgresql, sqlite

Output (mongoOptions, npgSqlOptions, redisOptions)​

PropertyTypeDefaultRequiredConstraints
portIntegerdb specific☐value > 0
hostStringlocalhost☑
userString☑
passwordString☑
connectionTimeoutInteger5☐value > 0
databaseNameString$sim-config-id☑

Output (sqLiteOptions)​

PropertyTypeDefaultRequiredConstraints
databaseNameString$sim-config-id☑
isInMemoryBooleanfalse☐

Output (socketOptions) exclude?​

PropertyTypeDefaultRequiredConstraints
socketPathString☑
sendingIntervalInteger0☐

Output (csvOptions)​

PropertyTypeDefaultRequiredConstraintsNotes
delimiterDelimiter,☑one of: ,, ;, \t, \w
includeHeaderBooleantrue☐
encodingStringUTF-8☐
chunkSizeInteger☐exclude
appendConfigNameBooleantrue☐
fileSuffixString☐overwrites appendConfigName
numberFormatStringg☐exclude
cultureStringen-EN☐

Layer​

PropertyTypeDefaultRequiredConstraints
nameStringclassname in AST☑
filePath☑path exists
outputOutputOptionnone☐
outputFrequencyInteger1☐value ≥ 0

The layer section includes a list of configurations for each layer type defined in the model. Here is an example of the configuration for two layers:

{
"layers": [
{
"name": "TrafficLightLayer",
"file": "res/traffic_lights/traffic_lights_harburg_zentrum.zip"
},
{
"name": "CitizenLayer",
"file": "res/networks/harburg_zentrum_walk_graph.geojson",
"mapping": [
{
"parameter": "ParkingOccupancy",
"value": 0.779
}
]
}
]
}

name: the name of the layer type. Note: this must match the layer type's name in the model.

file: the path to a file with geodata that is used to populate the layer.

mapping: a list of additional mappings for the layer.

Raster Layer​

PropertyTypeDefaultRequiredConstraints
filePath☐allowed file types: asc, csv, zip
outputLayerOutputOptionasc☐options: asc, csv, none
info

(Optional)
** Spatio-Temporal-Layer**

  • Set von Dateien auswählen
  • Ordnung der Dateien bestimmen
  • Dateien mit Zeitangaben versehen

Empty Layer

  • Bounding Box angeben (lower left, upper right)
  • No Data Value mit bspw. -99

Vector Layer​

PropertyTypeDefaultRequiredConstraints
filePath☐allowed file types: geoJSON, ESRI Shapefile
outputVectorLayerOutputOptionsasc☐options: asc, geoJSON, ESRI Shapefile, none

Agents​

PropertyTypeDefaultRequiredConstraintsExcludes
nameStringclassname provided by AST☑agent must exist in model
frequencyInteger1☐value > 0
filePath☐path existscount
outputOutputOptionGlobal Output Value☐
outputFrequencyInteger1☐value ≥ 0
outputFilterFilterList☐
countInteger0☐value ≥ 0
mappingMapping☑external variables must be mapped

The Agents section includes a configuration (an AgentMapping) for each agent type defined in the model. Here is an example:

{
"agents": [
{
"name": "Citizen",
"count": 10,
"file": "res/agent_inits/CitizenInit10k.csv",
"options": {
"delimiter": ";"
},
"mapping": [
{
"parameter" : "CanCycle",
"value" : true
},
{
"parameter": "resultTrajectory",
"value": true
}
]
}
]
}

name: the name of the agent type. Note: this must match the agent type's name in the model.

count: the number of agents of this agent type that should be spawned at the beginning of the simulation

file: the path to a csv file that contains a set of attributes and attribute values to parametrize the agents

​ Note: if a file is specified, the key options can be used to define further details such as the delimiter.

mapping: a list of additional mappings for the agents.

Mapping​

PropertyTypeDefaultRequiredConstraintsExcludes
parameterString☑must exist in agent definition and be marked as external
valueAny☐must be type of external parameterfield
fieldString☐allowed if input file is specified; must exist in .csvvalue
typePrimitiveTypesread from AST☑
{
"mapping": [
{
"parameter": "Energy",
"value": 100,
"field": "field.name"
}
]
}