All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opentripplanner.transit.raptor.rangeraptor.standard.BestNumberOfTransfers Maven / Gradle / Ivy

There is a newer version: 2.5.0
Show newest version
package org.opentripplanner.transit.raptor.rangeraptor.standard;


/**
 * This interface is part of calculating heuristics for transfers.
 */
public interface BestNumberOfTransfers {

    /**
     * If a stop is not reached the {@link #calculateMinNumberOfTransfers(int)} should
     * return this value. The value is a very high number.
     */
    default int unreachedMinNumberOfTransfers() {
        return 9999;
    }


    /**
     * Return the minimum number for transfers used to reach the given stop.
     * 

* This method is called after the search is complete, not before. *

* The result is used to calculate heuristics, so the calculated value * should be less than or equal to the "real value". The value should be at most: * -1 for a stop which is directly reachable via a street access/egress * 0 for a stop which can be reached via a single transit leg * 1 for a stop which can be reached via two separate transit legs */ int calculateMinNumberOfTransfers(int stop); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy