Let higher priority train pass using "standard" built in tools?

1611mac

- - . -
TRS19:
Given a main line and a passing siding, is there a way, using standard built in tools, to have an AI low priority train "sense" a high priority AI train on it's rear so that it will take the passing siding and wait? (By standard tools I mean, AI, track marks, priority marks, etc.)
 
Short answer, in my experience, is no!

Longer answer, you would need to use more advanced tools such as triggers, session rules and driver commands to achieve that result.
 
Short answer, in my experience, is no!

Longer answer, you would need to use more advanced tools such as triggers, session rules and driver commands to achieve that result.

I figured as much. That would be too simple. Thanks for the reply. Just wanted to double check as I sometimes miss the obvious.
 
Hi

I know of no simple way of doing this but I have done it in the past by using variables to indicate when a following train is close behind the target train.

Each passing loop needs to have a unique variable. Fast train(s) would increment the variable when they passed a trackmark a few miles from a passing loop. A slow train would check the variable as it approached the passing loop and, if the variable was greater than zero, it would set a path into the passing loop and stop there. If the variable equaled zero when the slow train checked it then it would set a path straight through on the main line.

The variable is decremented as the faster train(s) passed the exit from the passing loop. When the variable equals zero the slower train will then set a path out of the passing loop and continue on its way. The reason for using increment and decrement is that it is possible for a second faster train to pass the triggering trackmark before the first one clears the passing loop. Using increment and decrement allows you to count the number of faster trains to let through before the slow train goes on its way.

It is important to note that you need to use one of the path setting rules and driver commands in TS12 and earlier versions, or use Interlocking Towers in Tane or TRS19 to set the paths. Although it sounds complicated once you've got used to using variables it is possible to automate many types of railway practices for the AI.

Regards

Brian
 
Thanks very much for the instruction. I was actually pondering the possibilities of doing that very thing (using variables). I did some coding years ago so using variables in macro's, scripts, and such things is a natural thought for me. Thanks for the confirmation and the detail. Much appreciated. And this "shoves" me to IT's which I've been wanting to learn and do but just kept keep putting off.
 
I'm not sure if it could be used, but many years ago the creator Natvander released a series of speed signs and a driver rule that allowed you to set and detect the 'type' of train. You could have 'express', 'standard', 'goods'; each being able to have an individual speed limit set in the 'variable speed board' assets.

In theory you could possibly use a rule such as this to set the 'type' of train (or a custom priority setting).

This could then be used either in a rule, or a custom object, to select which road in a loop/siding arrangement the different trains use.

Alternatively, if you know where the trains should be at any particular time, you could just manually code them to use the appropriate siding.

Another thought would be to vary this depending on timing of the two trains.

The first train goes into the siding, the second train takes the main (allowing the train that won't be stopping to continue through at higher speed). It would require a bit of work with 'variable' settings, trigger checks, and possibly also the 'driver schedule' rule (I think it was, it was a rule that let you assign new commands to a driver part way through a session). In this case you would use this rule to progressively assign commands, based on which triggers the train passes, throughout the session. Rather than giving the driver the full list of commands from the start :)

Regards
 
Hi

A couple of things that I forgot to mention. When using Enhanced Interlocking Towers the path setting into and out of the passing loop for the slow train need to be set to manual and not left on automatic. This prevents the path being set by the tower until it is needed. The second point is that the commands should be put into two schedules in the Schedule Library from where they can be called by any train that needs them.

A rule and driver commands such as Zec suggests would probably work but I have no scripting skills so it is beyond me. The advantage of using variables is that all rules and driver commands required are already available and work without problems. The hardest part of using them is getting the logic correct so that the sequence of commands do exactly what you want without any unexpected consequences. I normally write out a simple flow chart before I start entering the commands so that I know exactly what I want the commands to do.

For anyone interested, the sequence of driver commands for the slow train would be:-

Drive via trackmark 2 on approach to loop
Skip to Label 1 if variable = 0
Set path into loop
Autodrive to trackmark in loop
Wait until variable = 0
Set path out of loop
Jump to Label2
Label 1
Set path through main line
Label 2
Autodrive via trackmark further down the line

For the fast train they would be:-

Drive via trackmark 1 (Trackmark a few miles from loop)
Increment variable by 1
Set path through main line
Drive past last junction of the passing loop
Decrement variable by 1
Drive past junction

Trackmark 1 is placed a few miles from the loop and is used by fast trains while trackmark 2 is much closer to the loop and is used by slow trains. Positioning of these will depend on the line speed. Trackmark 2 needs to be far enough from the loop for the slow train to be able to set the path through the main line before it starts to lose speed if it doesn't need to use the loop.

I came up with this method of controlling the trains as I was trying to totally automate a route where trains ran randomly so it wasn't possible to rely on just timing the trains to avoid any conflicts.

You can use a similar method to the above to automatically control long sections of single track where you may want trains traveling in the same direction to follow one another into the section. In such a case you need two variables, one to indicate if the section is occupied and a second to indicate which direction any train in the section is traveling.

Regards

Brian
 
OP here - I actually got (at least) something working (albeit with "cheats") using only track and train priority. The cheats are: 1.) very simple one tile loop test layout, 2.) the "local" takes two passing sidings each time around the loop and, 3.) I had to put in some extra junctions just before the sidings turn back onto the main line so the local would not grab and lock the junction that returns to the main. This is step one of a learning experience - I wanted to try it with just Driver commands and priority and logical placement and length of the passing sidings. The Priority 1 train runs track speed, the local runs about half speed. This "fixed" setup allows the trains to run at speed with the local not even having to wait much at all.

Why such a small and simple "'test?" Even this simple setup taught me a lot about Train and track priority, length of sidings, length of train, and placement of turnouts and how they are grabbed and locked by AI. Because no Session Rules were used, one has to "think" a bit more about these things and I think that was a good experience.

From here I'll delve into the procedures described for more realistic (and route practical) operation. I'm very anxious to give them a try. Will start small and simple and work up to more complex layout and routing.

Thanks to each of you for the suggestions.
 
Last edited:
Back
Top