traci.person
index
/build/sumo-3Ncg_a/sumo-0.23.0+dfsg1/tools/traci/person.py

@file    person.py
@author  Jakob Erdmann
@date    2015-02-06
@version $Id: person.py 18096 2015-03-17 09:50:59Z behrisch $
 
Python implementation of the TraCI interface.
 
SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
Copyright (C) 2011-2015 DLR (http://www.dlr.de/) and contributors
 
This file is part of SUMO.
SUMO is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

 
Modules
       
struct
traci.constants
traci

 
Functions
       
getAngle(personID)
getAngle(string) -> double
 
Returns the angle in degrees of the named person within the last step.
getColor(personID)
getColor(string) -> (integer, integer, integer, integer)
 
Returns the person's rgba color.
getContextSubscriptionResults(personID=None)
getIDCount()
getIDCount() -> integer
 
Returns the number of person in the network.
getIDList()
getIDList() -> list(string)
 
Returns a list of ids of all persons currently running within the scenario.
getLanePosition(personID)
getLanePosition(string) -> double
 
The position of the person along the lane measured in m.
getLength(personID)
getLength(string) -> double
 
Returns the length in m of the given person.
getMinGap(personID)
getMinGap(string) -> double
 
Returns the offset (gap to front person if halting) of this person.
getPersonNumber(personID)
getPersonNumber(string) -> integer
 
.
getPosition(personID)
getPosition(string) -> (double, double)
 
Returns the position of the named person within the last step [m,m].
getPosition3D(personID)
getPosition(string) -> (double, double)
 
Returns the position of the named person within the last step [m,m,m].
getRoadID(personID)
getRoadID(string) -> string
 
Returns the id of the edge the named person was at within the last step.
getSpeed(personID)
getSpeed(string) -> double
 
Returns the speed in m/s of the named person within the last step.
getSubscriptionResults(personID=None)
getSubscriptionResults(string) -> dict(integer: <value_type>)
 
Returns the subscription results for the last time step and the given person.
If no person id is given, all subscription results are returned in a dict.
If the person id is unknown or the subscription did for any reason return no data,
'None' is returned.
It is not possible to retrieve older subscription results than the ones
from the last time step.
getTypeID(personID)
getTypeID(string) -> string
 
Returns the id of the type of the named person.
getWaitingTime(personID)
getWaitingTime() -> double
The waiting time of a person is defined as the time (in seconds) spent with a
speed below 0.1m/s since the last time it was faster than 0.1m/s.
(basically, the waiting time of a person is reset to 0 every time it moves).
getWidth(personID)
getWidth(string) -> double
 
Returns the width in m of this person.
subscribe(personID, varIDs=(80, 86), begin=0, end=2147483647)
subscribe(string, list(integer), double, double) -> None
 
Subscribe to one or more person values for the given interval.
subscribeContext(personID, domain, dist, varIDs=(80, 86), begin=0, end=2147483647)

 
Data
        subscriptionResults = <{}, {}>