Closed ddohler closed 9 years ago
SEPTA rail before:
SEPTA rail after:
+1, nice! If you haven't already, I think it'd be good to try this out with Zhengzhou data to verify that the updated numbers look more sensible.
The problem with the Zhengzhou data is that it's from a scenario, so this fix won't really affect it because we don't have any way to edit trip directions in scenarios. The good news is that with scenarios, it's relatively straightforward to fix this problem by manually creating separate stations for inbound and outbound trips.
Trips in opposite directions were causing the average service frequency indicator (which is actually headway) to report numbers that were roughly 50% too low when the inbound and outbound trips shared stops as in metro or train service. Bus service was usually not affected because bus stops are usually split between inbound and outbound service when they are on opposite sides of the street. This parses out the direction_id parameter from GTFS feeds, when it exists, and groups the trips by direction_id when calculating the service frequency.
If the direction_id doesn't exist in the gtfs file, all trips will be grouped together, so if there are opposite direction trips which share the same stop, the service frequency at that stop will be artificially reduced.
Note that user-generated scenarios will not benefit from this change because the scenario editor doesn't have any concept of trip directionality, and therefore all trips will be grouped together.