Signals & Track How To Keep Tsw Dispatcher From Generating Deadlocks

Discussion in 'PC Editor Discussion' started by fceschmidt, Dec 18, 2023.

  1. fceschmidt

    fceschmidt Well-Known Member

    Joined:
    Oct 22, 2020
    Messages:
    308
    Likes Received:
    401
    Hi all,

    Two opposing signals on a single track line. Doesn't that say it all?

    I have a situation like that with the Danish signalling system. Unlike in stations in Germany where there is one exit signal at each track and that's it (grossly oversimplified), the Danes also put another station exit signal after all switches, basically opposite to the station entry signal. If the outgoing line is a single-track line then that is a recipe for a deadlock and TSW's dispatcher is not smart enough to allocate the entire single-track section in one piece, rather it will allocate two trains onto the section and they will meet head-on at those two signals.

    My solution right now is to mark this additional station exit signal as a Running Shunt signal, and it works because TSW reclassifies the route to that signal as a shunting route, but it feels like a dirty workaround because it is not technically correct and requires additional logic at the track exit signals.

    Are there any other solutions?

    My probably silly proposal for a TSW core change would be to introduce an overrideable function at the network signal property which returns a Boolean value deciding whether a route to this signal should be allocated or not. It could just return true by default, but in that function the signal could decide based on the occupancy of the following track section.
     
  2. mkraehe#6051

    mkraehe#6051 Well-Known Member

    Joined:
    Sep 14, 2022
    Messages:
    852
    Likes Received:
    1,876
    You could technically create a lot of dependencies between the trains in the timetable to make sure a train going one way only tries to reserve a route into the single-track section after the previous one going the other way has left it. That's a lot worse than the solution you've found: it's a lot of work to set up, it means you can't use layers at all in the timetable, and it takes away a lot of flexibility from the dispatcher. However, it is to my knowledge (I'd love to find out I'm wrong about this!) the only way to deal with single-track sections that are longer than just one block...
     
    • Like Like x 1
  3. protonmw

    protonmw Active Member

    Joined:
    Mar 18, 2022
    Messages:
    175
    Likes Received:
    142
    Can you tell us, how this problem is solved in real life? is there any locking mechanism? Or could some stupid dispatcher do this also in real life?
     
  4. mkraehe#6051

    mkraehe#6051 Well-Known Member

    Joined:
    Sep 14, 2022
    Messages:
    852
    Likes Received:
    1,876
    A bit of both, depending on which country you're in, when the signalling was installed, etc. In Germany, interlocking will prevent two trains facing each other at block signals in the middle of a single track section, but you can generally still produce a deadlock at (for example) a junction where two single track lines meet.
     
  5. Tomas9970

    Tomas9970 Well-Known Member

    Joined:
    Oct 7, 2018
    Messages:
    1,035
    Likes Received:
    1,042
    Can trains actually stop at the other exit signal? If not, I would try to make it an ancillary signal just like how dedicated pre-signals are made. Basically it would be there, show an aspect based on neighboring signals but the dispatcher wouldn't see it and route straight from the exit signal at each platform to the entry signal of the next station.

    Still for a proper solution, we would need to know more about how the signal works in the real world.
     
    Last edited: Dec 18, 2023
  6. MRFS

    MRFS Staff Member

    Joined:
    Sep 20, 2020
    Messages:
    148
    Likes Received:
    199
    Why does it feel like a dirty workaround? Ignore for one moment what the name of the signal is in the TSW Editor, think of what you want to achieve:
    A. you want to reserve the section ahead for the train stood in the loop?
    B. you want to prevent trains meeting at the back to back signals?

    If I've understood you correctly, in order to leave a control point in the Danish system, a departing train has to pass a signal in the loop (for the sake of argument, I'll call that the inner starter) and then pass a signal on the main line, which is co-located with the opposing entry signal (which we can call the outer starter).

    What's stopping you setting up the opposing entry signal in all cases as a running shunt? Have you tried that combination? All a running shunt means is that routes can be selected "through" it, and it will automatically clear if the conditions are favourable at the loop.

    If you set it up this way with the Entry signal as a running shunt, you'll get three [1] routes from each outer starter:

    Outer Starter to far loop Entry Signal
    Outer Starter to far Loop track 1 Inner Starter
    Outer Starter to far Loop track 2 Inner Starter

    [1] a route per loop track plus a route to the Entry Signal.

    It depends what signal rules are in force (my Danish notes are WELL BURIED) but if you set up the basic routes above with call on section at 0 for each of the three routes, that should stop the cornfield meet at the back to back signal and reserve a loop track for the approaching train. You might also need to change the "shunt" option in the editor to "main", depending what your aspect rules are - or if there's a shunt facility at the Outer Starter.

    If you make sure that the links on the track for the back-to-back-signal point to each other (so they don't cross) I think you should be able to allow the dispatcher to let you shunt out from the inner starter to the outer starter without affecting the occupancy of the section. You might need to experiment with the call-on section count backwards from the outer starter towards the inner starter, but then you run into "how do you get that shunt movement to reverse backwards?" if there's no signal there.

    Setting up call on sections (working backwards from the end point of a route) for shunting may cause complications with a set up like the one suggested above.

    E&OE, of course - but I think that's how I'd do it based on a very simple two aspect/two aspect with an advance warning system; it should allow a train to depart towards a loop with all roads occupied too, I think - the entry signal will step up as soon as one road clears, if that road is in the routing for the signal at the previous loop. This is off the top of my head without the actual editor open in front of me.

    I would not use an ancillary link, as you're wanting the signal to show a stop aspect, and enforce that aspect.
     
    Last edited: Dec 18, 2023
  7. fceschmidt

    fceschmidt Well-Known Member

    Joined:
    Oct 22, 2020
    Messages:
    308
    Likes Received:
    401
    My current setup feels like a hack as a consequence of the fact that the inner starter's aspect depends on the outer starter's aspect. [Context: If the outer starter shows clear or better then the inner starter shows a specific "clear through outer starter", otherwise a "clear until outer starter". In some sense it acts as a distant signal for the outer starter...]


    In order to access the outer starter signal's aspect from the inner starter I have to iterate through the "intermediate signals" of the route, unless I have a misconception, because it's not the "next signal" in the route - that is, in my current setup, the entry signal of the far loop. Do Running Shunt signals' aspects also propagate back through the On Next Signal Aspect Changed event, even if the route class is Main? Then I may technically not even have that problem... But it's not a big issue anyway. (Although we still don't have a For loop node in the public editor, yay. Branch FTW)


    Another reason is that setting it to running shunt completely hides the signal from TSW's route monitor, even if it is a main signal as they call it.


    Now to your idea! In reality the entry and outer starter signals aren't exactly colocated, the have a distance of at least 150 meters for a safety margin. So they always point to each other anyway :)


    I had not thought about making the entry signals Running Shunt signals because the German-style omission of the outer starter was so hardwired in my brain, but it sounds like a good idea particularly because it would allow shunting up to the outer starter which in many of these cases coincides with the shunting limit marker anyway.


    Is there a guide somewhere on what Call On Sections do? I've never touched that. Maybe if it's sort of quick to explain you could shoot me a paragraph :)


    Would your setup allow me to run three trains from control point A to control point B after each other, occupy both loops at B and have the third one hold in front of B's entry signal? A rather constructed example, admittedly.

    Thanks for your valuable comment and also to all others, I will try it out in the next days.

    I'll also check if I can get any information as to how these conflicts are avoided IRL, but I'm not a signalman :)
     
  8. MRFS

    MRFS Staff Member

    Joined:
    Sep 20, 2020
    Messages:
    148
    Likes Received:
    199
    Yes, there is a disadvantage that running shunts won't appear in the HUD - the other option is to strictly regulate the passage of the trains by using destination markers, but that can involve a lot of trial and error with single line - and can very easily go haywire if the timetable is not strictly observed (which it should be for single lines, far more than double lines). I'm currently - for myself, rather than anything job-related - mulling over a Spanish mechanical system, which has a "parada diferida" (a deferred stop) at the entry signal and using running shunts has been part of the conceptualisation for that.

    I think with the entry signal as a running shunt you can have both roads at B occupied and bring a train up to B's entry signal - you wouldn't tab past the signal (request authority to pass it at danger) to send the third train into an occupied road, but I think it should work - experimentation would be key here.

    Call on sections work backwards from the signal at the termination point of the route and the track section will break at every point and every signal (even if the signal is for the opposite direction). If you want the ability to send a train into an occupied section, where you pause at the signal and get authority to pass it you need to count the number of track sections that it is permissible to have a train sat on (occupied) BACKWARDS from the signal or whatever is there at the far end of the route relative to your move.
     
  9. Tomas9970

    Tomas9970 Well-Known Member

    Joined:
    Oct 7, 2018
    Messages:
    1,035
    Likes Received:
    1,042
    So far, I think there's at least one problem with making the entry signal a running shunt. When routing a train, the shunting signals don't change their aspect because the train just ignores them. That way, your fake entry signal would never change aspect.

    If I understand this correctly, you want two things:
    1.) That a train passes both signals or neither of them.
    2.) That a shunt can stop at the outer signal and go back.

    That very much sounds like a shunting signal to me. With an added feature that it shows an aspect if the inner starter has a train route coming from it.

    Another (and maybe the easiest option) would be to ensure that the dispatcher always makes paths from the station track all the way to station track of the next station (creates and reserves the exit path and entry path at the same time). This way, there wouldn't be any trains aproaching the entry signal without a guarantee that they can get into the station.
     
    Last edited: Dec 19, 2023
  10. mkraehe#6051

    mkraehe#6051 Well-Known Member

    Joined:
    Sep 14, 2022
    Messages:
    852
    Likes Received:
    1,876
    There must be a way to make shunt signals change aspect for train movements as that's how the German protection signals behave in the sim.
     
  11. Tomas9970

    Tomas9970 Well-Known Member

    Joined:
    Oct 7, 2018
    Messages:
    1,035
    Likes Received:
    1,042
    Isn't that a combined signal that's supposed to be valid for both of them? So that trains are supposed to stop in front of it but then they can only continue as a shunt. Pure shunting signals however don't do a thing if you set a train path through them.

    btw. Can I see what the timetable setup is that's causing a deadlock? Because when I set a path, the dispatcher routes the whole thing right away (from platform to platform) so there is no way for another train to get involved.

    edit: On a second look, that clearly isn't the case for long sections as the dispatcher will only route a few signals ahead so i got that wrong.
     
    Last edited: Dec 19, 2023
  12. mkraehe#6051

    mkraehe#6051 Well-Known Member

    Joined:
    Sep 14, 2022
    Messages:
    852
    Likes Received:
    1,876
    It's complicated. I think a full explanation of this is probably out of the scope of this thread. However, the way train moves are run past them does sound similar to the behaviour OP wants if I understand it correctly, so it might be worth looking at for ideas, I think.
     
  13. fceschmidt

    fceschmidt Well-Known Member

    Joined:
    Oct 22, 2020
    Messages:
    308
    Likes Received:
    401
    The funny thing is that even with my current setup, the outer starters are marked as running shunt, and they do change aspect. In fact when the dispatcher reserves a route from Main signal A to Main signal B via intermediate running shunt signals Sx, it also sets the route from Sx to B for each running shunt signal Sx. So I think that's not a problem. But I'll check probably tomorrow and report back.
     
  14. fceschmidt

    fceschmidt Well-Known Member

    Joined:
    Oct 22, 2020
    Messages:
    308
    Likes Received:
    401
    I managed to check this with someone more knowledgeable and it is indeed handled by interlocking. As I was explained it, the outer starter and all "Main-class" roads to it are linked to something called a linjeblok (line block) and all other signals along the single-track line are also linked to it. The line block is a form of state (not sure about the exact implementation) shared between to adjacent stations/control points which allows roads on the connecting single track line in only one direction at a time.
     
  15. MRFS

    MRFS Staff Member

    Joined:
    Sep 20, 2020
    Messages:
    148
    Likes Received:
    199
    No.
    Running Shunts do clear [1] - that is the entire reason they are set up as running shunts. They exist where there is a shunt signal between main signals, so when a route is called between main to main the shunt will be cleared by that route being called. Is that why you think a train ignores them; as they will clear for a main route automagically?

    [1] there are countries where the running shunts don't change aspect for main through routes, but their lock over the adjacent points is set.
     
  16. Tomas9970

    Tomas9970 Well-Known Member

    Joined:
    Oct 7, 2018
    Messages:
    1,035
    Likes Received:
    1,042
    So it's the usual stuff right? The dispatchers of neighboring stations can agree on the direction of travel using the interlocking. Then whoever has the right of way (likely not a proper term) can send trains from the exit signal to the track and as soon as he does that, the direction of travel gets locked until the train arrives at the next station and clears the track. The single-track section can obviously include block signals, which are fully automated and only rely on information about neighboring blocks and signals. This is done so that multiple trains can run right after each other in a single direction.

    That's where I got confused, they don't visibly change aspect so a train can run through as many shunting "reds" as it needs without even thinking about it. Obviously you will never have a train route and a shunting route in one place at the same time but that's handled at a different level and doesn't involve the actual signal lights.

    Secondly, the locking table (which is a table describing all routes allowed within a station as well as what switch positions are required to set it and what signal aspects are shown when it's set) doesn't say a thing about setting shunting signals when making a train route.
     
  17. MRFS

    MRFS Staff Member

    Joined:
    Sep 20, 2020
    Messages:
    148
    Likes Received:
    199
    All the examples I have of multiple aspect interlocking and control tables (and my collection is global, but not comprehensive) make reference to "preset shunt routes" (or the appropriate equivalent)- countries where shunting signal do not clear for the main route through them are very much the exception, not the norm.

    What country and what style of locking table are you thinking of, please?
     
  18. Tomas9970

    Tomas9970 Well-Known Member

    Joined:
    Oct 7, 2018
    Messages:
    1,035
    Likes Received:
    1,042
    I'm basing my arguments on Czech signaling as that's what I'm familiar with in the real world. This system doesn't have any train protection for shunting so that might be why it's an exception.

    Real locking tables are private however there is a sample one available. Important pages for us would be 32-34 showing the position of switches, level crossings and stuff for each route as well as pages 21-30, showing signal aspects based on what the final one is supposed to be.
    https://www.spravazeleznic.cz/documents/50004227/139626480/200610_TNŽ+34+2604.pdf/461f5645-923c-4337-aaa4-5df7ce5cb7e7
     
    Last edited: Dec 20, 2023
  19. MRFS

    MRFS Staff Member

    Joined:
    Sep 20, 2020
    Messages:
    148
    Likes Received:
    199
    Fascinating, thank you very much indeed.

    There's some interesting interlocking there - I can read it - surprisingly without translation as it follows or is very similar to Spanish practice, which in turn is a simplified/reduced version of German/Austro-Hungary practice. Completely different to UK locking charts. I'm guessing that it's an electromechanical frame with rotary switches to set the routes; is it? .

    Looking at the aspect sequences, the Se signals don't feature on the route list overviews (pp 21-30) but are in the interlocking table (Rows 50 - 64, 76 -91) - which suggests that their interlocking function acts when main signals are cleared over them, but the shunting signals themselves don't clear. As I read that table, the shunt signals would only change when they are a specific shunting move, as their interlocking functions are enacted/duplicated by the main routes. So they are not preset shunts.

    If there are any more examples online, I'd love to see them, please.
     
  20. Taihennami

    Taihennami Well-Known Member

    Joined:
    May 6, 2023
    Messages:
    344
    Likes Received:
    431
    In Britain, there are usually two solutions; which one to be applied depends on the age of the signalling installation.

    The first is a "token" system, essentially reserving the entire single-line section for a given train before any signals can be cleared onto it. Originally this was a physical token, engraved with the section limits and sometimes also serving as a key to unlock ground-frames for shunting sidings en route. Electric Token Block allows several tokens to exist for the same section, but they are locked in interlocked token machines so that only one can be in a driver's possession at a time. A more recent version is "tokenless block" in which the reservation is performed by a latching relay (which remains in position even when unpowered), rather than physically carrying the token on the train. RETB works like the physical token, but it's an electronic token transmitted by radio, rather than one made of steel or brass; it reduces the number of signalboxes that need to be manned in remote areas of Scotland and Wales.

    The other is employed on modern Track Circuit Block installations. It is essentially a directional control for a track consisting of, potentially, several signal sections in sequence. This means that, if there are enough signals, it is possible to send several trains in succession in the same direction as each other, but the system locks out attempts to introduce trains in the other direction until all of them have cleared. This system isn't restricted to what you might normally classify as a "single track line", but is also used for bidirectional signalling on main lines. Main lines will normally be directionally controlled in one direction, but that direction can be reversed for abnormal working, eg. for when the Down line needs to be blocked on the Dawlish sea wall during storms.

    From what I've seen, the "directional" system similar to TCB is reasonably common internationally, and in particular is a feature of many ex-Soviet installations.
     
  21. Taihennami

    Taihennami Well-Known Member

    Joined:
    May 6, 2023
    Messages:
    344
    Likes Received:
    431
    From my understanding, OSShD signalling routinely keeps shunt signals "on" when a main route is set through them, and this is used extensively (that is, almost universally) in ex-Soviet nations. They have a blue lamp for the stop aspect, to distinguish them from main signals which use red as usual. This may also be how the French do things, though with a different colour of lamp.

    OSShD is unusual in that it's a wayside signalling system built completely from the ground up in the 20th century. Let's just say the new Soviet nation inherited a railway system in a state of complete disrepair and chaos circa 1920. They adopted colour-light signalling from the outset, as the technology of the time allowed it, and rapidly retired any remaining semaphore signals. Thus there wasn't the usual evolution of basing the colour-light aspects on semaphore practice.
     
  22. Tomas9970

    Tomas9970 Well-Known Member

    Joined:
    Oct 7, 2018
    Messages:
    1,035
    Likes Received:
    1,042
    Yeah. It's an electro-mechanical interlocking. Not something I would be particularly familiar with as we have a relay-based interlocking and an electronic interlocking instead however they still do exist across the country.

    Based on what you said, I think there is still a correction to be made at least for more modern equipment. While it's true that the shunting signals can't be switched if there's a train route running over them, there is not actual lock put on the signals themselves when setting a route or any signals for tha matter (even ones that are part of a route).

    When the dispatcher sets a path, the interlocking starts flipping switches and setting other things to satisfy the conditions made in the table that has been implemented (assuming none of the equipment is locked by another path). When all the conditions have been met, the path gets locked in alongside with all the equipment that's part of it.

    Having a valid lock is the key condition that allows the signals to be set from red lights to aspects shown in the route list (and a modern interlocking does that automatically) however that doesn't put a lock on them. The dispatcher can still set them to red if he wants to and if the lock is lost because conditions have been violated (like if a track section gets suddenly occupied), all the signals automatically drop back to a red light.

    It's sort of a one-way connection where the signals merely show the status of the underlying security equipment but aren't really preventing anything.

    As for why you can't set shunting signals when there are already main signals cleared over them, it's because you can't set two conflicting routes at the same time. You can't, for example, have a switch in two positions at the same time to satisfy conditions for two different routes.

    edit: I made a mistake in this. Setting a route can fail due to a fault in signaling however it's only if the desired aspect can't be set on one of the signals and there is no alternate aspect. For example if the red light isn't working.
     
    Last edited: Dec 20, 2023
  23. MRFS

    MRFS Staff Member

    Joined:
    Sep 20, 2020
    Messages:
    148
    Likes Received:
    199
    Yes, indeed, plus running shunts in Austria don't routinely clear for a main movement over them.

    Screenshot 2023-12-20 125318.jpg

    Indeed. Carré Violet.

    A very adaptable system, but read the stacked heads from the top down (which is rare outside the Eastern Bloc, as is unchanging running shunts!).
     
    Last edited: Dec 20, 2023

Share This Page