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

org.opentripplanner.raptor.spi.RaptorConstrainedBoardingSearch Maven / Gradle / Ivy

The newest version!
package org.opentripplanner.raptor.spi;

import org.opentripplanner.raptor.api.model.RaptorTripSchedule;

/**
 * This interface enable the transit layer to override the normal trip search in Raptor. Each {@link
 * RaptorRoute} may provide an instance of this interface so Raptor can ask for a bord-/alight-
 * event with the route as the target.
 * 

* When searching forward the target is the "to" end of the transfer, and the * source is the "from" transfer point. For a reverse search the target is "from" * and the source is the "to" transfer point. * * @param The TripSchedule type defined by the user of the raptor API. */ public interface RaptorConstrainedBoardingSearch { /** * Check if the current pattern has any constrained transfers for the given target stop position. * If not, then Raptor will fall back to a regular trip search. *

* The target stop position is the boarding "to" stop position for a forward search, and the * source "from" stop position for a reverse search. */ boolean transferExistTargetStop(int targetStopPos); /** * Check if the current pattern has any constrained transfers for the given source stop position. * If not, then Raptor will fall back to a regular trip search. *

* The source stop position is the alighting "from" stop position for a forward search, and the * target "to" stop position for a reverse search. */ boolean transferExistSourceStop(int targetStopPos); /** * Get the board-/alight-event for the current pattern at the target stop position coming from the * source stop and trip with the given source arrival board-/alight time (exclude slack). *

* * @return An "empty" event if no target trip is found */ RaptorBoardOrAlightEvent find( RaptorTimeTable targetTimetable, int transferSlack, T sourceTrip, int sourceStopIndex, int prevTransitArrivalTime, int earliestBoardTime ); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy