Trips that should appear on more than one route's schedule (multi_route_trips.txt)

159 views
Skip to first unread message

Developer at MBTA

unread,
Feb 22, 2017, 3:00:46 PM2/22/17
to MBTA Developers
We're planning on adding a new file to our GTFS feed next month. This file will offer information to help feed consumers model trips that serve more than one route. If in your applications you have a need to show all the trips associated with a route and could benefit from using this, read on. If this file is not useful to you, it is safe to ignore. No values in existing files will be altered as part of the introduction of this new file.

The problem: trips that serve more than one route
Example 1: the train on two lines
At 6:55pm on weekdays train 221 leaves the MBTA's North Station. It serves five stops on the Lowell Line, then uses a special track that connects the Lowell Line to the Haverhill Line, and serves five stops on the Haverhill Line. As such the MBTA publishes it on both the Lowell Line schedule and the Haverhill Line schedule. In GTFS it's marked as a Haverhill Line trip, with no indication that it should also appear on a presentation of the Lowell Line's  schedule, or that the five Lowell Line stops it serves should not be considered part of the Haverhill Line. 

Example 2: the hybrid bus route
On weekdays the MBTA operates bus routes 62 and 76. On Saturday there is not enough demand for either but there is enough demand for one route that combines them, so we run buses on "route 62/76," which incorporates many of the stops on each route but all of the stops on neither. In this case the destination sign on the buses reads "62/76." We currently represent this as its own route in GTFS, with no data to indicate that a customer looking for a route 62 schedule or a route 76 schedule should be shown this route, or that "route 62/76" should be excluded from a list of MBTA bus services as redundant. 

Planned solution
We plan to add "multi_route_trips.txt" to our GTFS feed. Multi_route_trips.txt will identify these trips as being associated with more than one route. Nothing would change outside of this new file. 

The file will have two fields: one for the trip, and one for the route the trip should also be considered a part of. A sample appears below, and a full file consistent with the current GTFS feed is attached. 

added_route_id,trip_id
CR
-Lowell     ,CR-Weekday-Fall-16-221
62            ,Route-62-76-trip-1
67            ,Route-62-76-trip-1
62            ,Route-62-76-trip-2
67            ,Route-62-76-trip-2


So the "CR-Lowell" line above is read as "the trip 'CR-Weekday-Fall-16-221' should be shown on the route 'CR-Lowell' schedule in addition to the schedule of its own route. 

Next steps
We'd welcome any feedback you may have. We plan to add this file to our production GTFS feed next month. 

Sincerely,
developer@mbta
multi_route_trips.txt

Owen Savill

unread,
Apr 6, 2017, 11:48:39 AM4/6/17
to MBTA Developers
The latest file shows this:

"CR-Lowell","CR-Weekday-Fall-16-221"
"CR-Haverhill","CR-Weekday-Fall-16-221"
"CR-Fairmount","CR-Weekday-Fall-16-790"
"CR-Franklin","CR-Weekday-Fall-16-790"
"CR-Fairmount","CR-Weekday-Fall-16-746"
"CR-Franklin","CR-Weekday-Fall-16-746"

Taking
"CR-Lowell","CR-Weekday-Fall-16-221"
"CR-Haverhill","CR-Weekday-Fall-16-221"
the trip CR-Weekday-Fall-16-221 only goes in one direction. Should one not be CR-Weekday-Fall-16-220 or  CR-Weekday-Fall-16-222?

This approach will result in two services being shown for each stop at a given time, e.g. North Station 18:55 on CR-Lowell and 18:55 on CR-Haverhill both going to Haverhill

Also, does this revised list only apply to CR lines and buses?

Thanks,

Developer at MBTA

unread,
Apr 6, 2017, 7:05:07 PM4/6/17
to MBTA Developers
Hi Owen, it's correct that the Haverhill-via-Lowell only occurs in one direction currently. The best way to handle the North Station case you describe depends on your application. If you want to use just one route and are looking for a default, you should use the route that's referenced in trips.txt, which is consistent with what appears on the departure board.

Right now this condition is only applicable to some bus and some commuter rail trips. The condition isn't applicable to any subway service and there are currently no plans to schedule subway service for which it would apply, although it's not impossible.

Sincerely,
Developer@mbta

Owen Savill

unread,
Apr 7, 2017, 4:49:52 AM4/7/17
to MBTA Developers
Hi MBTA,

Many thanks for you prompt reply. So basically can this file be ignored for basic scheduling and route planning?

Developer at MBTA

unread,
Apr 7, 2017, 8:46:27 AM4/7/17
to MBTA Developers
Yes, it can be ignored for basic trips planning.

Sincerely,
Developer@mbta

Reply all
Reply to author
Forward
0 new messages