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
actualSystemTravelTime
Current system travel time as it standsprotected double
gap
Gapprotected double
minimumSystemTravelTime
Represents the total travel time if all flow were to be diverted to the shortest paths for all origin-destination pairs-
Fields inherited from class org.planit.gap.GapFunction
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
getActualSystemTravelTime()
Return the actual system travel timedouble
getGap()
Return the gap for the current iterationvoid
increaseActualSystemTravelTime(double increaseValue)
Increase system travel time, i.e.void
increaseConvexityBound(double increaseMinimumSystemTravelTime)
Increase convexity bound travel time, i.e.void
reset()
Reset system travel time and convexity bound to zero-
Methods inherited from class org.planit.gap.GapFunction
getStopCriterion, hasConverged
-
-
-
-
Field Detail
-
actualSystemTravelTime
protected double actualSystemTravelTime
Current system travel time as it stands
-
minimumSystemTravelTime
protected double minimumSystemTravelTime
Represents the total travel time 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
-
getActualSystemTravelTime
public double getActualSystemTravelTime()
Return the actual system travel time- Returns:
- the actual system travel time
-
increaseActualSystemTravelTime
public void increaseActualSystemTravelTime(double increaseValue)
Increase system travel time, i.e. compute it exogenously- Parameters:
increaseValue
- increase in actualSystemTravelTime for this iteration
-
increaseConvexityBound
public void increaseConvexityBound(double increaseMinimumSystemTravelTime)
Increase convexity bound travel time, i.e. compute it exogenously- Parameters:
increaseMinimumSystemTravelTime
- the increase in minimum system travel time
-
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
-
-