You are here: Wiki > start > usertrack > ttuse > class_of_service

Locked Page is locked

Table of Contents

Class of Service Rules
When should COS rules be specified?
COS Rules
Class of Service
Use Speeds
Speed Class

Class of Service Rules


Class of service rules (COS) determine how a train is handled in terms of departing from locations early, or using freight lines. Individual schedules can be set to one of:

Class Enters Early? Departs Early? Passenger Delays? Wrong Platform Penalty? Use Goods Lines?
Passenger No No Yes Yes No
Excn (Excursion) No No Yes Yes Yes
ECS (empty passenger train) Yes [1] Yes [1] Yes No Yes
Goods (/freight) Yes Yes No No Yes
Loco (light engine) Yes Yes No No Yes

If a particular schedule had no COS specified then its type is determined by the COS Rules, which you can specify in the Timetable Editor as described below.

[1] This is limited to two minutes early, and [2023-02-23] requires Mantis 38156 to be implemented to fix an earlier breaking change.

When should COS rules be specified?

If the timetable contains only standard BR/Network Rail headcodes, it is unlikely that custom COS rules will be required- certain timetables may require a modification for Class 9 trains, otherwise the default rules will be sufficient and no further rules need to be specified. COS rules are highly likely to be required if London Underground, Australian or other non-UK standard headcodes are used for trains.

COS Rules

The timetable editor has a tab labelled COS. A list of rules appear on the left (default: empty) and a set of buttons on the right allow manipulation of those rules, which should be self explanatory. The ordering of rules is important: more specific patterns should appear above less specific rules (explained further below).

Class of Service

Select the type of train this rule applies to.


Enter the pattern to match the headcode:

  • The character * matches any character
  • The character # matches any digit (0-9)
  • The character % matches any letter (A-Z)
  • Any other letter, symbol, or digit matches that exact character
  • If the pattern is longer than the headcode then it will not match. Conversely, if the headcode is longer than the pattern, then any characters beyond will be ignored and counted as a match.


  • 1A## matches 1A23, 1A99, 1A5678 but not 1ABC or 1A
  • 2 matches any headcode beginning with 2
  • #%%# natches 3SA4 but not 3SAM

Use Speeds

Specify whether a matching train will use passenger line speeds, freight line speeds, or per COS.

Speed Class

Select which speed classes the schedule must have (via the Train Category, if specified) in order to match this rule. Note that there are options of:

  • ignore - don't care
  • any of - must match at least one of the ticked classes
  • all of - must match every ticked class (schedule may have more)
  • none of - schedule must not have any of the ticked classes.


If no rule matches, or no rules have been specified, then the default rules will be used. These are:

ID Freight Speed class Class of service
5 Either must be Metro Passenger
5 Either ignore ECS
1 Passenger ignore Passenger
2 Passenger ignore Passenger
9 Passenger ignore Passenger
0 Passenger none of list A ECS
3 Passenger none of list A ECS
% Passenger none of list A ECS
* Passenger any of list A Passenger
0 Freight ignore Loco
1 Freight ignore Excn
2 Freight ignore Excn
* Either ignore Goods

List A is: EPS-E, EPS-D, HST, EMU, DMU, SP (sprinter), TGV (Cl.373), Metro, WES (Cl.442), Steam

An alternative formulation of the default rules is this: If the train has "Use freight linespeeds", the type is "Freight". If the train runs at passenger speeds and is one the speed classes in List A, it is "Passenger A". If neither of the previous two cases apply, the train is "Passenger B". The default rules then result in choosing the final COS as follows:

Headcode Passenger A Passenger B Freight Notes
0 Passenger ECS Light Engine
1, 2 Passenger Passenger Excursion
3 Passenger ECS Goods
4, 6, 7, 8 Passenger Goods Goods
5 ECS ECS ECS If "Metro", the Class is always "Passenger"
9 Passenger Passenger Goods
Other Passenger ECS Goods


  • Each rule is tested in the order specified, and stops if a match is found. Thus, a more specific rule like 2A## should come before a less specific rule like 2###.
  • An individual train schedule's COS overrides this section.

Last edited by GeoffM on 23/02/2023 at 22:22