| |
Methods defined here:
- __init__(self)
- getAllowed(self, laneID)
- getAllowed(string) -> list(string)
Returns a list of allowed vehicle classes. An empty list means all vehicles are allowed.
- getCO2Emission(self, laneID)
- getCO2Emission(string) -> double
Returns the CO2 emission in mg for the last time step on the given lane.
- getCOEmission(self, laneID)
- getCOEmission(string) -> double
Returns the CO emission in mg for the last time step on the given lane.
- getDisallowed(self, laneID)
- getDisallowed(string) -> list(string)
Returns a list of disallowed vehicle classes.
- getEdgeID(self, laneID)
- getEdgeID(string) -> string
Returns the id of the edge the lane belongs to.
- getElectricityConsumption(self, laneID)
- getElectricityConsumption(string) -> double
Returns the electricity consumption in ml for the last time step.
- getFoes(self, laneID, toLaneID)
- getFoes(string, string) -> list(string)
Returns the ids of incoming lanes that have right of way over the connection from laneID to toLaneID
- getFuelConsumption(self, laneID)
- getFuelConsumption(string) -> double
Returns the fuel consumption in ml for the last time step on the given lane.
- getHCEmission(self, laneID)
- getHCEmission(string) -> double
Returns the HC emission in mg for the last time step on the given lane.
- getInternalFoes(self, laneID)
- getFoes(string) -> list(string)
Returns the ids of internal lanes that are in conflict with the given internal lane id
- getLastStepHaltingNumber(self, 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(self, laneID)
- getLastStepLength(string) -> double
Returns the mean vehicle length in m for the last time step on the given lane.
- getLastStepMeanSpeed(self, laneID)
- getLastStepMeanSpeed(string) -> double
Returns the average speed in m/s for the last time step on the given lane.
- getLastStepOccupancy(self, laneID)
- getLastStepOccupancy(string) -> double
Returns the occupancy in % for the last time step on the given lane.
- getLastStepVehicleIDs(self, laneID)
- getLastStepVehicleIDs(string) -> list(string)
Returns the ids of the vehicles for the last time step on the given lane.
- getLastStepVehicleNumber(self, laneID)
- getLastStepVehicleNumber(string) -> integer
Returns the total number of vehicles for the last time step on the given lane.
- getLength(self, laneID)
- getLength(string) -> double
Returns the length in m.
- getLinkNumber(self, laneID)
- getLinkNumber(string) -> integer
Returns the number of connections to successive lanes.
- getLinks(self, laneID, extended=True)
- getLinks(string) -> list((string, bool, bool, bool))
A list containing id of successor lane together with priority, open and foe
for each link.
if extended=True, each result tuple contains
(string approachedLane, bool hasPrio, bool isOpen, bool hasFoe,
string approachedInternal, string state, string direction, float length)
- getMaxSpeed(self, laneID)
- getMaxSpeed(string) -> double
Returns the maximum allowed speed on the lane in m/s.
- getNOxEmission(self, laneID)
- getNOxEmission(string) -> double
Returns the NOx emission in mg for the last time step on the given lane.
- getNoiseEmission(self, laneID)
- getNoiseEmission(string) -> double
Returns the noise emission in db for the last time step on the given lane.
- getPMxEmission(self, laneID)
- getPMxEmission(string) -> double
Returns the particular matter emission in mg for the last time step on the given lane.
- getShape(self, laneID)
- getShape(string) -> list((double, double))
List of 2D positions (cartesian) describing the geometry.
- getTraveltime(self, laneID)
- getTraveltime(string) -> double
Returns the estimated travel time in s for the last time step on the given lane.
- getWaitingTime(self, laneID)
- getWaitingTime() -> double
.
- getWidth(self, laneID)
- getWidth(string) -> double
Returns the width of the lane in m.
- setAllowed(self, laneID, allowedClasses)
- setAllowed(string, list) -> None
Sets a list of allowed vehicle classes. Setting an empty list means all vehicles are allowed.
- setDisallowed(self, laneID, disallowedClasses)
- setDisallowed(string, list) -> None
Sets a list of disallowed vehicle classes.
- setLength(self, laneID, length)
- setLength(string, double) -> None
Sets the length of the lane in m.
- setMaxSpeed(self, laneID, speed)
- setMaxSpeed(string, double) -> None
Sets a new maximum allowed speed on the lane in m/s.
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
- getParameterWithKey(self, objID, param)
- getParameterWithKey(string, string) -> (string, string)
Returns the (key, value) tuple 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) -> None
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.
- subscribeParameterWithKey(self, objID, key, begin=-1073741824.0, end=-1073741824.0)
- subscribeParameterWithKey(string, string) -> None
Subscribe for a generic parameter with the given key.
- unsubscribe(self, objectID)
- unsubscribe(string) -> None
Unsubscribe from receiving object values.
- unsubscribeContext(self, objectID, domain, dist)
|