Add extra reservation factor to locomotives

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Add extra reservation factor to locomotives

Post by mrvn »

TL;DR
Trains should try to reserve signals ahead of their breaking point so that fast moving trains take precedence over slow moving or stationary trains.
What ?
Currently when a train drives it reserves just enough signals so that it can break before rolling over the next one. This lets slow moving or stationary trains cut ahead into the next segment and then the train has to break or even come to a stop to let the other train clear the next segment. All the speed painfully build up over time is lost. On busy lines this has a cascade effect because it slows down the next train too.

What I suggest is that the train tries to reserves more than strictly needed so as to prevent getting stopped but at the same time not care if the reservation fails. Only break when the breaking point dictates like now. This would prevent other trains from cutting right in front of other trains.

The amount of how much to reserve should depend on 3 factors:

1) The acceleration of the train.

A LC train can stop at a signal and then speed off once again when it gets green without problems. A LCCCCCCCCCCCCCCCC trains getting stopped at a signal takes forever to get moving again and would block the junction for that long. So it's better to have the LC train stop and let the LCCCCCCCCCCCCCCCC keep it's speed. This should be an inverse factor. The lower the acceleration the more important it is to keep the speed.

2) The current speed

Just like the breaking point moves forward as the train gains speed the reservation point should to. The faster a train is the more momentum would be lost by breaking. Combining 1+2 gives the cost for gaining back all the speed that would be lost if the train had to stop.

3) A factor in the prototype

This would allow mods to tune the reservation point to make different locomotives. There could be a long distance hauler that reserves 150% or a VIP Locomotive that reserves 200% for player transportation or critical goods (like coal for the steam engines).

I think the reservation factor should be additive. That way an LLCC train has precedence over a LC train while acceleration is the same for both. Building a train with many locomotives shows that the acceleration for that train is important to the player. Think of it at the cost in fuel it takes to accelerate back to speed again. Every second lost on a LLCC train costs twice as much as on a LC train in fuel.


I believe signals have a list of waiting trains so the oldest train gets a chance to reserve the signal next. Maybe moving trains should have priority there. On the other hand that might lead to an unending stream of trains going one way across a junction without ever letting the other ways cut in. So maybe not. Maybe reserving ahead of the breaking point is enough of an advantage already. Something to try out. Or a priority based on the time each train is waiting vs. how costly breaking is for a moving train and how close the breaking point is. The smaller the gaps between and the faster moving the trains the longer other trains must wait before cutting in.
Why ?
I love large rail setups. Trains going every which way, accelerating and flashing across long distances. The busier the better. Train lengths greatly depend on the throughput needed for each good and the distances to cover. For example uranium only needs an LC train that's barely filled at all usually. Iron ore trains on the other hand are huge. Lots of iron ore to transport and from much further away. Still, when the uranium train leaves it's station it often cuts right in front of one of the behemoth trains making them break instead of waiting a few extra seconds and cutting in behind it. And that can happen at any junction. It stops all the fast moving trains going straight through to cut across instead of having to wait for a break in the traffic where it could cut across more naturally.

Think about driving a car. When you want to take a left turn you don't cut across the other lane when the approaching car can just about break to not crash into you. Instead you wait for a larger gap in the traffic to cut across. I suggest trains should behave the same and the extra reservation distance as a way to implement it.

Currently it would take a lot of circuit wires and combinators to program signals to favor fast moving trains over slow or stationary trains and probably go wrong the first 50 tries. It also wouldn't allow for different locomotives so the player can build trains that have a higher importance.

Tekky
Smart Inserter
Smart Inserter
Posts: 1039
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Add extra reservation factor to locomotives

Post by Tekky »

I agree that priority handling of trains should be improved.

However, I believe it would be more important to be able to handle train priority using the circuit network. It is already possible for the circuit network to give priority to a train by forcing a signal to red. However, currently, the circuit network is unable to detect individual trains, so it can't do anything really useful. The following thread contains a suggestion to improve this:

