traci.inductionloop
index
/build/sumo-3t4YtI/sumo-0.25.0+dfsg1/tools/traci/inductionloop.py

@file    inductionloop.py
@author  Michael Behrisch
@author  Daniel Krajzewicz
@date    2011-03-16
@version $Id: inductionloop.py 18096 2015-03-17 09:50:59Z behrisch $
 
Python implementation of the TraCI interface.
 
SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
Copyright (C) 2011-2015 DLR (http://www.dlr.de/) and contributors
 
This file is part of SUMO.
SUMO is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

 
Modules
       
traci.constants
traci

 
Functions
       
getContextSubscriptionResults(loopID=None)
getIDCount()
getIDCount() -> integer
 
Returns the number of induction loops in the network.
getIDList()
getIDList() -> list(string)
 
Returns a list of all induction loops in the network.
getLaneID(loopID)
getLaneID(string) -> string
 
Returns the id of the lane the loop is on.
getLastStepMeanLength(loopID)
getLastStepMeanLength(string) -> double
 
Returns the mean length in m of vehicles which were on the detector in the last step.
getLastStepMeanSpeed(loopID)
getLastStepMeanSpeed(string) -> double
 
Returns the mean speed in m/s of vehicles that were on the named induction loop within the last simulation step.
getLastStepOccupancy(loopID)
getLastStepOccupancy(string) -> double
 
Returns the percentage of time the detector was occupied by a vehicle.
getLastStepVehicleIDs(loopID)
getLastStepVehicleIDs(string) -> list(string)
 
Returns the list of ids of vehicles that were on the named induction loop in the last simulation step.
getLastStepVehicleNumber(loopID)
getLastStepVehicleNumber(string) -> integer
 
Returns the number of vehicles that were on the named induction loop within the last simulation step.
getPosition(loopID)
getPosition(string) -> double
 
Returns the position measured from the beginning of the lane in meters.
getSubscriptionResults(loopID=None)
getSubscriptionResults(string) -> dict(integer: <value_type>)
 
Returns the subscription results for the last time step and the given loop.
If no loop id is given, all subscription results are returned in a dict.
If the loop 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.
getTimeSinceDetection(loopID)
getTimeSinceDetection(string) -> double
 
Returns the time in s since last detection.
getVehicleData(loopID)
getVehicleData(string) -> [(veh_id, veh_length, entry_time, exit_time, vType), ...]
 
Returns a complex structure containing several information about vehicles which passed the detector.
readVehicleData(result)
subscribe(loopID, varIDs=(16,), begin=0, end=2147483647)
subscribe(string, list(integer), double, double) -> None
 
Subscribe to one or more induction loop values for the given interval.
subscribeContext(loopID, domain, dist, varIDs=(16,), begin=0, end=2147483647)

 
Data
        subscriptionResults = <{}, {}>