traci._person
index
/build/sumo-0pkf0q/sumo-0.26.0+dfsg1/tools/traci/_person.py

@file    person.py
@author  Jakob Erdmann
@date    2015-02-06
@version $Id: _person.py 20482 2016-04-18 20:49:42Z behrisch $
 
Python implementation of the TraCI interface.
 
SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
Copyright (C) 2011-2016 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

 
Classes
       
traci.domain.Domain
PersonDomain

 
class PersonDomain(traci.domain.Domain)
     Methods defined here:
__init__(self)
getAngle(self, personID)
getAngle(string) -> double
 
Returns the angle in degrees of the named person within the last step.
getColor(self, personID)
getColor(string) -> (integer, integer, integer, integer)
 
Returns the person's rgba color.
getLanePosition(self, personID)
getLanePosition(string) -> double
 
The position of the person along the lane measured in m.
getLength(self, personID)
getLength(string) -> double
 
Returns the length in m of the given person.
getMinGap(self, personID)
getMinGap(string) -> double
 
Returns the offset (gap to front person if halting) of this person.
getNextEdge(self, personID)
getNextEdge() -> string
If the person is walking, returns the next edge on the persons route
(including crossing and walkingareas). If there is no further edge or the
person is in another stage, returns the empty string.
getPosition(self, personID)
getPosition(string) -> (double, double)
 
Returns the position of the named person within the last step [m,m].
getPosition3D(self, personID)
getPosition(string) -> (double, double)
 
Returns the position of the named person within the last step [m,m,m].
getRoadID(self, personID)
getRoadID(string) -> string
 
Returns the id of the edge the named person was at within the last step.
getSpeed(self, personID)
getSpeed(string) -> double
 
Returns the speed in m/s of the named person within the last step.
getTypeID(self, personID)
getTypeID(string) -> string
 
Returns the id of the type of the named person.
getWaitingTime(self, 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(self, personID)
getWidth(string) -> double
 
Returns the width in m of this person.

Methods inherited from traci.domain.Domain:
getContextSubscriptionResults(self, objectID=None)
getIDCount(self)
getIDCount() -> integer
 
Returns the number of currently loaded objects.
getIDList(self)
getIDList() -> list(string)
 
Returns a list of all objects in the network.
getParameter(self, objID, param)
getParameter(string, string) -> string
 
Returns the value of the given parameter for the given objID
getSubscriptionResults(self, objectID=None)
getSubscriptionResults(string) -> dict(integer: <value_type>)
 
Returns the subscription results for the last time step and the given object.
If no object id is given, all subscription results are returned in a dict.
If the object 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.
setParameter(self, objID, param, value)
setParameter(string, string, string) -> string
 
Sets the value of the given parameter to value for the given objID
subscribe(self, objectID, varIDs=None, begin=0, end=2147483647)
subscribe(string, list(integer), double, double) -> None
 
Subscribe to one or more object values for the given interval.
subscribeContext(self, objectID, domain, dist, varIDs=None, begin=0, end=2147483647)

 
Data
        absolute_import = _Feature((2, 5, 0, 'alpha', 1), (3, 0, 0, 'alpha', 0), 16384)