Class Simulation

java.lang.Object
de.tudresden.sumo.cmd.Simulation

public class Simulation extends Object
The Class Simulation.
Author:
Mario Krumnow, Evamarie Wiessner
  • Constructor Details Link icon

    • Simulation Link icon

      public Simulation()
  • Method Details Link icon

    • convert2D Link icon

      public static SumoCommand convert2D(String edgeID, double pos, byte laneIndex, String toGeo)
      convert2D.
      Parameters:
      edgeID - edge id
      pos - pos
      laneIndex - index
      toGeo - geo
      Returns:
      SumoCommand
    • convert3D Link icon

      public static SumoCommand convert3D(String edgeID, double pos, byte laneIndex, String toGeo)
      convert3D.
      Parameters:
      edgeID - edge id
      pos - pos
      laneIndex - index
      toGeo - geo
      Returns:
      SumoCommand
    • convertGeo Link icon

      public static SumoCommand convertGeo(double x, double y, boolean fromGeo)
      convertGeo.
      Parameters:
      x - x
      y - y
      fromGeo - geo
      Returns:
      SumoCommand
    • convertRoad Link icon

      public static SumoCommand convertRoad(double x, double y, boolean isGeo, String vClass)
      convertRoad.
      Parameters:
      x - x
      y - y
      isGeo - geo
      vClass - the v class
      Returns:
      SumoCommand
    • getArrivedIDList Link icon

      public static SumoCommand getArrivedIDList()
      Returns a list of IDs of vehicles which arrived in this time step.
      Returns:
      list of vehicles
    • getArrivedNumber Link icon

      public static SumoCommand getArrivedNumber()
      Returns the number of vehicles which arrived in this time step.
      Returns:
      number of vehicles
    • getBusStopWaiting Link icon

      public static SumoCommand getBusStopWaiting()
      Returns the current waiting time on bus stops(in ms).
      Returns:
      waiting time
    • getParkingEndingVehiclesIDList Link icon

      public static SumoCommand getParkingEndingVehiclesIDList()
      getParkingEndingVehiclesIDList().
      Returns:
      number of vehicles
    • getParkingEndingVehiclesNumber Link icon

      public static SumoCommand getParkingEndingVehiclesNumber()
      getParkingEndingVehiclesNumber().
      Returns:
      number of vehicles
    • getParkingStartingVehiclesIDList Link icon

      public static SumoCommand getParkingStartingVehiclesIDList()
      getParkingStartingVehiclesIDList().
      Returns:
      number of vehicles
    • getParkingStartingVehiclesNumber Link icon

      public static SumoCommand getParkingStartingVehiclesNumber()
      getParkingStartingVehiclesNumber().
      Returns:
      number of vehicles
    • getStopEndingVehiclesIDList Link icon

      public static SumoCommand getStopEndingVehiclesIDList()
      getStopEndingVehiclesIDList().
      Returns:
      number of vehicles
    • getCollidingVehiclesNumber Link icon

      public static SumoCommand getCollidingVehiclesNumber()
      getCollidingVehiclesNumber().
      Returns:
      Return number of vehicles involved in a collision (typically 2 per collision).
    • getCollidingVehiclesIDList Link icon

      public static SumoCommand getCollidingVehiclesIDList()
      getCollidingVehiclesNumber().
      Returns:
      Return Ids of vehicles involved in a collision (typically 2 per collision)
    • getEmergencyStoppingVehiclesNumber Link icon

      public static SumoCommand getEmergencyStoppingVehiclesNumber()
      getEmergencyStoppingVehiclesNumber().
      Returns:
      Return number of vehicles that performed an emergency stop in the last step
    • getEmergencyStoppingVehiclesIDList Link icon

      public static SumoCommand getEmergencyStoppingVehiclesIDList()
      getEmergencyStoppingVehiclesIDList().
      Returns:
      Return Ids of vehicles that peformed an emergency stop in the last step
    • getStopEndingVehiclesNumber Link icon

      public static SumoCommand getStopEndingVehiclesNumber()
      getStopEndingVehiclesNumber().
      Returns:
      number of vehicles
    • getStopStartingVehiclesIDList Link icon

      public static SumoCommand getStopStartingVehiclesIDList()
      getStopStartingVehiclesIDList().
      Returns:
      list of vehicles
    • getStopStartingVehiclesNumber Link icon

      public static SumoCommand getStopStartingVehiclesNumber()
      getStopStartingVehiclesIDList().
      Returns:
      list of vehicles
    • getCurrentTime Link icon

      public static SumoCommand 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 Link icon

      public static SumoCommand getTime()
      getTime.
      Returns:
      current time in s (double)
    • getDeltaT Link icon

      public static SumoCommand getDeltaT()
      getDeltaT.
      Returns:
      delat time
    • getDepartedIDList Link icon

      public static SumoCommand 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 Link icon

      public static SumoCommand getDepartedNumber()
      Returns the number of vehicles which departed in this time step.
      Returns:
      the number of vehicles which departed in this time step.
    • getDistance2D Link icon

      public static SumoCommand getDistance2D(double x1, double y1, double x2, double y2, boolean isGeo, boolean isDriving)
      Parameters:
      x1 - x1
      y1 - y1
      x2 - x2
      y2 - y2
      isGeo - is geo
      isDriving - is driving
      Returns:
      distance
    • getDistanceRoad Link icon

      public static SumoCommand getDistanceRoad(String edgeID1, double pos1, String edgeID2, double pos2, boolean isDriving)
      Parameters:
      edgeID1 - first edge
      pos1 - first position
      edgeID2 - second edge
      pos2 - second position
      isDriving - is drinving
      Returns:
      the distance in [m]
    • getEndingTeleportIDList Link icon

      public static SumoCommand getEndingTeleportIDList()
      Returns a list of IDs of vehicles which ended to be teleported in this time step.
      Returns:
      SumoCommand
    • getEndingTeleportNumber Link icon

      public static SumoCommand getEndingTeleportNumber()
      Returns the number of vehicles which ended to be teleported in this time step.
      Returns:
      SumoCommand
    • getLoadedIDList Link icon

      public static SumoCommand getLoadedIDList()
      Returns a list of IDs of vehicles which were loaded in this time step.
      Returns:
      SumoCommand
    • getLoadedNumber Link icon

      public static SumoCommand getLoadedNumber()
      Return the number of vehicles which were loaded in this time step. * @return SumoCommand
      Returns:
      SumoCommand
    • getMinExpectedNumber Link icon

      public static SumoCommand getMinExpectedNumber()
      Returns the number of vehicles which are in the net plus the ones still waiting to start.
      Returns:
      SumoCommand
    • getNetBoundary Link icon

      public static SumoCommand getNetBoundary()
      Returns the boundary box of the simulation network.
      Returns:
      SumoCommand
    • getStartingTeleportIDList Link icon

      public static SumoCommand getStartingTeleportIDList()
      Returns a list of IDs of vehicles which started to teleport in this time step.
      Returns:
      SumoCommand
    • getStartingTeleportNumber Link icon

      public static SumoCommand getStartingTeleportNumber()
      Returns the number of vehicles which started to teleport in this time step.
      Returns:
      SumoCommand
    • clearPending Link icon

      public static SumoCommand clearPending(String routeID)
      Clear pending.
      Parameters:
      routeID - route id
      Returns:
      SumoCommand
    • saveState Link icon

      public static SumoCommand saveState(String filename)
      save state.
      Parameters:
      filename - the filename
      Returns:
      SumoCommand
    • findRoute Link icon

      public static SumoCommand findRoute(String fromEdge, String toEdge, String vType, double depart, int routingMode)
      findRoute.
      Parameters:
      fromEdge - first edge
      toEdge - second edge
      vType - vehicle type
      depart - depart
      routingMode - routing mode
      Returns:
      the route
    • findIntermodalRoute Link icon

      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 edge
      toEdge - second edge
      modes - modes
      depart - depart
      routingMode - routing mode
      speed - speed
      walkingFactor - walkingFactor
      departPos - departPos
      arrivalPos - arrivalPos
      departPosLat - departPosLat
      pType - pType
      vType - vType
      destStop - destStop
      Returns:
      the route