[16.12] Circuit deactivated pump operates briefly when input fluid empties/changes

Bugs that are actually features.
Sylv4n
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Dec 21, 2017 10:56 pm
Contact:

[16.12] Circuit deactivated pump operates briefly when input fluid empties/changes

Post by Sylv4n »

There are no mods involved in this issue.

Bit of random preamble:
I was looking at reddit and saw an issue that someone was having trying to sort liquids:
https://www.reddit.com/r/factorio/comme ... g_liquids/
so I figured I would see if I could find a solution to it, however when trying to find a solution I noticed that one of the tanks I was going to sort liquid in was getting contaminated, I have managed to on a new map re-create this issue.


The Setup:
I am unloading two separate fluids into one station.
These are unloaded from the train into a fluid tank (AKA "Filter Tank" on images)
- this filter tank has three pumps that are emptying the liquid, all pumps are connected to the tank and have conditions set when to work:
- Pump 1 - Oil Filter = set to run if the tank has crude oil > 0 in
- Pump 2 - Water Filter = set to run if the tank has water > 0 in
- Pump 3 - Not in use = this is the one I spotted got contaminated before I started using it, in the attached example if it set to activate if F=50, which will never happen, I originally had other conditions however since it doesn't seem to matter what it is I thought I would make it obvious.
01- Image showing setup of pumps
01- Image showing setup of pumps
Factorio-PumpIssue1.jpg (1.36 MiB) Viewed 2635 times
Interestingly I was easily able to re-create the issue that is present on the pump facing EAST (Pump 3) on the pump facing SOUTH (Pump 2), but I wasn't able to make it happen on the WEST (Pump 1)

The Problem:
This system works great until I start unloading an Oil train while there is still water in the filter tank. (save attached at this point)
02 - Oil train arrives when water is still in the tank
02 - Oil train arrives when water is still in the tank
Factorio-PumpIssue2.jpg (1.34 MiB) Viewed 2635 times
Now as expected the water needs to empty before the oil can unload (I made it a bit quicker by adding tanks, but the result is the same if you wait). However it seems to move some water 0.x (where x is a low but variable number I have seen 0.0 to 0.9 water in the tank) amount is now in the tank passed Pump 3 (which was never active)
03 - Image showing water has moved
03 - Image showing water has moved
Factorio-PumpIssue3.jpg (1.37 MiB) Viewed 2635 times
Before reporting this I did check to see if it was already reported, and this may well be the same issue as:
Liquids from removed pipes/tanks could pass disabled pumps
viewtopic.php?f=29&t=48099&p=278155&hil ... mp#p278155
However since I was not removing any entities I figured it was different.
Attachments
FluidPump-Bug.zip
Save file, taken at point of image 02
(3.49 MiB) Downloaded 99 times

Sylv4n
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Dec 21, 2017 10:56 pm
Contact:

Re: [16.12] Circuit controlled pump leaking liquid

Post by Sylv4n »

after a bit more investigation this may end up in the 1/0 Magic sub section 8-), its just one of the oddities of the fluid mechanics.

I have not seen it move a value >= 1 into the other tank.
I have noticed that if I move the oil train out of the station in the previous save, then the water pump finishes and there is still <1 water in the tank (the oil isn't pushing it to the closest free tank)
screenshots

Loewchen
Global Moderator
Global Moderator
Posts: 8969
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [16.12] Circuit controlled pump leaking liquid

Post by Loewchen »

I can confirm the pump behaviour of the original report, it seems the pump operates for one tick when the input tank swaps content.

Zavian
Smart Inserter
Smart Inserter
Posts: 1646
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: [16.12] Circuit deactivated pump operates briefly when input fluid empties/changes

Post by Zavian »

The circuit network operates on integer values. That works fine for things like plates, but this can be problematic for fluids. Related suggestion viewtopic.php?f=6&t=49274.

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

Re: [16.12] Circuit deactivated pump operates briefly when input fluid empties/changes

Post by kovarex »

I believe that this is actually not a bug.
Every step in circuit network delays the signal by one tick, so the pump will be always active one tick after it doesn't have the original signal anymore.
It has several kind of workarounds.

Also, we might consider to add filters to the pump which would make these kind of things more straightforward.

Post Reply

Return to “Not a bug”