-
-
Notifications
You must be signed in to change notification settings - Fork 4
Description
When the T shuttles a middle segment of a line, like when the GL was recently shuttled from Government Center to North Station, it creates twice as many Trip
entries in our code for that line — intuitively, because riding the entire line means you have to take two trains. This makes it look like e.g. the Red Line runs 24 trains per hour instead of 12.
We need a way to detect and mitigate this so we can run make update-data
while the T is shuttling.
Here be dragons. @mathcolo and I have taken a few different approaches to this, and not cracked it so far. This PR has a promising approach, but it also caused us to erroneously halve computed service levels on some lines. Another, possibly more generalizable approach would be to augment each Trip
object with the total number of stops that it serves, and count fractions of a trip on this basis. This would require modifying the model here:
class Trip(object): |
...which gets pickled into a binary file as a reduced representation of a GTFS bundle's trips, because a GTFS bundle takes a long time to load and parse and we don't want to do that every time we run the code.
In general please familiarize yourself with the GTFS spec and the MBTA's extensions to the spec, in particular lines.txt
, before starting with this task.