TraCI/Change Person State
generated on 2017-12-19 09:15:32.093654 from the wiki page for TraCI/Change_Person_State for SUMO 0.32.0
Contents
Command 0xce: Change Person State
| ubyte | string |
| Variable | Person ID |
|---|
Changes the state of a Person...
| 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 immediatly 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,0) for the color red. The fourth integer (alpha) is only used when drawing persons with raster images. | 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 | int | byte | double |
| value type compound | item number (4) | value type string | type ID | value type string | Initial Edge ID | value type int | depart time in ms | 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) |
|---|
This page was last modified on 16 August 2017, at 07:14.