TraCI/Change Vehicle State

From Sumo
Revision as of 09:23, 27 July 2009 by Dkrajzew (talk | contribs)
Jump to navigation Jump to search

Command 0xc4: Change Vehicle State

Note that this API is currently only available in the SVN version
ubyte string ubyte <value_type>
Variable Vehicle ID Type of the value New Value

Changes the state of a vehicle. Because it is possible to change different values of a vehicle, the number of parameter to supply and their types differ between commands. The following values can be changed, the parameter which must be given are also shown in the table.

Overview Changeable Vehicle Variables
Variable ValueType Description
max speed (0x11) float Sets the vehicle's maximum speed to the given value
stop (0x12) string, float, byte, double Lets the vehicle stop at the given edge, at the given position and lane. The vehicle will stop for the given duration.
phase index (0x22) integer Sets the phase of the traffic light to the given. The given index must be valid for the current program of the traffic light, this means it must be between 0 and the number of phases known to the current program of the tls - 1.
change lane (0x13) byte, float Forces a lane change to the lane with the given index; if successfull, the lane will be chosen for the given amount of time.
slow down (0x14) float, double Reduces the speed to the given for the given amount of time.
change target (0x31) string The vehicle's destination edge is set to the given. The route is rebuilt.