Hi all,
I am trying to obtain a full timetable for each day by taking one full CIF schedule as the baseline and applying the subsequent daily update files.
While doing this, I have encountered several cases where it is unclear which schedule should remain active.
1. Overlay and cancellation on the same dateIf an STP indicator = O schedule and an STP indicator = C schedule are both valid for the same UID and operating date, should the overlay still run?
2. Overlay and revised permanent scheduleIf an STP indicator = O, transaction type N schedule and a later STP indicator = P, transaction type R schedule are both valid on the same operating date, should the STP indicator = O schedule take precedence?
3. Unmatched transaction type R recordsI have found transaction type R records whose start date does not match any existing schedule. Since a schedule is identified by UID + start date + STP indicator, it is unclear which schedule these records revise.
My current code treats an unmatched R record as a new schedule. Is this the correct approach?
4. Multiple overlay schedules valid on the same dateI have also found cases where more than one STP indicator = O schedule is valid for the same UID and operating date. For example, UID W92440 has two overlay schedules valid on 7 February 2022 after applying the available updates.How should these cases be resolved?
Does anyone know how these cases should be handled?
Thanks very much.
--
You received this message because you are subscribed to the Google Groups "A gathering place for the Open Rail Data community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openraildata-t...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/openraildata-talk/053f146a-8d2e-45df-95b0-6b07db011435n%40googlegroups.com.
Hi Peter,
Thank you for your reply. Here is one example for UID C30985.
In the full schedule dated 1 January 2022, I have the following BS records:
BSNC309852112122205080000001 PEE5Y3200 124676004 EMU 075D P
BSNC309852112122201020000001 1 C
BSNC309852201162201160000001 PEE5Y3200 124676004 EMU 075D O
BSNC309852201232201230000001 PEE5Y3200 124676004 EMU 075D O
BSNC309852201302201300000001 PEE5Y3200 124676004 EMU 075D O
BSNC309852202062202130000001 1 C
BSNC309852202272205080000001 1 C
The subsequent updates contain:
6 January update
BSNC309852112122201090000001 1 C
7 January update
BSDC30985220116 O
12 January update
BSNC309852112122201160000001 1 C
13 January update
BSDC30985220123 O
27 January update
BSNC309852112122202130000001 1 C
BSDC30985220206 C
After applying these updates, I still have the following records valid on 30 January 2022:
All three run on Sundays, and 30 January 2022 was a Sunday.
If an STP indicator = O schedule and an STP indicator = C schedule are both valid for the same UID and operating date, should the overlay still run?
If the STP C record appeared in a later update then it cancels the services for that date, regardless of whether it is the permanent schedule or the overlay schedule.
If an STP indicator = O, transaction type N schedule and a later STP indicator = P, transaction type R schedule are both valid on the same operating date, should the STP indicator = O schedule take precedence?
A Revise schedule for the P record does not override the Overlay record. If the Overlay is also to be amended it will have it's own Revision (or a deletion 9 if it is to now folow the timings of the Permament schedule.
I have found transaction type R records whose start date does not match any existing schedule. Since a schedule is identified by UID + start date + STP indicator, it is unclear which schedule these records revise.
My current code treats an unmatched R record as a new schedule. Is this the correct approach?
A grey area. I have seen cases of a previously unadvertised train changing its category to become an advertised passenger train. If your CIF feed does not include unadvartised sevrices then you will not have seen the N record schedule, but will see the R record. In my view, the train category should never be changed after initial publication but some train planners have been known to do it in the past.
Your approach is probably okay, however you need to beware that a train category has not been amended in error by the planners.