.stop_criterion
A Link Based Relative Gap Function method
Reference documentation for the link based relative gap function.
This gap function utilises the link costs across the network to establish a network wide gap. Its computation is based on the function mentioned in Bovy and Jansen (1983)1. In this approach, you simply construct a lower bound - each iteration - that consists of all current shortest paths for all Origin-Destination (OD) pairs multiplied with the OD demand and take the difference with actual system travel time. The latter is a simple multiplication of the link flows with the link costs - in the current iteration. One then divides this absolute gap by the total system travel time to obtain the relative gap. Hence its name, link based relative gap. Mathematically, it can be defined as follows:
\(\Large \delta^{\textrm relative} = { (\sum_{a}^{A} c_a \cdot f_a) \cdot (\sum_{w}^{W} c_w^* \cdot d_w) \over {\sum_{a}^{A} c_a \cdot f_a}}\)
with
\(\delta^{\textrm relative}= \textrm{relative duality gap},\\ c_a= \textrm{cost (h) on link segment } a,\\ c_w^*= \textrm{ path minimum cost (h) connecting OD pair } w,\\ d_w= \textrm{ total demand (veh/h) for OD pair } w,\\ f_a= \textrm{flow (veh/h) on link segment } a,\\ A= \textrm{ total number of links},\\ W= \textrm{ total number of OD pairs}\)
All link based gap functions are only suitable for traffic assignment methods that have link additive path costs, i.e., when we can add the link costs to construct the path cost, we can also use the link costs to determine the gap.
1 Bovy, P., & Jansen, G. (1983). Network aggregation effects upon equilibrium assignment outcomes: An empirical investigation. Transportation Science, 17(3), 240-261.
Name | Value | Type | Unit |
---|---|---|---|
Stop criterion | Object instance | Default Stop Criterion | N/A |
This class does not expose any methods (yet)
This class exposes the following properties:
Property | Availability | Description |
---|---|---|
.stop_criterion |
Always | Access to the stop criterion instance |
from planit import *
# choose to run PLANit with a traditional static traffic assignment method
planit_instance = PLANit()
planit_instance.set(TrafficAssignment.TRADITIONAL_STATIC)
# collect the stop criterion to do something
planit_instance.assignment.gap_function.stop_criterion.<call method>
Traffic Assignment on what traffic assignment methods are available
StopCriterion default implementation
Class GapFunctionWrapper
in Wrappers.py
A Link Based Relative Gap Function method