viewtopic.php?f=6&t=47541 track signals should send Train-ID to circuit network

Also, Train-IDs are not very useful, because you cannot set them to a user-defined value. The following threads make an interesting suggestion to improve this:

viewtopic.php?f=6&t=46969 Constant Combinator for Locomotive
viewtopic.php?f=6&t=56302 Train ID as Constant Combinator

For example, if that suggestion were implemented, it would be possible to encode the priority level of the train into the Train ID and this could be read by the circuit network. If the circuit network does not detect a train with a higher priority approaching the intersection, it could give priority to that train.

This thread is also related:

viewtopic.php?f=6&t=57742 Express/Priority Trains

mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Add extra reservation factor to locomotives

Post by mrvn »

Tekky wrote:
Mon Jun 10, 2019 5:47 pm
I agree that priority handling of trains should be improved.

However, I believe it would be more important to be able to handle train priority using the circuit network. It is already possible for the circuit network to give priority to a train by forcing a signal to red. However, currently, the circuit network is unable to detect individual trains, so it can't do anything really useful. The following thread contains a suggestion to improve this:

viewtopic.php?f=6&t=47541 track signals should send Train-ID to circuit network

Also, Train-IDs are not very useful, because you cannot set them to a user-defined value. The following threads make an interesting suggestion to improve this:

viewtopic.php?f=6&t=46969 Constant Combinator for Locomotive
viewtopic.php?f=6&t=56302 Train ID as Constant Combinator

For example, if that suggestion were implemented, it would be possible to encode the priority level of the train into the Train ID and this could be read by the circuit network. If the circuit network does not detect a train with a higher priority approaching the intersection, it could give priority to that train.

This thread is also related:

viewtopic.php?f=6&t=57742 Express/Priority Trains
That requires way to many circuits and crossing wires to be practicable. You only have red and green wires so you would end up with 5-20 power poles parallel to your track to hang all the wires. Would result in a total mess.

Tekky
Smart Inserter
Smart Inserter
Posts: 1039
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Add extra reservation factor to locomotives

Post by Tekky »

mrvn wrote:
Mon Jun 10, 2019 11:10 pm
That requires way to many circuits and crossing wires to be practicable. You only have red and green wires so you would end up with 5-20 power poles parallel to your track to hang all the wires. Would result in a total mess.
A solution to this problem would be wireless circuit network connections, which has already been suggested in the following threads:

viewtopic.php?f=6&t=49317 Radio Links for signals transmission
viewtopic.php?f=6&t=47429 global circuit network
viewtopic.php?f=6&t=12652 Connection of circuit network over distances
viewtopic.php?f=6&t=51811 "Pipboy" for wireless network/circuit manipulation
viewtopic.php?f=6&t=62384 Logistic circuit signals through radars

At least in the first two suggestions in the list, it has been suggested that wireless connections should have different channels, so that you can have more than one global wireless circuit network.

mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Add extra reservation factor to locomotives

Post by mrvn »

Tekky wrote:
Tue Jun 11, 2019 12:28 pm
mrvn wrote:
Mon Jun 10, 2019 11:10 pm
That requires way to many circuits and crossing wires to be practicable. You only have red and green wires so you would end up with 5-20 power poles parallel to your track to hang all the wires. Would result in a total mess.
A solution to this problem would be wireless circuit network connections, which has already been suggested in the following threads:

viewtopic.php?f=6&t=49317 Radio Links for signals transmission
viewtopic.php?f=6&t=47429 global circuit network
viewtopic.php?f=6&t=12652 Connection of circuit network over distances
viewtopic.php?f=6&t=51811 "Pipboy" for wireless network/circuit manipulation
viewtopic.php?f=6&t=62384 Logistic circuit signals through radars

At least in the first two suggestions in the list, it has been suggested that wireless connections should have different channels, so that you can have more than one global wireless circuit network.
So your suggestion to solve this simple problem is to first solve 3 complex problems and then have the user do this manually in game for very single junction. As said, way to complex do do this with circuits.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Add extra reservation factor to locomotives

Post by Optera »

Circuit logic giving priority to moving trains over stationary ones:
https://www.reddit.com/r/factorio/comme ... ng_solved/

A similar if not the same circuitry was used in some junctions from this thread, greatly boosting the throughput.
viewtopic.php?f=194&t=46855

mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Add extra reservation factor to locomotives

Post by mrvn »

Optera wrote:
Tue Jun 11, 2019 1:55 pm
Circuit logic giving priority to moving trains over stationary ones:
https://www.reddit.com/r/factorio/comme ... ng_solved/

A similar if not the same circuitry was used in some junctions from this thread, greatly boosting the throughput.
viewtopic.php?f=194&t=46855
I count 16 combinators and 4 signals per lane for this design. Now add sensors to read train ID (if they ever add support for configurable IDs to trains) and a decision tree which IDs should have priority. As said way to complex to add to every junction.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Add extra reservation factor to locomotives

Post by Optera »

mrvn wrote:
Tue Jun 11, 2019 2:44 pm
Optera wrote:
Tue Jun 11, 2019 1:55 pm
Circuit logic giving priority to moving trains over stationary ones:
https://www.reddit.com/r/factorio/comme ... ng_solved/

A similar if not the same circuitry was used in some junctions from this thread, greatly boosting the throughput.
viewtopic.php?f=194&t=46855
I count 16 combinators and 4 signals per lane for this design. Now add sensors to read train ID (if they ever add support for configurable IDs to trains) and a decision tree which IDs should have priority. As said way to complex to add to every junction.
I never said it'd be simple, just that it is possible.
As for train id filters, those can easily be done by adding waypoint stops to priority lanes. A schedule entry without condition is treated as waypoint while the stop penalty will prevent trains without that stop from entering that lane.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Add extra reservation factor to locomotives

Post by ssilk »

Also just use chain signals. Works quite well with junctions, where two rails come into one.

Code: Select all

                                       c  /     
                        s               /     s                         s
--<<<<<<-------------------------------------------------<<<<<----------------

s = signal
c = chain signal
<<<<< = Train
Example situation: You have a priority line (straight) and from up comes a side-line in.
With a chain signal for the side-line the train from the side must wait longer, before he can follow the former train to the priority line.
Technically this adds one occupied block to the end of the first train for the side-track.

This is not the same as the suggested idea, but in reality and with heavy traffic it has the same effect: when the priority lane is full, the side-train has no chance to squeeze into the priority lane, cause (as in the situation above) the next train follows the first and the gap is then normally too small to squeeze into it. Which is the essence of a priority lane.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Add extra reservation factor to locomotives

Post by mrvn »

ssilk wrote:
Thu Jun 13, 2019 4:38 pm
Also just use chain signals. Works quite well with junctions, where two rails come into one.

Code: Select all

                                       c  /     
                        s               /     s                         s
--<<<<<<-------------------------------------------------<<<<<----------------

s = signal
c = chain signal
<<<<< = Train
Example situation: You have a priority line (straight) and from up comes a side-line in.
With a chain signal for the side-line the train from the side must wait longer, before he can follow the former train to the priority line.
Technically this adds one occupied block to the end of the first train for the side-track.

This is not the same as the suggested idea, but in reality and with heavy traffic it has the same effect: when the priority lane is full, the side-train has no chance to squeeze into the priority lane, cause (as in the situation above) the next train follows the first and the gap is then normally too small to squeeze into it. Which is the essence of a priority lane.
I use that too. But on general junctions you don't necessarily know from which side the priority train comes. The chain signal gives priority to a lane and not a train.

Post Reply

Return to “Ideas and Suggestions”