traci.trafficlights
index
/build/buildd/sumo-0.15.0~dfsg/tools/traci/trafficlights.py

@file    trafficlights.py
@author  Michael Behrisch
@date    2011-03-16
@version $Id: trafficlights.py 11453 2011-11-02 09:40:25Z behrisch $
 
Python implementation of the TraCI interface.
 
SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
Copyright (C) 2011 DLR (http://www.dlr.de/) and contributors
All rights reserved

 
Modules
       
struct
traci.constants
traci

 
Classes
       
Logic
Phase

 
class Logic
     Methods defined here:
__init__(self, subID, type, subParameter, currentPhaseIndex, phases)
__repr__(self)

 
class Phase
     Methods defined here:
__init__(self, duration, duration1, duration2, phaseDef)
__repr__(self)

 
Functions
       
getCompleteRedYellowGreenDefinition(tlsID)
getCompleteRedYellowGreenDefinition(string) -> 
 
.
getControlledLanes(tlsID)
getControlledLanes(string) -> c
 
.
getControlledLinks(tlsID)
getControlledLinks(string) -> list(list(list(string)))
 
.
getIDList()
getIDList() -> list(string)
 
Returns a list of all traffic lights in the network.
getNextSwitch(tlsID)
getNextSwitch(string) -> integer
 
.
getPhase(tlsID)
getPhase(string) -> integer
 
.
getProgram(tlsID)
getProgram(string) -> string
 
.
getRedYellowGreenState(tlsID)
getRedYellowGreenState(string) -> string
 
.
getSubscriptionResults(tlsID=None)
getSubscriptionResults(string) -> dict(integer: <value_type>)
 
Returns the subscription results for the last time step and the given traffic light.
If no traffic light id is given, all subscription results are returned in a dict.
If the traffic light 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.
setCompleteRedYellowGreenDefinition(tlsID, tls)
setPhase(tlsID, index)
setPhaseDuration(tlsID, phaseDuration)
setProgram(tlsID, programID)
setRedYellowGreenState(tlsID, state)
subscribe(tlsID, varIDs=(40,), begin=0, end=2147483647L)
subscribe(string, list(integer), double, double) -> None
 
Subscribe to one or more traffic light values for the given interval.
A call to this method clears all previous subscription results.

 
Data
        subscriptionResults = {}