Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cause_detail and effect_detail to Alerts #332

Merged
merged 2 commits into from
Jul 26, 2022

Conversation

mckenzie-maidl-ibigroup
Copy link
Contributor

Background:

Transit agencies use different language when describing the effect of an alert. For example, when there is a rail suspension some agencies prefer saying 'bus bridge' while others prefer 'shuttle'. As another example, some agencies use the spelling ‘cancellation’ while others use ‘cancelation’ to describe trip or service cancellations. In addition, transit agencies may require more effects than those defined in the GTFS-realtime specification to describe the impact of their alerts. The specification currently allows for 12 enum values that correspond with different effects (see here). However, each of these values may correspond with more than one effect used by an agency. For example, a stop closure, suspension, and trip cancellation may all map to the NO_SERVICE effect in the specification.

Similarly, an agency may use more causes than those defined in the GTFS-realtime specification for the Cause field (see here). For example, causes like a fire, disabled bus, or mechanical issue could all correspond to the TECHNICAL_PROBLEM cause in the specification.

These limitations may keep transit agencies from being able to programmatically create alerts between two systems. For example, to automatically create alerts in an alert management system, causes and effects would need to be restricted to a one-to-one relationship between those used to describe alerts and those in the GTFS-realtime specification. These limitations also prevent consumers from using more granular effect and cause names when displaying or grouping alerts. For example, we have worked with transit agencies who prefer prominently showing "Stop Closure" for an alert on their website rather than "No Service" as would be communicated by the existing effect field.

Alternatives:

Summary of alternative options, and why they are insufficient:

  1. Add new enum values to cause and effect in the GTFS-realtime specification.

    1. This still limits data producers to a specific set of causes and effects, and as noted above agencies each use specific language when communicating to customers. Also, the timeline for proposing, debating, and voting on new enum values (and the chance that new enum values will not be unanimously approved) is a barrier to this option.
  2. Use existing effect options plus the collection of selected affected entities to determine a more granular effect than allowed by existing enums.

    1. For example, a route-direction-trip level NO_SERVICE alert is most likely a trip cancellation.
    2. More than one effect may correspond to the same effect/affected entity combination. For example, a route-direction-stop DETOUR alert may be either a detour or a snow route.

@google-cla
Copy link

google-cla bot commented May 31, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@skinkie
Copy link
Contributor

skinkie commented May 31, 2022

I really wonder when people start to see that these additions virtually 1 to 1 mimic SIRI...

@scmcca scmcca added the GTFS Realtime Issues and Pull Requests that focus on GTFS Realtime label Jun 1, 2022
@scmcca scmcca added the feature label Jun 13, 2022
@gcamp
Copy link
Contributor

gcamp commented Jun 21, 2022

We have similar value in our backend so this makes sense to me. Should there be a maximum length? It's the type of field that if it's entirely freeform consumer won't be able to use without validation.

@lauramatson
Copy link

We produce these fields and also consume/use them in our displays of alerts. We are keen to see these fields added officially to facilitate communication between the system Operations uses to manage disruptions and the system we use to create customer-facing alerts. Thanks to IBI for putting this together.

@mckenzie-maidl-ibigroup
Copy link
Contributor Author

We have similar value in our backend so this makes sense to me. Should there be a maximum length? It's the type of field that if it's entirely freeform consumer won't be able to use without validation.

We are open to this suggestion. Note however that for other translated strings in the spec (e.g., header_text or description_text) there are no set max lengths. We would be interested in hearing what other consumers think.

@jmburge
Copy link

jmburge commented Jul 1, 2022

As a producer we have been asked for extensions to the cause/effect values that are presented. This would give us some flexibility to extend without much difficulty in messing up multiple consumers. What additional information would be needed to move this along?

@mckenzie-maidl-ibigroup
Copy link
Contributor Author

@gcamp Our preference would be to not require a max length to follow precedence. Are you okay moving ahead without this? If yes, it seems like this is the only open question, and we can call a vote to add these as experimental fields once we are all on the same page. Anyone else on this thread - thoughts about this question/are there any others we should discuss?

@mckenzie-maidl-ibigroup
Copy link
Contributor Author

This pull request has been open for more than one week, so I am calling for a vote. Note that this is for the adoption of effect_detail and cause_detail as experimental fields.

Please vote with a +1 (for) or -1 (against) in the comments. Voting ends on 2022-07-22 at 23:59:59 UTC.

Thanks
Kenzie

@skinkie
Copy link
Contributor

skinkie commented Jul 12, 2022

+1 (OpenGeo)

@scmcca scmcca added the Status: Voting Pull Requests where the advocate has called for a vote as described in the changes.md label Jul 13, 2022
@leonardehrenfried
Copy link
Contributor

