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

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

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

import org.opentripplanner.transit.raptor.api.transit.RaptorTripSchedule;
import org.opentripplanner.transit.raptor.api.transit.TransitArrival;
import org.opentripplanner.transit.raptor.rangeraptor.WorkerState;

/**
 * This interface define the methods used be the {@link ArrivalTimeRoutingStrategy}
 * to query and update the state of the algorithm.
 *
 * @param  The TripSchedule type defined by the user of the raptor API.
 */
public interface StdWorkerState extends WorkerState {

    /**
     * Return TRUE if a stop is reached by transit or transfer in the previous round.
     */
    boolean isStopReachedInPreviousRound(int stop);

    /**
     * Return the best time at the given stop found in the last round. This is
     * used to find the right trip to board in the current round.
     * 

* If you are not trying to find paths or calculate the exact number of transfers * it is ok to return the overall best tim to reach the given stop. */ int bestTimePreviousRound(int stop); /** * Set the time at a transit stop iff it is optimal. This sets both the bestTime and the transitTime */ void transitToStop(int alightStop, int alightTime, int boardStop, int boardTime, T trip); TransitArrival previousTransit(int boardStopIndex); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy