Train Interrupt: differentiate between 'Destination Full' and 'No Path'

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
ve2dmn
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Mar 10, 2026 2:37 am
Contact:

Train Interrupt: differentiate between 'Destination Full' and 'No Path'

Post by ve2dmn »

I'm trying to make a full automated train system that can accept mixed cargo and automatically select the right destination.

It all works except that I can't differentiate between station that are full, close or not-existent. I would, at the minimum be able to tell which of these 2 conditions it is:
03-09-2026, 23-06-53.png
03-09-2026, 23-06-53.png (1.29 MiB) Viewed 363 times
I tried using circuit conditions, but in the case of non-existing station, the signal is 'void' (not 0) and always false... which means I can't trigger this interrupt.
03-09-2026, 23-09-44.png
03-09-2026, 23-09-44.png (48.35 KiB) Viewed 363 times
Any idea?
mmmPI
Smart Inserter
Smart Inserter
Posts: 4934
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Train Interrupt: differentiate between 'Destination Full' and 'No Path'

Post by mmmPI »

The picture shows no circuit related things connected to the train stops, but the interrupt has a condition which requires a signal to be send through the circuit to trigger. What do you expect the condition related to the hourglass signal to do in this situation ? Always be 0 ?

When you added it , what do you think it would do ? Also What are the settings you used on the train stops ? How do you think they work ?

It's unclear to me how to provide help with your description of the problem.
Check out my latest mod ! It's noisy !
ve2dmn
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Mar 10, 2026 2:37 am
Contact:

Re: Train Interrupt: differentiate between 'Destination Full' and 'No Path'

Post by ve2dmn »

The picture is from the FFF. I want the interrupt to trigger in one condition but not the other. Specifically, I want the interrupt to trigger when there are No valid destinations, but not when the station is full.

One of the way I thought of doing this was to add a constant combinator to the station and send a signal to the waiting trains.... but there is no circuit condition possible when the station is invalid.
ve2dmn
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Mar 10, 2026 2:37 am
Contact:

Re: Train Interrupt: differentiate between 'Destination Full' and 'No Path'

Post by ve2dmn »

If you want the whole context:

The trains are doing mixed-cargo on Fulgora. They have 1 stations that is a generic 'loading' station:
03-10-2026, 08-26-07.png
03-10-2026, 08-26-07.png (15.26 KiB) Viewed 288 times
Then they have an interrupt that trigger as soon as the train is loaded:
03-10-2026, 08-27-06.png
03-10-2026, 08-27-06.png (41.03 KiB) Viewed 288 times
Each station have the item in the name and the train just goes from one to the other without issues.
03-10-2026, 08-28-45.png
03-10-2026, 08-28-45.png (42.99 KiB) Viewed 288 times
The first problem arise when there are no destination for the cargo (No Path). So I made a "recycle" station that removes 1 item:
03-10-2026, 08-31-22.png
03-10-2026, 08-31-22.png (342.33 KiB) Viewed 288 times
(It works by taking inventory of the train, set the filter to the next item and reset when the train leaves, or tries to leave and find another unwanted cargo item)


And I made this interrupt to dump the unwanted cargo:
03-10-2026, 08-32-02.png
03-10-2026, 08-32-02.png (47.48 KiB) Viewed 288 times
So far, so good, but then you have the problem that the trains dump their cargo in 3 conditions:

1) full stations (at train limit)
2) Stations disabled by circuit conditions
3) non-existing stations

I want to find a wait for the interrupt to for non-existing station only. Otherwise the 'recycle' station get clogged with high production but low demand item (like, for example, scraps on Fulgora).

The only solution I found, so far, is to create a station for every possible item (including every quality variant) so that that I can use them to send signals to the trains, and do interrupt logic with circuit conditions.... but that would be a lot of stations.
Tertius
Smart Inserter
Smart Inserter
Posts: 1587
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Train Interrupt: differentiate between 'Destination Full' and 'No Path'

Post by Tertius »

ve2dmn wrote: Tue Mar 10, 2026 12:48 pm The trains are doing mixed-cargo on Fulgora. They have 1 stations that is a generic 'loading' station:
What exactly do you mean with "mixed-cargo"? Do you mean you load multiple material into the same train at the same time, or do you mean the same train loads and carries some item for one trip, becomes empty, and handles a different item for the next trip?

