News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Single Track Signalling Token Block Signal

Started by nuhgl, July 02, 2017, 09:13:10 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

nuhgl

Hello,

I am downgrading double tracked railway line to single track operation to reduce maintenance cost of the line.
But I can firgure it out how to place token block singnals.

I read some entry on the internet http://www.railsigns.uk/info/etoken1/etoken1.html and placed signals like this.



Could someone give advice on how to use token block singnals?



Vladki

I'm not 100% sure, but I think the home signals should be plain signals (non-token).

nuhgl

Do excuse me for my lack of knowldge on signals.
What are home signals?

jamespetts

Hello and welcome! Token block signalling is next on the list of signalling systems about which to make a tutorial video. I have, however, been concentrating on game balance, so have not got around to that yet.

In Simutrans-Extended, token block signals should be used on the entry to the single line section. In the single line section itself, one should use absolute block signals. Think of token block signals as the signals at which the line token is actually collected or deposited. Other signals should be of the absolute block working method.

And by "home signal", I think that Vladki meant stop signal (of the absolute block working method).
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

nuhgl

Hello James,

Thanks for very helpful videos. :)

I see! I will try to set up this and see if signals works as it meant to.
And also big thanks for your time and passion for Simutrans-Extended and your work on game balance!
Good balance, so now I face downgrading my line to get out of massive debt ;)

nuhgl

Quote from: jamespetts on July 02, 2017, 09:29:48 PM
Hello and welcome! Token block signalling is next on the list of signalling systems about which to make a tutorial video. I have, however, been concentrating on game balance, so have not got around to that yet.

In Simutrans-Extended, token block signals should be used on the entry to the single line section. In the single line section itself, one should use absolute block signals. Think of token block signals as the signals at which the line token is actually collected or deposited. Other signals should be of the absolute block working method.

And by "home signal", I think that Vladki meant stop signal (of the absolute block working method).

Token block signals should be placed at entries, should it be also placed on the exit points of the token block section supposed tokens should be deposited back?


This is what I understand use of token signals.

jamespetts

Tokens are not deposited at what I think that you mean by "exit signals" (that is, signals on a single track section where the train is facing out of the section), as the train cannot give up the token when any part of it is in the single line section. The token block signals need to be placed on the entry to the next single line section, and absolute block signals on the exit of a token block section.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

By home signal I meant the signal on entry to the passing loop.

Sent from my ONEPLUS A3003 using Tapatalk


Jando

Quote from: nuhgl on July 02, 2017, 09:13:10 PM
Hello,

I am downgrading double tracked railway line to single track operation to reduce maintenance cost of the line.
But I can firgure it out how to place token block singnals.
...
Could someone give advice on how to use token block singnals?

If you want to see an example, here is a saved game that uses token block signalling for single track segments: http://files.simutrans.com/index.php/s/NK8tlBOsqWuDDwo

AP

Quote from: Vladki on July 03, 2017, 06:37:35 AM
By home signal I meant the signal on entry to the passing loop.
I don't believe any such signal is required.

Vladki

It is needed. In token block, the track remains reserved in rear of the train until it completely passes another signal. If you would put signals only on exit of the loop, the trains would get stuck there.

River

#11
what might be worth mentioning and what i have been running in to is that you need to use oneway signals aswell to prevent trains from going the other direction where you place the token block signnals. this isn't needed in standard. Also i find the absolute block a better fit.

nuhgl

Is there way to prevent to happen this sort of deadlock?


River

Hi nuhgl,

you should remove signs S1 and S6. you shouldn't place signs (that interrupt reservations) on the single track parts where more then 1 train comes.

nuhgl

Quote from: River on July 14, 2017, 04:44:12 PM
Hi nuhgl,

you should remove signs S1 and S6. you shouldn't place signs (that interrupt reservations) on the single track parts where more then 1 train comes.

Hey River,

If I remove S1 and S6, It could prevent it but then this could happen.

Station B upper platform is Platform 1 and down is platform 2. (diagram avobe)
Platfrom 1, there is a set of train (Train A) ready to depart at S5 to P3 East.
While waiting another set of train (Train B) on the line from East on the way to stop at Platfrom 2, East P3 to S2.
When train B clears P3 and moved in to platform 2, Train A cannot proceed.

