traci.lane
index
/home/gladk/tmp/05/sumo-0.17.1~dfsg/tools/traci/lane.py

@file    lane.py
@author  Michael Behrisch
@author  Daniel Krajzewicz
@date    2011-03-17
@version $Id: lane.py 13857 2013-05-02 19:55:59Z 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

 
Functions
       
getAllowed(laneID)
getAllowed(string) -> list(string)
 
Returns a list of allowed vehicle classes. An empty list means all vehicles are allowed.
getCO2Emission(laneID)
getCO2Emission(string) -> double
 
Returns the CO2 emission in mg for the last time step on the given lane.
getCOEmission(laneID)
getCOEmission(string) -> double
 
Returns the CO emission in mg for the last time step on the given lane.
getContextSubscriptionResults(laneID=None)
getDisallowed(laneID)
getDisallowed(string) -> list(string)
 
Returns a list of disallowed vehicle classes.
getEdgeID(laneID)
getEdgeID(string) -> string
 
Returns the id of the edge the lane belongs to.
getFuelConsumption(laneID)
getFuelConsumption(string) -> double
 
Returns the fuel consumption in ml for the last time step on the given lane.
getHCEmission(laneID)
getHCEmission(string) -> double
 
Returns the HC emission in mg for the last time step on the given lane.
getIDList()
getIDList() -> list(string)
 
Returns a list of all lanes in the network.
getLastStepHaltingNumber(laneID)
getLastStepHaltingNumber(string) -> integer
 
Returns the total number of halting vehicles for the last time step on the given lane.
A speed of less than 0.1 m/s is considered a halt.
getLastStepLength(laneID)
getLastStepLength(string) -> double
 
Returns the total vehicle length in m for the last time step on the given lane.
getLastStepMeanSpeed(laneID)
getLastStepMeanSpeed(string) -> double
 
Returns the average speed in m/s for the last time step on the given lane.
getLastStepOccupancy(laneID)
getLastStepOccupancy(string) -> double
 
Returns the occupancy in % for the last time step on the given lane.
getLastStepVehicleIDs(laneID)
getLastStepVehicleIDs(string) -> list(string)
 
Returns the ids of the vehicles for the last time step on the given lane.
getLastStepVehicleNumber(laneID)
getLastStepVehicleNumber(string) -> integer
 
Returns the total number of vehicles for the last time step on the given lane.
getLength(laneID)
getLength(string) -> double
 
Returns the length in m.
getLinkNumber(laneID)
getLinkNumber(string) -> integer
 
Returns the number of connections to successive lanes.
getLinks(laneID)
getLinks(string) -> list((string, bool, bool, bool))
 
A list containing ids of successor lanes together with priority, open and foe.
getMaxSpeed(laneID)
getMaxSpeed(string) -> double
 
Returns the maximum allowed speed on the lane in m/s.
getNOxEmission(laneID)
getNOxEmission(string) -> double
 
Returns the NOx emission in mg for the last time step on the given lane.
getNoiseEmission(laneID)
getNoiseEmission(string) -> double
 
Returns the noise emission in db for the last time step on the given lane.
getPMxEmission(laneID)
getPMxEmission(string) -> double
 
Returns the particular matter emission in mg for the last time step on the given lane.
getShape(laneID)
getShape(string) -> list((double, double))
 
List of 2D positions (cartesian) describing the geometry.
getSubscriptionResults(laneID=None)
getSubscriptionResults(string) -> dict(integer: <value_type>)
 
Returns the subscription results for the last time step and the given lane.
If no lane id is given, all subscription results are returned in a dict.
If the lane 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.
getTraveltime(laneID)
getTraveltime(string) -> double
 
Returns the estimated travel time in s for the last time step on the given lane.
getWidth(laneID)
getWidth(string) -> double
 
Returns the width of the lane in m.
setAllowed(laneID, allowedClasses)
setDisallowed(laneID, disallowedClasses)
setLength(laneID, length)
setMaxSpeed(laneID, speed)
subscribe(laneID, varIDs=(16,), begin=0, end=2147483647L)
subscribe(string, list(integer), double, double) -> None
 
Subscribe to one or more lane values for the given interval.
A call to this method clears all previous subscription results.
subscribeContext(laneID, domain, dist, varIDs=(16,), begin=0, end=2147483647L)

 
Data
        subscriptionResults = <traci.SubscriptionResults instance>