Round robin scheduling for trains

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
GPFault
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon May 01, 2017 6:10 am
Contact:

Round robin scheduling for trains

Post by GPFault »

Hello,

>> What did you do?

I have several unload and load stations. I found that some trains are never moving. I created a test setup to highlight the problem.
I placed three "A1" stations and one "B" station with a limit of 1 train. I placed three trains with the same schedule: move to "A1", wait 5 seconds, move "B", wait 20 seconds (time enough to move from B to A1).

>> What happened?

The train above never moves.

>> What did you expect to happen instead? It might be obvious to you, but do it anyway!

I expect that all trains will visit "B" station one after one.
Perhaps it needs to make that train early found that "Destination full" will move early than a train that found the same later. It will balance the load evenly.
Screenshot_6.png
Screenshot_6.png (1.46 MiB) Viewed 374 times
Save file:
nevermove.zip
(1.74 MiB) Downloaded 102 times
Import Blueprint:
0eNqdnO1OGzsQhu9lfwfk77FzK0cVSiFqVwoBJaE6COXem5BsWpLZ7vvOPyjwMOvxrMePXT6676u35eumX++6+UfXP76st938v49u2/9YL1bHf9u9vy67edfvls/drFsvno+fbRb9qtvPun79tPy/m/v9t1m3XO/6Xb88/fznJ+8P67fn78vN4RsuP/n4tvm1fLr7BMy615ft4Wde1sdfdOCE6tyse+/mRcKB/tRvlo+nL5f97AYaYGjVoVGBxgt0uzvwfvzcjWGlyRmbv2JFwSYYW73XsV7BZnAIpKUztE5Dy5c0352ngjoA93mI9f4q2qyABU2Y/xOtgqlEiuIJVKMGakRS8r9A3hlCyirJG2LSScEQk6ikaIhJJyVDTE0lZXCSVh+HSVrbvT5SxfB8elTCP1/zKqnyMY2QmiEmdZYHZ4hJJ3lDTGruQjDEpJMi/C4NnxxxbvqVF5IhPrV2QjaQ1Fka+PkuTp1bAX2jSy1nTvk6ZkGjEi/42s7cOL20hwYvbP5+eO6ILGzRGUZUrYzoDSR1Pke0PZLkzpw63XNFoj9KQ3wynfNIrAxJCG4muI3g4jUk2RNcYgXJkeASNZWZvBGrSybyloiOKhN5S8TKU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bMF7q/ypTs8foQMh4Dd4aAQ8tVVx/KlO5x1z4v122L18AnbPqz65343NlwV7hod+1QGu56RjVQ12HUMbLDrGNhg1zGwwa5jYINdx8AGu46BDXYdAxvsOgY22HUMbLDrELgZ7DoGNth1DGyw6xjYYNcxsMGuY2CDXcfABruOgQ12HQMb7DoGNth1BBycwa5jYINdx8AGu46BDXYdAxvsOgY22HUMbLDrGNhg1zGwwa7fgr/NTn9GZf7XX12Zdb+Wm+3pGw6bMmmHHq20UFzd738D1A9+nA==

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

Re: [1.1.46] Wrong scheduling for trains (no round robin)

Post by mrvn »

I'm split on this.

On the one hand round-robin of trains is what other cases use.

On the other hand activating the closest train is also good.

Is ore from one mine any better than ore from another? Or iron plates from a smelter? What situation do you have where round-robin is better?

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 4981
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [1.1.46] Wrong scheduling for trains (no round robin)

Post by Klonan »

I am moving this to ideas and suggestions, nothing here is to suggest this is a bug

GPFault
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon May 01, 2017 6:10 am
Contact:

Re: [1.1.46] Wrong scheduling for trains (no round robin)

Post by GPFault »

mrvn wrote:
Wed Nov 10, 2021 10:01 am
Is ore from one mine any better than ore from another? Or iron plates from a smelter? What situation do you have where round-robin is better?
Please consider if you have two Red Circuits block and one Blue Circuits block as "A1" stations (Blue is on top). And station "B" is Green Circuits supplying block. Blue Circuits will never get a chance to start production until Red Circuits will not be filled with trains. It is pretty difficult to manage. With round-robin production of Blue and Red Circuits will be more balanced.

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

