traci._simulation
index
/build/sumo-90fV4g/sumo-0.30.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 23179 2017-03-02 08:32:15Z behrisch $
 
Python implementation of the TraCI interface.
 
SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
Copyright (C) 2011-2016 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

 
Classes
       
traci.domain.Domain
SimulationDomain

 
class SimulationDomain(traci.domain.Domain)
     Methods defined here:
__init__(self)
clearPending(self, routeID='')
convert2D(self, edgeID, pos, laneIndex=0, toGeo=False)
convert3D(self, edgeID, pos, laneIndex=0, toGeo=False)
convertGeo(self, x, y, fromGeo=False)
convertRoad(self, x, y, isGeo=False)
getArrivedIDList(self)
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(self)
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(self)
getBusStopWaiting() -> integer
Get the total number of waiting persons at the named bus stop.
getCurrentTime(self)
getCurrentTime() -> integer
 
Returns the current simulation time in ms.
getDeltaT(self)
getDeltaT() -> integer
Returns the length of one simulation step in milliseconds
getDepartedIDList(self)
getDepartedIDList() -> list(string)
 
Returns a list of ids of vehicles which departed (were inserted into the road network) in this time step.
getDepartedNumber(self)
getDepartedNumber() -> integer
 
Returns the number of vehicles which departed (were inserted into the road network) in this time step.
getDistance2D(self, x1, y1, x2, y2, isGeo=False, isDriving=False)
getDistance2D(double, double, double, double, boolean, boolean) -> double
 
Returns the distance between the two coordinate pairs (x1,y1) and (x2,y2)
 
If isGeo=True, coordinates are interpreted as longitude and latitude rather
than cartesian coordinates in meters.
 
If isDriving=True, the coordinates are mapped onto the road network and the
length of the shortest route in the network is returned. Otherwise, the
straight-line distance is returned.
getDistanceRoad(self, 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(self)
getEndingTeleportIDList() -> list(string)
 
Returns a list of ids of vehicles which ended to be teleported in this time step.
getEndingTeleportNumber(self)
getEndingTeleportNumber() -> integer
 
Returns the number of vehicles which ended to be teleported in this time step.
getLoadedIDList(self)
getLoadedIDList() -> list(string)
 
Returns a list of ids of vehicles which were loaded in this time step.
getLoadedNumber(self)
getLoadedNumber() -> integer
 
Returns the number of vehicles which were loaded in this time step.
getMinExpectedNumber(self)
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(self)
getNetBoundary() -> ((double, double), (double, double))
 
The boundary box of the simulation network.
getParkingEndingVehiclesIDList(self)
getParkingEndingVehiclesIDList() -> list(string)
 
.
getParkingEndingVehiclesNumber(self)
getParkingEndingVehiclesNumber() -> integer
 
.
getParkingStartingVehiclesIDList(self)
getParkingStartingVehiclesIDList() -> list(string)
 
.
getParkingStartingVehiclesNumber(self)
getParkingStartingVehiclesNumber() -> integer
 
.
getStartingTeleportIDList(self)
getStartingTeleportIDList() -> list(string)
 
Returns a list of ids of vehicles which started to teleport in this time step.
getStartingTeleportNumber(self)
getStartingTeleportNumber() -> integer
 
Returns the number of vehicles which started to teleport in this time step.
getStopEndingVehiclesIDList(self)
getStopEndingVehiclesIDList() -> list(string)
 
.
getStopEndingVehiclesNumber(self)
getStopEndingVehiclesNumber() -> integer
 
.
getStopStartingVehiclesIDList(self)
getStopStartingVehiclesIDList() -> list(string)
 
.
getStopStartingVehiclesNumber(self)
getStopStartingVehiclesNumber() -> integer
 
.
getSubscriptionResults(self)
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.
saveState(self, fileName)
subscribe(self, varIDs=(116,), begin=0, end=2147483647)
subscribe(list(integer), double, double) -> None
 
Subscribe to one or more simulation values for the given interval.

Methods inherited from traci.domain.Domain:
getContextSubscriptionResults(self, objectID=None)
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
setParameter(self, objID, param, value)
setParameter(string, string, string) -> string
 
Sets the value of the given parameter to value for the given objID
subscribeContext(self, objectID, domain, dist, varIDs=None, begin=0, end=2147483647)
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.
unsubscribe(self, objectID)
unsubscribe(string) -> None
 
Unsubscribe from receiving object values.
unsubscribeContext(self, objectID, domain, dist)

 
Data
        absolute_import = _Feature((2, 5, 0, 'alpha', 1), (3, 0, 0, 'alpha', 0), 16384)