MobilityData / gtfs-realtime-validator

Java-based tool that validates General Transit Feed Specification (GTFS)-realtime feeds
Other
42 stars 10 forks source link

New Rule Proposal: Individual scheduled trip_id not accounted for in Vehicle Positions feed #160

Open evansiroky opened 2 years ago

evansiroky commented 2 years ago

Summary:

An error should be raised whenever an individual Trip that should be in service at the time a Vehicle Positions feed was downloaded is not accounted for in any VehiclePosition record in the Vehicle Positions feed after accounting for canceled trips noted in the Trip Updates feed.

Steps to reproduce:

Given a TripUpdate dataset and a Vehicle Positions dataset downloaded close to the same time as the TripUpdate dataset and their associated GTFS Schedule dataset When the validator has compiled a list of all trips that should be currently in service and has scanned through all TripUpdate entities in a Trip Updates feed to determine which trips have been canceled and has scanned through all VehiclePosition entities in a Vehicle Positions feed and does not find an individual Trip that was expected to be in service being accounted for in any VehiclePosition record Then the validator should flag this respective trip_id in question for not having any corresponding VehiclePosition entity describing its realtime status in the Vehicle Positions feed.

Expected behavior:

The GTFS-Realtime Best Practices state:

Feeds should cover the vast majority of trips included in the companion static GTFS dataset. In particular, it should include data for high-density and high-traffic city areas and busy routes.

The GTFS Validator should flag all trip_ids individually that should have been accounted for at the time that the trip should have been in service.

Observed behavior:

An error or warning is not raised for this problem at this time.

etc