Package de.tudresden.sumo.cmd
Class Simulation
java.lang.Object
de.tudresden.sumo.cmd.Simulation
The Class Simulation.
- Author:
- Mario Krumnow, Evamarie Wiessner
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SumoCommand
clearPending
(String routeID) Clear pending.static SumoCommand
convert2D.static SumoCommand
convert3D.static SumoCommand
convertGeo
(double x, double y, boolean fromGeo) convertGeo.static SumoCommand
convertRoad
(double x, double y, boolean isGeo, String vClass) convertRoad.static SumoCommand
findIntermodalRoute
(String fromEdge, String toEdge, String modes, double depart, int routingMode, double speed, double walkingFactor, double departPos, double arrivalPos, double departPosLat, String pType, String vType, String destStop) findIntermodalRoute.static SumoCommand
findRoute.static SumoCommand
Returns a list of IDs of vehicles which arrived in this time step.static SumoCommand
Returns the number of vehicles which arrived in this time step.static SumoCommand
Returns the current waiting time on bus stops(in ms).static SumoCommand
getCollidingVehiclesNumber().static SumoCommand
getCollidingVehiclesNumber().static SumoCommand
getCurrentTime.static SumoCommand
getDeltaT.static SumoCommand
Returns a list of IDs of vehicles which departed in this time step.static SumoCommand
Returns the number of vehicles which departed in this time step.static SumoCommand
getDistance2D
(double x1, double y1, double x2, double y2, boolean isGeo, boolean isDriving) static SumoCommand
getDistanceRoad
(String edgeID1, double pos1, String edgeID2, double pos2, boolean isDriving) static SumoCommand
getEmergencyStoppingVehiclesIDList().static SumoCommand
getEmergencyStoppingVehiclesNumber().static SumoCommand
Returns a list of IDs of vehicles which ended to be teleported in this time step.static SumoCommand
Returns the number of vehicles which ended to be teleported in this time step.static SumoCommand
Returns a list of IDs of vehicles which were loaded in this time step.static SumoCommand
Return the number of vehicles which were loaded in this time step.static SumoCommand
Returns the number of vehicles which are in the net plus the ones still waiting to start.static SumoCommand
Returns the boundary box of the simulation network.static SumoCommand
getParkingEndingVehiclesIDList().static SumoCommand
getParkingEndingVehiclesNumber().static SumoCommand
getParkingStartingVehiclesIDList().static SumoCommand
getParkingStartingVehiclesNumber().static SumoCommand
Returns a list of IDs of vehicles which started to teleport in this time step.static SumoCommand
Returns the number of vehicles which started to teleport in this time step.static SumoCommand
getStopEndingVehiclesIDList().static SumoCommand
getStopEndingVehiclesNumber().static SumoCommand
getStopStartingVehiclesIDList().static SumoCommand
getStopStartingVehiclesIDList().static SumoCommand
getTime()
getTime.static SumoCommand
save state.
-
Constructor Details
-
Simulation
public Simulation()
-
-
Method Details
-
convert2D
convert2D.- Parameters:
edgeID
- edge idpos
- poslaneIndex
- indextoGeo
- geo- Returns:
- SumoCommand
-
convert3D
convert3D.- Parameters:
edgeID
- edge idpos
- poslaneIndex
- indextoGeo
- geo- Returns:
- SumoCommand
-
convertGeo
convertGeo.- Parameters:
x
- xy
- yfromGeo
- geo- Returns:
- SumoCommand
-
convertRoad
convertRoad.- Parameters:
x
- xy
- yisGeo
- geovClass
- the v class- Returns:
- SumoCommand
-
getArrivedIDList
Returns a list of IDs of vehicles which arrived in this time step.- Returns:
- list of vehicles
-
getArrivedNumber
Returns the number of vehicles which arrived in this time step.- Returns:
- number of vehicles
-
getBusStopWaiting
Returns the current waiting time on bus stops(in ms).- Returns:
- waiting time
-
getParkingEndingVehiclesIDList
getParkingEndingVehiclesIDList().- Returns:
- number of vehicles
-
getParkingEndingVehiclesNumber
getParkingEndingVehiclesNumber().- Returns:
- number of vehicles
-
getParkingStartingVehiclesIDList
getParkingStartingVehiclesIDList().- Returns:
- number of vehicles
-
getParkingStartingVehiclesNumber
getParkingStartingVehiclesNumber().- Returns:
- number of vehicles
-
getStopEndingVehiclesIDList
getStopEndingVehiclesIDList().- Returns:
- number of vehicles
-
getCollidingVehiclesNumber
getCollidingVehiclesNumber().- Returns:
- Return number of vehicles involved in a collision (typically 2 per collision).
-
getCollidingVehiclesIDList
getCollidingVehiclesNumber().- Returns:
- Return Ids of vehicles involved in a collision (typically 2 per collision)
-
getEmergencyStoppingVehiclesNumber
getEmergencyStoppingVehiclesNumber().- Returns:
- Return number of vehicles that performed an emergency stop in the last step
-
getEmergencyStoppingVehiclesIDList
getEmergencyStoppingVehiclesIDList().- Returns:
- Return Ids of vehicles that peformed an emergency stop in the last step
-
getStopEndingVehiclesNumber
getStopEndingVehiclesNumber().- Returns:
- number of vehicles
-
getStopStartingVehiclesIDList
getStopStartingVehiclesIDList().- Returns:
- list of vehicles
-
getStopStartingVehiclesNumber
getStopStartingVehiclesIDList().- Returns:
- list of vehicles
-
getCurrentTime
getCurrentTime.- Returns:
- current time in ms (integer). Note: this method only supports a simulation time up to 24 days and is only kept for legacy reasons
-
getTime
getTime.- Returns:
- current time in s (double)
-
getDeltaT
getDeltaT.- Returns:
- delat time
-
getDepartedIDList
Returns a list of IDs of vehicles which departed in this time step.- Returns:
- list of IDs of vehicles which departed in this time step.
-
getDepartedNumber
Returns the number of vehicles which departed in this time step.- Returns:
- the number of vehicles which departed in this time step.
-
getDistance2D
public static SumoCommand getDistance2D(double x1, double y1, double x2, double y2, boolean isGeo, boolean isDriving) - Parameters:
x1
- x1y1
- y1x2
- x2y2
- y2isGeo
- is geoisDriving
- is driving- Returns:
- distance
-
getDistanceRoad
public static SumoCommand getDistanceRoad(String edgeID1, double pos1, String edgeID2, double pos2, boolean isDriving) - Parameters:
edgeID1
- first edgepos1
- first positionedgeID2
- second edgepos2
- second positionisDriving
- is drinving- Returns:
- the distance in [m]
-
getEndingTeleportIDList
Returns a list of IDs of vehicles which ended to be teleported in this time step.- Returns:
- SumoCommand
-
getEndingTeleportNumber
Returns the number of vehicles which ended to be teleported in this time step.- Returns:
- SumoCommand
-
getLoadedIDList
Returns a list of IDs of vehicles which were loaded in this time step.- Returns:
- SumoCommand
-
getLoadedNumber
Return the number of vehicles which were loaded in this time step. * @return SumoCommand- Returns:
- SumoCommand
-
getMinExpectedNumber
Returns the number of vehicles which are in the net plus the ones still waiting to start.- Returns:
- SumoCommand
-
getNetBoundary
Returns the boundary box of the simulation network.- Returns:
- SumoCommand
-
getStartingTeleportIDList
Returns a list of IDs of vehicles which started to teleport in this time step.- Returns:
- SumoCommand
-
getStartingTeleportNumber
Returns the number of vehicles which started to teleport in this time step.- Returns:
- SumoCommand
-
clearPending
Clear pending.- Parameters:
routeID
- route id- Returns:
- SumoCommand
-
saveState
save state.- Parameters:
filename
- the filename- Returns:
- SumoCommand
-
findRoute
public static SumoCommand findRoute(String fromEdge, String toEdge, String vType, double depart, int routingMode) findRoute.- Parameters:
fromEdge
- first edgetoEdge
- second edgevType
- vehicle typedepart
- departroutingMode
- routing mode- Returns:
- the route
-
findIntermodalRoute
public static SumoCommand findIntermodalRoute(String fromEdge, String toEdge, String modes, double depart, int routingMode, double speed, double walkingFactor, double departPos, double arrivalPos, double departPosLat, String pType, String vType, String destStop) findIntermodalRoute.- Parameters:
fromEdge
- first edgetoEdge
- second edgemodes
- modesdepart
- departroutingMode
- routing modespeed
- speedwalkingFactor
- walkingFactordepartPos
- departPosarrivalPos
- arrivalPosdepartPosLat
- departPosLatpType
- pTypevType
- vTypedestStop
- destStop- Returns:
- the route
-