This email concerns the issue of switching bundles in OBA during active bus service (but at the transition point for agency scheduling periods). This is important for us because we have active bus service 24/7.
Consider the following excerpts from a GTFS calendar.txt file, from a hypothetical GTFS file named Spring.zip:
service_id,monday,tuesday,wednesday,thursday,friday,saturday,sunday,start_date,end_date
20120408SAT,0,0,0,0,0,1,0,20120408,20120707
20120408SUN,0,0,0,0,0,0,1,20120408,20120707
This shows the service ID’s for, respectively, Saturday and Sunday service for the time period from April 8, 2012 through July 7, 2012. Consider also some trips from the trips.txt file for this same hypothetical GTFS file below. Note that, for convenience of exposition, trip_id is generated by (in pseudocode) sprintf(“%s_%s_%s_%s”, $trip->service_id, $trip->route_id, $trip->start_time, $trip->end_time) :
route_id,service_id,trip_id,trip_headsign,direction_id,block_id,shape_id
R1,20120408SAT,20120408SAT_R1_2350_2520,”Some Late Saturday Night Trip on R1”,0,,
R1,20120408SUN,20120408SUN_R1_0600_0730,”Some Sunday Morning Trip on R1”,0,,
During weekends entirely covered by this GTFS file, there will not be a problem with the bundle making available information on trip 20120408SAT_R1_2350_2520 (a trip on route R1 that starts late on Saturday night and continues into Sunday). So, for example, at 00:15 on, say, April 15, the bundle will indicate that this trip is active on route R1. At the same time, it would indicate that both of the following trips are active on route R2: 20120408SAT_R2_2350_2520 and 20120408SUN_R2_0001_0230. So far, so good.
However, consider the case when the scheduling period ends and we need to swap bundles, at say the midnight between 7/7/2012 and 7/8/2012. Consider an excerpt from the calendar.txt for the GTFS for the period July 8 through September 1, 2012, named Summer.zip:
service_id,monday,tuesday,wednesday,thursday,friday,saturday,sunday,start_date,end_date
20120709SAT,0,0,0,0,0,1,0,20120709,20120901
20120709SUN,0,0,0,0,0,0,1,20120709,20120901
And for trips.txt (basically the same as the previous service period, with new service ID’s):
route_id,service_id,trip_id,trip_headsign,direction_id,block_id,shape_id
R1,20120709SAT,20120709SAT_R1_2350_2520,”Some Late Saturday Night Trip on R1”,0,,
R1,20120709SUN,20120709SUN_R1_0600_0730,”Some Sunday Morning Trip on R1”,0,,
We swap the Summer bundle to replace the Spring bundle at 2012-07-09 00:01. Then, at 00:15 on 7/9/2012 and we query for all the trips on R1. We get back nothing, even though, in reality, trip 20120408SAT_R1_2350_2520 is still running from the previous scheduling period.
That’s the basic issue – some info simply falls through the cracks for trips taking place on Sunday but on a Saturday service_id when you have swapped a bundle at midnight. Thoughts on anything we could do to help with this? I have one hacky idea but I will keep it to myself for the time being so as not to muddy the waters.
Thanks,
Mike
Brian
> --
> You received this message because you are subscribed to the Google Groups
> "onebusaway-developers" group.
> To post to this group, send email to onebusaway...@googlegroups.com.
> To unsubscribe from this group, send email to
> onebusaway-devel...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/onebusaway-developers?hl=en.
Brian
It's not a trivial shell script to modify calendar dates but certainly something that could be done prior to building the bundle with a more sophisticated script.
Brian, thanks. My understanding of our in-person discussion was what I thought was a shared acknowledgement that GTFS doesn’t really currently support 2 picks at the same time. At a minimum, it doesn’t allow one to say that certain stops or routes apply only for certain parts of the merged period. When a route or a stop is removed or added, it will usually be on pick boundaries.
Can’t really speak about the details of how the hot bundle swapping was implemented. Jeff/Sheldon?
Thanks,
Mike
Service changes do complicate everything but I do think it's important to both come up with a merged GTFS across picks. For 3rd party consumers of your GTFS and realtime data, having to synchronize their own updates to your bundle switch is tricky, if not impossible. Having a reasonable merged GTFS can help mitigate this complication.
Either way, the merged GTFS issue is a bit orthogonal to the bundle swapping functionality. I'm +1 on swapping support and I'd be curious to understand how you currently manage your workflow.
Brian
>> To post to this group, send email to onebusaway-developers@googlegroups.com.
>> To unsubscribe from this group, send email to
>> onebusaway-developers+unsub...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/onebusaway-developers?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "onebusaway-developers" group.
> To post to this group, send email to onebusaway-developers@googlegroups.com.
> To unsubscribe from this group, send email to onebusaway-developers+unsub...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/onebusaway-developers?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "onebusaway-developers" group.
> To post to this group, send email to onebusaway-developers@googlegroups.com.
> To unsubscribe from this group, send email to onebusaway-developers+unsub...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/onebusaway-developers?hl=en.
>
--
You received this message because you are subscribed to the Google Groups "onebusaway-developers" group.
To post to this group, send email to onebusaway-developers@googlegroups.com.
To unsubscribe from this group, send email to onebusaway-developers+unsub...@googlegroups.com.