| | |
- Logic
- Phase
- traci.domain.Domain
-
- TrafficLightDomain
class TrafficLightDomain(traci.domain.Domain) |
| | |
Methods defined here:
- __init__(self, name='trafficlight', deprecatedFor=None)
- getCompleteRedYellowGreenDefinition(self, tlsID)
- getCompleteRedYellowGreenDefinition(string) ->
.
- getControlledLanes(self, tlsID)
- getControlledLanes(string) -> c
Returns the list of lanes which are controlled by the named traffic light.
- getControlledLinks(self, tlsID)
- getControlledLinks(string) -> list(list(list(string)))
Returns the links controlled by the traffic light, sorted by the signal index and described by giving
the incoming, outgoing, and via lane.
- getNextSwitch(self, tlsID)
- getNextSwitch(string) -> double
.
- getPhase(self, tlsID)
- getPhase(string) -> integer
.
- getPhaseDuration(self, tlsID)
- getPhaseDuration(string) -> double
.
- getProgram(self, tlsID)
- getProgram(string) -> string
Returns the id of the current program.
- getRedYellowGreenState(self, tlsID)
- getRedYellowGreenState(string) -> string
Returns the named tl's state as a tuple of light definitions from
rugGyYoO, for red, yed-yellow, green, yellow, off, where lower case letters mean that the stream
has to decelerate.
- setCompleteRedYellowGreenDefinition(self, tlsID, tls)
- setCompleteRedYellowGreenDefinition(string, ) -> None
.
- setLinkState(self, tlsID, tlsLinkIndex, state)
- setLinkState(string, string, int, string) -> None
Sets the state for the given tls and link index. The state must be one
of rRgGyYoOu for red, red-yellow, green, yellow, off, where lower case letters mean that the stream has
to decelerate.
The link index is shown the gui when setting the appropriate junctino
visualization optin.
- setPhase(self, tlsID, index)
- setPhase(string, integer) -> None
.
- setPhaseDuration(self, tlsID, phaseDuration)
- setPhaseDuration(string, double) -> None
Set the phase duration of the current phase in seconds.
- setProgram(self, tlsID, programID)
- setProgram(string, string) -> None
Sets the id of the current program.
- setRedYellowGreenState(self, tlsID, state)
- setRedYellowGreenState(string, string) -> None
Sets the named tl's state as a tuple of light definitions from
rugGyYuoO, for red, red-yellow, green, yellow, off, where lower case letters mean that the stream has
to decelerate.
Data and other attributes defined here:
- Logic = <class traci._trafficlight.Logic>
- Phase = <class traci._trafficlight.Phase>
Methods inherited from traci.domain.Domain:
- getAllContextSubscriptionResults(self)
- getAllSubscriptionResults(self)
- getAllSubscriptionResults() -> dict(string: dict(integer: <value_type>))
Returns the subscription results for the last time step and all objects of the domain.
It is not possible to retrieve older subscription results than the ones
from the last time step.
- getContextSubscriptionResults(self, objectID)
- 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)
- getSubscriptionResults(string) -> dict(integer: <value_type>)
Returns the subscription results for the last time step and the given object.
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=-1073741824.0, end=-1073741824.0)
- 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=-1073741824.0, end=-1073741824.0)
- subscribeContext(string, int, double, list(integer), double, double) -> None
Subscribe to objects of the given domain (specified as domain=traci.constants.CMD_GET_<DOMAIN>_VARIABLE),
which are closer than dist to the object specified by objectID.
- unsubscribe(self, objectID)
- unsubscribe(string) -> None
Unsubscribe from receiving object values.
- unsubscribeContext(self, objectID, domain, dist)
| |