[kovarex] [0.17.64] Circuit controlled train signal "opens" by itself although set to "closed"

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 883
Joined: Sun Mar 20, 2016 2:51 am
Contact:

[kovarex] [0.17.64] Circuit controlled train signal "opens" by itself although set to "closed"

Post by Impatient »

The case I found, while experimenting with circuit controlled train signals, shows a train signal, that is set to "closed" via the circuit network, but for no obvious reason sets itself to "reserved" and lets a train pass.

Steps:
1. Load attached save. (Load without mods, none are required to reproduce).
2. Use the constant combinator. Increase the value for signal G to anything above 10 to open the train signal and dispatch the train.
3. Decrease the value for signal G below 10 to close the train signal again.

Observed behavior:
The train loops around once and stops at the station. When it then approaches the circuit controlled train signal, the train signal sets itself to "reserved" and lets the train pass. The train loops around a 2nd time and after another stop at the station finally comes to a permanent halt at the train signal.

Expected behavior:
The circuit controlled train signal follows its set closed condition and does not open. The train comes to a permanent halt at the train signal after one loop.

Edit: Further observations
The behavior changes to the expected one, when the 2nd train signal (to the right of the station) is moved further to the right, in a way that the train, stopping at the station, is in one track section, not in both.
Attachments
circuit controlled signal opens unexpectedly.zip
(3.07 MiB) Downloaded 113 times

ATAD
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Aug 08, 2019 2:14 am
Contact:

Re: [0.17.64] Circuit controlled train signal "opens" by itself although set to "closed"

Post by ATAD »

I think this bug may be related to (or possibly a duplicate of) the bug which I reported earlier: viewtopic.php?f=7&t=74390

User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 883
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: [0.17.64] Circuit controlled train signal "opens" by itself although set to "closed"

Post by Impatient »

In terms of the train signal not following its set closed condition definitely.

mmmPI
Smart Inserter
Smart Inserter
Posts: 2729
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: [0.17.64] Circuit controlled train signal "opens" by itself although set to "closed"

Post by mmmPI »

If we load the save without mods, there is no way to make wire at all ? ( can't even make them appear in infinity chest ).

I tried a few things, it is odd that it ALWAYS takes the train 2 turns to realise the signal is supposed to be close. If you turn it off, the first turn it always bypass the signal when starting from TSN2. And the 2nd turn, it stops in front of it.

Edit: my guess is that is has to do with where the train is when you turn off the signal. The fact that there is only 2 blocks in your setup may introduce weird behavior i would try with more signal in the loop.

User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 883
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: [0.17.64] Circuit controlled train signal "opens" by itself although set to "closed"

Post by Impatient »

mmmPI wrote:
Wed Aug 14, 2019 2:14 am
If we load the save without mods, there is no way to make wire at all ? ( can't even make them appear in infinity chest ).
Hm, maybe the mod "Wire Shortcuts" deleted the recipes. I don't know. Load it with the mods. They don't change anything. They are just there to support blueprinting and experimentation.
mmmPI wrote:
Wed Aug 14, 2019 2:14 am
I tried a few things, it is odd that it ALWAYS takes the train 2 turns to realise the signal is supposed to be close. If you turn it off, the first turn it always bypass the signal when starting from TSN2. And the 2nd turn, it stops in front of it.
That is the weird thing for the devs to shed some light on. Why is the train signal behaving that way? And while doing so: Why is the train signal not switching to "reserved" consistently? Why only after the first loop?
mmmPI wrote:
Wed Aug 14, 2019 2:14 am
Edit: my guess is that is has to do with where the train is when you turn off the signal. The fact that there is only 2 blocks in your setup may introduce weird behavior i would try with more signal in the loop.
I agree with you there. It can be handled that way. But the baseline is, that the train signal is not following its set closed condition. It seems that something, under certain conditions (the pathing algo?) can override it. That feels like a bug, certainly is unexpected.

mmmPI
Smart Inserter
Smart Inserter
Posts: 2729
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: [0.17.64] Circuit controlled train signal "opens" by itself although set to "closed"

Post by mmmPI »

Using the mods is annoying if you are not used to press alt F or alt G to get wire, they disappear when you try to have some in your inventory or toolbar!
in those cases i just place wire in slot for shortcut 1 and 2 i had to do differently :) !

it's ok though, i was thinking about this and realise that if you place a lamp like this you see something interesting:
wihtlamp.jpg
wihtlamp.jpg (235.58 KiB) Viewed 2994 times
The first turn the lamp is red, this means the first turn the signal is closed because the train was already in the block when the pathfinding was done. So the signal let the train through.

The second time, the lamp turns off, this means the block is now shut down by signal, the train had left it for a while. Which means it is prevented from entering again.

This looks similar to
mmmPI wrote:
Sat Aug 10, 2019 10:16 pm
if you click the little V you should get the pictures
Except the train in your case only cross the signal once due to it being shut down for other reasons the second turn. That would also explain why with more signal in the loop it doesn't happen. not 100% sure though :D

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [kovarex] [0.17.64] Circuit controlled train signal "opens" by itself although set to "closed"

Post by kovarex »

The problem was, that the block was already occupied by the same train, and the circuit network didn't have time to "tap" the signal.
But since it might be useful, I added a condition, that train signal can't be re-reserved by train when the circuit network wants to tap it, even if the block it guards is already occupied by the same train.

Post Reply

Return to “Resolved Problems and Bugs”