Class Edge


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

      Constructors 
      Constructor Description
      Edge()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static SumoCommand adaptTraveltime​(java.lang.String edgeID, double time)
      Adapt the travel time value (in s) used for (re-)routing on the given edge.
      static SumoCommand adaptTraveltime​(java.lang.String edgeID, double time, int begin, int end)
      Adapt the travel time value (in s) used for (re-)routing on the given edge.
      static SumoCommand getAdaptedTraveltime​(java.lang.String edgeID, int time)
      Returns the travel time value (in s) used for (re-)routing.
      static SumoCommand getCO2Emission​(java.lang.String edgeID)
      Returns the CO2 emissions (in mg) on the given edge during the last time step.
      static SumoCommand getCOEmission​(java.lang.String edgeID)
      Returns the CO emissions (in mg) on the given edge during the last time step.
      static SumoCommand getEffort​(java.lang.String edgeID, int time)
      Returns the effort value used for (re-)routing.
      static SumoCommand getElectricityConsumption​(java.lang.String edgeID)
      Returns the electricity consumption in ml for the last time step.
      static SumoCommand getFuelConsumption​(java.lang.String edgeID)
      Returns the fuel consumption (in ml) on the given edge during the last time step.
      static SumoCommand getHCEmission​(java.lang.String edgeID)
      Returns the HC emissions (in mg) on the given edge during the last time step.
      static SumoCommand getIDCount()
      Returns the number of edges in the network.
      static SumoCommand getIDList()
      Returns a list of all edges in the network.
      static SumoCommand getLaneNumber​(java.lang.String edgeID)  
      static SumoCommand getLastStepHaltingNumber​(java.lang.String edgeID)
      Returns the total number of halting vehicles on the given edge within the last time step.
      static SumoCommand getLastStepLength​(java.lang.String edgeID)
      Returns the total vehicle length (in m) on the given edge within the last time step.
      static SumoCommand getLastStepMeanSpeed​(java.lang.String edgeID)
      Returns the mean speed of vehicles (in m/s) that were on the named induction loop within the last simulation step.
      static SumoCommand getLastStepOccupancy​(java.lang.String edgeID)
      Returns the percentage of time (in %) the detector was occupied by a vehicle.
      static SumoCommand getLastStepPersonIDs​(java.lang.String edgeID)
      Returns the ids of the persons on the given edge during the last time step.
      static SumoCommand getLastStepVehicleIDs​(java.lang.String edgeID)
      Returns the list of IDs of the vehicles on the given edge within the last simulation step.
      static SumoCommand getLastStepVehicleNumber​(java.lang.String edgeID)
      Returns the total number of vehicles on this edge within the last time step.
      static SumoCommand getNoiseEmission​(java.lang.String edgeID)
      Returns the noise emissions (in db)on the given edge within the last time step.
      static SumoCommand getNOxEmission​(java.lang.String edgeID)
      Returns the NOx emissions (in mg) on the given edge during the last time step.
      static SumoCommand getParameter​(java.lang.String edgeID, java.lang.String param)
      Returns the chosen parameter
      static SumoCommand getPMxEmission​(java.lang.String edgeID)
      Returns the particular matter emissions (in mg) on the given edge on this edge during the last time step.
      static SumoCommand getTraveltime​(java.lang.String edgeID)
      Returns the estimated travel time (in s) on the given edge on this edge within the last time step.
      static SumoCommand getWaitingTime​(java.lang.String edgeID)
      Returns the waiting time (in s) on the given edge on this edge within the last time step.
      static SumoCommand setEffort​(java.lang.String edgeID, double effort)
      Adapt the effort value used for (re-)routing on the given edge.
      static SumoCommand setEffort​(java.lang.String edgeID, double effort, int begin, int end)
      Adapt the effort value used for (re-)routing on the given edge.
      static SumoCommand setMaxSpeed​(java.lang.String edgeID, double speed)
      Set a new maximum speed (in m/s) for all lanes of the edge.
      static SumoCommand setParameter​(java.lang.String edgeID, 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

      • Edge

        public Edge()
    • Method Detail

      • getAdaptedTraveltime

        public static SumoCommand getAdaptedTraveltime​(java.lang.String edgeID,
                                                       int time)
        Returns the travel time value (in s) used for (re-)routing.
        Parameters:
        edgeID - a string identifying the edge
        time - the point of time the returned value is valid for
        Returns:
        the travel time value (in s)
      • getCO2Emission

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

        public static SumoCommand getCOEmission​(java.lang.String edgeID)
        Returns the CO emissions (in mg) on the given edge during the last time step.
        Parameters:
        edgeID - a string identifying the edge
        Returns:
        the CO emissions (in mg)
      • getEffort

        public static SumoCommand getEffort​(java.lang.String edgeID,
                                            int time)
        Returns the effort value used for (re-)routing.
        Parameters:
        edgeID - a string identifying the edge
        time - the point of time the returned value is valid for
        Returns:
        the edge effort value (in s), -1 is returned if such a value does not exist
      • getElectricityConsumption

        public static SumoCommand getElectricityConsumption​(java.lang.String edgeID)
        Returns the electricity consumption in ml for the last time step.
        Parameters:
        edgeID - a string identifying the edge
        Returns:
        the edge effort value (in s), -1 is returned if such a value does not exist
      • getFuelConsumption

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

        public static SumoCommand getHCEmission​(java.lang.String edgeID)
        Returns the HC emissions (in mg) on the given edge during the last time step.
        Parameters:
        edgeID - a string identifying the edge
        Returns:
        the HC emissions (in mg)
      • getIDCount

        public static SumoCommand getIDCount()
        Returns the number of edges in the network.
        Returns:
        the number of edges
      • getIDList

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

        public static SumoCommand getLaneNumber​(java.lang.String edgeID)
        Parameters:
        edgeID - a string identifying the edge
        Returns:
        Returns the number of lanes of this edge
      • getLastStepHaltingNumber

        public static SumoCommand getLastStepHaltingNumber​(java.lang.String edgeID)
        Returns the total number of halting vehicles on the given edge within the last time step.
        Parameters:
        edgeID - a string identifying the edge
        Returns:
        number of halting vehicle, a speed of less than 0.1 m/s is considered a halt
      • getLastStepLength

        public static SumoCommand getLastStepLength​(java.lang.String edgeID)
        Returns the total vehicle length (in m) on the given edge within the last time step.
        Parameters:
        edgeID - a string identifying the edge
        Returns:
        total vehicle length (in m)
      • getLastStepMeanSpeed

        public static SumoCommand getLastStepMeanSpeed​(java.lang.String edgeID)
        Returns the mean speed of vehicles (in m/s) that were on the named induction loop within the last simulation step.
        Parameters:
        edgeID - a string identifying the edge
        Returns:
        the average speed (in m/s)
      • getLastStepPersonIDs

        public static SumoCommand getLastStepPersonIDs​(java.lang.String edgeID)
        Returns the ids of the persons on the given edge during the last time step.
        Parameters:
        edgeID - a string identifying the edge
        Returns:
        the average speed (in m/s)
      • getLastStepOccupancy

        public static SumoCommand getLastStepOccupancy​(java.lang.String edgeID)
        Returns the percentage of time (in %) the detector was occupied by a vehicle.
        Parameters:
        edgeID - a string identifying the edge
        Returns:
        the occupancy (in %)
      • getLastStepVehicleIDs

        public static SumoCommand getLastStepVehicleIDs​(java.lang.String edgeID)
        Returns the list of IDs of the vehicles on the given edge within the last simulation step.
        Parameters:
        edgeID - a string identifying the edge
        Returns:
        the IDs of the vehicles
      • getLastStepVehicleNumber

        public static SumoCommand getLastStepVehicleNumber​(java.lang.String edgeID)
        Returns the total number of vehicles on this edge within the last time step.
        Parameters:
        edgeID - a string identifying the edge
        Returns:
        the total number of vehicles
      • getNOxEmission

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

        public static SumoCommand getNoiseEmission​(java.lang.String edgeID)
        Returns the noise emissions (in db)on the given edge within the last time step.
        Parameters:
        edgeID - a string identifying the edge
        Returns:
        the noise emissions (in db)
      • getPMxEmission

        public static SumoCommand getPMxEmission​(java.lang.String edgeID)
        Returns the particular matter emissions (in mg) on the given edge on this edge during the last time step.
        Parameters:
        edgeID - a string identifying the edge
        Returns:
        the particular matter emissions(in mg)
      • getTraveltime

        public static SumoCommand getTraveltime​(java.lang.String edgeID)
        Returns the estimated travel time (in s) on the given edge on this edge within the last time step.
        Parameters:
        edgeID - a string identifying the edge
        Returns:
        the estimated travel time
      • getWaitingTime

        public static SumoCommand getWaitingTime​(java.lang.String edgeID)
        Returns the waiting time (in s) on the given edge on this edge within the last time step.
        Parameters:
        edgeID - a string identifying the edge
        Returns:
        the waiting time
      • getParameter

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

        public static SumoCommand setParameter​(java.lang.String edgeID,
                                               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
      • adaptTraveltime

        public static SumoCommand adaptTraveltime​(java.lang.String edgeID,
                                                  double time)
        Adapt the travel time value (in s) used for (re-)routing on the given edge.
        Parameters:
        edgeID - a string identifying the edge
        time - travel time value (in s)
        Returns:
        SumoCommand
      • adaptTraveltime

        public static SumoCommand adaptTraveltime​(java.lang.String edgeID,
                                                  double time,
                                                  int begin,
                                                  int end)
        Adapt the travel time value (in s) used for (re-)routing on the given edge.
        Parameters:
        edgeID - a string identifying the edge
        time - travel time value (in s)
        begin - begin value
        end - end value
        Returns:
        SumoCommand
      • setEffort

        public static SumoCommand setEffort​(java.lang.String edgeID,
                                            double effort)
        Adapt the effort value used for (re-)routing on the given edge.
        Parameters:
        edgeID - a string identifying the edge
        effort - effort value
        Returns:
        SumoCommand
      • setEffort

        public static SumoCommand setEffort​(java.lang.String edgeID,
                                            double effort,
                                            int begin,
                                            int end)
        Adapt the effort value used for (re-)routing on the given edge.
        Parameters:
        edgeID - a string identifying the edge
        effort - effort value
        begin - begin value
        end - end value
        Returns:
        SumoCommand
      • setMaxSpeed

        public static SumoCommand setMaxSpeed​(java.lang.String edgeID,
                                              double speed)
        Set a new maximum speed (in m/s) for all lanes of the edge.
        Parameters:
        edgeID - a string identifying the edge
        speed - maximum speed (in m/s)
        Returns:
        SumoCommand