Schedule Records: Difference between revisions

From Open Rail Data Wiki
Remove mention of wheelchair reservations from catering section
Remove mention of wheelchair reservations from catering section
 
(No difference)

Latest revision as of 19:46, 9 June 2024

Schedule records are contained within the SCHEDULE data feed, and provide information about the possible schedules available for trains. For a given train service, there may be multiple schedules listed - the date of the train service and any short / very-short term plans will affect which schedule is current.

A schedule record comprises of a header containing a schedule UID, data about the schedule (including whether it is a train, bus or ship) and validity dates, and an ordered list of locations and times at which a particular service should arrive, depart or pass.

  • Originating locations will always have a WTT departure time and optionally a public departure time
  • Intermediate locations in a schedule will have a passing time if they are a mandatory timing point, or an arrival and departure time if the train carries out an activity at that location
  • Terminating locations will always have a WTT arrival time and optionally a public arrival time, which may be some minutes later than the WTT time
  • A location may have one or more activities associated with it - for example, U for locations where the train calls to pick up passengers (i.e. not available for alighting), D for locations where the train calls to set down passengers (i.e. not available for boarding).
  • A location may have engineering, pathing or performance allowances

For further details, see the Network Rail Common Interface Format file specification: File:CIF End User Spec v29.pdf.

Record Layout

Schedule records are encoded as a JSON hash with a key of "JsonScheduleV1" and a value containing the schedule data, in the following layout:

JsonScheduleV1:
 CIF_train_uid
 transaction_type
 schedule_start_date
 schedule_end_date
 schedule_days_runs
 CIF_bank_holiday_running
 train_status
 CIF_stp_indicator
 atoc_code
 applicable_timetable
 
 schedule_segment:
  CIF_train_category
  signalling_id
  CIF_headcode
  CIF_course_indicator
  CIF_train_service_code
  CIF_business_sector
  CIF_power_type
  CIF_timing_load
  CIF_speed
  CIF_operating_characteristics
  CIF_train_class
  CIF_sleepers
  CIF_reservations
  CIF_connection_indicator
  CIF_catering_code
  CIF_service_branding

 new_schedule_segment:
  traction_class
  uic_code
 
 schedule_location:
  <location records>

Example JSON record

