Skip to content

Conversation

@westontrillium
Copy link
Contributor

@westontrillium westontrillium commented Jan 6, 2026

Summary

This proposal adds the ability to define the travel duration of flexible ("on-demand") services, relative to direct driving durations that consumers are expected to estimate themselves.

Describe the Problem

Currently, consumers can only use driving duration to display trip time estimates for flexible services. Because driving duration is based on algorithms for private vehicles and not public transit, these estimates can be quite different from reality. This also makes it more difficult for consumers to display service availability accurately to users, as the travel time used to calculate whether the queried trip falls within a given service's hours of operation may not match reality.

Use Cases

Allows consumers to include a safe travel time estimate (i.e., the longest expected time the trip could take for 95% of cases) for trips of vehicles that inevitably behave differently than a private car, taking into account such factors as:

  • Time taken to pick up or drop off additional passengers before rider reaches their destination
  • Boarding/alighting time of additional passengers before the rider reaches their destination (especially for mobility device accommodations)
  • Alternative travel behavior (e.g., different road usage) specific to public transit services resulting in longer trip times

Proposed Solution

This proposal adds two new fields to trips.txt: safe_duration_factor and safe_duration_offset. Producers can use these two fields to add a trip time multiplier, fixed offset value (in seconds), or both to a given flexible trip. Consumers can then take these values to offer a safe travel duration to riders. For example, if a consumer's routing algorithm calculates that the driving time of a given flexible trip will take 30 minutes and that trip has a safe_duration_factor of 1.5 and a safe_duration_offset of 60, the consumer can use the safe duration fields to display an adjusted travel time estimate of 46 minutes (30 minutes * 1.5 + 1 minute).

Type of change

GTFS Schedule

  • Functional Change
  • Non-Functional Change
  • Documentation Maintenance

Additional Information

This extension was originally part of the GTFS-FlexibleTrips proposal in early 2024 but was left out of the adopted base implementation because the feature was not ready.

Proposed Discussion Period

Preliminary discussion of this feature took place here, here, and here. I recommend reserving at least two weeks for discussion to ensure the wider GTFS community has sufficient time to offer feedback.

Testing Details

The feature in its current form has already been in testing for almost one year. I recommend testing any changes made to this proposal.

  • Consumer(s): FindARide.org (using OpenTripPlanner)
  • Producer(s): Optibus, on behalf of Hopelink. These fields are produced for 13 other agencies whose GTFS is also consumed by the FindARide tool.

Proposal Update Tracker

Date Update Description
(2026-01-06) Initial PR submission

Checklist

@westontrillium westontrillium changed the title Add safe duration fields to trips.txt to provide better on-demand trip time estimates Add safe duration fields to trips.txt to provide better flexible trip time estimates Jan 6, 2026
@etienne0101 etienne0101 added GTFS-Flex Issues and Pull Requests that focus on GTFS-Flex Extension Discussion Period The community engages in conversations to help refine and develop the proposal. Change type: Functional Refers to modifications that significantly affect specification functionalities. labels Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Change type: Functional Refers to modifications that significantly affect specification functionalities. Discussion Period The community engages in conversations to help refine and develop the proposal. GTFS-Flex Issues and Pull Requests that focus on GTFS-Flex Extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants