Disable a rail piece

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Disable a rail piece

Post by zOldBulldog »

I suggest that just like with belts, we should be able to run a wire to piece of rail and disable it (make it act as if it didn't exist).

- This is not the same as a signal, as trains would simply pile up and wait for a green light to pass.
- This is not the same as a stop, as it could disable not just one exit but a whole sub-section of the rail network, with many stops in it.

It is a very simple but incredibly powerful feature with many possible uses. Some kind of minimal light indicator could be used to show the rail state (just like with belts) .

Tekky
Smart Inserter
Smart Inserter
Posts: 1039
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Disable a rail piece

Post by Tekky »

I agree.

Related threads:
viewtopic.php?f=6&t=58395 Block rail section based on train condition
viewtopic.php?f=6&t=62758 A way to totally lock a track path

zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Re: Disable a rail piece

Post by zOldBulldog »

Indeed Tekky, this simple solution should also address those needs, plus probably a number of others.

In the meantime... I'm off to design some convoluted kludge to poorly separate two sections of my network while still allowing passage for my Pax trains and others that I need to move over to the other side. :cry:

Sad_Brother
Fast Inserter
Fast Inserter
Posts: 209
Joined: Mon Jan 08, 2018 4:54 pm
Contact:

Re: Disable a rail piece

Post by Sad_Brother »

From the point of railway security this is bad suggestion. I understand the desire of it, but it is really a diversion :shock:
The best way to forbid train movement is to teach the routing system to understand when specific way is closed. So option to close the signal should become two: "temporarily closed" and "long time closed". Or "Stop" and "Closed". Or how you name it...

Tekky
Smart Inserter
Smart Inserter
Posts: 1039
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Disable a rail piece

Post by Tekky »

Sad_Brother wrote:
Tue Oct 30, 2018 3:14 pm
From the point of railway security this is bad suggestion. I understand the desire of it, but it is really a diversion :shock:
The best way to forbid train movement is to teach the routing system to understand when specific way is closed. So option to close the signal should become two: "temporarily closed" and "long time closed". Or "Stop" and "Closed". Or how you name it...
The advantage of the solution described in the first thread mentioned above is that it would also be possible to block individual trains based on a train condition (for example Train-ID or train contents).

Sad_Brother
Fast Inserter
Fast Inserter
Posts: 209
Joined: Mon Jan 08, 2018 4:54 pm
Contact:

Re: Disable a rail piece

Post by Sad_Brother »

Tekky wrote:
Tue Oct 30, 2018 3:33 pm
The advantage of the solution described in the first thread mentioned above is that it would also be possible to block individual trains based on a train condition (for example Train-ID or train contents).
My opinion was about this suggestion, not about related one.
As about related, I think it should be represented by railway Sign right of the rails and so be separate for each direction. (hope no offtop)

This suggestion want to separate rails at any moment. It is bad desire.

zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Re: Disable a rail piece

Post by zOldBulldog »

Sad_Brother wrote:
Tue Oct 30, 2018 3:14 pm
From the point of railway security this is bad suggestion. I understand the desire of it, but it is really a diversion :shock:
The best way to forbid train movement is to teach the routing system to understand when specific way is closed. So option to close the signal should become two: "temporarily closed" and "long time closed". Or "Stop" and "Closed". Or how you name it...
This solution achieves exactly that:

- Stop = Use a regular or chain signal.
- Closed = Disable the rail.

And yes, it *could* also be implemented as a second state for the signals, named Stop and Closed. It is still two flavors of the same thing, either will work :)
Tekky wrote:
Tue Oct 30, 2018 3:33 pm
The advantage of the solution described in the first thread mentioned above is that it would also be possible to block individual trains based on a train condition (for example Train-ID or train contents).
This can be done easily by running a wire from a Train Stop, since the train needs to be stopped to read it.

Of course, if you are talking of reading a train "on the move"... that is a whole other ballgame. Very desirable, but I would not be surprised if it might be a bit too complex of an enhancement for the current state of Factorio.

BTW, it would have to be Train Name (and have the ability to rename trains, and even have duplicate names) or train contents. Train ID is much too hokey an identifier to be used in a proper implementation. I doubt too many people go by train IDs, I'd bet most people don't bother to check beyond "train ID > 0" at stops.

Tekky
Smart Inserter
Smart Inserter
Posts: 1039
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Disable a rail piece

