mbus-backend
    Preparing search index...

    Implementation of the McRAPTOR (Multi-Criteria Round-Based Public Transit Routing) algorithm. Optimizes for arrival time, walking distance, and number of transfers.

    Index

    Constructors

    Methods

    • Calculates optimal journeys for a specific departure time.

      Parameters

      • origin: string

        The starting Stop ID.

      • destination: string

        The destination Stop ID.

      • departureTime: number

        The exact departure time.

      Returns Journey[]

      A list of optimal Journey objects.

    • Finds the best journeys within a time window, filtering for Pareto optimality across all departures.

      Parameters

      • origin: string

        The starting Stop ID.

      • destination: string

        The destination Stop ID.

      • startTime: number

        The start of the departure window.

      • range: number

        The duration of the window to search (e.g. 3600s).

      Returns Journey[]

      A deduplicated list of the best journeys found in the time range.

    • Executes the McRAPTOR algorithm to find all non-dominated paths to the destination.

      Parameters

      • origin: string

        The starting Stop ID.

      • destination: string

        The destination Stop ID.

      • departureTime: number

        The time of departure.

      Returns Bag

      A Bag containing Pareto-optimal labels for the destination.

    • Sets the penalty multiplier for walking (default is 1).

      Parameters

      • penalty: number

        The multiplier for walking duration cost.

      Returns void