Scenario Service Class Priority – A (possibly) Definitive Guide

Discussion in 'Technical Reports' started by rjhi2, Nov 12, 2022.

  1. rjhi2

    rjhi2 New Member

    Joined:
    May 19, 2021
    Messages:
    2
    Likes Received:
    1
    upload_2022-11-12_17-18-18.png

    Currently working on a piece of management software for TS-Classic and have been investigating the Service-Class Priority parameter which was always a bit of a mystery due to there being no definitive documentation. Have read many forum posts on this issue (some rather dubious) but nothing concrete.

    Anyway, the “DTG Train Simulator Developer Documentation” (should be the most up-to-date and authoratitive, right?) says.

    “Service Class: Select the service class of the train. This is used by Train Simulator to prioritise the trains. For example, an Express Passenger train has line priority over a Standard Freight, and a Special Train has priority over all trains.”- which is not remotely definitive

    https://sites.google.com/a/railsimdev.com/dtgts1sdk/reference-manual/scenario-editor

    Now this looks ripped from the old RailWorks documentation (RailWorks 2: Creator Manual – 2010 which says “Service Class: Select the service class of the train. This is Class used by the RailWorks to prioritise the AI trains. An Express Passenger train has priority over a Standard Freight, and a Special train has priority over all.”

    Which is not unexpectedly similar to the “RailWorks Scenario Tools: Timetable View - 2010” document which says “The ‘Service Class’ can also be set here, which will depend on the type of activities you want the player to be doing. Certain service classes have a higher line priority than others, for example, passenger has higher priority than freight, express has higher priority than stopping or standard and Special is highest of all.”

    So, all clear as mud as regards anything definitive (beyond a few obvious examples).

    Now, in Rudolf’s excellent Scenario Authors guide from 2015 he had the same problem of finding documentation so had to guess an order, though his guess was pretty good.

    upload_2022-11-12_17-20-17.png

    Rudolf’s excellent guides can be found here
    https://railworksamerica.com/index....tutorial-rudolph&catid=23:miscellaneous-files

    Perhaps there is a definitive guide somewhere else but I can't find it.

    Now, until I found Rudolf’s guide I was assuming (not stupidly) that the order in which they are displayed in the Scenario Builder represents the priority level, that is

    upload_2022-11-12_17-20-45.png

    This implies that Light-Engine is the lowest and Empty-Stock(?) the highest, which always seemed a bit off to me but there we are.

    I have now tracked the ServiceClass field and can confirm the RW Scenario-Builder stores a number between zero and 10 (Scenario.bin/xml file in "../cConsist/Driver/cDriver/ServiceClass" ) and so created a scenario with a service of each class numbered 0 to 10 (0=LE, 10=Emp-Stk) as per the Scenario Builder. This gives me the following (‘Class’ on the right is the actual stored value)

    upload_2022-11-12_17-21-49.png

    So it would appear (again, assuming no fudges at run-time) the actual priority is...

    · 00 – Special (HIGHEST PRIORITY)
    · 01 – Light-Engine
    · 02 – Express Passenger
    · 03 – Stopping-Passenger
    · 04 – High-Speed-Freight
    · 05 – Express-Freight
    · 06 – Standard-Freight
    · 07 – Low-Speed-Freight
    · 08 – Other-Freight
    · 09 – Empty-Stock
    · 10 – International (LOWEST PRIORITY )

    Which kinda makes sense (except for International – as I always think of TGV’s – and you could argue that the slowest Empty-Stock is probably faster than the fastest Low-Speed-Freight etc...)

    The order is a little unexpected perhaps - compared to the order in the Scenario Builder - but as far as I can tell that's what it is.

    rjhi2

    PS. I've checked and double-checked my results but would appreciate someone else doing a check (just in case I've messed-up somewhere). Now, while I can check this easily (with my software) it can be done manually without too much grief.

    After creating the scenario via RW Scenario Builder (with one service for each priority - i.e. 11 services):

    Locate the Folder for that Scenario
    Serz the Scenario.bin to its Scenario.xml
    View the Scenario.xml (as a text file, say)
    Search for “ServiceClass>”
    You should have 11 occurences relating to your 11 different services and priorites
    Check each occurence tallies with my results - The relevant ServiceName is about 15 lines above the ServiceClass entry
     
    • Like Like x 1
    • Helpful Helpful x 1
  2. torfmeister

    torfmeister Guest

    Nice work.

    And as the Service Class also determines the pathing, do not forget that it is the calculated ETA's which determine priorities too. Playing around with speed percentages will make a huge difference.
     
  3. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    11,021
    Likes Received:
    3,454
    But it does not make sense
    In real life a light loco would not run at any line speed above about 60mph because of the reduced braking power available.
     
  4. TrainsAndWellbeing

    TrainsAndWellbeing Active Member

    Joined:
    Jan 18, 2024
    Messages:
    131
    Likes Received:
    197
    I hope it's OK for me to dig up this topic to ask a question:

    Is it possible for a player to loose their priority if they run late?

    I'm designing a rail tour scenario which has a point where two lines converge. If the player is on time they get to Stirling Platform 9 and get the line out ahead of an express passenger service which hasn't made it to Stirling at this point. If the player runs late and the express service gets to Stirling Platform 3 before the rail tour has even made it into the Stirling signalling blocks: I want the express to be given the line before the player who in effect would loose their time slot.

    I've set my express to Special and my rail tour to Stopping Passenger, but in the late scenario the express is just sitting at a danger signal waiting for my rail tour to go ahead, even if I haven't driven out of Alloa which is many miles away from Stirling. The express will just sit for 15 minutes or however long it takes me to get to Stirling, and I will pass it at the points.

    Is it possible to do what I'm describing?
    Many thanks anyone who can help.
     
  5. Spikee1975

    Spikee1975 Guest

    As you have priority as per scenario definition, the train will wait forever until you are passing it. TSC dispatcher is not dynamic. Note that you should not use "Special", Matt stated that multiple times in his scenario tutorials.

    The timetable is etched in stone as soon as you save the scenario in the editor. Overtakings must be planned in scenario editor - where the dispatcher will decide based upon service class AND ETAs if a train will be let onto the track before you. This needs StopAt instructions at the points where this should happen, as the dispatcher can only make the decision based on timings (and performance % set) - so basically dispatching happens at scenario creation.
     
    Last edited by a moderator: Jun 28, 2024
    • Helpful Helpful x 1
  6. TrainsAndWellbeing

    TrainsAndWellbeing Active Member

    Joined:
    Jan 18, 2024
    Messages:
    131
    Likes Received:
    197
    Thanks for confirming that for me. I'll put my Perth to Waverley back to Express Passenger; It was Special simply to see if that would produce the desired affect. The ScotRail passengers can just enjoy watching the K1 go by, providing the rail tour driver runs it pretty late.
     
  7. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    11,021
    Likes Received:
    3,454
    If you want the express to go first time it that way and the railtour will follow.
     
  8. idh1830

    idh1830 New Member

    Joined:
    Thursday
    Messages:
    1
    Likes Received:
    0
    Joining this thread late!

    I came across this thread while looking for something else. I think I can add to the conversation, but please excuse me if I am covering ground which has already been resolved.

    I think that rjhi2 is working under a misapprehension. The original premise that the index number of a service class is its order of priority is incorrect. I have long used "International" to give a service priority over Express Passenger - 'International opens all doors' is my mantra here. To clarify this for my own purpose I have therefore carried out a practical test.

    I set up a scenario with 11 trains each with a different service class. I placed these in sidings which had a single outlet - I used Old Oak Common on the BHBP line v4 and used the high numbered sidings for the location. I gave all 11 trains the identical start time, but there is only one exit line that they all feed into, so they must leave in priorty order. The chosen location in a siding is good for this purpose as the low speed means that there is no problem following the sequence of action, it happens so slowly; whether viewing on 2D or live with labels activated.

    The outcome was that the trains all pulled forward to the signal on each line and stopped, then they proceeded in the following order [the numbers after each class are: i) Priority order; ii) Index number in the program]:
    EMPTY STOCK 0 9
    INTERNATIONAL 1 10
    SPECIAL 2 0
    EXPRESS PASSENGER 3 2
    STOPPING PASSENGER 4 3
    HIGH SPEED FREIGHT 5 4
    EXPRESS FREIGHT 6 5
    STANDARD FREIGHT 7 6
    LOW SPEED FREIGHT 8 7
    OTHER FREIGHT 9 8
    LIGHT ENGINE 10 1
    In other words, they left in the order of the service class list in the game. This is therefore the order of priority.

    The index number is nothing more than the order in which these classes were established in the program. International is index 10 for no other reason than it was the last class implemented. The program code goes back a long way, right back to railsimulator.com, before Railworks, and in those days, I suppose the need for International had not been thought of.

    Unfortunately, this is not the end of the story as different classes have different performance characteristics which govern their behaviour. So freight trains seek passing loops, empty stock also, I observe, use loops, etc. This is not always predictable nor helpful. In a scenario I am currently working on, a freight train on the up line crossed to a loop on the down line and, due to the length of the freight, impeded the player train (express) on the downline because the rear of the freight was still on the main line! I had to force the freight to stay on the up line by specifying waypoints it must pass.

    I also have another observation on the point raised by TrainsAndWelbeing, whether a service can lose its path. Again this is from practical expeirience. I wrote a scenario on the GEML Ipswich-Liverpool Street line. My train was the East Anglian running non-stop between Ipswich and Liverpool Street. Because it's non-stop it has to deal with trains running ahead which stop at intermediate stations. The principal problem arises at Shenfield where the line from Southend joins the mainline. I worked out that the East Anglian has a small window to fit into. If it runs early it meets a signal check, if it runs late, it can indeed lose the path to a Southend train.

    Hope this helps.
     

Share This Page