Why not put a rail signal every two tiles?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
sparr
Smart Inserter
Smart Inserter
Posts: 1448
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Why not put a rail signal every two tiles?

Post by sparr »

I am aware that I need a block as long as my longest train at the exit from a rail intersection that uses chain signals.

Other than that, why would I ever choose not to put in as many signals as possible everywhere, as densely as possible? One train can follow another with a separation distance of the longest block on their route, right? So, I don't want any blocks to be any longer than they have to be. And there don't seem to be any penalties to blocks being arbitrarily short, other than the intersection exits mentioned above.

There's a mod that attaches a block signal to the back of every train so that you don't need to put block signals along all your straight tracks. Why isn't that behavior the default?
Frightning
Filter Inserter
Filter Inserter
Posts: 813
Joined: Fri Apr 29, 2016 5:27 pm
Contact:

Re: Why not put a rail signal every two tiles?

Post by Frightning »

The reason to not put block signals every few track segments is cost. As for why trains don't follow close: realism? I mean the trains in this game never accidentally run into each other (unless the player is driving, then you can, I think, run into an AI controlled train, but it will try and avoid the collision if it can).
searker
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Fri Nov 27, 2015 3:12 pm
Contact:

Re: Why not put a rail signal every two tiles?

Post by searker »

You could do that if you wanted to.

The reason for not implementing the mod:
It wouldnt work on single-rail systems if youre using more than one train.
sparr
Smart Inserter
Smart Inserter
Posts: 1448
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Why not put a rail signal every two tiles?

Post by sparr »

searker wrote:You could do that if you wanted to.

The reason for not implementing the mod:
It wouldnt work on single-rail systems if youre using more than one train.
It would work if the trains all dragged two signals, one pointed each way, right?
LazyLoneLion
Fast Inserter
Fast Inserter
Posts: 183
Joined: Sun Mar 20, 2016 11:49 pm
Contact:

Re: Why not put a rail signal every two tiles?

Post by LazyLoneLion »

sparr wrote:It would work if the trains all dragged two signals, one pointed each way, right?
Nope.
They can run from opposite directions and stop on a track forever. When you can put few signals so that they will pass by where you intend them to.
Shokubai
Filter Inserter
Filter Inserter
Posts: 470
Joined: Mon May 02, 2016 3:17 pm
Contact:

Re: Why not put a rail signal every two tiles?

Post by Shokubai »

Acceleration/Deceleration.

Putting signals close together creates an inchworm effect of moving & stopping trains at busy junctions. By spacing signals further apart strategically you create acceleration zones which allow junctions to run at full speed rather than like a 4 way stop.
sparr
Smart Inserter
Smart Inserter
Posts: 1448
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Why not put a rail signal every two tiles?

Post by sparr »

LazyLoneLion wrote:
sparr wrote:It would work if the trains all dragged two signals, one pointed each way, right?
Nope.
They can run from opposite directions and stop on a track forever.
How? If I have chain signals at intersections and the only block signals are the ones being dragged by the trains, then two trains can't meet on a single track because one of them will already be in the block for that track when the other tries to reserve it.
oddron
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Apr 29, 2016 1:58 am
Contact:

Re: Why not put a rail signal every two tiles?

Post by oddron »

sparr wrote:How? If I have chain signals at intersections and the only block signals are the ones being dragged by the trains, then two trains can't meet on a single track because one of them will already be in the block for that track when the other tries to reserve it.
This is true because if you over-use chain signals then you can create a system so constrained that it will only allow movement of one train at a time throughout the entire rail network. This would provide maximum safety with minimum throughput.
Why would I ever choose not to put in as many signals as possible everywhere, as densely as possible? One train can follow another with a separation distance of the longest block on their route, right?
For safety, the minimum separation distance between two trains should be at least the stopping distance of the rear train. If you plan on using high-speed trains, then this stopping distance is almost certainly longer then the train itself. If you have enough signals such that no block is longer then the stopping distance of a full-speed train, then the density of moving trains will be limited by stopping distance instead of block size. Additional signals will not reduce the separation distance further.

