This is the root of a scenario specification. A scenario corresponds to a serialized SimulationConfig object (and its children).
Complete scenario examples can be seen in the scenario folder of the basic-simulator.
Simulation Config
Entry | Unit | Type | Description | Default Value |
---|---|---|---|---|
name |
S | Name of the scenario (purely descriptive). | ||
map_name |
S | The path to the OSM map to be used. | ||
max_duration |
s | Duration | The maximum duration the simulation will be run. The simulation stops earlier if all tasks are completed. | 60 s |
tick_duration |
s | Duration | Duration of one physics tick. | 10 ms |
start_time |
Instant | Time of day inside the simulator. |
Instant.now() on simulation loading. |
|
cars |
[O] | An array of Vehicle Properties specifications. These are the vehicles that will be loaded in the simulation. | ||
modules |
[O] | An array of typed ModuleProperties sub-classes (see below). |
Modules
Modules are optional systems that can be loaded in the simulator.
SimpleNetwork Properties
A module to allow simple modelling of vehicle to vehicle communication across a network.
This module must be specified if vehicles use the SimpleCommunicationGateway
.
Entry | Unit | Type | Description | Default Value |
---|---|---|---|---|
transmission_time |
s | Duration | Constant delay when sending messages between vehicles. | 5 ms |
car_transmission_range |
m | FP | Range that cars can send messages to one another. |
Examples
Complete scenario examples can be seen in the scenario folder of the basic-simulator.
Basic scenario
A scenario using the map aachen.osm
of a maximal duration of 10 seconds and using 10 ms physics ticks.
Two cars are specified in the car array.
Details on the car specifications can be seen in the next example page (Vehicle examples).
{
"name": "example_scenario1",
"map_name": "aachen",
"max_duration": [10,0],
"tick_duration": [0,10000000],
"cars": [
{...},
{...}
]
}
SimpleNetwork Example
If cars want to communicate using the SimpleCommunicationGateway
, the SimpleNetwork
module must be loaded as show here:
{
"name": "example_scenario1",
"map_name": "aachen",
"max_duration": [10,0],
"tick_duration": [0,10000000],
"modules": [
{
"type": "simple_network",
"transmission_time": [0, 100000000],
"car_transmission_range": 100
}
],
"cars": [
{...},
{...}
]
}
Next: Vehicle Configuration