[0.15] Preventing train rerouting when disabling a stop

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

User avatar
DemiPixel
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Mon Mar 21, 2016 7:27 am
Contact:

[0.15] Preventing train rerouting when disabling a stop

Post by DemiPixel »

In certain cases, it maybe beneficial to prevent a train from rerouting even if it's headed towards a disabled station. Having a "Prevent rerouting" option when Enable/disable is checked for stops would mean trains would skip it unless it was already en route.

This is great for regular players, whose trains might not be able to get to any other station, and therefore need to be able to get on the right track from a station.

This is great for advanced players as well, as they can make a system where maybe stations have the same name, and then cause a station to be enabled the tick before (or the tick of) a train leaving, giving full control over which trains go to which stations.

In certain cases, trains as of right now can be immediately stopped in their tracks and have no path (even if it appears they do have one), though this might be a bug worth reporting...

IronCartographer
Filter Inserter
Filter Inserter
Posts: 463
Joined: Tue Jun 28, 2016 2:07 pm
Contact:

Re: [0.15] Preventing train rerouting when disabling a stop

Post by IronCartographer »

We might be able to get around the no path issue of terminus-only rail systems by including turnaround branches in key locations, but there has to be a more elegant solution.

Disabling automatic repathing could be a solution, but it doesn't help with the case of many trains suddenly pathing to one enabled station and overwhelming it.

What I would love to see is an extension of the Enable/Disable logic: Send a train stop a value (rather than a bool) for how many trains are allowed to path toward it at that moment. I'm not sure how efficiently that could be implemented, but it would be a huge step toward logistic network trains in vanilla. It would also prevent trains from pathing to a train stop that would be disabled before it arrived, causing this entire issue.

Edit: Actually, circuit conditions on the other waiting station(s) could prevent the overload from happening, but it requires uniquely identifying and tracking trains/stations at the waiting area in order to enable identically named outposts. Good point, Demipixel.

Rseding91
Factorio Staff
Factorio Staff
Posts: 14074
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15] Preventing train rerouting when disabling a stop

Post by Rseding91 »

There's no way to prevent a train from re-routing when disabling a train stop. Once it's disabled no train can use it as a valid destination which means they *have* to re-path.
If you want to get ahold of me I'm almost always on Discord.

metacreamy
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Feb 06, 2017 8:36 pm
Contact:

Re: [0.15] Preventing train rerouting when disabling a stop

Post by metacreamy »

IronCartographer wrote:What I would love to see is an extension of the Enable/Disable logic: Send a train stop a value (rather than a bool) for how many trains are allowed to path toward it at that moment. I'm not sure how efficiently that could be implemented
It was implemented there viewtopic.php?t=40919
Source code available as well https://github.com/GrayMage/GrayMod

I hope it will be updated to work with 0.15 version.

User avatar
DemiPixel
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Mon Mar 21, 2016 7:27 am
Contact:

Re: [0.15] Preventing train rerouting when disabling a stop

Post by DemiPixel »

Rseding91 wrote:There's no way to prevent a train from re-routing when disabling a train stop. Once it's disabled no train can use it as a valid destination which means they *have* to re-path.
A similar idea might be a "lock" which can be enabled via circuit condition. New trains could not choose to path to it until it is unlocked (though trains going to it would remain). I'm just trying to find simple ways of enabling full control over the entire train network without making a complicated system such as cirtual signals for each stop.

GrayMage
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sun Feb 05, 2017 8:48 pm
Contact:

Re: [0.15] Preventing train rerouting when disabling a stop

Post by GrayMage »

DemiPixel wrote:
Rseding91 wrote:There's no way to prevent a train from re-routing when disabling a train stop. Once it's disabled no train can use it as a valid destination which means they *have* to re-path.
A similar idea might be a "lock" which can be enabled via circuit condition. New trains could not choose to path to it until it is unlocked (though trains going to it would remain).
I think that wouldn't be enough, because you still need to know how many trains are on the route through this "lock". I mean if 20 trains calculated their paths which lead to the same train stop, closing the lock would prevent new trains to go through, but those 20 will probably cause a traffic jam or will have to recalculate their paths once the train stop is disabled.

User avatar
DemiPixel
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Mon Mar 21, 2016 7:27 am
Contact:

Re: [0.15] Preventing train rerouting when disabling a stop

Post by DemiPixel »

GrayMage wrote:
DemiPixel wrote:
Rseding91 wrote:There's no way to prevent a train from re-routing when disabling a train stop. Once it's disabled no train can use it as a valid destination which means they *have* to re-path.
A similar idea might be a "lock" which can be enabled via circuit condition. New trains could not choose to path to it until it is unlocked (though trains going to it would remain).
I think that wouldn't be enough, because you still need to know how many trains are on the route through this "lock". I mean if 20 trains calculated their paths which lead to the same train stop, closing the lock would prevent new trains to go through, but those 20 will probably cause a traffic jam or will have to recalculate their paths once the train stop is disabled.
Well it depends how you configure it. If trains only leave by circuit condition and you enable a train leaving at the same time as unlocking a station, then only that train would go instead of all X assigned to that station. That being said, having something that allows for simpler setups might be preferable.

IronCartographer
Filter Inserter
Filter Inserter
Posts: 463
Joined: Tue Jun 28, 2016 2:07 pm
Contact:

Re: [0.15] Preventing train rerouting when disabling a stop

Post by IronCartographer »

DemiPixel wrote:If trains only leave by circuit condition and you enable a train leaving at the same time as unlocking a station, then only that train would go instead of all X assigned to that station. That being said, having something that allows for simpler setups might be preferable.
The main pain point I see with this hack based on the current system is the inability to deploy trains to multiple same-name outposts while both are en route, unless the later trains are guaranteed to be able to pass by the first destination and continue to the second. If they've gone on the wrong dead-end branch already, that won't be possible.

That means either breaking down each resource into throughput-capped train "lines" (compromise, largely defeats the anonymizing advantage of being able to disable stops dynamically) or accepting the limitation of one train traveling per resource at any given time.

User avatar
Omnifarious
Filter Inserter
Filter Inserter
Posts: 273
Joined: Wed Jul 26, 2017 3:24 pm
Contact:

Re: [0.15] Preventing train rerouting when disabling a stop

Post by Omnifarious »

IronCartographer wrote:
Tue Apr 25, 2017 6:02 am
What I would love to see is an extension of the Enable/Disable logic: Send a train stop a value (rather than a bool) for how many trains are allowed to path toward it at that moment. I'm not sure how efficiently that could be implemented, but it would be a huge step toward logistic network trains in vanilla. It would also prevent trains from pathing to a train stop that would be disabled before it arrived, causing this entire issue.

Edit: Actually, circuit conditions on the other waiting station(s) could prevent the overload from happening, but it requires uniquely identifying and tracking trains/stations at the waiting area in order to enable identically named outposts. Good point, Demipixel.
I want to also voice my support for this suggestion. - viewtopic.php?f=28&t=78557

Post Reply

Return to “Ideas and Suggestions”