In theory, you can reduce the separation distance by artificially limiting your trains to run slowly, and in that case you could keep adding signals until no block is longer then the stopping distance of your fastest train.
LazyLoneLion wrote:
sparr wrote:It would work if the trains all dragged two signals, one pointed each way, right?
Nope.
They can run from opposite directions and stop on a track forever.
This is exactly the same as two people entering a narrow footbridge from opposite sides at the same time. If the bridge is too narrow for them to pass each other, then they will get stuck in the middle. If your rail network allows two-way movement on a single track, then it is very easy for two trains to enter a single track from opposite sides, meet in the middle, and get stuck. Additional rail signals make this problem worse, while properly-placed chain signals can force a train to reserve the entire track before entering.
sparr
Smart Inserter
Smart Inserter
Posts: 1448
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Why not put a rail signal every two tiles?

Post by sparr »

We are obviously miscommunicating. I will return to this thread with screenshot examples later.
Shokubai
Filter Inserter
Filter Inserter
Posts: 470
Joined: Mon May 02, 2016 3:17 pm
Contact:

Re: Why not put a rail signal every two tiles?

Post by Shokubai »

Without permanent signals at junctions you will have crashes. Trains decelerate slowly...
LazyLoneLion
Fast Inserter
Fast Inserter
Posts: 183
Joined: Sun Mar 20, 2016 11:49 pm
Contact:

Re: Why not put a rail signal every two tiles?

Post by LazyLoneLion »

sparr wrote:How? If I have chain signals at intersections and the only block signals are the ones being dragged by the trains, then two trains can't meet on a single track because one of them will already be in the block for that track when the other tries to reserve it.
Chain signals really can do (with block signals on intersections). But they don't make much sense then.You can omit them totally, leaving only those on a intersection, because they will be either all red or all green. I mean ahead of a train, because behind a train they will be just all red.

And if you use not the chain signal on the two-way track, then you'll make possible the "narrow bridge situation" with the opposite trains.

You can place block signals extremely dense on a one-way track. It probably won't make any big advantage though.
Shokubai
Filter Inserter
Filter Inserter
Posts: 470
Joined: Mon May 02, 2016 3:17 pm
Contact:

Re: Why not put a rail signal every two tiles?

Post by Shokubai »

This idea probably has more merit on a train system like OpenTTD that is path based. There, multiple trains may enter a block if they can find a clear path to the next signal. Unfortunately I feel dragging signals will just be too wonkey here.

Let me think this out on paper of a moment with the way things are now.
Two Way Rail
4 stations each at the end of a + junction (roundabout style)
We will call these stations N S E W

First lets think about no signals at the junction
Trains start at all stations
N wants to go S
Everything between NSEW is one block and only one train can enter it. N would get into the block but no other trains could leave their station???? Does that seem right? I think so but I,m doing this in my head.

What if we put a chain on the travel path direction and a block after the junction and chains on the roundabout corners.
N wants to go S
N can get to S, S can move to North...
This could work.

A thought occurs and I'm not sure how you would implement it. Lets say you have a chain signal at the front of your train. Your train always wants to clear the next block signal...I dont think this will work because it will lock up HUGE lenghts of track.

If you put a block signal in front, can the chain signal at the junction be recognized between it and the train?

This all seems very weird given current train pathing mechanics. I feel like, on this one, a better mod would be something of a path based logic for the trains which allowed them to make decisions and set a proper follow distance based on acceleration, deceleration, and paths of other trains. This could get very resource intensive though as now every train needs to know what every other train is doing all the time to avoid collisions.

Anyway, I like where you are going with this but I am not sure the current game could function properly by just dragging signals alone.
sparr
Smart Inserter
Smart Inserter
Posts: 1448
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Why not put a rail signal every two tiles?

Post by sparr »

sparr wrote:... rail intersection that uses chain signals.
Other than that ...
Why are so many people replying as if I am talking about doing intersections without chain signals?
Jupiter
Fast Inserter
Fast Inserter
Posts: 174
Joined: Thu Jun 23, 2016 2:38 pm
Contact:

Re: Why not put a rail signal every two tiles?

Post by Jupiter »

You know what. I'm gonna try it for ya. I'm just at the point in my game where I'm creating the first bits of my train network. If I get any problems with it I'll post it here (at least I hope I remember to).

