Interface MinimalTransferTimes


  • public interface MinimalTransferTimes
    Container class to manage minimal transfer times between two TransitStopFacility. Transfer times are *not* bidirectional and *not* transitive. This means:
    • A transfer time defined from stop A to stop B does not define a transfer time from stop B to stop A.
    • A transfer time defined from stop A to stop B, and another defined from stop B to stop C, does not define a transfer time from stop A to stop C.
    Both cases, the reverse transfer from stop B to stop A, and the indirect transfer from stop A to stop C via stop B, must explicitly be set in order to be returned in get(Id, Id).
    Author:
    mrieser / SBB
    • Method Detail

      • set

        double set​(Id<TransitStopFacility> fromStop,
                   Id<TransitStopFacility> toStop,
                   double seconds)
        Sets the minimal transfer time in seconds needed to transfer from fromStop to toStop.
        Parameters:
        fromStop -
        toStop -
        seconds - the minimal transfer time, in seconds
        Returns:
        the minimal transfer time previously assigned between the two stops, Double.NaN if none was specified.
      • get

        double get​(Id<TransitStopFacility> fromStop,
                   Id<TransitStopFacility> toStop,
                   double defaultSeconds)
        Parameters:
        fromStop -
        toStop -
        defaultSeconds -
        Returns:
        the minimal transfer time between the two stops if defined, defaultSeconds if none is set.
      • remove

        double remove​(Id<TransitStopFacility> fromStop,
                      Id<TransitStopFacility> toStop)
        Removes the minimal transfer time between the two stops if there was one set.
        Parameters:
        fromStop -
        toStop -
        Returns:
        the previously set minimal transfer time, or Double.NaN if none was set.