Package org.planit.gap
Class LinkBasedRelativeDualityGapFunction
- java.lang.Object
-
- org.planit.gap.GapFunction
-
- org.planit.gap.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 Summary
Fields Modifier and Type Field Description protected double
gap
Gapprotected double
measuredNetworkCost
Current system cost as it standsprotected double
minimumNetworkCost
Represents the total cost if all flow were to be diverted to the shortest paths for all origin-destination pairs-
Fields inherited from class org.planit.gap.GapFunction
LINK_BASED_RELATIVE_GAP, stopCriterion
-
-
Constructor Summary
Constructors Constructor Description LinkBasedRelativeDualityGapFunction(StopCriterion stopCriterion)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
computeGap()
Compute the gapdouble
getGap()
Return the gap for the current iterationdouble
getMeasuredNetworkCost()
Return the actual system travel timevoid
increaseConvexityBound(double increaseMinimumSystemCost)
Increase convexity bound cost, i.e.void
increaseMeasuredNetworkCost(double increaseValue)
Increase system cost, i.e.void
reset()
Reset system travel time and convexity bound to zero-
Methods inherited from class org.planit.gap.GapFunction
getStopCriterion, hasConverged
-
-
-
-
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 classGapFunction
-
getGap
public double getGap()
Return the gap for the current iteration- Specified by:
getGap
in classGapFunction
- Returns:
- the gap for the current iteration
-
-