To alleviate some of the strain on my brand new and small factory I will place a signal every 2 blocks to reduce the cost though. Later, when my base has grown I'll see if I can make some track with maximal signal density.
sparr
Smart Inserter
Smart Inserter
Posts: 1448
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Why not put a rail signal every two tiles?

Post by sparr »

Jupiter wrote:You know what. I'm gonna try it for ya.
To be clear, you still need to use chain signals inside intersections, and the exit block from an intersection needs to be as long as a train.
Jupiter
Fast Inserter
Fast Inserter
Posts: 174
Joined: Thu Jun 23, 2016 2:38 pm
Contact:

Re: Why not put a rail signal every two tiles?

Post by Jupiter »

sparr wrote:
Jupiter wrote:You know what. I'm gonna try it for ya.
To be clear, you still need to use chain signals inside intersections, and the exit block from an intersection needs to be as long as a train.
Yes, I know what you're asking. It's about signalling in between the intersections, just straight rail.
Jupiter
Fast Inserter
Fast Inserter
Posts: 174
Joined: Thu Jun 23, 2016 2:38 pm
Contact:

Re: Why not put a rail signal every two tiles?

Post by Jupiter »

Jupiter wrote:You know what. I'm gonna try it for ya. I'm just at the point in my game where I'm creating the first bits of my train network. If I get any problems with it I'll post it here (at least I hope I remember to).

To alleviate some of the strain on my brand new and small factory I will place a signal every 2 blocks to reduce the cost though. Later, when my base has grown I'll see if I can make some track with maximal signal density.
I decided to get back to this thread after finding out a very interesting consequence of having a very high signal density. I was experimenting with train pathfinding today and I noticed that, when the path of a train is blocked and there is a long long detour available but also blocked, then the number of occupied blocks has a very big impact. More so than other factors such as distance.

I found this thread: viewtopic.php?f=11&t=2237
In it a dev gives a formula for how the penalty of an occupied block is calculated. It adds a flat 100 tiles to it for every occupied block. So if you have a large block in which a train is sitting then you get a penalty of (100 + lenght of block)/(1 + distance from start).
If you decide to increase signal density and cut that block in half by placing a signal in the middle then you get 2 blocks, each getting the extra 100 even though the number of occupied rail-pieces stayed the same. The consequence is that lanes with a higher signal density are less likely to be chosen by trains.

I saw exactly this behavior in experiments.

Thought you might want to know.

PS: that formula is different from the one mentioned on the wiki. Wiki says penalty = 2*block length / distance from start. I think the one the dev gave is more accurate as it matches with my observations.
terror_gnom
Fast Inserter
Fast Inserter
Posts: 121
Joined: Wed Apr 06, 2016 4:01 am
Contact:

Re: Why not put a rail signal every two tiles?

Post by terror_gnom »

Trains plan their path as far, as their stopingdistance and reserve the blocks acordingly (yellow signal). That means, train crashes in automatic mode are should be impossible (report it as a bug ;) )

*edit* didnt saw it went to page 2 :(
User avatar
BattleFluffy
Fast Inserter
Fast Inserter
Posts: 200
Joined: Sun Mar 31, 2019 4:58 pm
Contact:

Re: Why not put a rail signal every two tiles?

Post by BattleFluffy »

Apologies for necro'ing such an old thread, but I referred to this very thread during the design phase for my latest rail interchange, and I now have something important to add to the discussion!

Having rail signals every 2 tiles is a bad idea if the amount of rails/trains is high, because it can cause the game to slow down - a lot. The train pathfinding algorithm has to iterate through blocks, so drastically increasing the number of blocks means its searches take dramatically longer.

My city has over 60km of rail lines with nearly 300 trains, and I tried having a rail signal every 1 cargo wagon length. The result once the trains started running was basically a slideshow in terms of FPS/UPS.

I originally thought I had stumbled on a bug when the pathfinder update alone was taking 30ms, but Rseding (dev) kindly looked at my save file and has set the record straight. Check out the bug report thread for further reading: viewtopic.php?f=23&t=70637
Post Reply

Return to “Gameplay Help”