TraCI/Simulation Value Retrieval
Command 0xab: Get Simulation Variable
| ubyte | string |
| Variable | Simulation ID (always unused) |
|---|
Asks for the value of a certain simulation variable
The following variable values can be retrieved, the type of the return value is also shown in the table.
| Variable | ValueType | Description |
|---|---|---|
| current simulation time (0x70) | int | Returns the current simulation time (in ms) |
| number of loaded vehicles (id 0x71) | int | The number of vehicles which were loaded in this time step. |
| ids of loaded vehicles (id 0x72) | stringList | A list of ids of vehicles which were loaded in this time step. |
| number of departed vehicles (id 0x73) | int | The number of vehicles which departed (were inserted into the road network) in this time step. |
| ids of departed vehicles (id 0x74) | stringList | A list of ids of vehicles which departed (were inserted into the road network) in this time step. |
| number of vehicles that start to teleport (id 0x75) | int | The number of vehicles which started to teleport in this time step. |
| ids of vehicles that start to teleport (id 0x76) | stringList | A list of ids of vehicles which started to teleport in this time step. |
| number of vehicles that end being teleported (id 0x77) | int | The number of vehicles which ended to be teleported in this time step. |
| ids of vehicles that end being teleported (id 0x78) | stringList | A list of ids of vehicles which ended to be teleported in this time step. |
| number of arrived vehicles (id 0x79) | int | The number of vehicles which arrived (have reached their destination and are removed from the road network) in this time step. |
| ids of arrived vehicles (id 0x7a) | stringList | A list of ids of vehicles which arrived (have reached their destination and are removed from the road network) in this time step. |
| network boundaries (id 0x7c) | boundary box | The boundary box of the simulation network. |
| minimum number of vehicles that are still expected to leave the net (id 0x7d) | int | The number of vehicles which are in the net plus the ones still waiting to start. This number may be smaller than the actual number of vehicles still to come because of delayed route file parsing. |
Response 0xbb: Simulation Variable
| ubyte | string | ubyte | <return_type> |
| Variable | <invalid> | Return type of the variable | <VARIABLE_VALUE> |
|---|
The respond to a "Command Get Simulation Variable".
This page was last modified on 1 November 2011, at 08:11.