Re: [1.1.46] Wrong scheduling for trains (no round robin)

Post by mrvn »

GPFault wrote:
Wed Nov 10, 2021 3:04 pm
mrvn wrote:
Wed Nov 10, 2021 10:01 am
Is ore from one mine any better than ore from another? Or iron plates from a smelter? What situation do you have where round-robin is better?
Please consider if you have two Red Circuits block and one Blue Circuits block as "A1" stations (Blue is on top). And station "B" is Green Circuits supplying block. Blue Circuits will never get a chance to start production until Red Circuits will not be filled with trains. It is pretty difficult to manage. With round-robin production of Blue and Red Circuits will be more balanced.
True. If you look at this from a supply point of view with trains stationed at the consumers.

I tend to have the trains at the producer except for ore. Because:

1) generally there are more consumers than producers so it saves trains
2) trains as the producer will be filled already when a consumer needs goods and only need to travel 1 way instead of a round trip. So delivering items is faster.
3) factorio is more tuned for over-producing than over-consuming, balancing happens when one consumer backs up and stops consuming

But it's a valid example to have it the other way around. Not sure how to fix this unless you manually balance your stops with circuit logic.

In the long run the red circuits will back up at some point unless you constantly drain them with something else and then blue circuits and red circuits both get trains. It just takes forever till that happens with the amounts of green circuits consumed. And every time the blue circuits eat a red circuit train they get exclusive deliveries till they are backed up again.

The simplest solution is: Produce more green circuits.

User avatar
Khagan
Fast Inserter
Fast Inserter
Posts: 131
Joined: Mon Mar 25, 2019 9:40 pm
Contact:

Re: [1.1.46] Wrong scheduling for trains (no round robin)

Post by Khagan »

mrvn wrote:
Thu Nov 11, 2021 1:13 pm
The simplest solution is: Produce more green circuits.
In fact, just produce more of everything. The factory grows ...

GPFault
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon May 01, 2017 6:10 am
Contact:

Re: [1.1.46] Wrong scheduling for trains (no round robin)

Post by GPFault »

mrvn wrote:
Thu Nov 11, 2021 1:13 pm
3) factorio is more tuned for over-producing than over-consuming, balancing happens when one consumer backs up and stops consuming
It is always over-consuming of something :)

DarkShadow44
Fast Inserter
Fast Inserter
Posts: 141
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

Re: Round robin scheduling for trains

Post by DarkShadow44 »

How do you propose this should be implemented? Because round robin is not always desired either...

Nidan
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Sat Nov 21, 2015 1:40 am
Contact:

Re: Round robin scheduling for trains

Post by Nidan »

You can force round robin behavior using the circuit network. Implement a counter or pass around some token to control which station releases the next train.

User avatar
MEOWMI
Fast Inserter
Fast Inserter
Posts: 220
Joined: Wed May 22, 2019 12:21 pm
Contact:

Re: Round robin scheduling for trains

Post by MEOWMI »

It is nice for figuring out that you aren't producing enough, because it's easier to notice one station struggling to keep up with production than ALL stations struggling to. As others have pointed out, you almost always want to have an excess of supply trains.

Hard to say exactly which way is better, though I did sort of expect it to be round robin since inserters work this way and IIRC trains trying to reserve the same block works like that too.

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

Re: Round robin scheduling for trains

Post by ssilk »

GPFault wrote:
Wed Nov 10, 2021 9:53 am
I have several unload and load stations. I found that some trains are never moving. I created a test setup to highlight the problem.
I placed three "A1" stations and one "B" station with a limit of 1 train. I placed three trains with the same schedule: move to "A1", wait 5 seconds, move "B", wait 20 seconds (time enough to move from B to A1).
I just would add a station “Z” which is in front of B and is able to hold at minimum 3 trains (nearly as much as are on all “A” stations).

The schedule for all trains is then A1, Z, B.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Post Reply

Return to “Ideas and Suggestions”