Difference between revisions of "Train Cancellation"

From Open Rail Data Wiki
Jump to navigation Jump to search
Line 1: Line 1:
== Overview ==
 
 
 
A cancellation message is sent when the train does not, or will not, complete its scheduled journey.  
 
A cancellation message is sent when the train does not, or will not, complete its scheduled journey.  
  
A train may be cancelled in one of three ways:
+
A train may be cancelled in one of four ways:
  
 
* At activation time ("ON CALL"), usually where the applicable schedule has a STP indicator of "C" - see [[Planned Cancellations]].  Trains may be cancelled for other reasons before train has been activated, and when activation occurs, the train will be immediately cancelled with the appropriate reason code
 
* At activation time ("ON CALL"), usually where the applicable schedule has a STP indicator of "C" - see [[Planned Cancellations]].  Trains may be cancelled for other reasons before train has been activated, and when activation occurs, the train will be immediately cancelled with the appropriate reason code
Line 12: Line 10:
 
As with all other messages, cancellation messages will only be received for train schedules which have already been activated.
 
As with all other messages, cancellation messages will only be received for train schedules which have already been activated.
  
== Data structure ==
+
= Data structure =
  
=== Header ===
+
== Header ==
  
 
{| class='wikitable'
 
{| class='wikitable'
Line 33: Line 31:
 
|}
 
|}
  
=== Body ===
+
== Body ==
  
 
{| class='wikitable'
 
{| class='wikitable'
Line 40: Line 38:
 
|-
 
|-
 
|train_id
 
|train_id
|The 10-character unique identity for this train at TRUST activation time
+
|The 10-character unique identity for this train (sent in the TRUST [[Train_Activation |activation message]])
 
|-
 
|-
 
|orig_loc_stanox
 
|orig_loc_stanox
|For an an "OUT OF PLAN" cancellation, set to the location in the schedule that the train should have been at
+
|For an an "OUT OF PLAN" cancellation, this is the location that the train should have been at according to the schedule
 
|-
 
|-
 
|orig_loc_timestamp
 
|orig_loc_timestamp
|For an "OUT OF PLAN" cancellation, the departure time of the location in the schedule that the train should have been at
+
|For an "OUT OF PLAN" cancellation, this is the departure time of the location that the train should have been at according to the schedule
 
|-
 
|-
 
|toc_id
 
|toc_id
Line 52: Line 50:
 
|-
 
|-
 
|dep_timestamp
 
|dep_timestamp
|The departure time at the location that the train is cancelled from
+
|The departure time at the location that the train is cancelled from (in milliseconds since the UNIX epoch)
 
|-
 
|-
 
|division_code
 
|division_code
Line 58: Line 56:
 
|-
 
|-
 
|loc_stanox
 
|loc_stanox
|The STANOX of the location in the schedule that the train is being cancelled from.  For an "OUT OF PLAN" cancellation, this STANOX will not be in the schedule, but a [Train Movement] message will have already been sent for
+
|The STANOX of the location that the train is being cancelled from.  For an "OUT OF PLAN" cancellation, this STANOX will not be in the schedule, but a [[Train_Movement | Train Movement]] message will have already been sent.
 
|-
 
|-
 
|canx_timestamp
 
|canx_timestamp
Line 70: Line 68:
 
|-
 
|-
 
|train_service_code
 
|train_service_code
|Train service code as per schedule
+
|Train service code as per the schedule
 
|-
 
|-
 
|train_file_address
 
|train_file_address

Revision as of 19:05, 23 May 2013

A cancellation message is sent when the train does not, or will not, complete its scheduled journey.

A train may be cancelled in one of four ways:

  • At activation time ("ON CALL"), usually where the applicable schedule has a STP indicator of "C" - see Planned Cancellations. Trains may be cancelled for other reasons before train has been activated, and when activation occurs, the train will be immediately cancelled with the appropriate reason code
  • At the train's planned origin ("AT ORIGIN")
  • En-route ("EN ROUTE")
  • Off-route ("OUT OF PLAN")

As with all other messages, cancellation messages will only be received for train schedules which have already been activated.

Data structure

Header

Field Description
msg_type Set to '0002' for a cancellation message
source_dev_id Set to the device ID of the terminal that issued the request
source_system_id Set to "TRUST" for a cancellation message
original_data_source Set to "TOPS" or "SDR" for a reactionary cancellation, or "" for a planned cancellation (STP 'C')

Body

Field Description
train_id The 10-character unique identity for this train (sent in the TRUST activation message)
orig_loc_stanox For an an "OUT OF PLAN" cancellation, this is the location that the train should have been at according to the schedule
orig_loc_timestamp For an "OUT OF PLAN" cancellation, this is the departure time of the location that the train should have been at according to the schedule
toc_id Operating company ID as per TOC Codes
dep_timestamp The departure time at the location that the train is cancelled from (in milliseconds since the UNIX epoch)
division_code Operating company ID as per TOC Codes
loc_stanox The STANOX of the location that the train is being cancelled from. For an "OUT OF PLAN" cancellation, this STANOX will not be in the schedule, but a Train Movement message will have already been sent.
canx_timestamp The time at which the cancellation was input to TRUST
canx_reason_code The reason code for the cancellation, taken from the Delay Attribution Guide
canx_type Either "ON CALL" for a planned cancellation, "AT ORIGIN", "EN ROUTE" or "OUT OF PLAN"
train_service_code Train service code as per the schedule
train_file_address The TOPS train file address, if applicable


Network Rail Open Data Feeds
Data Feeds About the Feeds Account States Durable Subscriptions Example Code ( PHP / C# / Java / Ruby / Node.js) • Advanced UsesFAQ Release Notes
RTPPM RTPPM Feed
Train Movements Train Movements Feed Train Activation Train Cancellation Train Movement Train Reinstatement Change of Origin Change of Identity Change of Location TSPEED Field Planned Cancellations Cancellation Codes
TD TD Feed C-Class Messages S-Class Messages Train Describers TD Berths
VSTP VSTP Feed
TSR TSR Feed Route Codes
SCHEDULE SCHEDULE Feed Schedule and Location Records Association Records CIF Codes How Scheduling Works Allowances
Reference Data Reference Data Feed TOC Codes CIF Codes Delay Attribution Codes Identifying Locations (STANOX, TIPLOC, NLC and 3-Alpha Codes) STANOX Geographical Areas Train Planning data