TraCI/Change Vehicle State

= Command 0xc4: Change Vehicle State = 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. Furthermore it is possible to change all values mentioned in TraCI/Change_VehicleType_State. If you do so, the vehicle gets a new type (named "typeid@vehid") and won't be affected by further changes to the original type.

Please note:

(1): The first occurrence of the edge is currently at is searched within the new route; the vehicle continues the route from this point in the route from. If the edge the vehicle is currently does not exist within the new route, an error is generated. (2): changing the route works only if the vehicle is not within an intersection.

The message contents are as following:

stop (0x12)

change lane (0x13)

slow down (0x14)

resume (0x19)

change target (0x31)

change route by id (0x54)

change route (0x57)

change edge travel time information (0x58)

This command can be sent using 4, 2, or 1 parameters. In the first form, it adds a new override of edge information to the list of existing overrides for the given vehicle, valid from begin time to end time. In the second form, it adds a new override that is valid throughout the simulation, replacing an earlier one for the same edge. In the third form, it removes as earlier override for the given edge, valid throughout the simulation.

change edge effort information (0x59)

This command can be sent using 4, 2, or 1 parameters. In the first form, it adds a new override of edge information to the list of existing overrides for the given vehicle, valid from begin time to end time. In the second form, it adds a new override that is valid throughout the simulation, replacing an earlier one for the same edge. In the third form, it removes as earlier override for the given edge, valid throughout the simulation.

reroute (compute new route) by travel time (0x90)

reroute (compute new route) by effort (0x91)

reroute (compute new route) by effort (0x91)

The vehicle will be renamed from its lane and moved to the given position on the given lane. No collision checks are done, this means that moving the vehicle may cause in collisions or in situations yielding in such. The vehicle keeps its speed - in the next time step it is at given position + speed. Note that the lane must be a part of the following route, this means it must be either a part of the edge the vehicle is currently on or a part of an edge the vehicle will pass in future; setting a new route before moving the vehicle if needed should work.

speed mode (0xb3)

Per default, the vehicle is using the given speed regarding the safe gap, the maximum acceleration, and the maximum deceleration. One can control this behavior using the speed mode (0xb3) command, the given integer is a bitset (bit0 is the least significant bit) with the following fields: Setting the bit enables the check (the according value is regarded), keeping the bit==zero disables the check.
 * bit0: Regard safe speed
 * bit1: Regard maximum acceleration
 * bit2: Regard maximum deceleration

lane change mode (0xb6)

The lane change model knows five reasons to change lanes: One can control this behavior using the lane change mode (0xb6) command, the given integer is a bitset (bit0 is the least significant bit) with the following fields:
 * strategic (change lanes to continue the route)
 * cooperative (change in order to allow others to change)
 * speed gain (the other lane allows for faster driving)
 * obligation to drive on the right
 * External request (TraCI)
 * bit1, bit0: 00 = do no strategic changes; 01 = do strategic changes if not in conflict with a TraCI request; 10 = do strategic change even if overriding TraCI request
 * bit3, bit2: 00 = do no cooperative changes; 01 = do cooperative changes if not in conflict with a TraCI request; 10 = do cooperative change even if overriding TraCI request
 * bit5, bit4: 00 = do no changes; 01 = do speed gain changes if not in conflict with a TraCI request; 10 = do speed gain change even if overriding TraCI request
 * bit7, bit6: 00 = do no right drive changes; 01 = do right drive changes if not in conflict with a TraCI request; 10 = do right drive change even if overriding TraCI request


 * bit9, bit8:
 * 00 = do not respect other drivers when following TraCI requests, adapt speed to fulfill request
 * 01 = avoid immediate collisions when following a TraCI request, adapt speed to fulfill request
 * 10 = respect the speed / brake gaps of others when changing lanes, adapt speed to fulfill request
 * 11 = respect the speed / brake gaps of others when changing lanes, no speed adaption

add (0x80)

If zero or a negative departure speed is set, one of the following fixed speed settings will be used: * 0: DEPART_SPEED_DEFAULT * -2: DEPART_SPEED_RANDOM * -3: DEPART_SPEED_MAX

remove (0x81) The following reasons may be given:
 * 0: NOTIFICATION_TELEPORT
 * 1: NOTIFICATION_PARKING
 * 2: NOTIFICATION_ARRIVED
 * 3: NOTIFICATION_VAPORIZED
 * 4: NOTIFICATION_TELEPORT_ARRIVED