ibi-group / OpenTripPlanner

An open source multi-modal trip planner
http://www.opentripplanner.org
Other
13 stars 2 forks source link

Hide agency (global) alerts from itineraries. #44

Closed fpurcell closed 1 year ago

fpurcell commented 4 years ago

Expected behavior

TriMet has an ongoing 'global' alert in our GTFS-RT feed right now (Covid wear a mask alert). We don't want to see that alert showing up in the itinerary ... we only want to see alerts inline with routes in the itinerary.

Observed behavior

This agency alert is showing up (multiple times) in the itinerary.

entity {
  id: "72332"
  alert {
    active_period {
      start: 1595845860
    }
    informed_entity {
      agency_id: "TRIMET"
    }
    url {
      translation {
        text: "http://trimet.org/health"
      }
    }
    description_text {
      translation {
        text: "A scarf, bandanna or fabric mask works, as long as it covers your nose and mouth."
      }
    }
  }
}

(See: https://developer.trimet.org/ws/V1/FeedSpecAlerts/appid/B393B2CE96A258A72BAB481CA/text/true)

Don't want to see this alert at all in our itinerary response...but right now it's repeated for every route:

Screen Shot 2020-07-30 at 12 24 58 PM

Version of OTP used (exact commit hash or JAR name)

ibi-group master

Data sets in use (links to GTFS and OSM PBF files)

https://maps.trimet.org/m/

fpurcell commented 4 years ago

BTW, we would like a configuration param to control this hiding of AGENCY alerts from the itinerary. Here's a proposed config param in router-config.json (generated from a recent discussion with Landon):

 {
          type: "real-time-alerts",
          frequencySec: 30,
          earlyStart: 864000,
          url: "http://trimet.org/transweb/ws/V1/FeedSpecAlerts/includeFuture/true",
          feedId: "TriMet",
      >>  hideAgencyAlerts: true
 },

If the hideAgencyAlerts: true is in router-config.json, then only alerts with route numbers get into OTP responses. If the config either lacks hideAgencyAlerts or hideAgencyAlerts: false then all alerts show up in the itinerary.

fpurcell commented 1 year ago

we don't need this ... resolved by adding a param (url path) to not include global alerts in the gtfs-rt feed