Page 2 of 2
Re: Bag of trains tutorial
Posted: Sun Jan 19, 2025 4:01 pm
by groggynrat
waterBear wrote: Sun Jan 19, 2025 1:16 pm
groggynrat wrote: Sat Jan 18, 2025 3:19 pm
This is a really nice guide, thank you for putting it together. I have a question about how the loader station round robin configuration actually works. I haven't yet implemented this, but it would seem like trains would prefer the first station. Am I missing something?
Glad you found the guide useful!
If you have two trains and two stations open up, both with limit 1, then the trains will favor whichever station is closest. Once the closest station has a train on the way, the limit will be reached and the next train dispatched will head to station 2.
This does mean that fluctuating demand will cause the closest station to get visited most often, but you won't have an uneven number of trains dispatched when demand is high. For example, you should never have 3 trains waiting on the closest station and no trains waiting on the furthest station (unless the stations load at different rates or with different priorities somehow).
Ahh, I see. Also it doesn't really matter that the first supplier is preferred, now that I think about it. Round robin made me think that after servicing the first train, a supplier would be disabled until all other suppliers had been visited.
Thanks for clearing this up!
Re: Bag of trains tutorial
Posted: Sun Jan 19, 2025 6:42 pm
by waterBear
groggynrat wrote: Sun Jan 19, 2025 4:01 pm
waterBear wrote: Sun Jan 19, 2025 1:16 pm
groggynrat wrote: Sat Jan 18, 2025 3:19 pm
This is a really nice guide, thank you for putting it together. I have a question about how the loader station round robin configuration actually works. I haven't yet implemented this, but it would seem like trains would prefer the first station. Am I missing something?
Glad you found the guide useful!
If you have two trains and two stations open up, both with limit 1, then the trains will favor whichever station is closest. Once the closest station has a train on the way, the limit will be reached and the next train dispatched will head to station 2.
This does mean that fluctuating demand will cause the closest station to get visited most often, but you won't have an uneven number of trains dispatched when demand is high. For example, you should never have 3 trains waiting on the closest station and no trains waiting on the furthest station (unless the stations load at different rates or with different priorities somehow).
Ahh, I see. Also it doesn't really matter that the first supplier is preferred, now that I think about it. Round robin made me think that after servicing the first train, a supplier would be disabled until all other suppliers had been visited.
Thanks for clearing this up!
I see what you mean now. Sounds like you got it figured out. The suppliers and consumers are totally decoupled, but that does mean there will be additional challenges the more you push this system (challenges that wouldn't appear in a system like you described, where you take more control of which consumer gets fed).
A common issue is when you don't have enough supply stations. If there's a nearby consumer and a distant one and the nearby one can consume trains faster than a slow loading station can fill them, this will lead to starvation for the distant station. The solution is just...more supply stations (and preferably they load as fast as you can make them with legendary inserters, pumps, or direct insertion if your mining productivity is high enough). If the trains are acting like bots then the supply stations act like passive provider chests loaded by a factory. If the factory's too slow, you won't satisfy all your requests.
This was an intentional design decision that I made, motivated by a desire to *not* do any complex scheduling. Someone else will surely cook up a different system with other tradeoffs. Keeps things interesting
Re: Bag of trains tutorial
Posted: Thu Jan 23, 2025 7:19 pm
by merkaderkderk
Can get it to work but it still is having issues.
Have two load stations for oil spread far away from each other, so not connected.
Have two unload stations.
Unload stations have enough tanks to hold x2 trains worth of oil. If I empty the tanks it should send a total of 4 trains to fill everything up.
Issue is that it has a tendency to send 5 trains and the last train ends up sitting at load station until tank levels can hold another trains worth of oil and the train starts moving.
Another thing to note is the problem with it always choosing the closest station first: if you have two fluid stations, one close and one far away and system only needs one trainload of fluid it will send a train to the closest one. If that station is not yet full enough to fill a whole train, the train will just sit there and wait. Would be better if the train went to the full station, even if its further away.
Re: Bag of trains tutorial
Posted: Thu Jan 23, 2025 11:44 pm
by waterBear
merkaderkderk wrote: Thu Jan 23, 2025 7:19 pm
Can get it to work but it still is having issues.
Have two load stations for oil spread far away from each other, so not connected.
Have two unload stations.
Unload stations have enough tanks to hold x2 trains worth of oil. If I empty the tanks it should send a total of 4 trains to fill everything up.
Issue is that it has a tendency to send 5 trains and the last train ends up sitting at load station until tank levels can hold another trains worth of oil and the train starts moving.
Another thing to note is the problem with it always choosing the closest station first: if you have two fluid stations, one close and one far away and system only needs one trainload of fluid it will send a train to the closest one. If that station is not yet full enough to fill a whole train, the train will just sit there and wait. Would be better if the train went to the full station, even if its further away.
It sounds like something is misconfigured in your setup somewhere. Under normal circumstances the system will not over-provide. That can happen if you rewire some combinators while the whole system is running, but shouldn't be a recurring problem.
My guess is that one of the requester stops is not reading signal C from the stop correctly (that's the number of trains on the way or waiting at the station). Either that or your need signal is perhaps calculated incorrectly at one of the stops.
It is certainly a weakness of the system that closer requesters get visited first, but I've always been able to overcome that with brute force (more and faster loading stations, faster dispatch from wait stations, etc). No system is perfect.
If you want to share a save file, I can take a look.
Re: Bag of trains tutorial
Posted: Sun Jan 26, 2025 2:24 am
by groggynrat
I actually had a similar issue until I changed item + 1 = item to item * 1. Now that I think of it, this might be because I've only got one station (C = 1).
Re: Bag of trains tutorial
Posted: Tue Jan 28, 2025 1:17 am
by waterBear
I really need to cook up a more comprehensive set of (parametrized) blueprints. If I did this right, it shouldn't be so fiddly to set up.