Class LinkBasedRelativeDualityGapFunction


  • public class LinkBasedRelativeDualityGapFunction
    extends GapFunction
    Gap function based on the work of Bovy and Jansen (1983) who take the different between the current system travel time and the system travel time if all flow were to be assigned to the shortest paths, divided by the system travel time
    Author:
    markr
    • Field Detail

      • measuredNetworkCost

        protected double measuredNetworkCost
        Current system cost as it stands
      • minimumNetworkCost

        protected double minimumNetworkCost
        Represents the total cost if all flow were to be diverted to the shortest paths for all origin-destination pairs
      • gap

        protected double gap
        Gap
    • Constructor Detail

      • LinkBasedRelativeDualityGapFunction

        public LinkBasedRelativeDualityGapFunction​(StopCriterion stopCriterion)
        Constructor
        Parameters:
        stopCriterion - StopCriterion object being used
    • Method Detail

      • computeGap

        public double computeGap()
        Compute the gap
        Returns:
        the gap for the current iteration
      • getMeasuredNetworkCost

        public double getMeasuredNetworkCost()
        Return the actual system travel time
        Returns:
        the actual system travel time
      • increaseMeasuredNetworkCost

        public void increaseMeasuredNetworkCost​(double increaseValue)
        Increase system cost, i.e. compute it exogenously
        Parameters:
        increaseValue - increase in actualSystemTravelTime for this iteration
      • increaseConvexityBound

        public void increaseConvexityBound​(double increaseMinimumSystemCost)
        Increase convexity bound cost, i.e. compute it exogenously
        Parameters:
        increaseMinimumSystemCost - the increase in minimum system cost
      • reset

        public void reset()
        Reset system travel time and convexity bound to zero
        Specified by:
        reset in class GapFunction
      • getGap

        public double getGap()
        Return the gap for the current iteration
        Specified by:
        getGap in class GapFunction
        Returns:
        the gap for the current iteration