Page 1 of 1
[0.15] Preventing train rerouting when disabling a stop
Posted: Tue Apr 25, 2017 2:30 am
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...
Re: [0.15] Preventing train rerouting when disabling a stop
Posted: Tue Apr 25, 2017 6:02 am
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.
Re: [0.15] Preventing train rerouting when disabling a stop
Posted: Tue Apr 25, 2017 3:14 pm
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.
Re: [0.15] Preventing train rerouting when disabling a stop
Posted: Tue Apr 25, 2017 5:32 pm
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.
Re: [0.15] Preventing train rerouting when disabling a stop
Posted: Tue Apr 25, 2017 5:45 pm
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.
Re: [0.15] Preventing train rerouting when disabling a stop
Posted: Tue Apr 25, 2017 7:51 pm
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.
Re: [0.15] Preventing train rerouting when disabling a stop
Posted: Tue Apr 25, 2017 9:41 pm
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.
Re: [0.15] Preventing train rerouting when disabling a stop
Posted: Wed Apr 26, 2017 9:23 pm
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.
Re: [0.15] Preventing train rerouting when disabling a stop
Posted: Thu Dec 12, 2019 3:17 pm
by Omnifarious
IronCartographer wrote: ↑Tue Apr 25, 2017 6:02 amWhat 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