Post by Tekky »

zOldBulldog wrote:
Tue Oct 30, 2018 4:08 pm
Of course, if you are talking of reading a train "on the move"... that is a whole other ballgame. Very desirable, but I would not be surprised if it might be a bit too complex of an enhancement for the current state of Factorio.
I disagree that it would be too complex.

Corresponding suggestion threads:
viewtopic.php?f=6&t=47541 track signals should send Train-ID to circuit network
viewtopic.php?f=6&t=62838 Circuits: enhancing rail signal function
viewtopic.php?f=6&t=52504 Receive signals from moving trains
zOldBulldog wrote:
Tue Oct 30, 2018 4:08 pm
BTW, it would have to be Train Name (and have the ability to rename trains, and even have duplicate names) or train contents. Train ID is much too hokey an identifier to be used in a proper implementation. I doubt too many people go by train IDs, I'd bet most people don't bother to check beyond "train ID > 0" at stops.
Yes, I agree that the current Train ID system is not well polished. In the following thread, it has been suggested that the user should be able to provide a user-defined ID for every train:

viewtopic.php?f=6&t=46969 Constant Combinator for Locomotive

zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Re: Disable a rail piece

Post by zOldBulldog »

Tekky wrote:
Tue Oct 30, 2018 4:20 pm
zOldBulldog wrote:
Tue Oct 30, 2018 4:08 pm
Of course, if you are talking of reading a train "on the move"... that is a whole other ballgame. Very desirable, but I would not be surprised if it might be a bit too complex of an enhancement for the current state of Factorio.
I disagree that it would be too complex.

Corresponding suggestion threads:
viewtopic.php?f=6&t=47541 track signals should send Train-ID to circuit network
viewtopic.php?f=6&t=62838 Circuits: enhancing rail signal function
zOldBulldog wrote:
Tue Oct 30, 2018 4:08 pm
BTW, it would have to be Train Name (and have the ability to rename trains, and even have duplicate names) or train contents. Train ID is much too hokey an identifier to be used in a proper implementation. I doubt too many people go by train IDs, I'd bet most people don't bother to check beyond "train ID > 0" at stops.
Corresponding suggestion thread:
viewtopic.php?f=6&t=46969 Constant Combinator for Locomotive
Two of those threads are from 2017... maybe the devs consider it too complex (aka it would take too much time) to bother implementing?

Which is why I suggested this option. Achieves the most important results with what I would hope is a very modest time investment. Think of it as the cheap car version.

The rest would be nice to have and we might get it some day, but is it worth it to do without it for years all just in the hope that maybe we'll eventually get the gold-plated Rolls Royce?

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Disable a rail piece

Post by darkfrei »

It can be done by the mod, remove entity by signal and place it back when no signal.

Sad_Brother
Fast Inserter
Fast Inserter
Posts: 209
Joined: Mon Jan 08, 2018 4:54 pm
Contact:

Re: Disable a rail piece

Post by Sad_Brother »

zOldBulldog wrote:
Tue Oct 30, 2018 4:08 pm
- Stop = Use a regular or chain signal.
- Closed = Disable the rail.

And yes, it *could* also be implemented as a second state for the signals, named Stop and Closed. It is still two flavors of the same thing, either will work :)
There is the difference: Signal already knows what train yet to come already on the way and unstoppable. So the Signal would not close if it yellow or red already.
From the other side rails...
darkfrei wrote:
Tue Oct 30, 2018 6:20 pm
It can be done by the mod, remove entity by signal and place it back when no signal.
just removed by moder resulting in crash.

Main note is here: what we need is routing control, not real rails disconnection. :P

Btw is it the best train behaviour description?

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Disable a rail piece

Post by darkfrei »

Sad_Brother wrote:
Tue Oct 30, 2018 8:03 pm
Btw is it the best train behaviour description?
When the rail block is guarded by a rail signal set to red by the circuit network -> Add a penalty of 1000.
Yes, and sometimes you are need serial 10-100 red signals to close the way.

zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Re: Disable a rail piece

Post by zOldBulldog »

Sad_Brother wrote:
Tue Oct 30, 2018 8:03 pm
There is the difference: Signal already knows what train yet to come already on the way and unstoppable. So the Signal would not close if it yellow or red already.
Now *that* would be nice. If it is ever built.