I'm asking because it's not clear if you posted some schedule screenshots or all schedule screenshots, so your train behavior isn't fully clear. You have that green cargo wildcard in the loading station name, so it seems you tried to construct loading station names. But for a generic train setup there cannot be a wildcarded loading station - it's just something like "loading" for every station no matter the material.

The 1st variant is next to impossible to implement directly with interrupts, because there is no reliable mechanic to dynamically send a train to some station you determine with circuits. I didn't yet see one working example for that, although some incredibly complex circuit contraptions claim they're working fine.

The 2nd variant is the common case. However it's mandatory trains become completely empty if they're heading to some loading station, otherwise it's possible they're being loaded with 2 and more different items and it's not predictable which different items, and the ratio between them. So if this is running for a longer time, your trains can carry a small collection of random leftovers and the majority of the cargo slots will contain the recently loaded item.

I implemented trash removal on my latest map that seems similar to what you try to do. It looks kind of similar to yours but not completely.

The main schedule:
It's intended for ore transport, so the loading station is named (mining drill) instead of a generic "loading".
03-10-2026, 16-46-52.png
03-10-2026, 16-46-52.png (54.58 KiB) Viewed 246 times
Delivery interrupt:
The interrupt will trigger if there are more than just leftovers in the train, and the train will be unloaded until it is either empty or its cargo is below 40 and a short timeout elapsed. This is to make trains leave with a small leftover if cargo unloading wasn't balanced across wagons.
03-10-2026, 16-48-51.png
03-10-2026, 16-48-51.png (59.11 KiB) Viewed 246 times
Interrupt to flush a train with leftovers:
This interrupt will trigger only if the train carries not more than the leftover amount. The flush station will just remove every item from the train, so it becomes empty.
03-10-2026, 16-51-25.png
03-10-2026, 16-51-25.png (51.45 KiB) Viewed 246 times
Refuel interrupt:
Not important for this discussion, just added for the complete picture.
03-10-2026, 16-53-27.png
03-10-2026, 16-53-27.png (75.45 KiB) Viewed 246 times
Depot interrupt:
This is probably the most interesting one, because it handles the "destination full or no path" situation. It makes trains leave the unloading station to free it for the next train and make the train wait at some depot station for empty trains. It just triggers for empty trains.
03-10-2026, 16-54-13.png
03-10-2026, 16-54-13.png (54.86 KiB) Viewed 246 times
About unknown items, with no corresponding unloading station: If there are less then 40 unknown items in the train, my setup will direct the train to the flush station and unload. This will properly handle the situation you sometimes encounter on Nauvis: a single stone is being loaded along with ore, and due to this stone the train system starts malfunctioning.

If there are more than 40 unknown items in the train, it breaks. This situation is not handled. I don't handle it, because it's not possible to detect if a train has lots of some unknown item or if just all valid destinations are full. Trains with large amounts of unknown items just stay at their loading stations with "no path". This is not perfect, but it's ok since if you have a station that's loading large amounts of items for which no unloading station exists, that station has no purpose at the moment. I have to build that unloading station, and as soon as I build it train operation for this item will proceed properly.

You can partly handle it by adding a 2nd kind of depot - a depot for full trains. You would duplicate the current depot interrupt and add it after the current depot (order is important). Remove the "Empty cargo inventory" condition and replace the depot names with the additional depot stations for the full trains. I didn't do this, because I want full trains just wait at their loading stations if all unloading stations are full. Not at a separate depot.
ve2dmn
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Mar 10, 2026 2:37 am
Contact:

Re: Train Interrupt: differentiate between 'Destination Full' and 'No Path'

Post by ve2dmn »

