traci.simulation
index
/build/sumo-O79YsN/sumo-0.25.0+dfsg1/tools/traci/simulation.py

@file    simulation.py
@author  Daniel Krajzewicz
@author  Jakob Erdmann
@author  Michael Behrisch
@date    2011-03-15
@version $Id: simulation.py 18106 2015-03-19 08:08:16Z 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
       
struct
traci.constants
traci

 
Functions
       
clearPending(routeID='')
convert2D(edgeID, pos, laneIndex=0, toGeo=False)
convert3D(edgeID, pos, laneIndex=0, toGeo=False)
convertGeo(x, y, fromGeo=False)
convertRoad(x, y, isGeo=False)
getArrivedIDList()
getArrivedIDList() -> list(string)
 
Returns a list of ids of vehicles which arrived (have reached their destination and are removed from the road network) in this time step.
getArrivedNumber()
getArrivedNumber() -> integer
 
Returns the number of vehicles which arrived (have reached their destination and are removed from the road network) in this time step.
getBusStopWaiting()
getBusStopWaiting() -> integer
 
.
getCurrentTime()
getCurrentTime() -> integer
 
Returns the current simulation time in ms.
getDeltaT()
getDeltaT() -> integer
 
.
getDepartedIDList()
getDepartedIDList() -> list(string)
 
Returns a list of ids of vehicles which departed (were inserted into the road network) in this time step.
getDepartedNumber()
getDepartedNumber() -> integer
 
Returns the number of vehicles which departed (were inserted into the road network) in this time step.
getDistance2D(x1, y1, x2, y2, isGeo=False, isDriving=False)
getDistance2D(double, double, double, double, boolean, boolean) -> double
 
Reads two coordinate pairs and an indicator whether the air or the driving distance shall be computed. Returns the according distance.
getDistanceRoad(edgeID1, pos1, edgeID2, pos2, isDriving=False)
getDistanceRoad(string, double, string, double, boolean) -> double
 
Reads two positions on the road network and an indicator whether the air or the driving distance shall be computed. Returns the according distance.
getEndingTeleportIDList()
getEndingTeleportIDList() -> list(string)
 
Returns a list of ids of vehicles which ended to be teleported in this time step.
getEndingTeleportNumber()
getEndingTeleportNumber() -> integer
 
Returns the number of vehicles which ended to be teleported in this time step.
getLoadedIDList()
getLoadedIDList() -> list(string)
 
Returns a list of ids of vehicles which were loaded in this time step.
getLoadedNumber()
getLoadedNumber() -> integer
 
Returns the number of vehicles which were loaded in this time step.
getMinExpectedNumber()
getMinExpectedNumber() -> integer
 
Returns the number of vehicles which are in the net plus the
ones still waiting to start. This number may be smaller than
the actual number of vehicles still to come because of delayed
route file parsing. If the number is 0 however, it is
guaranteed that all route files have been parsed completely
and all vehicles have left the network.
getNetBoundary()
getNetBoundary() -> ((double, double), (double, double))
 
The boundary box of the simulation network.
getParkingEndingVehiclesIDList()
getParkingEndingVehiclesIDList() -> list(string)
 
.
getParkingEndingVehiclesNumber()
getParkingEndingVehiclesNumber() -> integer
 
.
getParkingStartingVehiclesIDList()
getParkingStartingVehiclesIDList() -> list(string)
 
.
getParkingStartingVehiclesNumber()
getParkingStartingVehiclesNumber() -> integer
 
.
getStartingTeleportIDList()
getStartingTeleportIDList() -> list(string)
 
Returns a list of ids of vehicles which started to teleport in this time step.
getStartingTeleportNumber()
getStartingTeleportNumber() -> integer
 
Returns the number of vehicles which started to teleport in this time step.
getStopEndingVehiclesIDList()
getStopEndingVehiclesIDList() -> list(string)
 
.
getStopEndingVehiclesNumber()
getStopEndingVehiclesNumber() -> integer
 
.
getStopStartingVehiclesIDList()
getStopStartingVehiclesIDList() -> list(string)
 
.
getStopStartingVehiclesNumber()
getStopStartingVehiclesNumber() -> integer
 
.
getSubscriptionResults()
getSubscriptionResults() -> dict(integer: <value_type>)
 
Returns the subscription results for the last time step.
It is not possible to retrieve older subscription results than the ones
from the last time step.
subscribe(varIDs=(116,), begin=0, end=2147483647)
subscribe(list(integer), double, double) -> None
 
Subscribe to one or more simulation values for the given interval.

 
Data
        subscriptionResults = <{}, {}>