Difference between revisions of "LTP and STP Processes"

From Open Rail Data Wiki
Jump to navigation Jump to search
m (categorisation)
m
Line 1: Line 1:
== Introduction ==
+
A train schedule is identified by a UID.  Each UID may apply to several versions of a schedule, and each version may apply on different days - for example, if the train runs to a slightly different calling pattern on Saturdays and Sundays.
  
Scheduling appears to be a complicated process, but is relatively straightforward.
+
A version of a schedule can be uniquely identified by the schedule UID, start date and STP indicator field.  If multiple schedules exist for a given date, the one with the lowest STP indicator is the valid one.  This composite primary key is used when processing schedule updates to select the correct record to revise or delete.
  
== Schedules ==
+
= STP Indicator =
  
A train schedule is identified by a UID.  Each UID may hold several 'versions' of the schedule, and each schedule may apply on different days - for example, if the train runs to a slightly different calling pattern on Saturdays and Sundays.
+
The Short-Term Planning (STP) indicator for a particular schedule indicates the type of schedule:
 
 
An version of a schedule can be uniquely identified by the UID, start date and STP indicator field.  This composite primary key is used when processing schedule updates to select the correct record to revise or delete.
 
 
 
Each schedule has a start date, an end date and a 'days run' which identify the days on which the schedule is valid.  It is possible for more than one schedule to be valid on a particular day - see 'Validity' for the rules used to determine which schedule is valid.
 
 
 
=== STP Indicator ===
 
 
 
The Short-Term Planning (STP) indicator for a particular schedule indicates the 'type' of schedule it is:
 
  
 
{| class='wikitable'
 
{| class='wikitable'
Line 43: Line 35:
 
|}
 
|}
  
NOTE: A CAN schedule will have no locations in the schedule, and exists to indicate that the train will not run on this date - it is a planned cancellation.  This is a separate type of cancellation from an operational cancellation, where the train was planned to run, but was later cancelled.
+
'''NOTE:''' A ''CAN'' schedule will have no locations in the schedule, and exists to indicate that the train will not run on this date - it is a planned cancellation.  This is a separate type of cancellation from an operational cancellation, where the train was planned to run, but was later cancelled.
  
=== Validity ===
+
= Validity =
  
A UID will contain either:
+
A UID will refer to either:
  
 
* One or more WTT schedules and zero or more VAR or CAN schedules, or
 
* One or more WTT schedules and zero or more VAR or CAN schedules, or

Revision as of 09:24, 20 May 2013

A train schedule is identified by a UID. Each UID may apply to several versions of a schedule, and each version may apply on different days - for example, if the train runs to a slightly different calling pattern on Saturdays and Sundays.

A version of a schedule can be uniquely identified by the schedule UID, start date and STP indicator field. If multiple schedules exist for a given date, the one with the lowest STP indicator is the valid one. This composite primary key is used when processing schedule updates to select the correct record to revise or delete.

STP Indicator

The Short-Term Planning (STP) indicator for a particular schedule indicates the type of schedule:

Name STP Indicator Abbreviation Description
Permanent P WTT A schedule which was generated by the Long-Term Planning process
Overlay O VAR A variation to a schedule generated by the Long-Term Planning process
Short-Term Planned N STP A schedule which was generated by the Short-Term Planning process. These are usually 'one-off' trains.
Cancellation C CAN A planned cancellation which overlays the WTT schedule. This effectively says 'the schedule does not apply today', and are not an operational cancellation. See Planned Cancellations.

NOTE: A CAN schedule will have no locations in the schedule, and exists to indicate that the train will not run on this date - it is a planned cancellation. This is a separate type of cancellation from an operational cancellation, where the train was planned to run, but was later cancelled.

Validity

A UID will refer to either:

  • One or more WTT schedules and zero or more VAR or CAN schedules, or
  • One or more STP schedules

It is not possible for a UID containing a WTT schedule to also contain an STP schedule.

Where more than one schedule appears to be valid for a particular date (for example, where a WTT schedule is overlaid by a VAR or CAN schedule), the schedule that is valid is the one which has the lowest alphabetic STP indicator.

Let's look at an example for UID A12345. There are two schedules:

  • WTT schedule valid on Monday, Tuesday, Wednesday, Thursday and Friday from Monday 7th January 2013 to Friday 11th January 2013
  • CAN schedule valid on Wednesday and Thursday from Wednesday 9th January 2013 to Thursday 10th January 2013

The result of overlaying these two schedules is that:

  • The WTT schedule is valid on Monday 7th, Tuesday 8th and and Friday 11th January 2013
  • The CAN schedule is valid on Wednesday 9th and Thursday 10th January 2013

If retrieving all the schedules for UID A12345 on Wednesday 9th January 2013, we'll see two schedules - the WTT schedule and the CAN schedule. Picking the schedule with the lower alphabetical STP indicator will select the CAN schedule, which is the schedule that applies on the day.