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 doublegapGapprotected doublemeasuredNetworkCostCurrent system cost as it standsprotected doubleminimumNetworkCostRepresents 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 doublecomputeGap()Compute the gapdoublegetGap()Return the gap for the current iterationdoublegetMeasuredNetworkCost()Return the actual system travel timevoidincreaseConvexityBound(double increaseMinimumSystemCost)Increase convexity bound cost, i.e.voidincreaseMeasuredNetworkCost(double increaseValue)Increase system cost, i.e.voidreset()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:
resetin classGapFunction
-
getGap
public double getGap()
Return the gap for the current iteration- Specified by:
getGapin classGapFunction- Returns:
- the gap for the current iteration
-
-