Class Lane

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

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

    • Lane

      public Lane()
  • Method Details

    • getAllowed

      public static SumoCommand getAllowed(String laneID)
      Returns a list of allowed vehicle classes.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      list of allowed vehicle classes. An empty list means all vehicles are allowed.
    • getIDCount

      public static SumoCommand getIDCount()
      Returns the number of all lanes in the network.
      Returns:
      the number of lanes
    • getCO2Emission

      public static SumoCommand getCO2Emission(String laneID)
      Returns the CO2 emissions (in mg) on the given lane during the last time step.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      the CO2 emissions (in mg)
    • getCOEmission

      public static SumoCommand getCOEmission(String laneID)
      Returns the CO emissions (in mg) on the given lane during the last time step.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      the CO emissions (in mg)
    • getDisallowed

      public static SumoCommand getDisallowed(String laneID)
      Returns a list of disallowed vehicle classes.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      list of disallowed vehicle classes
    • getEdgeID

      public static SumoCommand getEdgeID(String laneID)
      Returns the ID of the edge this lane belongs to.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      the id of the edge this lane belongs to
    • getElectricityConsumption

      public static SumoCommand getElectricityConsumption(String laneID)
      Returns the electricity consumption in ml for the last time step.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      the energy consumption
    • getFoes

      public static SumoCommand getFoes(String laneID, String toLane)
      Returns the ids of incoming lanes that have right of way over the connection from laneID to toLaneID.
      Parameters:
      laneID - a string identifying a lane
      toLane - a string identifying the target lane
      Returns:
      the energy consumption
    • getInternalFoes

      public static SumoCommand getInternalFoes(String laneID)
      Returns the ids of internal lanes that are in conflict with the given internal lane id.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      the energy consumption
    • getFuelConsumption

      public static SumoCommand getFuelConsumption(String laneID)
      Returns the fuel consumption (in ml) on the given lane during the last time step.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      the fuel consumption (in ml)
    • getHCEmission

      public static SumoCommand getHCEmission(String laneID)
      Returns the HC emissions (in mg) on the given lane during the last time step.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      the HC emissions (in mg)
    • getIDList

      public static SumoCommand getIDList()
      Returns a list of IDs of all lanes in the network.
      Returns:
      a list of IDs of all lanes
    • getLastStepHaltingNumber

      public static SumoCommand getLastStepHaltingNumber(String laneID)
      Returns the total number of halting vehicles on the given lane within the last time step. A speed of less than 0.1 m/s is considered a halt.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      number of halting vehicles within the last time step
    • getLastStepLength

      public static SumoCommand getLastStepLength(String laneID)
      Returns the total vehicle length (in m) on the given lane during the last time step.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      vehicle length (in m) within the last time step
    • getLastStepMeanSpeed

      public static SumoCommand getLastStepMeanSpeed(String laneID)
      Returns the mean speed (in m/s) on the given lane within the last time step.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      the average speed (in m/s) within the last time step
    • getLastStepOccupancy

      public static SumoCommand getLastStepOccupancy(String laneID)
      Returns the occupancy (in %) on the given lane during the last time step.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      the percentage of time the lane was occupied
    • getLastStepVehicleIDs

      public static SumoCommand getLastStepVehicleIDs(String laneID)
      Returns the IDs of the vehicles on the given lane within the last time step.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      list of IDs of vehicles
    • getLastStepVehicleNumber

      public static SumoCommand getLastStepVehicleNumber(String laneID)
      Returns number of vehicles on this lane within the last time step.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      number of vehicles
    • getLength

      public static SumoCommand getLength(String laneID)
      Returns the length (in m) of the named lane.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      length of the named lane (in m)
    • getLinkNumber

      public static SumoCommand getLinkNumber(String laneID)
      Returns the number of links outgoing from this lane.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      number of connections to successive lanes
    • getLinks

      public static SumoCommand getLinks(String laneID)
      Returns descriptions of the links (in m) outgoing from this lane.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      a list containing IDs of sucessor lanes
    • getMaxSpeed

      public static SumoCommand getMaxSpeed(String laneID)
      Returns the maximum speed (in m/s) allowed on this lane.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      maximum allowed speed (in m/s)
    • getNOxEmission

      public static SumoCommand getNOxEmission(String laneID)
      Returns the NOx emissions (in mg) on the given lane during the last time step.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      the NOx emissions (in mg)
    • getNoiseEmission

      public static SumoCommand getNoiseEmission(String laneID)
      Returns the noise emissions (in db) on the given lane during the last time step.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      the noise emissions (in mg)
    • getParameter

      public static SumoCommand getParameter(String laneID, String param)
      Returns the chosen parameter.
      Parameters:
      laneID - a string identifying the edge
      param - a string identifying the parameter
      Returns:
      the specific parameter
    • setParameter

      public static SumoCommand setParameter(String laneID, String param, String value)
      Sets the chosen parameter.
      Parameters:
      laneID - the lane ID
      param - a string identifying the parameter
      value - a string identifying the new value
      Returns:
      SumoCommand
    • getPMxEmission

      public static SumoCommand getPMxEmission(String laneID)
      Returns the particular matter emissions (in mg) on the given lane during the last time step.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      the particular matter emissions (in mg)
    • getShape

      public static SumoCommand getShape(String laneID)
      Returns this lane's shape.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      list of position describing the geometry
    • getTraveltime

      public static SumoCommand getTraveltime(String laneID)
      Returns the estimated travel time (in s) on the given lane during the last time step.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      estimated travel time (in s)
    • getWidth

      public static SumoCommand getWidth(String laneID)
      Returns the width (in m) of the named lane.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      width of lane (in m)
    • getWaitingTime

      public static SumoCommand getWaitingTime(String laneID)
      getWaitingTime.
      Parameters:
      laneID - a string identifying a lane
      Returns:
      the waiting time of the lane (in s)
    • setAllowed

      public static SumoCommand setAllowed(String laneID, SumoStringList allowedClasses)
      Set a list of allowed vehicle classes.
      Parameters:
      laneID - a string identifying a lane
      allowedClasses - allowed vehicle classes
      Returns:
      SumoCommand
    • setDisallowed

      public static SumoCommand setDisallowed(String laneID, SumoStringList disallowedClasses)
      Set a list of disallowed vehicle classes.
      Parameters:
      laneID - a string identifying a lane
      disallowedClasses - not allowed vehicle classes
      Returns:
      SumoCommand
    • setLength

      public static SumoCommand setLength(String laneID, double length)
      Set the length (in m) of the named lane.
      Parameters:
      laneID - a string identifying a lane
      length - new length (in m) of the lane
      Returns:
      SumoCommand
    • setMaxSpeed

      public static SumoCommand setMaxSpeed(String laneID, double speed)
      Set the maximum speed (in m/s) allowed on this lane.
      Parameters:
      laneID - a string identifying a lane
      speed - maximum velocity allowed (in m/s)
      Returns:
      SumoCommand