Class Edge


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

      • Edge

        public Edge()
    • Method Detail

      • getAdaptedTraveltime

        public static SumoCommand getAdaptedTraveltime​(String edgeID,
                                                       double 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​(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​(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​(String edgeID,
                                            double 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​(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​(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​(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​(String edgeID)
        Gets the lane number.
        Parameters:
        edgeID - a string identifying the edge
        Returns:
        Returns the number of lanes of this edge
      • getLastStepHaltingNumber

        public static SumoCommand getLastStepHaltingNumber​(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​(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​(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​(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​(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​(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​(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​(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​(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​(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​(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​(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​(String edgeID,
                                               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​(String edgeID,
                                               String param,
                                               String value)
        Sets the chosen parameter.
        Parameters:
        edgeID - the edge ID
        param - a string identifying the parameter
        value - a string identifying the new value
        Returns:
        SumoCommand
      • adaptTraveltime

        public static SumoCommand adaptTraveltime​(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​(String edgeID,
                                                  double time,
                                                  double begin,
                                                  double 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​(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​(String edgeID,
                                            double effort,
                                            double begin,
                                            double 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​(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