Many locations have been omitted for brevity.

 {
   "JsonScheduleV1": {
     "CIF_bank_holiday_running": null,
     "CIF_stp_indicator": "P",
     "CIF_train_uid": "G38906",
     "applicable_timetable": "Y",
     "atoc_code": "SN",
     "new_schedule_segment": {
       "traction_class": "",
       "uic_code": ""
     },
     "schedule_days_runs": "1111100",
     "schedule_end_date": "2024-12-13",
     "schedule_segment": {
       "signalling_id": "1H27",
       "CIF_train_category": "XX",
       "CIF_headcode": "",
       "CIF_course_indicator": 1,
       "CIF_train_service_code": "24746000",
       "CIF_business_sector": "??",
       "CIF_power_type": "EMU",
       "CIF_timing_load": null,
       "CIF_speed": "100",
       "CIF_operating_characteristics": null,
       "CIF_train_class": "B",
       "CIF_sleepers": null,
       "CIF_reservations": "S",
       "CIF_connection_indicator": null,
       "CIF_catering_code": null,
       "CIF_service_branding": "",
       "schedule_location": [
         {
           "location_type": "LO",
           "record_identity": "LO",
           "tiploc_code": "LTLHMPT",
           "tiploc_instance": null,
           "departure": "1112",
           "public_departure": "1112",
           "platform": "1",
           "line": null,
           "engineering_allowance": null,
           "pathing_allowance": null,
           "performance_allowance": null
         },
         {
           "location_type": "LI",
           "record_identity": "LI",
           "tiploc_code": "SHRHMBS",
           "tiploc_instance": null,
           "departure": "1142",
           "public_departure": "1142",
           "platform": "1",
           "line": null,
           "engineering_allowance": null,
           "pathing_allowance": null,
           "performance_allowance": null,
           "arrival": "1141",
           "public_arrival": "1141",
           "pass": null,
           "path": null
         },
         {
           "location_type": "LI",
           "record_identity": "LI",
           "tiploc_code": "PSLDAWH",
           "tiploc_instance": null,
           "departure": "1146H",
           "public_departure": "1146",
           "platform": null,
           "line": null,
           "engineering_allowance": null,
           "pathing_allowance": null,
           "performance_allowance": null,
           "arrival": "1146",
           "public_arrival": "1146",
           "pass": null,
           "path": null
         },
         {
           "location_type": "LI",
           "record_identity": "LI",
           "tiploc_code": "HOVE",
           "tiploc_instance": null,
           "departure": "1150H",
           "public_departure": "1150",
           "platform": "2",
           "line": null,
           "engineering_allowance": null,
           "pathing_allowance": null,
           "performance_allowance": "1",
           "arrival": "1149",
           "public_arrival": "1149",
           "pass": null,
           "path": null
         },
         {
           "location_type": "LI",
           "record_identity": "LI",
           "tiploc_code": "PRSP",
           "tiploc_instance": null,
           "departure": "1155H",
           "public_departure": "1155",
           "platform": "1",
           "line": "UML",
           "engineering_allowance": null,
           "pathing_allowance": null,
           "performance_allowance": null,
           "arrival": "1155",
           "public_arrival": "1155",
           "pass": null,
           "path": null
         },
         {
           "location_type": "LI",
           "record_identity": "LI",
           "tiploc_code": "HASOCKS",
           "tiploc_instance": null,
           "departure": "1202",
           "public_departure": "1202",
           "platform": "1",
           "line": null,
           "engineering_allowance": null,
           "pathing_allowance": null,
           "performance_allowance": null,
           "arrival": "1201H",
           "public_arrival": "1202",
           "pass": null,
           "path": null
         },
         {
           "location_type": "LI",
           "record_identity": "LI",
           "tiploc_code": "BURGESH",
           "tiploc_instance": null,
           "departure": "1206",
           "public_departure": "1206",
           "platform": "1",
           "line": null,
           "engineering_allowance": null,
           "pathing_allowance": null,
           "performance_allowance": null,
           "arrival": "1205",
           "public_arrival": "1205",
           "pass": null,
           "path": null
         },
         {
           "location_type": "LI",
           "record_identity": "LI",
           "tiploc_code": "KEYMERJ",
           "tiploc_instance": null,
           "departure": null,
           "public_departure": null,
           "platform": null,
           "line": null,
           "engineering_allowance": null,
           "pathing_allowance": null,
           "performance_allowance": null,
           "arrival": null,
           "public_arrival": null,
           "pass": "1207",
           "path": null
         },
         {
           "location_type": "LI",
           "record_identity": "LI",
           "tiploc_code": "BALCMTJ",
           "tiploc_instance": null,
           "departure": null,
           "public_departure": null,
           "platform": null,
           "line": "FL",
           "engineering_allowance": null,
           "pathing_allowance": null,
           "performance_allowance": null,
           "arrival": null,
           "public_arrival": null,
           "pass": "1218",
           "path": null
         },
         {
           "location_type": "LI",
           "record_identity": "LI",
           "tiploc_code": "THBDGS",
           "tiploc_instance": null,
           "departure": null,
           "public_departure": null,
           "platform": "4",
           "line": null,
           "engineering_allowance": null,
           "pathing_allowance": null,
           "performance_allowance": null,
           "arrival": null,
           "public_arrival": null,
           "pass": "1219H",
           "path": null
         },
         {
           "location_type": "LI",
           "record_identity": "LI",
           "tiploc_code": "GTWK",
           "tiploc_instance": null,
           "departure": "1226",
           "public_departure": "1226",
           "platform": "4",
           "line": null,
           "engineering_allowance": null,
           "pathing_allowance": null,
           "performance_allowance": null,
           "arrival": "1222H",
           "public_arrival": "1223",
           "pass": null,
           "path": "FL"
         },
         {
           "location_type": "LI",
           "record_identity": "LI",
           "tiploc_code": "BATRSPJ",
           "tiploc_instance": null,
           "departure": null,
           "public_departure": null,
           "platform": null,
           "line": "FL",
           "engineering_allowance": null,
           "pathing_allowance": null,
           "performance_allowance": null,
           "arrival": null,
           "public_arrival": null,
           "pass": "1254H",
           "path": null
         },
         {
           "location_type": "LT",
           "record_identity": "LT",
           "tiploc_code": "VICTRIC",
           "tiploc_instance": null,
           "platform": "15",
           "arrival": "1258",
           "public_arrival": "1258",
           "path": null
         }
       ]
     },
     "schedule_start_date": "2024-06-03",
     "train_status": "P",
     "transaction_type": "Create"
   }
 }

Schedule Records

Field Description
CIF_train_uid The unique identifier for the schedule.

This is made up of a letter plus five numbers. There may be multiple schedules for one schedule UID. See also the train_uid field of the TRUST Train Activation message type.

transaction_type create or delete
schedule_start_date The start date of the schedule
schedule_end_date The end date of the schedule
schedule_days_runs A seven-character field; character 1 represents Monday, character 7 represents Sunday. A 1 in a character position means that the service runs on that day, while a 0 means that it does not.

Note: this field is called schedule_days_runs within the JSON file.

CIF_bank_holiday_running Bank holiday running code
  • X - Does not run on specified Bank Holiday Mondays
  • G - Does not run on Glasgow Bank Holidays

Note: The sole purpose of this field is to add the BHX symbol to the relevant column in a printed timetable. Actual changes for bank holiday workings for each train schedule are indicated by STP overlays or STP cancellations.

train_status Train status

See train status codes

CIF_train_category Train category

See train category codes

signalling_id Signalling ID, also referred to as headcode, not to be confused with below. For passenger services, this is the headcode of the service. For anonymous freight services this will be blank.
CIF_headcode National Reservation System headcode, designated by train operator, not to be confused with above.
CIF_course_indicator Not used
CIF_train_service_code Divides trains into service groups and used for revenue reasons
CIF_business_sector Formery used to denote the business sector running the service; now represent the Portion ID for services which join or split
CIF_power_type Power type

See power type codes

CIF_timing_load Timing load

See timing load codes

CIF_speed Planned speed of the train service
CIF_operating_characteristics Operating characteristics

Up to 6 characters. See operating characteristics codes

CIF_train_class Seating classes available:
  • Blank or B - First and standard
  • S - Standard class only
CIF_sleepers Sleeping accommodation available:
  • B - First and standard class
  • F - First Class only
  • S - Standard class only
CIF_reservations Reservation recommendations:
  • A - Reservations compulsory
  • E - Reservations for bicycles essential
  • R - Reservations recommended
  • S - Reservations possible from any station
CIF_connection_indicator Not used
CIF_catering_code Up to two characters from the following:
  • C - Buffet Service
  • F - Restaurant Car available for First Class passengers
  • H - Hot food available
  • M - Meal included for First Class passengers
  • R - Restaurant
  • T - Trolley service
CIF_service_branding Service brand:
  • E - Eurostar
CIF_stp_indicator STP (short-term planning) schedule indicator
  • C - STP cancellation of permanent schedule
  • N - New STP schedule (not an overlay)
  • O - STP overlay of permanent schedule
  • P - Permanent
traction_class Not used
uic_code Union Internationale des Chemins de Fer code for the service
atoc_code ATOC code

See TOC codes

applicable_timetable Applicable timetable service?
  • Y - Train is subject to performance monitoring (Applicable Timetable Service)
  • N - Train is not subject to performance monitoring (Not Applicable Timetable Service)
schedule_location Field containing an array of location records

Location Records

Location records contain information about the locations that the train service originates at, passes, stops at and terminates at. The schedule_location field contains an ordered JSON list of location records, each with the following fields:

Field Description
record_identity The type of location record
  • LO - Originating location - location where the train service starts from
  • LI - Intermediate location
  • LT - Terminating location - where the service terminates
tiploc_code The TIPLOC code of the location
tiploc_instance The nth occurrence of the location.
arrival WTT arrival time (LI and LT records)

Format: HHMMH - time given by the 24-hour clock. Optional H indicates half-minute. In local time (i.e. adjusted for BST / GMT.)

departure WTT departure time (LO and LI records)

Format: HHMMH - time given by the 24-hour clock. Optional H indicates half-minute. In local time (i.e. adjusted for BST / GMT.)

pass WTT passing time (LI records)

Format: HHMMH - time given by the 24-hour clock. Optional H indicates half-minute. In local time (i.e. adjusted for BST / GMT.)

public_arrival Public timetable arrival time (LI and LT records)

Format: HHMM - time given by the 24-hour clock. In local time (i.e. adjusted for BST / GMT.)

public_departure Public timetable departure time (LO and LI records)

Format: HHMM - time given by the 24-hour clock. In local time (i.e. adjusted for BST / GMT.)

platform Platform

A 3-character field used to denote the platform or line that the service uses.

line Departure line

A 3-character field representing the line to be used on departure from the location. The line abbreviation will be used.

path Arrival path

A 3-character field representing the line to be used on arrival at the location. The line abbreviation will be used.

engineering_allowance Time allowed for recovery from engineering activities
  • H - Half a minute
  • 1,1H ... 9, 9H - One, one-and-a-half through to nine, nine-and-a-half minutes
  • 10 to 59 - 10 to 59 minutes (whole minutes only)
pathing_allowance Time allowed for pathing requirements
  • H - Half a minute
  • 1,1H ... 9, 9H - One, one-and-a-half through to nine, nine-and-a-half minutes
  • 10 to 59 - 10 to 59 minutes (whole minutes only)
performance_allowance Performance allowance
  • H - Half a minute
  • 1,1H ... 9, 9H - One, one-and-a-half through to nine, nine-and-a-half minutes
location_type Same as record_identity (LO, LI or LT)


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 TIPLOC Records 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 (BPLAN)