Implement priority signals for trains

Post your ideas and suggestions how to improve the game.
Post Reply
psihius
Fast Inserter
Fast Inserter
Posts: 155
Joined: Mon Dec 15, 2014 12:47 am
Contact:

Implement priority signals for trains

Post by psihius » Wed Jan 09, 2019 6:40 pm

Basically, a signal that gives train on the line where it is placed right before the intersection priority so it can continue at full speed and not break for the merging train that happened to be a few secons ahead.

Main use case - signalling main lines, so train merging does not slow down trunk line traffic.

Sad_Brother
Fast Inserter
Fast Inserter
Posts: 116
Joined: Mon Jan 08, 2018 4:54 pm
Contact:

Re: Implement priority signals for trains

Post by Sad_Brother » Wed Jan 09, 2019 9:28 pm

Close signals on the other lines when main line is busy.

psihius
Fast Inserter
Fast Inserter
Posts: 155
Joined: Mon Dec 15, 2014 12:47 am
Contact:

Re: Implement priority signals for trains

Post by psihius » Thu Jan 10, 2019 9:31 am

It's not as simple as it sounds - the amount of wiring that needs to happen if done via the circuit network is pretty huge and different trains have different stop lengths and so the calculations are not as straight forward and lead distances that have to be taken into account are pretty huge. So it gets impractical fast. And then there is the additional layer when two merges are close enough to fit a train in between, but close enough for the stopping distance being bigger than the space between crossings, so it needs a look-ahead logic.

Basically, rudimentary and limited priority signal - yes, I can do it with circuits now. But to do it properly, like chain signals, it needs to hook into train pathing and manager to handle high traffic situations and dense builds. There is also the performance aspect of it. I'd consider this late to end-game feature, cause most of the time we need something like this is when we go big. Sure, you can plan ahead, space everything out and separate rail systems as much as possible, but that should not be the only way and organically growing factories are also a nice thing, they just need a bit of help to prioritize the traffic. Working with a 200MB world just because you need to ridiculously space things out so your trains work better does not seem to me as a good solution :)

I know it might not be simple to implement or even not feasible, but in my humble opinion it is at least worth a feasibility study and will greatly help with traffic prioritization. It might even just be an option on a chain signal to make it a priority signal (though a nice distinctive priority signal graphic would be nice to avoid confusion :) ).

Tairon96
Inserter
Inserter
Posts: 39
Joined: Sun Nov 18, 2018 6:38 am
Contact:

Re: Implement priority signals for trains

Post by Tairon96 » Thu Jan 10, 2019 10:17 am

I don't know how this could be integrated into the game in a way that is handy for the players regarding UI.

You are asking for a train signal that ...

... is looking into the future.

(or other way around)

... is changing its decision to give free way even if there is already a train in the signal's section.
__

Without a strategic thinking human control as an overwatch, there might be too many aspects to be considered for a simple specialized signal.
Radar : Damnit, we are surrounded! :o
Artillery : Great, now I can attack in every direction! :D
_
languages

psihius
Fast Inserter
Fast Inserter
Posts: 155
Joined: Mon Dec 15, 2014 12:47 am
Contact:

Re: Implement priority signals for trains

Post by psihius » Thu Jan 10, 2019 10:47 am

Well, trains already do a look-ahead with chain signals and trigger signal change. This is something similar, the difference being that priority signal has to block other signals from allowing trains to pass that will pass under no priority situation. Basically trains already calculate when they need to slow down, this adds additional check or penalty if a priority signal is on the trains path to block signals a bit more ahead

Zavian
Smart Inserter
Smart Inserter
Posts: 1328
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Implement priority signals for trains

Post by Zavian » Thu Jan 10, 2019 11:53 am

psihius wrote:
Thu Jan 10, 2019 10:47 am
Well, trains already do a look-ahead with chain signals and trigger signal change. This is something similar, the difference being that priority signal has to block other signals from allowing trains to pass that will pass under no priority situation. Basically trains already calculate when they need to slow down, this adds additional check or penalty if a priority signal is on the trains path to block signals a bit more ahead
I'm pretty sure that they simply track their stopping point, (if they were to apply the brakes now), then reserve any ordinary signals as that stopping point passes them. If the stopping point passes a chain signal, then they attempt to reserve that chain signal, plus enough additional signals (on their route) until they have reserved a normal signal. (Typically the exit signal from the junction they have just reserved their route through).

