Preamble 2: Yes, the most obvious solution is to add fuel logistic chests to at least 1 stop in every route, but that feels wasteful and I want to explore if there are any other "compact" options on offer.
I've been using Automatic Train Fuel Stop mod. In simple routes that have only 2 stops and no waiting bays it works flawlessly. However, if the routes include more stops or waiting bays - I keep running into deadlocks that keep trains from leaving the Fuel Stops, and because every train needs to be refueled once in a while - that affect all routes, simple or not.
Consider the following route: [Ore](until full) -> [Bay](_) -> [Smelter](until empty)
If I have 10 smelter stations, 10 bay stations, and 20 trains running this route - eventually some of the trains that need a refuel will get a [Fuel stop] added in between [Bay] and [Smelter]. That itself is not a big issue: I'm just making sure that there are connections with the main rail network on both ends of [Bay] blocks and [Smelter] blocks, even if conceptually there is no need to have it after [Bay] or before [Smelter] (alternatively: add station-less rail bypasses to both blocks for same effect).
But now there exists a possibility that I'll get, say, 5 trains that go to refuel after [Bay], and now all 5 are waiting for a [Smelter] opening. But if the throughput is not at 100% - then the remaining 15 trains can keep all of the [Smelter] stops occupied in perpetuity*, never allowing trains on the [Fuel stop] to unlock. And if I run out of [Fuel stop]s then all other routes will eventually halt as well, waiting for a [Fuel stop] opening.
Things I've considered so far:
- (ATFS) Add more and more [Fuel Stop] stations until their amount exceeds the sum of ALL [Bay] stations of all routes so that this deadlock becomes impossible - that doesn't sound right; too many unnecessary stations, too many chests, not compact at all.
- (Vanilla) Add logistic refueling chests to stations such that there is no route that does not have one in their schedule - this is exactly what I did not want to do and why I installed ATFS mod to begin with.
- (Vanilla) Add a normal station to every schedule whose only purpose is to refuel trains: see above, and is essentially equivalent to using ATFS but you waste time and fuel for that every route cycle instead of only when you actually need fuel
- Use block-specific refueling stations before the bay - I would need to have a non-empty waiting condition on those (such as "Inactivity 2s") which adds a bottleneck to the entire route if I use 1 station, and if I use more then I might as well do it on the [Bay] stations themselves instead, but I count that as equivalent to adding refueling chests to every route.
- (Compromise) Use ATFS for simple routes where such deadlocks are improbable, and use refillable refueling chests in bays in routes that have bays - essentially what I am forced to do now, but then why use ATFS at all?
- (Circuits) Replace [Bay](_) stop with [Bay](wait for circuit signal), where circuit signal allows trains to leave only if all [Fuel Stop] stations are empty, which will allow refueled trains to be prioritized* for [Smelter] over those waiting in the bay - this makes sense on paper, but unfortunately the bay trains get queued into their next station immediately and are unaffected by later changes in circuits, so the refueling train would have to wait for all trains currently waiting in the bay to do a full cycle, and only then it will get its turn*. This means that A) you need more [Fuel Stop] stations, which is equivalent to a previously dismissed solution, and B) any deadlock in one route will affect other routes, so you need to either add a ridiculous amount of un-automatable circuitry to keep track which trains are currently waiting on [Fuel Stop]s and "disable" only bays that those trains belong to (keeping in mind that after refueling the train will immediately queue into the next station and "disconnect" from the refueling station so you cant even read a train ID anymore, so you have to use a memory cell and use a bunch of conditions based on the signal stops, which adds even more circuit complexity), or to use and even more complicated circuit system that keeps track of all station availability and dispatches trains one by one... yeah no. All of the previous solutions are way less complex and more compact than this would be.
- (Circuits) Circuit-controlled train stations on [Smelter] stops:
- Enable\Disable based on buffer storage item amount: if all stations are disabled (aka if all buffers are full) - the station gets skipped completely in routes that have more than 2 stations, so the bay trains will be running to and from mines, wasting a ton of fuel.
- 0-1 Train limit based on buffer storage item amount: if all stations are at 0 limit - bay trains will still queue into them, and (as previously mentioned) lose all connection to the [Bay] train stop because they are now "technically" on the way to [Smelter], so you cant use any waiting conditions or circuit controls anymore, so you have no way of forcing refueling trains to be prioritized
- Both solutions are predicated on having a buffer storage on [Smelter] stations. That does seem like a popular choice in the community, but for some reason I prefer not having chest input buffers. I guess train bay design could be considered an input buffer in its own way...
- (Design) Separate blocks with large amount of trains into smaller blocks with fewer trains: [Bay-N] -> [Smelter-N] with only 2 trains, times 10. Does solve the issue, but requires a ton of manual labor setting up individual blocks, because now you cant just copy-paste settings and are forced to rename every station and set up every route.
- Use a different refueling train station mod - the ones I found function in the exact same way as ATFS, or add too much complexity for a task at hand. If there are any out there that simply allow you to specify where the fuel stop is allowed to be in the schedule - that would be perfect.
- Logistic Train Network: as far as I can tell it would simply replace my example route with [Provider] -> [Requester] -> [Depot] and I would still need to add refueling chests to all [Depot] stations. It centralizes things, but quickly becomes non-compact the bigger your network becomes, and massively changes the way you make train networks. Might as well wait for 2.0 and re-learn it once rather than twice.
- Smarter Trains: adds a temporary fuel stop specifically to the end of schedule, so I guess it fits the bill and I can just rearrange the schedules so that a fuel stop can never be in between [Bay] and [Smelter], but the mod adds a lot of other unrelated things as well. If the refueling option is not tied to Smart Train Stops the mod adds, then I guess I can just choose not to use Smart Train Stops.
With all that, is there a design idea or a simple mod that I am missing here? Or am I doomed to circle back to requester-chest-for-every-route design?