TraCI/Change Person State

From Sumo
Jump to: navigation, search

Command 0xce: Change Person State

ubyte string
Variable Person ID

Changes the state of a Person...

Overview Changeable Person Variables
Variable ValueType Description Python Method
add (0x80) complex see below Inserts a new person to the simulation at the given edge, position and time (in s). This function should be followed by appending Stages or the person will immediately vanish on departure. add
append stage (0xc4) complex see below Appends a stage (waiting, walking or driving) to the plan of the given person. appendDrivingStage appendWaitingStage appendWalkingStage
remove stage (0xc5) int Removes the nth next stage. nextStageIndex must be lower then value of getRemainingStages(personID). nextStageIndex 0 immediately aborts the current stage and proceeds to the next stage. When removing all stages, stage 0 should be removed last (the python function removeStages does this automatically). removeStage
removeStages
reroute (compute new route) by travel time (0x90) compound (<empty>) Computes a new route to the current destination that minimizes travel time. The assumed values for each edge in the network can be customized in various ways. See Simulation/Routing#Travel-time_values_for_routing. Replaces the current route by the found route. rerouteTraveltime
color (0x45) ubyte,ubyte,ubyte,ubyte (RGBA) sets color for person with the given ID. i.e. (255,0,0,255) for the color red. setColor
height (0xbc) double Sets the height in m for this person. setHeight
length (0x44) double Sets the length in m for the given person. setLength
min gap (0x4c) double Sets the offset (gap to front person if halting) for this vehicle. setMinGap
speed (0x5e) double Sets the maximum speed in m/s for the named person for subsequent step. setSpeed
type (0x4f) string (id) Sets the id of the type for the named person. setType
width (0x4d) double Sets the width in m for this person. setWidth

compound message details

The message contents are as following:

add (0x80)

byte integer byte string byte string byte double byte double
value type compound item number (4) value type string type ID value type string Initial Edge ID value type double depart time in seconds value type double depart position

A depart time value of -3 is interpreted as immediate departure

append waiting stage (0xc4)

byte int byte int byte int byte string byte string
value type compound item number (4) value type int stage type (1) value type int duration in ms value type string description (may be empty) value type string stopID (may be empty)

append walking stage (0xc4)

byte int byte int byte stringList byte double byte int byte double byte string
value type compound item number (4) value type int stage type (2) value type stringlist edges value type double arrival position value type int duration in ms (when a positive value is given, speed is computed from duration and length, otherwise speed is used) value type double speed (when a positive value is given this speed is used, otherwise the default speed of the person is used) value type string stopID (may be empty)

append driving stage (0xc4)

byte int byte int byte string byte string byte string
value type compound item number (4) value type int stage type (3) value type string destination edge ID value type string lines value type string stopID (may be empty)