.
Results 1 to 9 of 9

Thread: double to single track and multiple enhanced interlocking towers

  1. #1
    Join Date
    Aug 2012
    Location
    Columbus, Oh USA -by the Weber Connection!
    Posts
    1,197
     

    Default double to single track and multiple enhanced interlocking towers

    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?
    Check out my grungy electric piano based band, "Small Movies" at http://wearesmallmovies.com/

  2. #2
    Join Date
    Nov 2006
    Location
    Australia, NSW, Sydney
    Posts
    319
     

    Default

    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 by PGibbons; October 8th, 2021 at 07:45 PM. Reason: update
    Win10-64bit, Intel I7, 32GB RAM, TANE on SSD, GTX1050Ti.

  3. #3
    Join Date
    Nov 2011
    Location
    United States of America, Tampa, FL
    Posts
    1,205
     

    Default

    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.
    "Cave Johnson. We're done here."

  4. #4
    Join Date
    Feb 2008
    Location
    United Kingdom
    Posts
    2,139
     

    Default

    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 by Kennilworth; October 9th, 2021 at 02:58 AM. Reason: spelling

  5. #5
    Join Date
    Aug 2012
    Location
    Columbus, Oh USA -by the Weber Connection!
    Posts
    1,197
     

    Default

    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?
    Check out my grungy electric piano based band, "Small Movies" at http://wearesmallmovies.com/

  6. #6
    Join Date
    Aug 2012
    Location
    Columbus, Oh USA -by the Weber Connection!
    Posts
    1,197
     

    Default

    Quote Originally Posted by Kennilworth View Post
    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.
    Check out my grungy electric piano based band, "Small Movies" at http://wearesmallmovies.com/

  7. #7
    Join Date
    Feb 2008
    Location
    United Kingdom
    Posts
    2,139
     

    Default

    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 by Kennilworth; October 24th, 2021 at 02:17 PM. Reason: Corrected schedule after Trevor pointed out errors

  8. #8
    Join Date
    Nov 2006
    Location
    South Africa, West Cape, Sedgefield
    Posts
    1,181
     

    Default

    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

  9. #9
    Join Date
    Feb 2008
    Location
    United Kingdom
    Posts
    2,139
     

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •