I also recommend to keep an information about the priority of a train category in a way. I do not remember why it was defined as a string, but an integer value would also make sense. And as a not so elegant solution an integer in string format (e.g. "3") can be used. I also recommend to use the rule that the lower value means a higher priority.