[2.0.28] Pump not respecting "set filters" signal, internal buffer still loading into fluid wagons

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
NameLips
Inserter
Inserter
Posts: 44
Joined: Mon Jun 27, 2016 11:53 pm
Contact:

[2.0.28] Pump not respecting "set filters" signal, internal buffer still loading into fluid wagons

Post by NameLips »

I have a setup in a modded game where several fluids can be loaded into my trains. The stop has several tanks and pumps. The fluid is selected using the Set Filters signal.

This problem started when I updated my factorio version to 2.0.28 on 12/24/24.

I am over 300 hours into a pyanadon hard mode game with cybersyn. I have over a hundred fluid stations and this problem only started happening last night after I updated.

I'll admit my setup is a bit weird, but it has been working flawlessly up to this point. All the pumps connect to the wagon when it arrives. They all get a set filters signal. And even though all the pumps connect, only the correct fluid flows into the wagon.

Now it is broken. The incorrect fluid flows into the wagon. Only a couple hundred units -- it must be the internal buffer of the incorrect pump. But of course that is enough to wreck the entire system.
fluidfucked.png
fluidfucked.png (500.96 KiB) Viewed 810 times
NameLips
Inserter
Inserter
Posts: 44
Joined: Mon Jun 27, 2016 11:53 pm
Contact:

Re: [2.0.28] Pump not respecting "set filters" signal, internal buffer still loading into fluid wagons

Post by NameLips »

And I have to ask, in all honesty, what's the point of allowing a "set filters" signal for pumps...

if the pumps have a secret stash of fluid on the other side of the filter that can ignore it? I cannot stress this enough -- the fact that the internal buffer in the pump ignores the filter seems to completely invalidate the entire point of the filter. We need to be able to trust that a fluid not matching the filter will never, under any circumstances, get through the pump, otherwise what is the point? At that point the easiest fix is to just go through all my fluid stops one by one and set their filters manually, the way I used to build my multi-fluid stations before pumps could set filters at all.
robot256
Smart Inserter
Smart Inserter
Posts: 1177
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: [2.0.28] Pump not respecting "set filters" signal, internal buffer still loading into fluid wagons

Post by robot256 »

Can you post your save where this is happening? If it really broke when you upgraded, do you have a save file that works in a previous version but not in 2.0.28?

My guess is you are correct about there being hidden buffers in the pump, a little like inserter hand contents.

The main purpose for pump filters is to prevent them from *unloading* the wrong train wagon into a pipe network. Secondary application is a "sushi pipe" which holds different fluids at different times.

Neither of these applications really benefit from circuit-selectable pump filter, at least not ones that change. I think you have a valid point there.

In your application, you could also do without them. Assuming the fluids in the tanks at each stop are constant, you could set up a parametrized blueprint to set the pumps' enable conditions to the fluid they provide, rather than dynamically selecting fluids. You could also make a combinator circuit to detect when the content of a given tank matches the request from the train and dynamically enable the pump that way.
NameLips
Inserter
Inserter
Posts: 44
Joined: Mon Jun 27, 2016 11:53 pm
Contact:

Re: [2.0.28] Pump not respecting "set filters" signal, internal buffer still loading into fluid wagons

Post by NameLips »

robot256 wrote: Wed Dec 25, 2024 5:41 pm Can you post your save where this is happening? If it really broke when you upgraded, do you have a save file that works in a previous version but not in 2.0.28?

My guess is you are correct about there being hidden buffers in the pump, a little like inserter hand contents.

The main purpose for pump filters is to prevent them from *unloading* the wrong train wagon into a pipe network. Secondary application is a "sushi pipe" which holds different fluids at different times.

Neither of these applications really benefit from circuit-selectable pump filter, at least not ones that change. I think you have a valid point there.

In your application, you could also do without them. Assuming the fluids in the tanks at each stop are constant, you could set up a parametrized blueprint to set the pumps' enable conditions to the fluid they provide, rather than dynamically selecting fluids. You could also make a combinator circuit to detect when the content of a given tank matches the request from the train and dynamically enable the pump that way.
I saved, updated factorio and my mods, reloaded, and it's broken. I haven't re-saved since the update, so I guess the file could be loaded in the old version and new version to see what is behaving differently. I'll attach it.

My last pyanadon run (back in july, pre 2.0) had manually set pump filters. It worked flawlessly throughout the entire pyanadon run. But I can't remember the details of the wiring -- if all the pumps activated and attached to the wagon and only the correct fluid entered, or if only the specific required pump activated and attached to the wagon. I don't have those save files anymore, I purged everything when 2.0 dropped.
Attachments
py.zip
(37.02 MiB) Downloaded 23 times
NameLips
Inserter
Inserter
Posts: 44
Joined: Mon Jun 27, 2016 11:53 pm
Contact:

Re: [2.0.28] Pump not respecting "set filters" signal, internal buffer still loading into fluid wagons

Post by NameLips »

A bit of an update, I think I have more information.

I rewired things, wiring from the station to the output of the arithmetic combinator, then to the pumps, and it seemed to make some improvements. From there if I delete the pumps and rebuild them (to destroy the fluid in their internal buffer) I think it's... working? Maybe? I'm having trouble testing it.
NameLips
Inserter
Inserter
Posts: 44
Joined: Mon Jun 27, 2016 11:53 pm
Contact:

Re: [2.0.28] Pump not respecting "set filters" signal, internal buffer still loading into fluid wagons

Post by NameLips »

update: still not working. Sometimes it seems to work, but that's just coincidence. Once a pump activates once, it leaves fluid in its buffer. Once multiple pumps have fluid in their buffers, it seems random which fluid gets put into the train. Sometimes it's the right one, and the train fills up and leaves. Sometimes it's the wrong one, and the train gets stuck (cybersyn won't let it leave until it has met its order, so it just sits there.)

edit: manually setting the filters isn't helping. It makes no difference if they are manually set versus set by circuit signal. The problem is exclusively the internal buffer.
robot256
Smart Inserter
Smart Inserter
Posts: 1177
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: [2.0.28] Pump not respecting "set filters" signal, internal buffer still loading into fluid wagons

Post by robot256 »

Thanks for that. The station in question is near the "X Coal disabled for now" map tag in the middle-left. Before the next train arrives, you can see that it contains 400 Coal Gas fluid, and the train that arrives is requesting the other fluid. The coal gas gets ejected into the fluid wagon and the brine pump cannot insert anything else.
12-25-2024, 14-26-31.png
12-25-2024, 14-26-31.png (1.3 MiB) Viewed 721 times
Thanks for the update confirming our suspicions. I guess the circuit pump filters are only useful when you have a method of flushing the output fluid from the system. Wiring up the Cybersyn request outputs to control the specific pump enable signals makes the most sense, since that will prevent it from ejecting the internal buffer at the wrong time (right?).
NameLips
Inserter
Inserter
Posts: 44
Joined: Mon Jun 27, 2016 11:53 pm
Contact:

Re: [2.0.28] Pump not respecting "set filters" signal, internal buffer still loading into fluid wagons

Post by NameLips »

robot256 wrote: Wed Dec 25, 2024 8:32 pm Thanks for the update confirming our suspicions. I guess the circuit pump filters are only useful when you have a method of flushing the output fluid from the system. Wiring up the Cybersyn request outputs to control the specific pump enable signals makes the most sense, since that will prevent it from ejecting the internal buffer at the wrong time (right?).
You found the exact pump from the screenshot and observed the exact behavior and I am so amazed. Wow.
Yes that would seem to be the only solution.

I don't quite understand if something changed with pump behavior because they definitely didn't behave this way before I updated. I'm over 300 hours into this save and I've used this same multi-fluid provider blueprint all over the factory. And my previous pyanadon run (pre-2.0) never had this problem.

But yes it looks like if I want to continue this save I need to figure out how to activate only the required pump, and retrofit all of my stations.
computeraddict
Filter Inserter
Filter Inserter
Posts: 331
Joined: Sat Oct 07, 2023 6:44 am
Contact:

Re: [2.0.28] Pump not respecting "set filters" signal, internal buffer still loading into fluid wagons

Post by computeraddict »

My vote here is for "not a bug". What's the alternative behavior? A pump that picks up fluid becoming permanently disabled if its filter changes before emptying its fluid buffer? It'd be exactly as bad as an inserter becoming disabled if its filter stopped including the thing it was holding, and the solutions are equivalent. Just like filtered inserters trying to load a cargo wagon, you need a pump to remove any leftovers the other pump(s) might add.
NameLips
Inserter
Inserter
Posts: 44
Joined: Mon Jun 27, 2016 11:53 pm
Contact:

Re: [2.0.28] Pump not respecting "set filters" signal, internal buffer still loading into fluid wagons

Post by NameLips »

computeraddict wrote: Thu Dec 26, 2024 3:25 pm My vote here is for "not a bug". What's the alternative behavior? A pump that picks up fluid becoming permanently disabled if its filter changes before emptying its fluid buffer? It'd be exactly as bad as an inserter becoming disabled if its filter stopped including the thing it was holding, and the solutions are equivalent. Just like filtered inserters trying to load a cargo wagon, you need a pump to remove any leftovers the other pump(s) might add.
I have a feeling my problem occurred because they fixed this very issue.
However there is an alternative -- not having an internal buffer at all, and instead pulling directly from the pipe only when there is a valid output location.
computeraddict
Filter Inserter
Filter Inserter
Posts: 331
Joined: Sat Oct 07, 2023 6:44 am
Contact:

Re: [2.0.28] Pump not respecting "set filters" signal, internal buffer still loading into fluid wagons

Post by computeraddict »

NameLips wrote: Thu Dec 26, 2024 5:52 pm I have a feeling my problem occurred because they fixed this very issue.
However there is an alternative -- not having an internal buffer at all, and instead pulling directly from the pipe only when there is a valid output location.
I'm guessing that there are optimization and/or code simplicity reasons for avoiding this, such as some machines that accept fluid input not having fluid boxes of their own and doing pump-pump chains.
spacedog
Long Handed Inserter
Long Handed Inserter
Posts: 80
Joined: Fri Mar 27, 2020 5:05 am
Contact:

Re: [2.0.28] Pump not respecting "set filters" signal, internal buffer still loading into fluid wagons

Post by spacedog »

computeraddict wrote: Thu Dec 26, 2024 3:25 pm What's the alternative behavior?
One perfectly reasonable option would simply be to discard any fluid in the internal buffer that doesn't match the new filter. It's basically the same thing that happens with crafting machines (and has been confirmed to be by design), just on a much smaller scale.
Post Reply

Return to “Pending”