Also, what mod? And are you saying that it is broken (resulting in crash)? Is there another mod that does the job?

I assume that if one mod could do it, there might be more than one, and I have no problem using a mod if it is commonly used and well maintained.

Sad_Brother
Fast Inserter
Fast Inserter
Posts: 209
Joined: Mon Jan 08, 2018 4:54 pm
Contact:

Re: Disable a rail piece

Post by Sad_Brother »

It is built. If you try to close red or yellow signal it ignores. If you close it green, signal visually red but no color output.

Hypothetical mentioned. By crash I mean "bump into rails end" here. ;)
Not played with mods really.

zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Re: Disable a rail piece

Post by zOldBulldog »

Sad_Brother wrote:
Tue Oct 30, 2018 10:55 pm
It is built. If you try to close red or yellow signal it ignores. If you close it green, signal visually red but no color output.

Hypothetical mentioned. By crash I mean "bump into rails end" here. ;)
Not played with mods really.
I think we are talking of different things. In this discussion Stop = stop at a red signal,. Close = make the rail where the signal is completely unpassable an cause "no path" for any stop after it... forcing the train to repath elsewhere.

Engimage
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Jun 29, 2016 10:02 am
Contact:

Re: Disable a rail piece

Post by Engimage »

There is an option to add functionality to a signal to add pathfinding penalty to it. While not totally preventing this path from being considered it will then be considered last for example.
I know no situation when I would want to totally disable a path in automatic mode (eg not reconstructing rails anyways) but you would really want to prioritize one path over the other.
In this case you could also make different penalties for different movement directions in the case if you have double directonal rails.

zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Re: Disable a rail piece

Post by zOldBulldog »

PacifyerGrey wrote:
Wed Oct 31, 2018 7:08 am
There is an option to add functionality to a signal to add pathfinding penalty to it. While not totally preventing this path from being considered it will then be considered last for example.
I know no situation when I would want to totally disable a path in automatic mode (eg not reconstructing rails anyways) but you would really want to prioritize one path over the other.
In this case you could also make different penalties for different movement directions in the case if you have double directonal rails.
That is exactly the kludge I am using for now.

I place multiple unnamed stops on the "I want this track to be unusable unless there is no other option" section, and then for extra safety I place a signal that is always red unless the train trying to pass is carrying a specific item (as determined by inspecting it at the last stop before that signal).

That way all trains should be discouraged from trying that route unless specifically ordered to go there, and if I miss something and an unwanted train goes there anyway.., it will be stopped at the border and I will eventually notice it and correct it.

Still, it is a nasty bit of work to achieve something so simple. Thus... This suggestion thread :D

zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Re: Disable a rail piece

Post by zOldBulldog »

More details on the kludge. It isn't pretty, but it seems to work and is fairly tolerant of human error.
rail network isolation.png
rail network isolation.png (3.59 MiB) Viewed 3025 times
- The 5 unnamed train stops add a very significant penalty to that segment. It *should* be enough to discourage any train that isn't sent specifically to a stop that can only be reached through that rail from taking that route.

- Additionally, the circuits shown where the 3 rails merge make the signal red all of the time. Any "expected" train headed for the restricted segment stops at the station for 1 second, is inspected, then let through if it carries an allowed item... by making the signal green for 5 seconds. The circuitry used is explained here:
viewtopic.php?f=193&t=63215. Any unexpected train will fail to stop and will get a red signal.

- Unexpected trains should never really happen, but if a mistake is made, they will stop right before the split. That is why there are 3 rails/stops, so that flow doesn't stop in this situation. Also, for the worst case scenario (yep, if I am royally distracted) there is a stacker before reaching the 3 rails.

- Unexpected stopped trains can be rerouted directly from the map (since they are stopped *before* the split), in which case they will make a right turn and return to their normal destinations. There is no need to go to this location, except to fix any design deficiencies that caused the problem in the first place.

- As a convenience, I have an earlier stop that I can send expected trains to in order to load one Assembler 1 onto their last wagon before proceeding. Since Assembler 1 is one of the items allowed, that lets me remotely send any train through the restricted segment.

What do I use the restricted segment for? To cross between two "almost" isolated rail networks. That way my Pax trains can cross but my ore trains and such stay where they belong.

Post Reply

Return to “Ideas and Suggestions”