Because train B at platform 2 is still have reservation for that.

River

#15
are you by any chance using token block signals? that is the reason why i'm using the absolute block

jamespetts

In reality, the way that the sort of deadlock that you describe would be prevented is by limiting the number of trains travelling on the single track section. Single track lines are generally only suited to sparse traffic. You can limit the number of trains by using the schedules and setting "wait for time" at some stops to fix the frequency of services.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

AP

#17

       
  • Make the passing loop 2 trains long
  • position the station at one end
  • position S1 inside the loop, immediately before the platform starts.
  • position S6 inside the loop, immediately before the other platform starts
This will ensure that either S1 or S6 (but not both) can hold a train prior to the platform, but inside the loop, i.e. without blocking the loop exit. Which will stop the gridlock.

I would usually bias such a configuration so that trains could run freely away from a depot, junction, or terminus.

If you make the loop 3 trains long, you can obviously avoid the gridlock in either direction, but you start needing lots more track.

Quote from: nuhgl on July 14, 2017, 03:48:32 PM
Is there way to prevent to happen this sort of deadlock?



nuhgl

Thanks for sugesstions.

However, Is there way to clear station signals (such as S2 or S5) on one station before to clear way only if S1 or S6 can be cleared?

Making loop long add up the cost of infrastructure maintance.

AP

Quote from: Vladki on July 09, 2017, 06:38:03 PM
It is needed. In token block, the track remains reserved in rear of the train until it completely passes another signal. If you would put signals only on exit of the loop, the trains would get stuck there.


It sounds like this is the problem. I suggest that in Simutrans-ex, the signals controlling entry into a token block section need to work like "long block" signals of old did in Simutrans-standard, that is, not allow entry into the block section until the loop is clear at the other end.

River

this is why i use a absolute block signal, the reservation is removed where the train has passed. for now its the best i know of how to remove the reservation.

jamespetts

Quote from: AP on July 18, 2017, 10:43:59 AM

It sounds like this is the problem. I suggest that in Simutrans-ex, the signals controlling entry into a token block section need to work like "long block" signals of old did in Simutrans-standard, that is, not allow entry into the block section until the loop is clear at the other end.

That would be difficult to understand as this would not mirror how signalling works on actual railways.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

AP

#22
Quote from: jamespetts on July 18, 2017, 10:58:11 PM
That would be difficult to understand as this would not mirror how signalling works on actual railways.

I disagree. It would not mirror how the signals work, but it would mirror how the signalling system as a whole works. The distinction being the presence of a signalman to make 'intelligent' decisions:

The gridlock pictured in nuhgl's diagram would not occur on actual railways. The cause of this is that the signalling currently is allowing trains into the block when the loop is already full. On an actual railway, the signalman would not allow such following trains to proceed until the loop was clear (or about to become clear). Certainly s/he wouldn't allow following trains to proceed from both directions.

Absent a signalman, I suggest the simutrans signal should perform the same check.

jamespetts

On a real railway, the deadlock would not happen because there would not be an excessive number of trains scheduled to enter a single track section at the same time, rather than because it is a feature of the signalling system that trains are not allowed into a block section until the block two sections ahead is clear. Such a system would interfere with the ordinary working of trains in situations that are not liable to lead to deadlocks, making single line working less efficient.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

I'm reopening this, as I have run into issues with token block signalling when I wanted to use it for the demo game. For me it ended up completely useless, and used absolute block signalling. As long as there is at most one stop on the single track part between loops, it works fine.

In real life, a station on single track line would look like this:

Home signals are choose signals, and start signals are token block signals. Two tracks are enough for passing loop, but usually there will be more, e.g. for loading cargo which takes long time. I found out that this layout leads to deadlocks very quickly, even if there are free tracks in the station (loop). It takes only three trains: two trains are travelling in opposite directions. One of them is a bit closer to the loop, so it gets the reservation to enter the middle track. If there would be only these two trains, the other will choose one of the remaining platforms, and the trains will pass happily. But if there is third train in the rear of the first one, it will start as soon as the first train passes the home signal, and reserve the whole track. If the train from the opposite direction is not scheduled to stop in this loop, it will not choose an alternative route, because the track at end of choose sign will be already reserved by the third train.