Tertius wrote: Tue Mar 10, 2026 4:10 pm What exactly do you mean with "mixed-cargo"? Do you mean you load multiple material into the same train at the same time, or do you mean the same train loads and carries some item for one trip, becomes empty, and handles a different item for the next trip?
When I said "mixed cargo" I mean that the train has everything that came out of the recycler on fulgora: Steel, gears, stone, concrete, ice, etc... in a single train.
Tertius wrote: Tue Mar 10, 2026 4:10 pm I'm asking because it's not clear if you posted some schedule screenshots or all schedule screenshots, so your train behavior isn't fully clear. You have that green cargo wildcard in the loading station name, so it seems you tried to construct loading station names. But for a generic train setup there cannot be a wildcarded loading station - it's just something like "loading" for every station no matter the material.
The "loading" stations are all named the same. I used a wildcard at some point to try things and left it there. They are generic. I should just remove it.
Tertius wrote: Tue Mar 10, 2026 4:10 pm The 1st variant is next to impossible to implement directly with interrupts, because there is no reliable mechanic to dynamically send a train to some station you determine with circuits. I didn't yet see one working example for that, although some incredibly complex circuit contraptions claim they're working fine.
I essentially started with the system described in this video, but I'm trying to modify it to support multiple item type in each train (For quality on Nauvis, and everything on Fulgora): https://www.youtube.com/watch?v=G9GWl4X2ln0

It works great 95% of the time, but it break in the same way:
Tertius wrote: Tue Mar 10, 2026 4:10 pm Trains with large amounts of unknown items just stay at their loading stations with "no path". This is not perfect, but it's ok since if you have a station that's loading large amounts of items for which no unloading station exists, that station has no purpose at the moment. I have to build that unloading station, and as soon as I build it train operation for this item will proceed properly.
Which I guess means the solution to my problem is to make stations for every possible items and quality :any-quality: : 1 for normal steel, 1 for uncommon steel, 1 for rare steel, 1 for uncommon gear, 1 for rare gear, etc... put a contant combinator on every one of these station that tells the train "This station is closed, go to the dump". That's gonna be a lot of stations. :?

Instead of having a "if the station does not exist, go to the dumping station" interrupt (since that one also trigger for full stations and I don't want that).

It's a weird workaround, but I can put it in a corner of the map and forget it.
User avatar
Nosferatu
Filter Inserter
Filter Inserter
Posts: 288
Joined: Fri Jan 20, 2017 4:48 pm
Contact:

Re: Train Interrupt: differentiate between 'Destination Full' and 'No Path'

Post by Nosferatu »

What do you plan to do with the stuff that got overproduced and causes the station full?
That's the Fulgora problem. You can't store that stuff forever. I would simply send it to the recycler.

That would mean. 1,2 and 3 all go to the recycler.
Problem solved.
mmmPI
Smart Inserter
Smart Inserter
Posts: 4934
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Train Interrupt: differentiate between 'Destination Full' and 'No Path'

Post by mmmPI »

ve2dmn wrote: Tue Mar 10, 2026 12:48 pm So far, so good, but then you have the problem that the trains dump their cargo in 3 conditions:

1) full stations (at train limit)
2) Stations disabled by circuit conditions
3) non-existing stations

I want to find a wait for the interrupt to for non-existing station only. Otherwise the 'recycle' station get clogged with high production but low demand item (like, for example, scraps on Fulgora).

The only solution I found, so far, is to create a station for every possible item (including every quality variant) so that that I can use them to send signals to the trains, and do interrupt logic with circuit conditions.... but that would be a lot of stations.
I think the underlined part is a problem, there should be a place in your factory on Fulgora where you can dump "anything" , because over the course of the game you will have shortages of dfferent materials and the need to void "all the others" to get the desired ones.

Then maybe the train can use "inactivity" condition, to trigger a departure to such "dump" station. This means, if you already have a proper unload station the trains tries to go there, but if it is full, or non-existing, the train will be inactive, and eventually go to "void everything place".

To keep track of the "new" station for each item you create, you can always use logistic groups, setup a constant combinator for this, and whenever a new item has a particular unload station created, meaning the material will not go by default to the dump place, but the train will attempt to unload them with a specific interrupt. Then you add a signals for this item on the logistic group. Then you can embed the "list of items" where you load material by copying the constant combinator with the same group, so that if the train contain items that are not on the list, you have knowledge that it is non-existing station, whereas if the train is inactive, but contain items that are on the list, it means the unloading station are full.

Does that make sense for your context ?
Check out my latest mod ! It's noisy !
ve2dmn
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Mar 10, 2026 2:37 am
Contact:

Re: Train Interrupt: differentiate between 'Destination Full' and 'No Path'

Post by ve2dmn »

