Skip to content

frequencies.txt exact_times=1 trip_id semantics #227

@derhuerst

Description

@derhuerst

I have a question about the semantics of frequencies.txt with exact_times=1.


From my experience with GTFS and my observations of GTFS-based UIs, a lot of tools seem to make the following assumption:

A single trip (as defined by a unique trip_id in the GTFS dataset) is one vehicle (or group of vehicles) that I can use without significant interruptions (such as waiting for another vehicle or chasing to a different line). Often, a single trip is considered to be a vehicle which I can travel with for the whole duration of the trip.

The frequencies.txt documentation seems to undermine that assumption however:

frequencies.txt represents trips that operate on regular headways (time between trips). This file can be used to represent two different types of service.

  • Frequency-based service (exact_times=0) in which service does not follow a fixed schedule throughout the day. Instead, operators attempt to strictly maintain predetermined headways for trips.
  • A compressed representation of schedule-based service (exact_times=1) that has the exact same headway for trips over specified time period(s). In schedule-based service operators try to strictly adhere to a schedule.
Field Name Type Required Description
trip_id ID referencing trips.trip_id Required Identifies a trip to which the specified headway of service applies.

I think this is especially important for routing engines: Now, they can't assume anymore that every GTFS data point referring to the same trip_id is tied to one vehicle allowing continuous travel. There are >=1 "runs" of a vehicle, all under the same trip_id, but each of them ends at the last stop specified in stop_times.txt.


Is my understanding of the semantics correct? If it is, I'd argue that this is quite unintuitive and therefore easy to implement in a wrong way. If I misunderstood how frequencies.txt works, let's improve the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GTFS ScheduleIssues and Pull Requests that focus on GTFS ScheduleStatus: StaleIssues and Pull Requests that have remained inactive for 30 calendar days or more.Support: Needs HelpNeeds support to answer outstanding questions and/or feedback.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions