-
Notifications
You must be signed in to change notification settings - Fork 0
/
rtt-announce.py
executable file
·4621 lines (4213 loc) · 155 KB
/
rtt-announce.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env python3
import collections
import datetime
import json
import os
import pprint
import pyaudio
import requests
import soundfile
import sys
import time
import tomllib
import traceback
import typing
toc_map = {
"Male1": {
"AW": ("arriva trains wales", True), # TODO
"CC": ("c2c", True),
"CH": ("chiltern railways", True),
# CS TODO
"EM": ("east midlands", True), # TODO
"ES": ("eurostar", True),
"GC": ("grand central", True),
"GN": ("great northern", True),
"GR": ("gner", True), # TODO
"GW": ("great western", True), # TODO
"GX": ("gatwick express", True),
"HT": ("hull trains", True),
"HX": ("heathrow express", True),
"IL": ("island line", True),
# LD TODO
"LE": ("anglia railways", True), # TODO
"LM": ("london midland", True), # TODO
"LO": ("london overground", True),
# LS TODO
"LT": ("london underground", True),
"ME": ("merseyside electrics", True), # TODO, maybe, though this is actually fairly similar to how Atos Anne announces it
# MV TODO
"NT": ("northern rail", True), # TODO
# NY TODO
"SE": ("southeastern", True),
# SJ TODO
"SN": ("southern", True),
# SO TODO
"SP": ("the swanage railway", True), # TODO
"SR": ("scotrail", True),
"SW": ("south west trains", True), # TODO
"TL": ("thameslink", True),
"TP": ("first transpennine express", True), # TODO
"TW": ("tyne and wear metro", True),
# TY TODO
"VT": ("virgin trains", True), # TODO
"WR": ("west coast railway company", True),
"XC": ("crosscountry", True),
# XR TODO
# YG TODO
},
"Female1": {
"AW": ("arriva trains wales", True), # TODO
"CC": ("c2c", True),
"CH": ("chiltern railways", True),
# CS TODO
"EM": ("east midlands trains", True), # TODO
"ES": ("eurostar", False),
"GC": ("grand central", True),
"GN": ("great northern", True),
"GR": ("gner", True), # TODO
"GW": ("great western", True), # TODO
"GX": ("gatwick express", True),
"HT": ("hull trains", True),
"HX": ("heathrow express", False),
"IL": ("island line", False),
# LD TODO
"LE": ("anglia railways", True), # TODO
"LM": ("london midland", True), # TODO
"LO": ("london overground", True),
# LS TODO
"LT": ("london underground", True),
"ME": ("merseyside electrics", False), # TODO, maybe, though this is actually fairly similar to how Atos Anne announces it
# MV TODO
"NT": ("northern rail", True), # TODO
# NY TODO
"SE": ("southeastern", True),
# SJ TODO
"SN": ("southern", True),
# SO TODO
"SP": ("the swanage railway", True), # TODO
"SR": ("scotrail", True),
"SW": ("south west trains", True), # TODO
"TL": ("thameslink", True),
"TP": ("arriva transpennine", False), # TODO
"TW": ("tyne and wear metro", True),
# TY TODO
"VT": ("virgin trains", True), # TODO
"WR": ("west coast railway company", False),
"XC": ("crosscountry", True),
# XR TODO
# YG TODO
},
"Female2": {
# AW TODO
# CC TODO
# CH TODO
# CS TODO
"EM": ("east midlands", True), # TODO
# ES TODO
"GC": ("grand central", True),
# GN TODO
"GR": ("gner", True), # TODO
"GW": ("first great western", True), # TODO
# GX TODO
# HT TODO
# HX TODO
# IL TODO
# LD TODO
# LE TODO
# LM TODO
"LO": ("london overground", True),
# LS TODO
# LT TODO
# ME TODO
# MV TODO
# NT TODO
# NY TODO
"SE": ("southeastern", True),
# SJ TODO
"SN": ("southern", True),
# SO TODO
# SP TODO
"SR": ("scotrail", True),
"SW": ("south west trains", True), # TODO
# TL TODO
# TP TODO
# TW TODO
# TY TODO
"VT": ("virgin trains", False), # TODO
# WR TODO
# XC TODO
# XR TODO
# YG TODO
}
}
station_map = {
"Male1": {
"GIL": "GIL-3",
"YVJ": "YVJ-2",
"CDN": "CDN - Smitham",
"SDC": "SDC - Shoreditch",
"BIT": "BIT - Bicester Town",
"BUI": "BUI - Strathclyde",
"CLT": "CLT - Clacton",
"DFE": "DFE - Dunfermline",
"AFS": "AFS - Middlesex",
"GSC": "GSC - Lambhill",
"HXX": "HXX - Heathrow Airport",
"LUA": "LUA - London Luton Airport",
"SAD": "SAD-2",
"SOF": "SOF - Woodham Ferrers",
"WAV": "WAV - Wavertree",
"WCF": "WCF - on sea",
},
"Female1": {
"GIL": "GIL-2",
"YVJ": "YVJ-2",
"CDN": "CDN - Smitham",
"SDC": "SDC - Shoreditch",
"BIT": "BIT - Bicester Town",
"CLT": "CLT - Clacton",
"DFE": "DFE - Dunfermline",
"AFS": "AFS - Middlesex",
"GSC": "GSC - Lambhill",
"HXX": "HXX - Heathrow Airport",
"LUA": "LUA - London Luton Airport",
"SOF": "SOF - Woodham Ferrers",
"WCF": "WCF - on sea",
},
"Female2": {
"CDB": "CDB - Cardiff Bute Road",
"CHX": "CHX - Charing Cross",
"DFE": "DFE - Dunfermline Town",
"EDB": "EDB - Edinburgh Waverley",
"GGJ": "GGJ - Georgemas",
"MOG": "MOG - London Moorgate"
}
}
cancel_map = {
"Male1": {
# AA acceptance into off-NR terminal or yard
# AC train prep/TOPS
"AD": ["a staff shortage"],
"AE": ["congestion"],
"AG": ["an incident on the line"],
"AH": ["a fault on trackside equipment"],
# AJ awaiting customer's traffic/doc
"AK": ["an incident on the line"],
"AX": ["a fault on trackside equipment"],
"AZ": ["a currently unidentified reason which is under investigation"],
# DA non-tech fleet
# DB Train operations
"DC": ["crewing difficulties"],
# DD tech fleet
# DE station
"DF": ["an external cause beyond our control"],
# DG terminals or yards
"DH": ["slippery rail conditions"],
"FA": ["an incident on the line"],
"FC": ["an incident on the line"],
"FE": ["awaiting a member of the train crew"],
"FF": ["crewing difficulties"],
# FG professional driving policy
# FH FOC planning issue non-crewing
"FI": ["signalling difficulties"],
# FJ FOC control decision
"FK": [
"a slow-running preceding freight train running behind schedule"
],
# FL FOC request
"FM": ["a fault on the train"],
"FO": ["a currently unidentified reason which is under investigation"],
"FS": ["signalling difficulties"],
"FW": ["a currently unidentified reason which is under investigation"],
"FX": [
"a slow-running preceding freight train running behind schedule"
],
"FZ": ["a currently unidentified reason which is under investigation"],
"IA": ["a signal failure"],
"IB": ["a points failure"],
"IC": ["a track circuit failure"],
"ID": ["a fault on a level crossing"],
"IE": ["a power supply problem"],
"IF": ["a failure of signalling equipment"],
"IG": ["a signalling apparatus failure"],
"IH": ["a power supply problem"],
"II": ["a technical fault to lineside equipment"],
"IJ": ["a fault on trackside equipment"],
"IK": ["a technical problem"],
"IL": ["a signalling apparatus failure"],
"IM": ["a technical fault to lineside equipment"],
"IN": ["a technical fault to lineside equipment"],
"IP": [
"a points failure",
"m/which has been caused by.wav",
"snow",
"m/and.wav",
"a fault on trackside equipment"
],
"IQ": ["a fault on trackside equipment"],
"IR": ["a broken rail"],
"IS": ["damaged track"],
"IT": ["a currently unidentified reason which is under investigation"],
"IV": ["a landslip"],
"IW": ["adverse weather conditions"],
"I0": ["a temporary fault with the signalling equipment"],
"I1": [
"overhead electric line problems",
"m/or-2.wav",
"third rail problems"
],
"I2": ["an electrical power supply problem"],
"I4": ["an electrical power supply problem"],
"I5": ["overrunning engineering work"],
"I6": ["overrunning engineering work"],
"I7": ["overrunning engineering work"],
"I8": ["animals on the railway line"],
"I9": ["a lineside fire"],
"JA": ["a temporary speed restriction because of track repairs"],
# not sure how to end this so just add a random today
"JB": ["a temporary speed restriction", "e/today.wav"],
"JD": ["suspected damage to a railway bridge"],
"JF": ["a fault on trackside equipment"],
"JG": ["a temporary speed restriction because of track repairs"],
"JH": ["the extreme heat"],
"JK": ["flooding"],
"JL": ["an incident on the line"],
"JP": ["a fallen tree on the line"],
"JR": ["signalling difficulties"],
"JS": ["a temporary speed restriction because of track repairs"],
"JT": [
"a points failure",
"m/which has been caused by.wav",
"snow",
],
"JX": ["objects on the line"],
"J0": ["a technical problem"],
"J2": ["a technical problem"],
"J3": ["a temporary fault with the signalling equipment"],
"J4": ["reports of a blockage on the line"],
"J5": ["reports of a blockage on the line"],
"J6": ["a lightning strike"],
"J7": ["a temporary fault with the signalling equipment"],
"J8": [
"damaged track",
"m/which has been caused by.wav",
"engineering work"
],
"J9": ["emergency engineering work"],
"MB": ["a broken down train"],
"MC": ["a broken down train"],
"MD": ["a broken down train"],
"ME": ["a broken down train"],
"ML": ["a train failure"],
"MN": ["a train failure"],
"MP": ["slippery rail conditions"],
"MR": ["a train failure"],
"MS": ["short formation of this train"],
"MT": ["a train failure"],
"MU": ["additional maintenance requirements at the depot"],
"MV": ["a fault on trackside equipment"],
"MW": [
"a train failure",
"m/which has been caused by.wav",
"adverse weather conditions"
],
"MY": [
"a fault that has occurred whilst attaching coaches to this train"
],
"M1": ["a train failure"],
"M7": ["train door problems"],
"M8": ["a train failure"],
"M0": ["a train failure"],
"NA": ["a train failure"],
"OA": ["a late-running preceding service"],
"OB": ["signalling difficulties"],
"OC": ["signalling difficulties"],
"OD": ["a late-running preceding service"],
"OE": ["slippery rail conditions"],
"OF": ["signalling difficulties"],
"OG": [
"third rail problems",
"m/which has been caused by.wav",
"adverse weather conditions"
],
"OH": ["signalling difficulties"],
"OJ": ["a fire"],
"OK": ["staff shortages"],
"OL": ["staff shortages"],
"OM": ["slippery rail conditions"],
"ON": ["a currently unidentified reason which is under investigation"],
"OQ": ["signalling difficulties"],
"OR": ["a late-running preceding service"],
"OS": ["slippery rail conditions"],
"OT": [
"a temporary speed restriction because of signalling equipment " +
"repairs"
],
"OU": ["a currently unidentified reason which is under investigation"],
"OV": ["a fire"],
"OW": [
"being held awaiting a late running connection",
"m/which has been caused by.wav",
"a slow-running preceding freight train running behind schedule"
],
"OZ": ["a currently unidentified reason which is under investigation"],
"PA": [
"a temporary speed restriction",
"m/which has been caused by.wav",
"engineering work"
],
"PB": ["a temporary speed restriction because of track repairs"],
# PD system generated cancellation
"PF": ["engineering work"],
# PG planned cancellation
# PJ duplicate
# PL exclusion agreed
"PN": ["a late-running preceding service"],
# PT TRUST anomalies
"QA": [
"a technical problem",
"e/from the original timetable schedule.wav"
],
"QB": ["engineering work"],
"QH": ["poor rail conditions caused by leaf fall"],
"QI": ["poor rail conditions caused by leaf fall"],
"QJ": ["poor rail conditions caused by leaf fall"],
# QM VAR/STP problem
# QN VSTP problem
"QP": ["engineering work"],
# QT commercial delay accepted
"RB": ["large numbers of passengers joining the trains"],
"RC": ["a member of staff providing assistance to a passenger"],
"RD": ["additional coaches being attached to the train"],
# RE lift/escalator failure
"RH": ["a fire"],
"RI": ["being held awaiting a late running connection"],
"RJ": ["this train making additional stops on its journey"],
"RK": ["being held awaiting a late running connection"],
"RL": ["this train making additional stops on its journey"],
"RK": ["being held awaiting a replacement bus connection"],
"RO": ["passenger illness"],
"RP": ["a passenger incident"],
"RQ": ["a member of staff providing assistance to a passenger"],
"RR": ["large numbers of passengers joining the trains"],
"RS": ["large numbers of passengers joining the trains"],
"RT": ["large numbers of passengers joining the trains"],
"RU": ["a passenger incident"],
"RV": [
"confusion caused by a fault with the station information board"
],
"RW": ["flooding"],
"RX": ["overcrowding"],
"RY": ["a passenger incident"],
"RZ": ["a currently unidentified reason which is under investigation"],
"R1": ["an incident on the line"],
"R2": ["an incident on the line"],
"R3": ["a shortage of train dispatch staff"],
"R4": ["a shortage of train dispatch staff"],
"R5": ["an incident on the line"],
"R7": ["overcrowding"],
"R8": ["a currently unidentified reason which is under investigation"],
"TA": ["crewing difficulties"],
# TB operator request
"TF": ["a fault on the train"],
"TG": ["a temporary shortage of drivers"],
"TH": ["a temporary shortage of train crews"],
"TI": ["crewing difficulties"],
"TJ": ["a fault on the train"],
"TK": ["a temporary shortage of train crews"],
"TM": ["being held awaiting a late running connection"],
"TN": ["an external cause beyond our control"],
"TO": ["a currently unidentified reason which is under investigation"],
"TP": ["this train making additional stops on its journey"],
# TR TOC directive
"TS": ["signalling difficulties"],
"TT": ["poor rail conditions caused by leaf fall"],
# TW professional driving policy
"TX": ["an external cause beyond our control"],
"TY": ["an incident on the line"],
"TZ": ["a currently unidentified reason which is under investigation"],
# T2 non-DOO delay at unstaffed station
"T3": ["being held awaiting a replacement bus connection"],
# T4 loading supplies
"T8": ["a currently unidentified reason which is under investigation"],
"VA": ["trespass on the line"],
"VB": ["vandalism"],
"VC": ["an accident to a member of the public"],
"VD": ["a passenger having been taken ill on this train"],
"VE": ["a ticket irregularity on board this train"],
"VF": [
"a fire",
"m/which has been caused by.wav",
"vandalism"
],
"VG": ["police activity on the line"],
"VH": ["the emergency communication cord being activated"],
"VI": ["a security alert"],
"VR": ["severe weather conditions"],
"VW": ["severe weather conditions"],
"VX": ["an external cause beyond our control"],
"VZ": ["a currently unidentified reason which is under investigation"],
"V8": ["animals on the railway line"],
"XA": ["trespass on the line"],
"XB": ["vandalism"],
"XC": ["a fatality"],
"XD": ["an accident on a level crossing"],
"XF": ["police activity on the line"],
"XH": ["the extreme heat"],
"XI": ["a security alert"],
"XK": ["a major electrical power fault"],
"XL": ["a fire"],
"XM": ["an external cause beyond our control"],
"XN": ["a road vehicle on the line"],
"XO": ["objects on the line"],
"XP": ["a road vehicle striking a railway bridge"],
# XQ swing bridge
"XR": ["vandalism"],
"XT": ["snow"],
"XU": ["adverse weather conditions"],
"XV": ["a fire"],
"XW": ["high winds"],
"X1": ["fog"],
"X2": ["flooding"],
"X3": ["a lightning strike"],
"X4": ["extreme weather conditions"],
"X8": ["animals on the railway line"],
"X9": [
"a points failure",
"m/which has been caused by.wav",
"snow",
],
"YA": ["a late-running preceding service"],
"YB": ["a late-running preceding service"],
"YC": ["a late-running preceding service"],
"YD": ["a late-running preceding service"],
"YE": ["a late-running preceding service"],
"YG": ["a late-running preceding service"],
"YI": ["the late arrival of an incoming train"],
"YJ": ["awaiting a member of the train crew"],
"YL": ["being held awaiting a late running connection"],
"YM": ["this train making additional stops on its journey"],
"YN": ["awaiting a member of the train crew"],
"YO": ["awaiting an available platform because of service congestion"],
"YP": ["the train being diverted from its scheduled route"],
"YQ": [
"overcrowding caused by the short formation of this service today"
],
# YR tactical service recovery
"YU": ["a shortage of available coaches"],
"YT": ["an external cause beyond our control"],
"YV": ["a line blockage"],
"YX": [
"overcrowding caused by the",
"e/delay or cancellation.wav",
],
# ZS sub-threshold delay
# ZU no cause
# ZW system roll-up
# ZX system roll-up
# ZY system roll-up
# ZZ system roll-up
},
"Female1": {
"AA": ["operational problems"],
"AC": ["operational problems"],
"AD": ["a staff shortage"],
"AE": ["congestion"],
"AG": ["an incident on the line"],
"AH": ["a fault on trackside equipment"],
"AJ": ["operational problems"],
"AK": ["an incident on the line"],
"AX": ["a fault on trackside equipment"],
"AZ": ["a currently unidentified reason which is under investigation"],
"DA": ["operational problems"],
"DB": ["operational problems"],
"DC": ["operational problems"],
"DD": ["operational problems"],
"DE": ["operational problems"],
"DF": ["an external cause beyond our control"],
"DG": ["operational problems"],
"DH": ["slippery rail conditions"],
"FA": ["an incident on the line"],
"FC": ["an incident on the line"],
"FE": ["awaiting a member of the train crew"],
"FF": ["operational problems"],
"FG": ["operational problems"],
"FH": ["operational problems"],
"FI": ["signalling difficulties"],
"FJ": ["operational problems"],
"FK": [
"a slow-running preceding freight train running behind schedule"
],
# FL FOC request
"FM": ["a fault on the train"],
"FO": ["a currently unidentified reason which is under investigation"],
"FS": ["signalling difficulties"],
"FW": ["a currently unidentified reason which is under investigation"],
"FX": [
"a slow-running preceding freight train running behind schedule"
],
"FZ": ["a currently unidentified reason which is under investigation"],
"IA": ["a failure of signalling equipment"],
"IB": ["a points failure"],
"IC": ["a track circuit failure"],
"ID": ["a fault on a level crossing"],
"IE": ["a power failure"],
"IF": ["a failure of signalling equipment"],
"IG": ["a failure of signalling equipment"],
"IH": ["a power failure"],
"II": ["a technical fault to lineside equipment"],
"IJ": ["a fault on trackside equipment"],
"IK": ["a technical fault to lineside equipment"],
"IL": ["a failure of signalling equipment"],
"IM": ["a technical fault to lineside equipment"],
"IN": ["a technical fault to lineside equipment"],
"IP": [
"a points failure",
"m/which has been caused by.wav",
"snow",
"m/and.wav",
"a fault on trackside equipment"
],
"IQ": ["a fault on trackside equipment"],
"IR": ["a broken rail"],
"IS": ["damaged track"],
"IT": ["a currently unidentified reason which is under investigation"],
"IV": ["a landslip"],
"IW": ["adverse weather conditions"],
"I0": ["a temporary fault with the signalling equipment"],
"I1": [
"overhead electric line problems",
"m/or.wav",
"third rail problems"
],
"I2": ["an electrical power supply problem"],
"I4": ["an electrical power supply problem"],
"I5": ["overrunning engineering work"],
"I6": ["overrunning engineering work"],
"I7": ["overrunning engineering work"],
"I8": ["animals on the railway line"],
"I9": ["a lineside fire"],
"JA": ["a temporary speed restriction because of track repairs"],
# not sure how to end this so just add a random today
"JB": ["a temporary speed restriction", "e/today.wav"],
"JD": ["suspected damage to a railway bridge"],
"JF": ["a fault on trackside equipment"],
"JG": ["a temporary speed restriction because of track repairs"],
"JH": ["the extreme heat"],
"JK": ["flooding"],
"JL": ["an incident on the line"],
"JP": ["a fallen tree on the line"],
"JR": ["signalling difficulties"],
"JS": ["a temporary speed restriction because of track repairs"],
"JT": [
"a points failure",
"m/which has been caused by.wav",
"snow",
],
"JX": ["objects on the line"],
"J0": ["a technical fault to lineside equipment"],
"J2": ["a technical fault to lineside equipment"],
"J3": ["a temporary fault with the signalling equipment"],
"J4": ["reports of a blockage on the line"],
"J5": ["reports of a blockage on the line"],
"J6": ["a lightning strike"],
"J7": ["a temporary fault with the signalling equipment"],
"J8": [
"damaged track",
"m/which has been caused by.wav",
"engineering works"
],
"J9": ["emergency engineering work"],
"MB": ["a broken down train"],
"MC": ["a broken down train"],
"MD": ["a broken down train"],
"ME": ["a broken down train"],
"ML": ["a train failure"],
"MN": ["a train failure"],
"MP": ["slippery rail conditions"],
"MR": ["a train failure"],
"MS": ["short formation of this train"],
"MT": ["a train failure"],
"MU": ["additional maintenance requirements at the depot"],
"MV": ["a fault on trackside equipment"],
"MW": [
"a train failure",
"m/which has been caused by.wav",
"adverse weather conditions"
],
"MY": [
"a fault that has occurred whilst attaching coaches to this train"
],
"M1": ["a train failure"],
"M7": ["train door problems"],
"M8": ["a train failure"],
"M0": ["a train failure"],
"NA": ["a train failure"],
"OA": ["a late-running preceding service"],
"OB": ["signalling difficulties"],
"OC": ["signalling difficulties"],
"OD": ["a late-running preceding service"],
"OE": ["slippery rail conditions"],
"OF": ["signalling difficulties"],
"OG": [
"third rail problems",
"m/which has been caused by.wav",
"adverse weather conditions"
],
"OH": ["signalling difficulties"],
"OJ": ["a fire"],
"OK": ["a staff shortage"],
"OL": ["a staff shortage"],
"OM": ["slippery rail conditions"],
"ON": ["a currently unidentified reason which is under investigation"],
"OQ": ["signalling difficulties"],
"OR": ["a late-running preceding service"],
"OS": ["slippery rail conditions"],
"OT": [
"a temporary speed restriction because of signalling equipment " +
"repairs"
],
"OU": ["a currently unidentified reason which is under investigation"],
"OV": ["a fire"],
"OW": [
"being held awaiting a late running connection",
"m/which has been caused by.wav",
"a slow-running preceding freight train running behind schedule"
],
"OZ": ["a currently unidentified reason which is under investigation"],
"PA": [
"a temporary speed restriction",
"m/which has been caused by.wav",
"engineering works"
],
"PB": ["a temporary speed restriction because of track repairs"],
# PD system generated cancellation
"PF": ["engineering works"],
# PG planned cancellation
# PJ duplicate
# PL exclusion agreed
"PN": ["a late-running preceding service"],
# PT TRUST anomalies
"QA": ["operational problems"],
"QB": ["engineering works"],
"QH": ["poor rail conditions caused by leaf fall"],
"QI": ["poor rail conditions caused by leaf fall"],
"QJ": ["poor rail conditions caused by leaf fall"],
# QM VAR/STP problem
# QN VSTP problem
"QP": ["engineering works"],
# QT commercial delay accepted
"RB": ["large numbers of passengers joining the trains"],
"RC": ["a member of staff providing assistance to a passenger"],
"RD": ["additional coaches being attached to the train"],
# RE lift/escalator failure
"RH": ["a fire"],
"RI": ["being held awaiting a late running connection"],
"RJ": ["this train making additional stops on its journey"],
"RK": ["being held awaiting a late running connection"],
"RL": ["this train making additional stops on its journey"],
"RK": ["being held awaiting a replacement bus connection"],
"RO": ["passenger illness"],
"RP": ["a passenger incident"],
"RQ": ["a member of staff providing assistance to a passenger"],
"RR": ["large numbers of passengers joining the trains"],
"RS": ["large numbers of passengers joining the trains"],
"RT": ["large numbers of passengers joining the trains"],
"RU": ["a passenger incident"],
"RV": [
"confusion caused by a fault with the station information board"
],
"RW": ["flooding"],
"RX": ["overcrowding"],
"RY": ["a passenger incident"],
"RZ": ["a currently unidentified reason which is under investigation"],
"R1": ["an incident on the line"],
"R2": ["an incident on the line"],
"R3": ["a shortage of train dispatch staff"],
"R4": ["a shortage of train dispatch staff"],
"R5": ["an incident on the line"],
"R7": ["overcrowding"],
"R8": ["a currently unidentified reason which is under investigation"],
"TA": ["operational problems"],
# TB operator request
"TF": ["a fault on the train"],
"TG": ["a temporary shortage of drivers"],
"TH": ["a temporary shortage of train crews"],
"TI": ["operational problems"],
"TJ": ["a fault on the train"],
"TK": ["a temporary shortage of train crews"],
"TM": ["being held awaiting a late running connection"],
"TN": ["an external cause beyond our control"],
"TO": ["a currently unidentified reason which is under investigation"],
"TP": ["this train making additional stops on its journey"],
"TR": ["operational problems"],
"TS": ["signalling difficulties"],
"TT": ["poor rail conditions caused by leaf fall"],
"TW": ["operational problems"],
"TX": ["an external cause beyond our control"],
"TY": ["an incident on the line"],
"TZ": ["a currently unidentified reason which is under investigation"],
"T2": ["operational problems"],
"T3": ["being held awaiting a replacement bus connection"],
"T4": ["operational problems"],
"T8": ["a currently unidentified reason which is under investigation"],
"VA": ["trespass on the line"],
"VB": ["vandalism"],
"VC": ["an accident to a member of the public"],
"VD": ["passenger illness"],
"VE": ["a ticket irregularity on board this train"],
"VF": [
"a fire",
"m/which has been caused by.wav",
"vandalism"
],
"VG": ["police activity on the line"],
"VH": ["the emergency communication cord being activated"],
"VI": ["a security alert"],
"VR": ["severe weather conditions"],
"VW": ["severe weather conditions"],
"VX": ["an external cause beyond our control"],
"VZ": ["a currently unidentified reason which is under investigation"],
"V8": ["animals on the railway line"],
"XA": ["trespass on the line"],
"XB": ["vandalism"],
"XC": ["a fatality"],
"XD": ["an accident on a level crossing"],
"XF": ["police activity on the line"],
"XH": ["the extreme heat"],
"XI": ["a security alert"],
"XK": ["a major electrical power fault"],
"XL": ["a fire"],
"XM": ["an external cause beyond our control"],
"XN": ["a road vehicle on the line"],
"XO": ["objects on the line"],
"XP": ["a road vehicle striking a railway bridge"],
"XQ": ["operational problems"],
"XR": ["vandalism"],
"XT": ["snow"],
"XU": ["adverse weather conditions"],
"XV": ["a fire"],
"XW": ["high winds"],
"X1": ["fog"],
"X2": ["flooding"],
"X3": ["a lightning strike"],
"X4": ["extreme weather conditions"],
"X8": ["animals on the railway line"],
"X9": [
"a points failure",
"m/which has been caused by.wav",
"snow",
],
"YA": ["a late-running preceding service"],
"YB": ["a late-running preceding service"],
"YC": ["a late-running preceding service"],
"YD": ["a late-running preceding service"],
"YE": ["a late-running preceding service"],
"YG": ["a late-running preceding service"],
"YI": ["the late arrival of an incoming train"],
"YJ": ["awaiting a member of the train crew"],
"YL": ["being held awaiting a late running connection"],
"YM": ["this train making additional stops on its journey"],
"YN": ["awaiting a member of the train crew"],
"YO": ["awaiting an available platform because of service congestion"],
"YP": ["the train being diverted from its scheduled route"],
"YQ": [
"overcrowding caused by the short formation of this service today"
],
"YR": ["operational problems"],
"YU": ["a shortage of available coaches"],
"YT": ["an external cause beyond our control"],
"YV": ["reports of a blockage on the line"],
"YX": ["overcrowding"],
# ZS sub-threshold delay
# ZU no cause
# ZW system roll-up
# ZX system roll-up
# ZY system roll-up
# ZZ system roll-up
},
"Female2": {
# AA acceptance into off-NR terminal or yard
# AC train prep/TOPS
"AD": ["a staff shortage"],
"AE": ["signalling difficulties"],
"AG": ["an incident on the line"],
"AH": ["a technical problem"],
# AJ awaiting customer's traffic/doc
"AK": ["an incident on the line"],
"AX": ["a technical problem"],
# AZ other FOC cause
# DA non-tech fleet
# DB Train operations
"DC": ["a staff shortage"],
# DD tech fleet
# DE station
# DF external causes
# DG terminals or yards
"DH": ["poor rail conditions"],
"FA": ["an incident on the line"],
"FC": ["an incident on the line"],
"FE": ["a staff shortage"],
"FF": ["a staff shortage"],
# FG professional driving policy
# FH FOC planning issue non-crewing
"FI": ["signalling difficulties"],
# FJ FOC control decision
# FK FOC divert request
# FL FOC request
"FM": ["a train failure"],
# FO believed to be operator caused
"FS": ["signalling difficulties"],
# FW unexplained late start
# FX freight running at lower speed than specified
# FZ other FOC cause
"IA": ["a signalling apparatus failure"],
"IB": ["a points failure"],
"IC": ["a signalling apparatus failure"],
"ID": ["a technical problem"],
"IE": ["a technical problem"],
"IF": ["a signalling apparatus failure"],
"IG": ["a signalling apparatus failure"],
"IH": ["a technical problem"],
"II": ["a technical problem"],
"IJ": ["a technical problem"],
"IK": ["a technical problem"],
"IL": ["a signalling apparatus failure"],
"IM": ["a technical problem"],
"IN": ["a technical problem"],
"IP": ["a points failure"],
"IQ": ["a technical problem"],
"IR": ["poor rail conditions"], # broken is poor, right?
"IS": ["poor rail conditions"],
"IT": ["poor rail conditions"],
"IV": ["an incident on the line"],
"IW": ["adverse weather conditions"],
"I0": ["a signalling apparatus failure"],
"I1": ["overhead electric line problems"],
"I2": ["a technical problem"],
"I4": ["a technical problem"],
"I5": ["engineering work"],
"I6": ["engineering work"],
"I7": ["engineering work"],
"I8": ["an incident on the line"],
"I9": ["an incident on the line"],
"JA": ["engineering work"],
"JB": ["engineering work"],
"JD": ["suspected damage to a railway bridge"],
"JF": ["a technical problem"],
"JG": ["engineering work"],
"JH": ["adverse weather conditions"],
"JK": ["bad weather conditions"],
"JL": ["an incident on the line"],
"JP": ["an incident on the line"],
"JR": ["signalling difficulties"],
"JS": ["engineering works"],
"JT": ["a points failure"],
"JX": ["an incident on the line"],
"J0": ["a technical problem"],
"J2": ["a technical problem"],
"J3": ["a signalling apparatus failure"],
"J4": ["an incident on the line"],
"J5": ["an incident on the line"],
"J6": ["bad weather conditions"],
"J7": ["a signalling apparatus failure"],
"J8": ["engineering work"],
"J9": ["engineering work"],
"MB": ["a train failure"],
"MC": ["a train failure"],
"MD": ["a train failure"],
"ME": ["a train failure"],
"ML": ["a train failure"],
"MN": ["a train failure"],
"MP": ["poor rail conditions"],
"MR": ["a train failure"],
# MS short formation
"MT": ["a train failure"],
"MU": ["a train failure"],
"MV": ["a technical problem"],
"MW": ["a train failure"],
"MY": ["a train failure"],
"M1": ["a train failure"],
"M7": ["a train failure"],
"M8": ["a train failure"],
"M0": ["a train failure"],
"NA": ["a train failure"],
"OA": ["signalling difficulties"],
"OB": ["signalling difficulties"],
"OC": ["signalling difficulties"],
"OD": ["signalling difficulties"],
"OE": ["poor rail conditions"],
"OF": ["signalling difficulties"],
"OG": ["adverse weather conditions"],
"OH": ["signalling difficulties"],
"OJ": ["an incident on the line"],
"OK": ["staff shortages"],
"OL": ["staff shortages"],
"OM": ["poor rail conditions"],
# ON delays not investigated
"OQ": ["signalling difficulties"],
"OR": ["signalling difficulties"],
"OS": ["poor rail conditions"],
"OT": ["a signalling apparatus failure"],
# OU delays not investigated
"OV": ["an incident on the line"],
"OW": ["the late arrival of an incoming train"],
# OZ other NR
"PA": ["engineering work"],
"PB": ["engineering work"],
# PD system generated cancellation
"PF": ["engineering work"],
# PG planned cancellation
# PJ duplicate
# PL exclusion agreed
# PN VSTP delay under 5 minutes
# PT TRUST anomalies
"QA": ["a technical problem"],
"QB": ["engineering work"],
"QH": ["poor rail conditions"],
"QI": ["poor rail conditions"],
"QJ": ["poor rail conditions"],
# QM VAR/STP problem
# QN VSTP problem
"QP": ["engineering work"],
# QT commercial delay accepted
# RB passengers joining/alighting
# RC pre-booked assistance
# RD attaching/detaching
# RE lift/escalator failure
"RH": ["an incident on the line"],
"RI": ["the late arrival of an incoming train"],
# RJ unauthorised special stop orders
"RK": ["the late arrival of an incoming train"],
# RL authorised special stop orders
"RK": ["the late arrival of an incoming train"],
"RO": ["an incident on the line"],
"RP": ["an incident on the line"],
# RQ unbooked assistance
# RR reserved cycles
# RS unreserved cycles
# RT luggage
"RU": ["an incident on the line"],
"RV": ["a technical problem"],
"RW": ["bad weather conditions"],
"RX": ["an incident on the line"],
"RY": ["an incident on the line"],
# RZ other station
"R1": ["an incident on the line"],