TraCI/Lane Value Retrieval

generated on 2015-09-02 00:02:08.036623 from the wiki page for TraCI/Lane_Value_Retrieval for SUMO 0.24.0

Command 0xa3: Get Lane Variable

ubyte string
Variable Lane ID

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

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

Overview Retrievable Lane Variables
Variable ValueType Description
id list (0x00) stringList Returns a list of ids of all lanes within the scenario (the given Lane ID is ignored)
count (0x01) int Returns the number of lanes within the scenario (the given Lane ID is ignored)
link number (0x30) ubyte Returns the number of links outgoing from this lane [#]
edge id (0x31) string Returns the id of the edge this lane belongs to
links (0x33) compound Returns descriptions of the links outgoing from this lane [m]
allowed vehicle classes (0x34) stringList Returns the mml-definitions of vehicle classes allowed on this lane
disallowed vehicle classes (0x35) stringList Returns the mml-definitions of vehicle classes not allowed on this lane
length (0x44) double Returns the length of the named lane [m]
vmax (0x41) double Returns the maximum speed allowed on this lane [m/s]
shape (0x4e) shape Returns this lane's shape
width (0x4d) double Returns the width of the named lane [m]
CO2 emissions (id 0x60) double Sum of CO2 emissions on this lane in mg during this time step.
CO emissions (id 0x61) double Sum of CO emissions on this lane in mg during this time step.
HC emissions (id 0x62) double Sum of HC emissions on this lane in mg during this time step.
PMx emissions (id 0x63) double Sum of PMx emissions on this lane in mg during this time step.
NOx emissions (id 0x64) double Sum of NOx emissions on this lane in mg during this time step.
fuel consumption (id 0x65) double Sum of fuel consumption on this lane in ml during this time step.
noise emission (id 0x66) double Sum of noise generated on this lane in dBA.
last step vehicle number (0x10) integer The number of vehicles on this lane within the last time step.
last step mean speed (0x11) double Returns the mean speed of vehicles that were on this lane within the last simulation step [m/s]
last step vehicle ids (0x12) stringList Returns the list of ids of vehicles that were on this lane in the last simulation step
last step occupancy (0x13) double Returns the total lengths of vehicles on this lane during the last simulation step divided by the length of this lane
last step mean vehicle length (0x15) double The mean length of vehicles which were on this lane in the last step [m]
waiting time (0x7a) double Returns the waiting time for all vehicles on the lane [s]


Response 0xb3: Lane Variable

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

The respond to a "Command Get Lane Variable".

Structure of compound object links

If you request the list of links, an compound object is returned, structured as following. Attention, each part is fowarded by a byte which represents its data type, except "length".

integer type + integer link ... link
Length Number of links Link 1 ... Link n

where length is the total number of following elements -- counting each element of link separatley -- and link is decribed by:

type + string type + string type + ubyte type + ubyte type + ubyte type + string type + string type + double
consecutive not internal lane consecutive internal lane has priority (=1) or not (=0) is opened (=1) or not (=0) has approaching foe (=1) or not (=0) (current) state direction length [m] - only valid if not using internal lanes
Caution:
Please note that the information "is opened" and "has approaching foe" currently refer to the current time step; this is rather inappropriate and will be probably changed in the next future.

This page was last modified on 27 March 2015, at 16:21.