Closed omar-kabbani closed 2 years ago
@omar-kabbani, thanks for writing this up.
Interline is in agreement that Option 2 is preferable. It is necessary for us to model complex fares with various types of transfer discounts here in the SF Bay Area.
//cc @jewel1965
Putting aside for a moment the choice between the two options, there seems to the implication that the rider_category has been moved from the fare_leg_rules table to this product table.
The fare purchased by a traveller can be thought of as being "discriminated" by a number of separate factors including:
Are we heading towards the fare_leg_rules table performing only the function of the journey discrimination (combined with transfers of course) and the product table providing a means to cover the other discriminating factors (user class, products, times, etc.) ?
Hi @davidlewis-ito
Yes - if we were to proceed, then fare_leg_rules.txt
contains records that outline travel, for example:
The other details will be represented in fare_products.txt
, for example:
fare_product_id
(26 April 2022 at 11 AM ET)
Attended by @omar-kabbani, @michellenguyenta, @jsteelz, @npaun, @timMillet, @irees, @flocsy
During the discussion, it was agreed to proceed with Option 2 presented in the first message on this issue.
Uniqueness of
fare_product_id
This GitHub issue was raised in response to a discussion in https://github.com/google/transit/pull/286, and has been prioritized by MobilityData, who is going to work on it with the agenda described below. MobilityData is trying this format to resolve open issues with GTFS extensions - if you have any feedback regarding this format, please reach out to specifications@mobilitydata.org.
The need
A clear way to model how fare products work for different rider categories (for example: the cost of the same one way ticket, but for adults, seniors, students, etc.).
The issue
No agreement on how this is modeled in
fare_products.txt
.Potential options
fare_products.fare_product_id
unique - so the samefare_product_id
cannot be used in more than one record. For this, a differentfare_product_id
is required for each instance. For example:fare_product_id
rider_category
amount
currency
fare_products.fare_product_id
not unique - so that the samefare_product_id
can be used in more than one record. For this, onefare_product_id
is required per fare product, however, multiple records with the samefare_product_id
define the different costs for different rider categories. For example:fare_product_id
rider_category
amount
currency
Recommendation:
Even though this will not directly affect the base implementation of GTFS-Fares v2, this affects the future modeling of
fare_products.txt
. MobilityData recommends Option 2. This serves the following benefits:fare_product_id
per fare productfare_leg_rules.txt
significantly lighter by only requiring one record to define a leg with onefare_product_id
instead of multiple records; each with a differentfare_product_id
fare_products.fare_product_id
s if needed and express the fare legs explicitly infare_leg_rules.txt