traci.edge | index /home/behr_mi/sumo/tools/traci/edge.py

`@file edge.py
@author Michael Behrisch
@date 2011-03-17
@version $Id: edge.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
`` |  | adaptTraveltime(edgeID, time) `adaptTraveltime(string, double) -> None Adapt the travel time value (in s) used for (re-)routing for the given edge.` getAdaptedTraveltime(edgeID, time) `getAdaptedTraveltime(string, double) -> double Returns the travel time value (in s) used for (re-)routing which is valid on the edge at the given time.` getCO2Emission(edgeID) `getCO2Emission(string) -> double Returns the CO2 emission in mg for the last time step on the given edge.` getCOEmission(edgeID) `getCOEmission(string) -> double Returns the CO emission in mg for the last time step on the given edge.` getContextSubscriptionResults(edgeID=None) `getContextSubscriptionResults(string) -> dict(string: dict(integer: <value_type>)) Returns the context subscription results for the last time step and the given edge. If no edge id is given, all subscription results are returned in a dict. If the edge 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.` getEffort(edgeID, time) `getEffort(string, double) -> double Returns the effort value used for (re-)routing which is valid on the edge at the given time.` getFuelConsumption(edgeID) `getFuelConsumption(string) -> double Returns the fuel consumption in ml for the last time step on the given edge.` getHCEmission(edgeID) `getHCEmission(string) -> double Returns the HC emission in mg for the last time step on the given edge.` getIDCount() `getIDCount() -> integer Returns the number of edges in the network.` getIDList() `getIDList() -> list(string) Returns a list of all edges in the network.` getLastStepHaltingNumber(edgeID) `getLastStepHaltingNumber(string) -> integer Returns the total number of halting vehicles for the last time step on the given edge. A speed of less than 0.1 m/s is considered a halt.` getLastStepLength(edgeID) `getLastStepLength(string) -> double Returns the total vehicle length in m for the last time step on the given edge.` getLastStepMeanSpeed(edgeID) `getLastStepMeanSpeed(string) -> double Returns the average speed in m/s for the last time step on the given edge.` getLastStepOccupancy(edgeID) `getLastStepOccupancy(string) -> double Returns the occupancy in % for the last time step on the given edge.` getLastStepVehicleIDs(edgeID) `getLastStepVehicleIDs(string) -> list(string) Returns the ids of the vehicles for the last time step on the given edge.` getLastStepVehicleNumber(edgeID) `getLastStepVehicleNumber(string) -> integer Returns the total number of vehicles for the last time step on the given edge.` getNOxEmission(edgeID) `getNOxEmission(string) -> double Returns the NOx emission in mg for the last time step on the given edge.` getNoiseEmission(edgeID) `getNoiseEmission(string) -> double Returns the noise emission in db for the last time step on the given edge.` getPMxEmission(edgeID) `getPMxEmission(string) -> double Returns the particular matter emission in mg for the last time step on the given edge.` getSubscriptionResults(edgeID=None) `getSubscriptionResults(string) -> dict(integer: <value_type>) Returns the subscription results for the last time step and the given edge. If no edge id is given, all subscription results are returned in a dict. If the edge 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(edgeID) `getTraveltime(string) -> double Returns the estimated travel time in s for the last time step on the given edge.` setEffort(edgeID, effort) `setEffort(string, double) -> None Adapt the effort value used for (re-)routing for the given edge.` setMaxSpeed(edgeID, speed) `setMaxSpeed(string, double) -> None Set a new maximum speed (in m/s) for all lanes of the edge..` subscribe(edgeID, varIDs=(16,), begin=0, end=2147483647) `subscribe(string, list(integer), double, double) -> None Subscribe to one or more edge values for the given interval. A call to this method clears all previous subscription results.` subscribeContext(edgeID, domain, dist, varIDs=(16,), begin=0, end=2147483647)

Data
`` |  | subscriptionResults = <traci.SubscriptionResults instance>