Difference between revisions of "TraCI/Induction Loop Value Retrieval"

From Sumo
Jump to navigation Jump to search
(Induction Loop Value Retrieval)
(Induction Loop Value Retrieval)
Line 35: Line 35:
 
| string*
 
| string*
 
| Returns the list of ids of vehicles that were on the named induction loop in the last simulation step
 
| Returns the list of ids of vehicles that were on the named induction loop in the last simulation step
 +
|-
 +
| last step occupance (0x13)
 +
| float
 +
| Returns the percentage of time the detector was occupied by a vehicle [%]
 
|-
 
|-
 
| last step mean vehicle length (0x15)
 
| last step mean vehicle length (0x15)
Line 46: Line 50:
 
|}
 
|}
  
{{Caution|Note that retrieval methods 0x15, and 0x16 are currently only available within the SVN.}}
+
{{Caution|Note that retrieval methods 0x13, 0x15, and 0x16 are currently only available within the SVN.}}
 
 
 
[[Category:RevisitAfterNextRelease]]
 
[[Category:RevisitAfterNextRelease]]

Revision as of 12:55, 11 September 2009

Induction Loop Value Retrieval

Command 0xa0: Get Induction Loop Variable

ubyte string
Variable Induction Loop ID

Asks for the value of a certain variable of the named induction loop (e1 detector). The value returned is the state of the asked variable/value within the last simulation step. Please note that for asking values from your induction loops with TraCI, you have to:

  • define them
  • set their frequency to 1s

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

Overview Retrievable Induction Loop Variables
Variable ValueType Description
id list (0x00) string* Returns a list of ids of all known induction loops within the scenario (the given Induction Loop ID is ignored)
last step vehicle number (0x10) integer Returns the number of vehicles that were on the named induction loop within the last simulation step [#];
Note:
This value corresponds to the nVehEntered measure of induction loops.
last step mean speed (0x11) float 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) string* Returns the list of ids of vehicles that were on the named induction loop in the last simulation step
last step occupance (0x13) float Returns the percentage of time the detector was occupied by a vehicle [%]
last step mean vehicle length (0x15) float The mean length of vehicles which were on the detector in the last step [m]
last step's time since last detection (0x16) float The time since last detection [s]
Caution:
Note that retrieval methods 0x13, 0x15, and 0x16 are currently only available within the SVN.


Response 0xb0: Induction Loop Variable

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

The respond to a "Command Get Induction Loop Variable".

Notes