Road Network Events
The following events handle the creation and modification of the road network within the simulation. The road network consists of intersections (nodes) and roads (edges) that form the topology on which vehicles travel. These events are emitted during runtime when properties of roads or intersections change.
During initialization, the complete road network can also be downloaded via the simulation’s REST endpoint at /simulation/road-network/intersections and /simulation/road-network/roads. This is particularly useful for the visualization to render the full road network at startup. For details on the structure, refer to the tutorial on the road network.
road-network:intersections-added
Informs all participants that new intersections have been added to the road network. Each intersection represents a node in the road network and is defined by a unique identifier and a geographic position.
Important
This event is not used in the competition setting.
Senders
SIMULATION
Receivers
OPTIMIZERSIMULATIONVISUALIZATION
Data Fields
| Field | Type | Required | Description |
|---|---|---|---|
intersections |
array |
Yes | A list of intersection objects that were added. |
Each intersection object contains:
| Field | Type | Required | Description |
|---|---|---|---|
id |
integer |
Yes | The unique identifier of the intersection. |
latitude |
number |
Yes | The geographic latitude of the intersection. |
longitude |
number |
Yes | The geographic longitude of the intersection. |
Example
{
"category": "road-network",
"name": "intersections-added",
"data": {
"intersections": [
{ "id": 0, "latitude": 49.87318, "longitude": 8.65148 },
{ "id": 1, "latitude": 49.87291, "longitude": 8.65026 },
{ "id": 2, "latitude": 49.87244, "longitude": 8.6484 }
]
}
}
Flow after Triggering
All receivers register the new intersections in their internal representation of the road network.
road-network:roads-added
Informs all participants that new roads have been added to the road network. Each road represents a directed edge connecting two intersections, along with properties such as length, and maximum speed.
Important
This event is not used in the competition setting.
Senders
SIMULATION
Receivers
OPTIMIZERSIMULATIONVISUALIZATION
Data Fields
| Field | Type | Required | Description |
|---|---|---|---|
roads |
array |
Yes | A list of road objects that were added. |
Each road object contains:
| Field | Type | Required | Description |
|---|---|---|---|
id |
integer |
Yes | The unique identifier of the road. |
from |
integer |
Yes | The identifier of the intersection where the road starts. |
to |
integer |
Yes | The identifier of the intersection where the road ends. |
length |
number |
Yes | The length of the road in meters. |
maximum-speed |
number |
Yes | The maximum allowed speed on the road in km/h. |
Example
{
"category": "road-network",
"name": "roads-added",
"data": {
"roads": [
{ "id": 0, "from": 0, "to": 1, "length": 100.0, "maximum-speed": 50 },
{ "id": 1, "from": 1, "to": 2, "length": 150.0, "maximum-speed": 30 }
]
}
}
Flow after Triggering
All receivers register the new roads in their internal representation of the road network.
road-network:changed-road-property
Informs all participants that a property of an existing road has been changed. This event can be emitted during runtime, for example when the simulation adjusts road parameters such as the maximum speed to simulate traffic jams.
Senders
SIMULATION
Receivers
OPTIMIZERSIMULATIONVISUALIZATION
Data Fields
| Field | Type | Required | Description |
|---|---|---|---|
road-id |
integer |
Yes | The unique identifier of the road whose property changed. |
properties |
object |
Yes | An object containing the changed properties and their new values. |
Known properties:
| Property | Type | Description |
|---|---|---|
maximum-speed |
number |
The new maximum allowed speed in km/h. |
Example
{
"category": "road-network",
"name": "changed-road-property",
"data": {
"road-id": 1,
"properties": {
"maximum-speed": 30
}
}
}
Flow after Triggering
All receivers update the specified property of the given road in their internal representation.
road-network:changed-intersection-property
Informs all participants that a property of an existing intersection has been changed. This event can be emitted during runtime when intersection parameters are modified.
Important
This event is not used in the competition setting.
Senders
SIMULATION
Receivers
OPTIMIZER,SIMULATION,VISUALIZATION
Data Fields
| Field | Type | Required | Description |
|---|---|---|---|
intersection-id |
integer |
Yes | The unique identifier of the intersection whose property changed. |
properties |
object |
Yes | An object containing the changed properties and their new values. |
Example
{
"category": "road-network",
"name": "changed-intersection-property",
"data": {
"intersection-id": 0,
"properties": {}
}
}
Flow after Triggering
- All receivers update the specified property of the given intersection in their internal representation.
- The visualization may update the visual representation of the affected intersection.