To avoid this, it is better to have the tracks in the loop signaled as uni-directional. Thus the home signal is normal signal (not choose).

This sort of loop can deadlock if you have 4 trains on the line. Let's have a line with 3 passing loops (plus terminal stations). 4 trains should use such line just fine. 2 trains at the middle loop, and 1 at each terminus. When they start two trains should meet at both remaining passing loops, and then again 2 trains in central loop and 2 at terminal stops. As long as nothing disturbs the schedule, it should work fine. But if the trains get delayed somewhere (let's say that the terminal stops are junctions with main line, and some sort of congestion happens there), or you just release the train from depot at wrong time, it may happen that the trains will follow each other more closely, and may get stuck - two in the loop, and the other two waiting at home signals.

This can be avoided by omitting the home signal:

This works fine if the start signal is absolute block, or track circuit signal. But if it is token block, the two trains would meet at the loop, but will not clear the tracks in rear and block each other. As suggested before, this could be solved by making the loop 2x longer so that two trains fit there, but IMHO it would deadlock with 4 trains just as the previous example (plus it would have higher costs).

In real world this sort of situation is avoided by the fact that token is not returned after passing the home signal, but only after stopping the train at start signal. And if there is another train waiting to depart in opposite direction, the token is given directly to the driver, and not to the token machine, so that they cannot pick a token on the opposite side. (Well maybe it has to go to some other machine for a short while if it is interlocked with signal).

So my suggestion would be to clear the track in rear of train if it has stopped ahead of token block signal and waiting for clearance. (It should stop there anyway for a short while to hand the token to signalman).

jamespetts

Thank you for your report. I have not had a chance to look into this in detail yet, as I am just catching up with various matters after returning from holiday. However, I am struggling to understand what you mean when you write,

Quote
But if there is third train in the rear of the first one, it will start as soon as the first train passes the home signal, and reserve the whole track.

Can you elaborate on what you mean when you refer to the third train "start[ing] as soon as the first train passes the home signal" (where is it starting from, exactly?) and "reserve the whole track" (what exactly counts as the "whole track" here)?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

OK, imagine a line with several stations like the one on the top.
Lets have stations -A-B-C-, and three trains, that are scheduled to go _non-stop_ from A to C. B is supposed to work as passing loop.
There are two trains (a,c) in A and C ready to depart towards B, and third train (b) half-way between A and B heading to B. Train from C can depart immediately, its path towards B is clear. But the track A-B is occupied by train (b). Train (b) will reach station B, and stop on the middle track, and wait for clearance - because track B-C will be occupied by train (c). But as soon as the train (b) will completely pass the home signal at B, it will free the track A-B and train (a) will depart and reserve the track up to the home signal.

So we have a station with 3 tracks, one occupied and two trains approaching the station from both directions. One would expect that the next train (c) that approaches B will choose one of the free platforms (home signal is a choose signal), but it won't. It is because the tile with end-of-choose sign is reserved by the train (a) approaching from the other side. So both trains will stop at home signals, waiting for the other to free the end-of-choose sign, or for the straight track to become free.

This situation occurs frequently on the British Sandbox server game, with track circuit block, but I think this would work similarly with absolute or token block.

This will not happen if these trains are scheduled to stop at B. Then the choose signals will look for free platform, and won't be bothered about the end-of-choose sign on the other side of station. However, if there are more trains on the line, they may (in the meantime) get to stations A and C and depart towards B, before any of the three trains could get out of B. The line up to the home signal is cleared before the junction protected by it, so this is also very likely to happen. To be 100% free of deadlock on such line, you'll have to have as many platforms on each station as you have trains on the line. And also schedule them all to halt at all passing stations.


AP

Presumably if there are no platforms at some intermediate passing loops (eg because there is no town nearby),  this is even more problematic.

jamespetts

