Class Lane


  • public class Lane
    extends java.lang.Object
    Author:
    Mario Krumnow, Evamarie Wiessner
    • Constructor Summary

      Constructors 
      Constructor Description
      Lane()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static SumoCommand getAllowed​(java.lang.String laneID)
      Returns a list of allowed vehicle classes.
      static SumoCommand getCO2Emission​(java.lang.String laneID)
      Returns the CO2 emissions (in mg) on the given lane during the last time step.
      static SumoCommand getCOEmission​(java.lang.String laneID)
      Returns the CO emissions (in mg) on the given lane during the last time step.
      static SumoCommand getDisallowed​(java.lang.String laneID)
      Returns a list of disallowed vehicle classes.
      static SumoCommand getEdgeID​(java.lang.String laneID)
      Returns the ID of the edge this lane belongs to.
      static SumoCommand getElectricityConsumption​(java.lang.String laneID)
      Returns the electricity consumption in ml for the last time step.
      static SumoCommand getFoes​(java.lang.String laneID, java.lang.String toLane)
      Returns the ids of incoming lanes that have right of way over the connection from laneID to toLaneID
      static SumoCommand getFuelConsumption​(java.lang.String laneID)
      Returns the fuel consumption (in ml) on the given lane during the last time step.
      static SumoCommand getHCEmission​(java.lang.String laneID)
      Returns the HC emissions (in mg) on the given lane during the last time step.
      static SumoCommand getIDCount()
      Returns the number of all lanes in the network.
      static SumoCommand getIDList()
      Returns a list of IDs of all lanes in the network.
      static SumoCommand getInternalFoes​(java.lang.String laneID)
      Returns the ids of internal lanes that are in conflict with the given internal lane id
      static SumoCommand getLastStepHaltingNumber​(java.lang.String laneID)
      Returns the total number of halting vehicles on the given lane within the last time step.
      static SumoCommand getLastStepLength​(java.lang.String laneID)
      Returns the total vehicle length (in m) on the given lane during the last time step.
      static SumoCommand getLastStepMeanSpeed​(java.lang.String laneID)
      Returns the mean speed (in m/s) on the given lane within the last time step.
      static SumoCommand getLastStepOccupancy​(java.lang.String laneID)
      Returns the occupancy (in %) on the given lane during the last time step.
      static SumoCommand getLastStepVehicleIDs​(java.lang.String laneID)
      Returns the IDs of the vehicles on the given lane within the last time step.
      static SumoCommand getLastStepVehicleNumber​(java.lang.String laneID)
      Returns number of vehicles on this lane within the last time step.
      static SumoCommand getLength​(java.lang.String laneID)
      Returns the length (in m) of the named lane.
      static SumoCommand getLinkNumber​(java.lang.String laneID)
      Returns the number of links outgoing from this lane.
      static SumoCommand getLinks​(java.lang.String laneID)
      Returns descriptions of the links (in m) outgoing from this lane.
      static SumoCommand getMaxSpeed​(java.lang.String laneID)
      Returns the maximum speed (in m/s) allowed on this lane.
      static SumoCommand getNoiseEmission​(java.lang.String laneID)
      Returns the noise emissions (in db) on the given lane during the last time step.
      static SumoCommand getNOxEmission​(java.lang.String laneID)
      Returns the NOx emissions (in mg) on the given lane during the last time step.
      static SumoCommand getParameter​(java.lang.String laneID, java.lang.String param)
      Returns the chosen parameter
      static SumoCommand getPMxEmission​(java.lang.String laneID)
      Returns the particular matter emissions (in mg) on the given lane during the last time step.
      static SumoCommand getShape​(java.lang.String laneID)
      Returns this lane's shape.
      static SumoCommand getTraveltime​(java.lang.String laneID)
      Returns the estimated travel time (in s) on the given lane during the last time step.
      static SumoCommand getWaitingTime​(java.lang.String laneID)
      getWaitingTime
      static SumoCommand getWidth​(java.lang.String laneID)
      Returns the width (in m) of the named lane.
      static SumoCommand setAllowed​(java.lang.String laneID, SumoStringList allowedClasses)
      Set a list of allowed vehicle classes.
      static SumoCommand setDisallowed​(java.lang.String laneID, SumoStringList disallowedClasses)
      Set a list of disallowed vehicle classes.
      static SumoCommand setLength​(java.lang.String laneID, double length)
      Set the length (in m) of the named lane.
      static SumoCommand setMaxSpeed​(java.lang.String laneID, double speed)
      Set the maximum speed (in m/s) allowed on this lane.
      static SumoCommand setParameter​(java.lang.String laneID, java.lang.String param, java.lang.String value)
      Sets the chosen parameter
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Lane

        public Lane()
    • Method Detail

      • getAllowed

        public static SumoCommand getAllowed​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.String laneID,
                                          java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.String laneID,
                                               java.lang.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​(java.lang.String laneID,
                                               java.lang.String param,
                                               java.lang.String value)
        Sets the chosen parameter
        Parameters:
        vehID - a string identifying the vehicle
        param - a string identifying the parameter
        value - a string identifying the new value
        Returns:
        SumoCommand
      • getPMxEmission

        public static SumoCommand getPMxEmission​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.String laneID)
        getWaitingTime
        Parameters:
        laneID - a string identifying a lane
        Returns:
        the waiting time of the lane (in s)
      • setAllowed

        public static SumoCommand setAllowed​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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