TraCI/Change Vehicle State

From Sumo
Revision as of 09:44, 27 July 2009 by Dkrajzew (talk | contribs) (Command 0xc4: Change Vehicle State)
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, float Lets the vehicle stop at the given edge, at the given position and lane. The vehicle will stop for the given duration.
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, float 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.

The message contents are as following:

max speed (0x11)

New Maximum Speed

stop (0x12)

string float byte float
Edge ID Position Lane Index Duration

change lane (0x13)

byte float
Lane Index Duration

slow down (0x14)

float float
Speed Duration

change target (0x31)

Edge ID