It's for ore mines. My setup is like this:
- No mods.
- All trains are 1 locomotive and 4 wagons
- The railway consists of 2 parallel tracks, right hand drive
- all stations are on a small branch from the main rail that is as long as one train
- all ore mines (loading stations) with the same ore have the same station name ("<ore name> loading")
- all unloading stations for the same ore have the same station name ("<ore name> unloading")
- all stations have a train limit of 1, so there is no waiting in front of an occupied station
- there are as many trains as loading stations
- there are more loading stations than unloading stations.
- The trains are scheduled to drive to a loading station, wait for full, then drive to an unloading station, wait for empty
If I configure a time limit in the train schedules on a unloading station, the train returns to the loading station after the timeout, is refilled - and returns to the station it just left. The empty station is still ignored.
If I configure a time limit in the train schedules on a loading station, the train drives half empty to the unloading station after the timeout, so the probability the nearer unloading stations are occupied is higher, so more trains drive to the starving station, but this wastes train capacity, and the starving unloading station is only filled half by one train, since trains arrive half empty. This helps a bit, but I'm not satisfied at all.
My current approach is to wire all chests in the unloading stations and count the items in the chests with the circuit network, then set the train limit to 0 or 1 if the chest content is above or below some threshold (currently: 50% full).
This works in general, but if the supply drops below some threshold, for example if some mine becomes exhausted, the issue returns, since my near unloading station falls below 50% sometimes and the trains go there instead of other unloading stations that may have dropped to 0%. It also becomes worse, the faster the items at the oversupplied stations get consumed. I can lower the threshold below 50%, but then there isn't much safety, and full trains are waiting idle at loading stations while there are stations that are 70% empty.
The perfect solution seems a global circuit network that compares the content of all unloading station chests and always activates one or two unloading stations only - the ones that are most empty. However, this needs to connect everything, which is quite tedious, and this makes less trains actually drive than possible, creating a bottleneck, so even more sophisticated circuit network magic has to be invented.
Are there other approaches I didn't see? I don't need the perfect solution, just alternatives.
And another question: I can either set a train limit or activate/deactivate the station. Setting the train limit needs a combinator, activating/deactivating needs none. Is there an advantage to set a train limit instead of directly toggling the station active or inactive? Currently, I don't intend to ever raise a train limit above 1. On the other hand, are there advantages of having a train limit of 2 and a waiting area in front of a station? For my issue of uneven supply of unloading stations, I assume my oversupplied stations will get even one more train and the starving station will still get no train.
I'm certainly not the first one with that challenge. Are there threads with ideas and solutions, not just discussions without conclusion? I did not really find any conclusions, only more or less the same question, but no good answers that go beyond what I already do.