So let's say I have 10 trains that idle on depot stations. And I have 3 iron ore export stations on different mining patches. When a station that needs the iron ore a train full amount, that station creates a signal (-1 iron ore) and sends it through the radar.
The idea is, when the export/mining station sees this signal, it will increase it's train limit and get an available train from the depot. Now I'm canceling the -1 iron ore signal when a train is on it's way and zeroing out the iron ore signal so no more trains are requested.
However, for a split second, when no train is on it's way and a train is requested in the smelting station, all three of the iron ore export stations increase their train limit because for that one tick, there is no train on it's way to any of the mining stations and I end up 3 iron ore trains waiting to go to the smelting stations, only one can go and the other 2 are waiting for god knows when they will be requested. I don't want that. Has anyone found a good way to do this?
I've tried creating an auto resetting timer and only enable the station if the timer is at zero, and it mostly works because the timer won't be the same in all of the export stations so only one of them will request that one train when it's enabled for a tick. but I don't like this solution too much. mainly because it's kind of dependent on chance and I was hoping if anyone has made a export queue?
Train Stations That Activate Only When Item Is Requested
Re: Train Stations That Activate Only When Item Is Requested
Do you have a save gme of what you did ?
Check out my latest mod ! It's noisy !
Re: Train Stations That Activate Only When Item Is Requested
I did something like that - but it's not something simple. There are a lot of mean borderline cases to check, and if something goes wrong or is set up in a wrong way, the system can easily break hard.
I have special circuitry for delivering station, provider stations and a central part, all communicating with each other. You can have a peek, but I don't recommend using these blueprints without actually understanding what they do first:
In general you need to use a semaphore mechanism to ensure that signals created in parall by different providers or requesters don't cancel each other out or will lead to other unintended behaviour. I introduced this central handling part for that, storing requests and assigning dedicated providers.
I have special circuitry for delivering station, provider stations and a central part, all communicating with each other. You can have a peek, but I don't recommend using these blueprints without actually understanding what they do first:
In general you need to use a semaphore mechanism to ensure that signals created in parall by different providers or requesters don't cancel each other out or will lead to other unintended behaviour. I introduced this central handling part for that, storing requests and assigning dedicated providers.
Re: Train Stations That Activate Only When Item Is Requested
Different approach: Instead of letting your empty trains idling in a depot, send them to all your ore export stations as long as there isn't a train yet (set the train limit of your ore export stations to static 1). Now you have a train at each ore export station, either being loaded or being full. They're now idling while being full already, so the response is much faster.asa159 wrote: Fri Jun 27, 2025 5:05 pm So let's say I have 10 trains that idle on depot stations. And I have 3 iron ore export stations on different mining patches. When a station that needs the iron ore a train full amount, that station creates a signal (-1 iron ore) and sends it through the radar.
You need to deploy as many trains as slots in loading stations + slots in unloading stations. If you have 4 loading stations and 3 unloading stations, 7 trains. The depot should have as many lanes as you have unloading stations, but a minimum of 1.
When a station that needs the iron ore a train full mount, that station sets its train limit from 0 to 1. Now there is already a full ore train waiting at an ore export station, so it just starts driving to the station that needs the ore.
You still need a depot for empty trains between the loading and the unloading stations, otherwise if an empty train wouldn't be able to an unloading station, since all loading stations are always supposed to be full.
The schedule goes like this:
static entry: "go to loading station", wait condition: "wait until cargo full"
interrupt: condition "cargo full", action: "go to unloading station", wait condition: cargo empty
interrupt: condition "destination full or no path", action: "go to depot", wait condition: no waiting condition
This will make all trains directly go from the unloading station back to the loading station, except no loading station has a free slot. In this case the train goes to the depot and waits at the depot until one loading station gets a free slot. The overall behavior is that every station is supposed to have a train all the time, so the latency between a train getting empty and arrival of the next full train is minimized. You don't even need to dynamically adjust the train limit between 0 and 1 at the unloading stations.