mmmPI wrote: Tue Mar 10, 2026 8:16 pm Does that make sense for your context ?
Not 100%, but it does give me a few idea to try, Thanks.
Nosferatu wrote: Tue Mar 10, 2026 6:13 pm What do you plan to do with the stuff that got overproduced and causes the station full?
That's the Fulgora problem. You can't store that stuff forever. I would simply send it to the recycler.

That would mean. 1,2 and 3 all go to the recycler.
Problem solved.
It's true that overproduction on Fulgora can be voided. (Scraps are plentiful). I was hoping to use this as a testing ground for quality on other planets. I don't want the ore on Nauvis to be 'recycle' because the station are full and I don't want a 'no path' situation if I have 1 legendary steel, so I'm not 100% satisfied with voiding overproduction, even if it works great on Fulgora.
mmmPI
Smart Inserter
Smart Inserter
Posts: 4934
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Train Interrupt: differentiate between 'Destination Full' and 'No Path'

Post by mmmPI »

ve2dmn wrote: Tue Mar 10, 2026 9:04 pm Not 100%, but it does give me a few idea to try, Thanks.
I wasn't 100% sure i understand the usecase / context , so maybe i got it wrong. I can describe the system i had in mind with more precisions or show examples if that helps, but if i didn't get the context right it's probably better to sort this first x).
ve2dmn wrote: Tue Mar 10, 2026 9:04 pm It's true that overproduction on Fulgora can be voided. (Scraps are plentiful).
It's very difficult if you try to not void anything, you end up with so much concrete at times, or so few holmium you will need to void a lot of things. You would make the game a whole lot harder for yourself if you try to find a use to all the recycled material from the scrap, either exporting it to other planet or importing missing material to transform them is a nightmare because the ratio keeps changing as long as you expand the base. It's more like you "should" void stuff on fulgora, and make sure you have enough voiding capacity to keep only what you want when you mine scrap.
ve2dmn wrote: Tue Mar 10, 2026 9:04 pm I was hoping to use this as a testing ground for quality on other planets. I don't want the ore on Nauvis to be 'recycle' because the station are full and I don't want a 'no path' situation if I have 1 legendary steel, so I'm not 100% satisfied with voiding overproduction, even if it works great on Fulgora.
Sorry if this is detracting you from fun experiments, but since it's in the gameplay help , i feel like pointing out that it's easier to keep "quality making" on a single planet. ( I tried both the things i don't recommend doing). Here it's also going to make the game much harder for yourself if you try to have various planet making various quality things. If you still want to pursue in the not-easy way, then you will probably need to use a different system on the different planets, each their own, Fulgora being arguably the most difficult to setup for long term quality production.

In Nauvis you shouldn't have overproduction, or at least it's possible to avoid it. Recyclers are used "only" for quality unlike in Fulgora, so it's possible to only send material to them when needed, you shouldn't have a 1 lone legendary steel somewhere clogging your system, that's more a fulgora thing where it's more difficult to manage both the recyclers used for quality and the recyclers used to "void things" to keep fulgora running. This is also why the system would be a bit different imo.
Check out my latest mod ! It's noisy !
Tertius
Smart Inserter
Smart Inserter
Posts: 1587
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Train Interrupt: differentiate between 'Destination Full' and 'No Path'

Post by Tertius »

If you use quality modules in the miners and load all qualities into a train, you get every possible combination of item and quality, even if you don't need them. In addition, ratios are wrong. You get everything with a chance of better quality, but you need only part of that. It might be better (and personally I do it this way) to just mine everything in normal quality and get the higher qualities through upcycling. Upcycling will always create the correct ingredient ratio.
This way you don't get 5 versions of everything (everything in every quality), having to void 80% of everything just to get enough of that one item you really need.
Instead, upcycling is an easy to understand and easy to manage blackbox you feed normal ingredients and get quality end products out with the desired quality.

Complexity explodes if you try to universally handle all possible combinations.

And in the end there are some vital end products like the stack inserter that can only be made with upcycling. The stack inserter because of the jelly ingredient. Directly creating quality jelly (for example legendary for legendary stack inserters) isn't really feasible. Or the Aquilo-specific buildings that can only be crafted on Aquilo. Or everything that needs holmium plates since holmium plates don't profit from early quality mining+recycling - it loses any quality in the holmium solution step.

So I recommend to reduce your complexity by not trying to handle every quality in every production step.
Post Reply

Return to “Gameplay Help”