[0.17.50] Gate Read Sensor reacts multiple times to slow train

Bugs that are actually features.
Sircus
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Jun 19, 2019 1:21 pm
Contact:

[0.17.50] Gate Read Sensor reacts multiple times to slow train

Post by Sircus »

I have this train-counting configuration:
gate_config.png
gate_config.png (106.36 KiB) Viewed 1742 times
The gate is set to Read Sensor. The bottom arithmetic combinator receives this input and adds 0, producing a different output. The decider combinator checks whether the undelayed (gate) input is greater than the delayed (0-added) input and emits 1. The top arithmetic combinator adds the decider's output to a signal.

This all works beautifully if the train goes quickly through the gate. In some places, I have some routing logic just before the gate. Sometimes, trains stop at the routing signal. In these cases, when the train starts again and passes through the counter, multiple "open" events of the gate will occur.

I can reproduce this manually by putting a train some 20ish blocks away and driving through the gate, accelerating all the time. If I do that, the count is correct. If I instead start ~5 rail blocks away, where the gate has not been triggered to open yet, then multiple trains will be counted.

The effect is more pronounced if I drive backwards through the gate.

Note: this is not the "nothing happened for 5s, so the gate closed" effect. Visually, the gate remains completely open at all times. To trigger the bug, the train doesn't need to stop or decelerate. Continuous acceleration toward the gate will also trigger it, as long as the speed at which the train passes the gate is sufficiently slow.
Sircus
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Jun 19, 2019 1:21 pm
Contact:

Re: [0.17.50] Gate Read Sensor reacts multiple times to slow train

Post by Sircus »

I've attached a minimal test case. Three lines, three trains all in the same place. Counters placed somewhat differently. None of the trains has triggered any of the gates (if you switch them to manual mode and edge them back, then switch them to automatic, you'll see that the gate doesn't open as they approach the red signal).

Turn on the constant combinator to the right of the player - all three trains will depart. At least for me, A will count 4. B will count 5. C will (correctly) count 2.

(The test case was made using Creative Mode, but this is a vanilla save.)
Attachments
mintest-base.zip
(3.63 MiB) Downloaded 99 times
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.17.50] Gate Read Sensor reacts multiple times to slow train

Post by kovarex »

Hello, this is not a bug. The train repeatedly sends the signal to pen games in front of him so one gate can easily get more signals to open.
Sircus
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Jun 19, 2019 1:21 pm
Contact:

Re: [0.17.50] Gate Read Sensor reacts multiple times to slow train

Post by Sircus »

But... the gate only actual opens once. I'm struggling to picture why a player would be more interested in the logic of how trains trigger gates than in when the gate actually opens?
JasonC
Filter Inserter
Filter Inserter
Posts: 449
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Re: [0.17.50] Gate Read Sensor reacts multiple times to slow train

Post by JasonC »

Reported again: viewtopic.php?f=7&t=80584

Strongly disagree that this is not a bug, see description and points there.
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.
Post Reply

Return to “Not a bug”