At first sight, this appears to be a highly complex conceptual problem, the only possible solution to which would involve a whole new layer of logic way beyond basic signal operation that might take a very considerable amount of time to implement.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

Well I do not ask for fixing the first scenario. There is a partial solution show on the third screenshot. It means to get rid of home signals, to keep trains in station until there is a free track in the loop. Also the tracks in the loop must be one way signed.

But that layout works only for absolute and track circuit block.

Fix is needed only for token block (and one train staff). And the fix would be to free the track in rear of train if it is waiting for clearance at a signal.

Sent from my ONEPLUS A3003 using Tapatalk


jamespetts

I am having some trouble reproducing this. In this example saved game that I have created (start the trains in the depots at the ends of the line to see this in action), the trains will clear the reservation behind them when they pass the one way sign in the passing loop. Are you able to reproduce a situation in a saved game where this does not occur?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

Well, finally I got to test your example. It works partially. Only the first train that arrives to the loop removes its reservation after passing the one-way sign. The other one, removes the reservation only after passing the token signal.

Furthermore, the distant signals at the loop show clear even if token block signals are at danger.
When one train is already in the loop and the other approaching, reservation is made through the loop and ahead, but the token-signal stays at danger, and the train passes it at full speed.

I have my own save, where it does not what is expected. It does more funny stuff, trains teleporting from overcombe to marygreen at 4:15:xx
http://list.extended.simutrans.org/~vladki/debug-saves/demo-5.sve

Vladki

One more debug save with further issues. http://list.extended.simutrans.org/~vladki/debug-saves/demo-6.sve

token block signalling is set up on single track lines
- christminster central -  eastgate
you can see a train waiting for clearance at christminster north, heading to minster downs. The platform is clear, but the train is still waiting for clearance... It will wait forever, because the other train will errorneously leave the track reserved when it switches to absolute block and heads to christmister central.
- marygreen - havenpool
a train will soon depart from marygreen, and will reserve the whole track to havenpool, even though it is scheduled to stop midway at overcobe loop. The train in the opposite direction is thus uneccesarily delayed. Normally, they should pass at overcombe. When the train arrives to havenpool, the other train starts to overcombe - reservation only to overcombe. But when it passes overcombe, and clears the track, the first train stays waiting for clearance... Like the trains in christminster. When the cargo train arrives at marygreen, the pax train will start and teleport from overcombe to marygreen...
- melchester - kingsbere
short while after loading trains will start from both directions, and nicely meet at emminster halt. Pax train will clear the track after loading, the cargo train will clear only partially - the junction tile will remain reserved, until the cargo train leaves the station.






jamespetts

#33
Thank you for the reports: I have now had a little time to look into this. I think that I have managed to fix the original issue on the master branch: the trains now correctly stop for the token block signal to collect the token and clear the reservation behind them. The problem with this seems to have been introduced with the double block signals some months ago.

I have not yet had chance to test whether and to what extent this also fixes the other reported issues.

Edit: I have now fixed the distant signal issue and I cannot reproduce the teleporting with the fixed build. Incidentally, this will mean that a distant signal will never clear when the section signal is a token block signal, as the token block signal will now not clear until the train is right in front of it; but this is, I think, realistic, as there would be fixed distant signals in such a case in real life.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

Wow thank you for the fixes. It is much better now, but a few issues remained:

1. cargo train to kingsbere, when clears the section in rear, leaves one tile reserved. Accidentally it is the junction tile (at emminster halt), so it blocks the pax train until the cargo gets out of the station. Perhaps its length may be the cause? Train shortened to 3 tiles does not do that.

2. pax train to kingsbere, after stopping at meadow halt in direction to kingsbere, messes up its reservation. Removing the nearby distant signal helps. (Also moving it one tile ahead - towards kingsbere helps).

3. It seems that that track in rear is not be cleared if the train is loading and then gets clearance immediately. It will be cleared (after loading) if it has to wait, or if it is not loading at the loop.

4. the issues at christminster north with switching between token and abs. block remained, they seem to be the same as (3) - if the train gets clearance from christminster north to central immediately after loading, it will not clear the track in rear at all (due to switching to abs. block). But it will clear the thrack in rear if it has to wait for clearance.