leonardehrenfried commented Jul 13, 2022

@gcamp Our preference would be to not require a max length to follow precedence. Are you okay moving ahead without this? If yes, it seems like this is the only open question, and we can call a vote to add these as experimental fields once we are all on the same page. Anyone else on this thread - thoughts about this question/are there any others we should discuss?

As a consumer of RT feeds (OTP developer) I'm also in favour of not imposing an arbitrary limit. Of course there is some technical limit at which things become slow but if you put a, say, 10MB alert string in your GTFS-RT feed you probably have other problems, too.

@gcamp
Copy link
Contributor

gcamp commented Jul 13, 2022

+1 Transit

@lauramatson
Copy link

+1 Metro Transit (Minneapolis/St. Paul, Minnesota)

@mckenzie-maidl-ibigroup
Copy link
Contributor Author

Thanks all for participating! The vote ended on Friday, July 22 at 23:59:59 UTC with a unanimous consensus of 3 'yes' votes from OpenGeo (@skinkie), Transit (@gcamp), and Metro Transit (@lauramatson).

As per the specification amendment process, this proposal is now accepted!

@omar-kabbani omar-kabbani removed the Status: Voting Pull Requests where the advocate has called for a vote as described in the changes.md label Jul 26, 2022
@omar-kabbani omar-kabbani merged commit a132709 into google:master Jul 26, 2022
omar-kabbani added a commit to MobilityData/transit that referenced this pull request Aug 4, 2022
commit 9d5ebf1
Author: Guillaume Campagna <[email protected]>
Date:   Tue Jul 26 17:09:35 2022 -0400

    Add trip-to-trip transfers with in-seat option (google#303)

    * Add trip-to-trip transfers with in-seat option

    * Fix stop_id are **Conditionally Required** and formatting

    * Add clarification about potential conflict

    * Fix typo

    Co-authored-by: Leonard Ehrenfried <[email protected]>

    Co-authored-by: Nicholas Paun <[email protected]>
    Co-authored-by: Leonard Ehrenfried <[email protected]>

commit a132709
Author: McKenzie Maidl <[email protected]>
Date:   Tue Jul 26 13:58:04 2022 -0700

    addition of cause_detail and effect_detail to the spec (google#332)

commit 8993a24
Author: Zsombor Welker <[email protected]>
Date:   Mon Jul 25 14:49:40 2022 +0200

    Add WheelchairAccessible documentation (google#340)
isabelle-dr pushed a commit to MobilityData/transit that referenced this pull request Dec 19, 2023
* Squashed commit of the following:

commit 2e6887e
Author: scmcca <[email protected]>
Date:   Wed Feb 2 12:42:10 2022 -0500

    [Formatting fix] Add newlines before lists

    Improved syntax for different markdown parsers

commit 0033573
Author: Tristram Gräbener <[email protected]>
Date:   Fri Jan 28 15:54:00 2022 +0100

    Specify that the filename are case sensitive (google#300)

    Closes google#297

commit 23d877e
Author: scott christian mccallum <[email protected]>
Date:   Tue Jan 18 19:09:46 2022 -0500

    "Fields" and "Values" as non-header (google#302)

* Squashed commit of the following:

commit 9d5ebf1
Author: Guillaume Campagna <[email protected]>
Date:   Tue Jul 26 17:09:35 2022 -0400

    Add trip-to-trip transfers with in-seat option (google#303)

    * Add trip-to-trip transfers with in-seat option

    * Fix stop_id are **Conditionally Required** and formatting

    * Add clarification about potential conflict

    * Fix typo

    Co-authored-by: Leonard Ehrenfried <[email protected]>

    Co-authored-by: Nicholas Paun <[email protected]>
    Co-authored-by: Leonard Ehrenfried <[email protected]>

commit a132709
Author: McKenzie Maidl <[email protected]>
Date:   Tue Jul 26 13:58:04 2022 -0700

    addition of cause_detail and effect_detail to the spec (google#332)

commit 8993a24
Author: Zsombor Welker <[email protected]>
Date:   Mon Jul 25 14:49:40 2022 +0200

    Add WheelchairAccessible documentation (google#340)

* Update README.md (#63)

* issue templates

* update use cases section

* update contact links

* rename

* Delete .github/ISSUE_TEMPLATE/spec_improvement.yml

---------

Co-authored-by: scmcca <[email protected]>
Co-authored-by: omar-kabbani <[email protected]>
Co-authored-by: Emma Jae Blue <[email protected]>
@isabelle-dr isabelle-dr added the Change: Addition New function proposed to the specification. label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Change: Addition New function proposed to the specification. GTFS Realtime Issues and Pull Requests that focus on GTFS Realtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants