double to single track and multiple enhanced interlocking towers

justinroth

Active member
I am trying to figure out the best way to handle traffic control in a particular situation. Double track becomes single and is part of the route that is controlled by a certain interlocking tower. The single track is around 10 miles long and then becomes double track controlled by a different interlocking tower. I prefer to have more enhanced interlocking towers with fewer paths than to have a bunch of paths on just a few eit's (paying attention not to have any overlapping paths). Normally, when using MCM the follow path(s) will be automatically selected. In this case the next path is a different tower so I'm assuming I will need a path trigger. Problem is that both paths need to be set simultaneously as to avoid a stand-off but I'm concerned that the length of single track is too long. Any suggestions on how to handle control as simply as possible?
 
Simplest solution is to use signals to control access to the single track . No real need for EIT's.

-------------S>---\ /-<S-----------------
--<S-----------------------S>-
--------------S>--/ \-<S---------------------


The double track sections should have an uo & down leg and you must ensure that any consist is not heading into the double track section at the far end where another consist is already present. Signals further along the double track sections also need to be used as normal.
Ive used this configuration on many routes and as far as I know signal distance is well over 10miles. Do a Forum search on 'Signal Distance' to check.


PG
Just checked - I believe its still 32Km
 
Last edited:
10 miles may be a bit much. But I have 2 ideas.

1. Look into using the track circuit triggers/detectors. These will allow the 2 towers to sort of coordinate the controls as a TCB(Track Circuit Block) occupied will trick one of the towers to "lock out" the occupied single until cleared of traffic. Down side is, only 1 train at a time will run the single regardless of direction.

2. (preferred) break up the 10 miles with passing sidings. It would mean more towers, but you could program each full segment as a full path and allow for a few more trains in the whole 10 mile stretch.
 
Hi

Just use one tower containing two paths, eg Northbound and Southbound, to control the whole of the single line section . Once a train has been allocated it's path no other train will be able to set the same or the opposing path until the first one has cleared the section.

If you wish to keep a tower at each end for some reason then you can use a variable as a token to indicate whether the section is occupied or clear by setting the variable to 1 or 0.

As it is a long section you may wish to have more than one train in the section at a time as long as they are travelling in the same direction. In such situations I use two variables, one to indicate if the section is occupied and a second to indicate the direction of travel that the occupying train is travelling. It sounds complicated but it's far simpler than it sounds and once set up it works completely automatically. You will also have to break the long section up into smaller blocks with signals which will keep the trains apart when there is more than one in the section.

Regards

Brian
 
Last edited:
I totally forgot about the C+ nameable asset. I believe I could use this as an exclusive sets membership for any path entering the single track?
 
Hi

Just use one tower containing two paths, eg Northbound and Southbound, to control the whole of the single line section . Once a train has been allocated it's path no other train will be able to set the same or the opposing path until the first one has cleared the section.

If you wish to keep a tower at each end for some reason then you can use a variable as a token to indicate whether the section is occupied or clear by setting the variable to 1 or 0.

As it is a long section you may wish to have more than one train in the section at a time as long as they are travelling in the same direction. In such situations I use two variables, one to indicate if the section is occupied and a second to indicate the direction of travel that the occupying train is travelling. It sounds complicated but it's far simpler than it sounds and once set up it works completely automatically. You will also have to break the long section up into smaller blocks with signals which will keep the trains apart when there is more than one in the section.

Regards

Brian


I'm interested in the using the variables method but I don't know where to start, what to implement, what rules I need ect.
 
Hi Justin

To use a variable as a single line token you will need to download the following driver commands from the DLS, all by author "trev999"

"Insert buff label" kuid:160293:101002
"Jump to label" kuid2:160293:101003:2
"Set S-variable" kuid2:160293:101005:5
"Wait Until S-variable V3" kuid2:160293:101006:3
"Skip if session-variable" kuid2:160293:101014:3

You will also need the "Input Table" rule which is included as built in with all recent versions of Trainz.

Decide on a name for the variable - I'll use "tok_1" for this example.

Open the Input table rule and add the following lines

svname,tok_1
svar,set,0
svar,set,1
svar,eq,0

The commas are important.

You will need to place two trackmarks on the double track either side of the single line section, the first one far enough back from the signal to allow the train to stop without running through the signal. The second one needs to be about 10 meters from the signal. Assuming the line runs North to South I would name them "NB Tok 1 Approach" and "NB Tok 1 Stop" and "SB Tok 1 Approach" and "SB Tok 1 Stop". You will also need a trackmark on the double track at the other end of the single line section "NB Tok 1 Exit" and "SB Tok 1 Exit".

For a Northbound train the sequence of driver commands would be

Drive via "NB Tok 1 Approach"
Skip to lable 1 if session-variable "tok_1" = 0
Drive to "NB Tok 1 Stop"
Wait Until S-variable V3 tok_1 = 0
Label 1
Set "tok_1" = 1
Drive via "NB Tok 1 Exit"
Set "tok_1" = 0

Explanation of above

The train drives through the approach trackmark and checks the value in the variable. If it is 0 (section clear) then it skips the next two commands to Label 1. If it is 1 (section occupied) it drives to the second trackmark and waits until the variable is set to 0.

After the label the first command is to set the variable to 1. This is to minimise the chance of another train setting the variable at the same time. The train will then proceed through the single line section and then set the variable back to 0 after it passes "NB Tok 1 Exit"

Put these commands into the Schedule Library so that any train can copy them with a single command.

One final thing, you must set the value of the variable to 0 with a command at the beginning of the session otherwise it will have nothing to compare to and the schedule will stop.


On a long single line section you may need to allow two or more trains travelling in the same direction to follow one another into the section.

To do this you will need to insert a second variable and some more operators into the Input Table

svname,tok_1_dir
svar,inc,1
svar,dec,1
svar,set,2

This token is used to indicate the direction of travel of any train in the section, NB = 1 and SB = 2.

The driver commands will now be

Drive via NB Tok 1 Approach
Skip to lable 1 if session-variable "tok_1" = 0
Skip to lable 1 if session-variable "tok_1_dir" = 1
Drive to NB Tok 1 Stop
Wait Until S-variable V3 tok_1 = 0
Label 1
Inc "tok_1" by 1
Set "tok_1_dir" = 1
Drive via "NB Tok 1 Exit"
dec "tok_1" by 1

Explanation

The train drives through the approach trackmark and checks the state of variable "tok_1". If it is 0 then it skips to Label 1, if it is greater than 0 then it moves to the next line where it checks the "tok_1_dir" variable to check the direction of travel of the train already in the section. If the value in the variable is 1 then it indicates that a train already in the section is also travelling NB and it jumps to Label 1. If both these checks fail indicating that the train already in the section is travelling SB then the train will drive to "NB Tok 1 Stop" and wait for "tok_1" to return to 0.

When "tok_1" = 0 the next command doesn't set the variable to 1 but increments it by 1 instead. This is because it needs to count the number of trains that are in the section at any one time. If there were 2 trains in the section the variable would have a value of 2 etc.

The train again drives through "NB Tok 1 Exit" but this time it decrements the "tok_1" variable by 1 and thus keeps the count of the trains still in the section accurate.

Again you need to set the "tok_1" variable to 0 at the start of the session but there is no need to set the "tok_1_dir" variable as this will be done by the first train through.

Obviously you can name the variables whatever you want. If you double click on the "Set S-variable" command in CM, Trevor has helpfully given a description of how to set the variables up and how to use the operators and comparators.

I hope that you can follow this but if you have any problems or questions please post again and I'll do my best to answer them.

Regards

Brian
 
Last edited:
Hi Brian - Thanks for promoting my commands. There is a small mistake in the line "Wait Until S-variable V3 = 0".

The command expects to be supplied a session variable name (svname) so you need to include the variable name in the command line:

Wait Until S-variable V3 tok_1 = 0

The same applies to the second example.

Hope the OP is successful in getting this to work.

Cheers - Trev
 
Hi Trevor

Good to hear from you again. Thank you for pointing out the errors in the schedules. That's what happens when I type them in off the top of my head instead of checking an existing set up.

Regards

Brian
 
HI all,

just quickly, I have a single line section governed by a combination of trev999’s variables and pguy’s IT’s coupled with MC. The double line section is very long, has high speeds, several approach signals and can deal with at least a few traffic generated from a portal every 30 minutes.
On each approach signal I’ve added intermediate approach TM’s designed specifically to cater additional opportunities to the driver (like following a line of breadcrumbs) before arriving at a home signal at STOP.
Heres how I demonstrated:
The signals I use in the double line section are Ranger_51’s NSW double light series.
They have a total of 10 aspects/states, but I limited to 4 for this scenario (se my signature below except without the stop_then_continue signal state (R-R-G)).

I used @Kennilworth’s analogy in this but chained it repeatedly until it reached the home signal.

• The last Clear signal lies alongside the outer approach TM.
• The last approach signal before the stop signal lies next to the inner approach TM.
Code:
[CLEAR]Autodrive through “tok 1 outer approach”
Skip to lbl 1 if s-variable “tok_1” = 0
Skip to lbl 1 if s-variable “tok_1_dir” = 1
[ADVANCE CAUTION]Autodrive through “tok 1 inter approach”
Skip to lbl 1 if s-variable “tok_1” = 0
Skip to lbl 1 if s-variable “tok_1_dir” = 1
[CAUTION]Autodrive through “tok 1 inner approach”
Skip to lbl 1 if s-variable “tok_1” = 0
Skip to lbl 1 if s-variable “tok_1_dir” = 1
[STOP]Autodrive to “tok 1 stop”
Wait until s-variable “tok_1” = 0
Lbl 1
ITMCAssignNextPath
Inc “tok_1” by 1
set “tok_1_dir” = 1
Auto drive to tok 1 exit
Dec “tok_1” by 1
Call At <portal>
I’m not exactly sure if I do need this structure to make it reasonable for the AI.
Or should I stick to the 2 TM rule? What are your thoughts?

In answering with @Kennilworth’s post will it work using brummfondel’s autodrive instead of the base drive to/via commands, reason I ask this is I don’t like the physical elements where the ai would slow down for the TM and then drive up to track speed.
Also, in using autodrive to/through TM command, would it affect MCM to look for a train in the vicinity to activate an IT path?

in build 117669

Regards,
darrren
 
Last edited:
Back
Top