google / transit

https://gtfs.org/
Apache License 2.0
588 stars 179 forks source link

[GTFS-Fares v2] Non-sequential Legs Transfer #427

Open tzujenchanmbd opened 8 months ago

tzujenchanmbd commented 8 months ago

Problem to solve

The Transfer Semantics document mentions that there are systems where transfers are time-based, such that riders can acquire fare discounts for non-direct transfers. For example, in a journey with four legs (Leg1 → Leg2 → Leg3 → Leg4), where Leg1 and Leg4 belong to SystemA, and Leg2 and Leg3 belong to SystemB. In SystemA, even if riders travel through a different system(B) during the journey, Leg4 can still acquire a discount from Leg1, as long as it remains within a specific amount of time. However, the current Fares v2 spec seems unable to differentiate whether non-direct transfers are allowed.

Furthermore, the current spec also appears unable to distinguish cases where the transfer_countand the timer for duration_limit should be "reset". For instance, in the example above, when transferring to Leg2, it might be necessary to "reset" the timer and transfer_count for SystemB.


We'd love to see any potential solutions and real-world use cases. Please feel free to share any thoughts here.

tzujenchanmbd commented 8 months ago

One possible idea (not sure if it's helpful) - to explicitly define the "fare systems" in the spec by defining "group of networks". Perhaps in networks.txt using similar mechanism to stops.parent_station + location_type, or adding a new "group of networks" file. Consumers can calculate transfer_count and duration time independently in each "fare system", and by default allow non-direct transfer in a system, if the rider travels on a different leg in a different system in between.

jfabi commented 8 months ago

Even within a single "system", there are example of non-sequential transfers at the MBTA in Boston whenever we operate free services. Here is one real-world example (references system diagram below) that will be taking place next month due to scheduled track maintenance—@tzujenchanmbd, let me know if you would prefer to consider this out of the current scope since it is within the same agency/feed:

Screen Shot 2024-01-22 at 19 27 05
tzujenchanmbd commented 2 months ago

Here is a proposal of simply adding a new field to explicitly define if the transfer rule is used for sequential transfer only. We plan to discuss this proposal in the July WGM.

(tagging consumers for review - @jsteelz, @npaun, @bdferris-v2)