TraCI/Edge Value Retrieval

Command 0xaa: Get Edge Variable

ubyte string
Variable Edge ID

Asks for the value of a certain variable of the named edge.

The following variable values can be retrieved, the type of the return value is also shown in the table.

Overview Retrievable Edge Variables
Variable ValueType Description
id list (0x00) stringList Returns a list of ids of all edges within the scenario (the given Edge ID is ignored)
count (0x01) int Returns the number of edges within the scenario (the given Edge ID is ignored)
current travel time (0x5a) double Returns the current travel time (length/mean speed).
Note:
This definition of travel time has to be reverified.
CO2 emissions (id 0x60) double Sum of CO2 emissions on this edge in mg during this time step, computed based on HBEFA.
CO emissions (id 0x61) double Sum of CO emissions on this edge in mg during this time step, computed based on HBEFA.
HC emissions (id 0x62) double Sum of HC emissions on this edge in mg during this time step, computed based on HBEFA.
PMx emissions (id 0x63) double Sum of PMx emissions on this edge in mg during this time step, computed based on HBEFA.
NOx emissions (id 0x64) double Sum of NOx emissions on this edge in mg during this time step, computed based on HBEFA.
fuel consumption (id 0x65) double Sum of fuel consumption on this edge in ml during this time step, computed based on HBEFA.
noise emission (id 0x66) double Sum of noise generated on this edge in dBA, computed based on Harmonoise.
last step vehicle number (0x10) integer The number of vehicles on this edge within the last time step.
last step mean speed (0x11) double Returns the mean speed of vehicles that were on the named induction loop within the last simulation step [m/s]
last step vehicle ids (0x12) stringList Returns the list of ids of vehicles that were on the named induction loop in the last simulation step
last step occupancy (0x13) double Returns the percentage of time the detector was occupied by a vehicle [%]
last step mean vehicle length (0x15) double The mean length of vehicles which were on the detector in the last step [m]


Response 0xba: Edge Variable

ubyte string ubyte <return_type>
Variable Edge ID Return type of the variable <VARIABLE_VALUE>

The respond to a "Command Get Edge Variable".


Extended retrieval messages

Some further messages require additional parameters.

Overview Extended Variables Retrieval
Variable Request ValueType Response ValueType Description
edge travel time information (0x58) time (int) double Returns the edge travel time for the given time as stored in the global container. If such a value does not exist, -1 is returned.
edge effort information (0x59) time (int) double Returns the edge effort for the given time as stored in the global container. If such a value does not exist, -1 is returned.

This page was last modified on 6 January 2012, at 08:09.