Circuit Detection of Train with Destination Full

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Necandum
Inserter
Inserter
Posts: 40
Joined: Sat Jan 06, 2024 2:05 am
Contact:

Circuit Detection of Train with Destination Full

Post by Necandum »

TL;DR
It would be convenient if train stops emitted a signal when they were occupied by a train who's next destination was full.

What ?
Train stops usually play great with the circuit network, there's plenty of information given and all major functions can be controlled. However, one thing is missing: if a train meets its waiting conditions but its next destination is full, its stuck in limbo. It is still physically at the station and holds a reservation. But it does not interact with inserters or transmit its ID / contents. And this state cannot be directly detected by the circuit network.

Don't get me wrong, its possible to infer by listening to rail signals and correlating with the train ID channel. But all such methods are guaranteed to have transient false positives each time a train leaves / arrives, and cannot be made tick perfect.

There appears to have been a similar issue for mods that was fixed by boskid here . It would be great if a solution could also be made for the circuit network.

Suggestion: an option to transmit train ID on a different channel if the train's next destination is full but it has met its waiting conditions.
Why ?
This will extend what is possible with the circuit network. This information is currently simply not accessible in a reasonable fashion, and thus prevents any designs that might benefit from it.

Examples:
1. When not using buffer chests at stations, the only way to know if a resource is in surplus is by counting full trains with that resource. Janky solution with inference causes constant flickering of the values due to false positives.
2. Due to the flickering from false positives, its impossible to do things like activate a temporary station to buffer full trains (that would otherwise be disabled and skipped) or temporarily increase the station limit so that a new train is dispatched.
3. Looking ahead to 2.0, this information might be really useful to station side logic circuits, as they would be able to dynamically react to the next station being full in the context of other information from the base, by rerouting either the current train or others.
SoShootMe
Filter Inserter
Filter Inserter
Posts: 517
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: Circuit Detection of Train with Destination Full

Post by SoShootMe »

Necandum wrote: Wed Aug 28, 2024 2:13 am Don't get me wrong, its possible to infer by listening to rail signals and correlating with the train ID channel. But all such methods are guaranteed to have transient false positives each time a train leaves / arrives, and cannot be made tick perfect.
These are unequivocal statements that I think warrant some expansion as they are a key reason for the suggestion. I am sceptical that transient false positives are unavoidable (that is not to say they are trivially avoided). I am not sure what you mean by "tick perfect" - if you mean zero- or one-tick latency then you may be correct, but it is unclear if that is a requirement.
There appears to have been a similar issue for mods that was fixed by boskid here .
Sounds like this enables the desired functionality to be provided through a mod, which might be more appropriate unless there are broader use cases I'm missing and/or similar outcomes are unachievable with 2.0 railway enhancements (that can probably only be accurately judged after release).
Tertius
Filter Inserter
Filter Inserter
Posts: 930
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Circuit Detection of Train with Destination Full

Post by Tertius »

It's a bit difficult I guess, because the train has the info that it is unable to get a destination, not the station. From the game engine's perspective, the train already left the station (its circuit connection to the station is no more), so the train has no means any more to transmit its info to any circuit network.

I also had the situation when I wanted to know (in a circuit) if the train has finished loading/unloading and was about to leave. The goal was to always have 2 trains for that station. One currently being loaded/unloaded, the other on the tracks or in the stacker directly in front of the station. This is what train limits are for, but in case the train that is about to leave but has destination full still occupies one train limit slot. In this case, the next train isn't called as long as the previous train still sits at the station.

I tried a workaround to detect the situation and dynamically increase the train limit by 1, but this didn't work out. Due to circuit latency, there could be the situation that for one tick one train too many was called, which then clogged the waiting area in front of the station.
User avatar
Nosferatu
Filter Inserter
Filter Inserter
Posts: 251
Joined: Fri Jan 20, 2017 4:48 pm
Contact:

Re: Circuit Detection of Train with Destination Full

Post by Nosferatu »

2.0 has the possibility to send trains which are "destination full" into an depot. Would that not be a better solution to your problem?

https://factorio.com/blog/post/fff-389
"The depot problem"
Post Reply

Return to “Ideas and Suggestions”