| |
- __builtin__.object
-
- Stage
- 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, vClass='ignoring')
- findIntermodalRoute(self, fromEdge, toEdge, modes='', depart=-1.0, routingMode=0, speed=-1.0, walkFactor=-1.0, departPos=0.0, arrivalPos=-1073741824.0, departPosLat=0.0, pType='', vType='', destStop='')
- findRoute(self, fromEdge, toEdge, vType='', depart=-1.0, routingMode=0)
- 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.
- getBusStopIDList(self)
- getBusStopWaiting(self, stopID)
- getBusStopWaiting() -> integer
Get the total number of waiting persons at the named bus stop.
- getBusStopWaitingIDList(self, stopID)
- getBusStopWaiting() -> list(string)
Get the IDs of waiting persons at the named bus stop.
- getCollidingVehiclesIDList(self)
- getCollidingVehiclesIDList() -> list(string)
Return Ids of vehicles involved in a collision (typically 2 per
collision).
- getCollidingVehiclesNumber(self)
- getCollidingVehiclesNumber() -> integer
Return number of vehicles involved in a collision (typically 2 per
collision).
- getCurrentTime(self)
- getCurrentTime() -> integer
Returns the current simulation time in ms.
- getDeltaT(self)
- getDeltaT() -> double
Returns the length of one simulation step in seconds
- 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.
- getEmergencyStoppingVehiclesIDList(self)
- getEmergencyStoppingVehiclesIDList() -> list(string)
Return Ids of vehicles that peformed an emergency stop in the last step
- getEmergencyStoppingVehiclesNumber(self)
- getEmergencyStoppingVehiclesNumber() -> integer
Return number of vehicles that performed an emergency stop in the last step
- 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.
- getTime(self)
- getTime() -> double
Returns the current simulation time in s.
- loadState(self, fileName)
- saveState(self, fileName)
- step(self, time=0.0)
- step(double) -> None
Make a simulation step and simulate up to the given sim time (in seconds).
If the given value is 0 or absent, exactly one step is performed.
Values smaller than or equal to the current sim time result in no action.
- 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.
- writeMessage(self, msg)
Static methods defined here:
- walkingStage(edges, arrivalPos, destStop='', description='')
Data and other attributes defined here:
- Stage = <class 'traci._simulation.Stage'>
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
- setParameter(self, objID, param, value)
- setParameter(string, string, string) -> None
Sets the value of the given parameter to value for the given objID
- 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)
|
class Stage(__builtin__.object) |
| |
Methods defined here:
- __attr_repr__(self, attrname, default='')
- __init__(self, type=-1073741824, vType='', line='', destStop='', edges=[], travelTime=-1073741824.0, cost=-1073741824.0, length=-1073741824.0, intended='', depart=-1073741824.0, departPos=-1073741824.0, arrivalPos=-1073741824.0, description='')
- __repr__(self)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |