Train Planning Data Structure

See Reference_Data for the download link for this data, which is updated twice a year.

The Public Interface Format (PIF) file is a tab-separated, variable record length ASCII file containing the following sets of data:


 * Reference codes as used in CIF schedule files
 * Timing Loads used in train planning
 * Location codes (TIPLOCs), their type (TRUST, Mandatory or Optional) and, for many records, the geographical location in Eastings/Northings
 * Platform data, including platform number, length, power supply type
 * Network Links between TIPLOCs, including distances
 * Timing Links between TIPLOCs, including traction type, entry and exit speeds

The format of the file is straightforward:


 * The first field on a record is a 3-character field identifying the record type.
 * The second field is the Action Code, which will always be 'A' - Add. The action codes 'C' and 'D' should not be seen in PIF files from the Data Feeds platform, as they are extracted as reference data, and not updates to the existing data.
 * The subsequent fields are tab-separated and variable-length.
 * A single trailer record reports the number of records of each type in the file, and indicates the end of the file

Within each record, the 'type' column indicates whether the field is part of a record key, mandatory or optional:


 * P: Primary key - a field, or set of fields, that uniquely identify an entity instance
 * A: Alternate key - an alternate set of fields that also uniquely identify an entity
 * M: Mandatory field
 * O: Optional field

Data will be provided for P, A and M fields, but not necessarily for O fields. However, the field will still be present and will be empty, i.e. the file will have two TAB characters.

= Field formats =

The following field formats are used:


 * Date: DD-MM-YYYY HH:MM:SS
 * Time: HH:MM:SS
 * Duration: MM'SS
 * SRT: MMM'SS

All measurements are in metric units. Times use the 24 hour clock, with midnight as 00:00:00.

A single final trailer record defines the number of records of each type in the file.

= Record types =

Reference Codes
The reference code types are as follows:

Timing Load
There are several point-to-point timings (Timing links) across a Network Link. When timing a train across a network link, the timing link to use depends on the train formation, as well as its entry and exit speeds.

Point-to-point timings are not needed for every train formation, as many have effectively the same timings. Timings across a network link are defined for a variety of timing loads, each applicable to a number of train formations. The timing load to use for a train may depend on its class/subclass, planned load, planned maximum speed and RA number.

Geographic data
Some geography items may be dated, i.e. they may have a start or end date.

NOTE: The Easting and Northing values for locations are not guaranteed to be accurate

Platform/Sidings
NOTE: The Platform/Siding Length values for locations are not guaranteed to be accurate

Network Link
NOTE: The distance values for are not guaranteed to be accurate