If they can't reserve one of those signals, then they apply the brakes and stop, (or at least slow down. They might be able to reserve the signal in a few ticks, in which case they can stop braking). There is no look ahead to see whether any other train is about to attempt to reserve the same signals. To implement your proposal a train would probably need to look ahead a lot more signals, and if there is a priority signal, and the priority favours the train to then reserve the priority signal as well.

Whilst this is probably technically possible I'm far from convinced that making meagbases easier is a good idea. They should be challenging to get functioning well. Removing too much challenge would just makes building megabases an uninteresting exercise.

Sad_Brother
Fast Inserter
Fast Inserter
Posts: 116
Joined: Mon Jan 08, 2018 4:54 pm
Contact:

Re: Implement priority signals for trains

Post by Sad_Brother » Thu Jan 10, 2019 3:46 pm

psihius wrote:
Thu Jan 10, 2019 9:31 am
It's not as simple as it sounds ... :) ).
I describe probably simplest way to implement line priority.
You can ask for a system to lock some priority path ahead of train stop-point. But look at my suggestion again. By closing other lines earlier you give main line priority of some length. Only if logical length gap between trains on the main line more than signal line, other lines can be used. This sysmet is soft enough and not too complex.

psihius
Fast Inserter
Fast Inserter
Posts: 155
Joined: Mon Dec 15, 2014 12:47 am
Contact:

Re: Implement priority signals for trains

Post by psihius » Mon Jan 14, 2019 4:02 pm

Sad_Brother wrote:
Thu Jan 10, 2019 3:46 pm
psihius wrote:
Thu Jan 10, 2019 9:31 am
It's not as simple as it sounds ... :) ).
I describe probably simplest way to implement line priority.
You can ask for a system to lock some priority path ahead of train stop-point. But look at my suggestion again. By closing other lines earlier you give main line priority of some length. Only if logical length gap between trains on the main line more than signal line, other lines can be used. This sysmet is soft enough and not too complex.
I'm looking on this as more of a general solution that improves train experience in general for the game as a whole. Circuits can do properly on a subset and require laser precision. Also, circuits tend to break from time to time - especially when people are involved in multiplayer - using circuits in that environment is a sure way for someone to break it with a 99.99% chance (4k+ hour experience speaking :D )

Sad_Brother
Fast Inserter
Fast Inserter
Posts: 116
Joined: Mon Jan 08, 2018 4:54 pm
Contact:

Re: Implement priority signals for trains

Post by Sad_Brother » Mon Jan 14, 2019 4:29 pm

psihius wrote:
Wed Jan 09, 2019 6:40 pm
Basically, a signal that gives train on the line where it is placed right before the intersection priority so it can continue at full speed and not break for the merging train that happened to be a few secons ahead.

Main use case - signalling main lines, so train merging does not slow down trunk line traffic.
psihius wrote:
Mon Jan 14, 2019 4:02 pm
I'm looking on this as more of a general solution
So, when some block become free, you want trains on adjacent lines to be checked with some priority. It may be possible, but may be not possible without major reorganisation. I think it does not worth much efforts.
I can think of such possible system: each signal can have delay value, so it opens after guarded block is free for that value of ticks.
I do not need it.

ikarikeiji
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Sun Jul 12, 2015 6:28 pm
Contact:

Re: Implement priority signals for trains

Post by ikarikeiji » Fri Jan 18, 2019 1:13 pm

There is a very simple implementation of priority signal that the devs could use:

- When reserved by a train, also reserve the next signal, like a chain signal
- In all other aspects, behave identically to a regular signal

You would use this signal not at the very entrance to a merging block, but on one or more signals leading up to that entrance signal. Then, trains on the mainline would be allowed to run all the way up to the merge point, but trains on the side line would need to wait once a train had reserved the first priority signal in the sequence.

If the devs expose partial behaviours of signals like the above to the modding API then the priority signal described above would become possible to add via a mod, so this could equivalently be a modding API request.

Thinking about it, my description above also gives a simple way to implement it via circuit network alone: if not all priority signals are green (# green signal < # total signals connected) then set side entrance signals to red. So this can be done with a single decider combinator per merge block, no matter how complex your train network.

Post Reply

Return to “Ideas and Suggestions”

Who is online

Users browsing this forum: ManaUser and 4 guests