Filters in Fluid Wagons & Pumps

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
User avatar
Gergely
Filter Inserter
Filter Inserter
Posts: 596
Joined: Sun Apr 10, 2016 8:31 pm
Contact:

Filters in Fluid Wagons & Pumps

Post by Gergely »

The ability to set up filtering in Fluid Wagons (Per tank) and Pumps.
Why?
-Trains need filtering. That is why the Cargo Wagons have filters. If you are building a rail world where you probably have millions of trains running, the Train identification system in the circuit network just doesn't cut it. You need a general way to tell the difference between an Oil transporter and a Steam supplier train. Especially when they often come to the same stop.
-Pumps are the liquid equivalent of inserters. (Right?) I would rather ask why not? I have tried replicating a filter mechanism with two pumps, three storage tanks, and some circuitry, but I can't find a way to detect liquid that is less than 1 unit in my tanks. My tank keeps showing me less than 0.5 units of water and both pumps are off because circuitry can't detect it.
-Having theese features will finally allow for generic or multipurpose stations that can supply and unload any train.
What?
Filtering on Fluid Wagons. Setting the filters will make pumps that load the wagons only accept the given liquid atop of their own filters.
Filters on Pumps should work like filter inserters. You set a liquid, and that and only that type of liquid can pass through the pump. Other types of liquid simply don't enter the pump. It would also mean it should be possible to set the filters through the circuit network. The same as on inserters.
Extra: Pumps should be able to report the train wagon filters to the circuit network.
Last edited by Gergely on Fri Jul 06, 2018 7:07 pm, edited 4 times in total.

Hedning1390
Fast Inserter
Fast Inserter
Posts: 231
Joined: Fri Jan 05, 2018 8:47 pm
Contact:

Re: Filters in Fluid Wagons & Pumps

Post by Hedning1390 »

In my experience pumps rather tend to overdo whatever they do, so I don't see how you would be left with 0.5 units. However if your tanks have less than 1 unit in them just declare them to be empty and let the train leave for a refill.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Filters in Fluid Wagons & Pumps

Post by bobingabout »

either you're doing it wrong, or there's a bug, because if you have your circuit set to compare fluid > 0, and there's 0.5 in the tank, it should be detecting that there's still fluid in the tank.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

Meddleman
Inserter
Inserter
Posts: 47
Joined: Mon Jun 26, 2017 7:39 pm
Contact:

Re: Filters in Fluid Wagons & Pumps

Post by Meddleman »

I've personally had this problem, and been able to get around this by using an arithmetic & decider combinator to detect if the pump is mathematically empty (IF -> ANYTHING multiplied by 10 is NOT EQUAL to 0) once a train has left the station, and if it this is True (as in not equal to 0), a "relief pump valve" outflows all current pipe contents to a seperate storage tank that functions as a sort of filter since storage tanks accept only one type of liquid at a time. You can directly attach a barrell-filler as they only accept what they are set to barrel. The barrels can then be sorted as required.

This is kiiiinda what I had. (Yes I understand some of it looks weird, I copy pasted a bit around in mspaint, and the sorting logic probably doesnt make sense either, but you get the jist.)
Unbenannt3.jpg
Unbenannt3.jpg (320.13 KiB) Viewed 2602 times
But another way to get around this is to simply check what each train's code is that is expected to stop at that station, and per platform use circuit wires to activate the relevant pumps. Also, never use the same pump to pump different liquids if possible. If this is unavoidable, consider using a pre-bareller at the mining area so you can mix different barrels per cargo-wagon which then can be sorted later.
I was able to use the pumps themselves to decide if the signal code from a stopped train was under a certain value, which meant to activate suction pumps to accept oil from two oil trains. If it was over the value, it had to be the phos-gas train doing a pickup. No other trains stopped at the station.
This I coped for each of the two platforms, but each platform handled its logic seperately. Never mix platform signals together. Demuxing them sucks. Also I used seperate fluid lines for each type of fluid.
This worked because this unique situation had only one phos-gas train and the train codes worked out nicely. The more complicated the numbers, the more deciders you need.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Filters in Fluid Wagons & Pumps

Post by Optera »

Meddleman wrote:I've personally had this problem, and been able to get around this by using an arithmetic & decider combinator to detect if the pump is mathematically empty (IF -> ANYTHING multiplied by 10 is NOT EQUAL to 0)
This can't work since Factorio rounds decimal fluid numbers to integer combinator signals.
No amount of multiplying will bring back precision lost from rounding.

I started a thread a while back about the problematic of detecting empty tanks/wagons due to the mathematically correct rounding, suggesting always rounding up, so 0 means empty in any circumstance. Having Tanks reported as full at 24999.1 instead of 24999.5 would be a neglactable change, but having residue inside tanks and pipes blocking other fluids isn't.

You can see this clearly when comparing train stops fluid values(mathematical rounding) amount against Inventory Sensors fluid values (always rounds up) with a really slow pump and trains set to leave when either of them reports 0 fluid.


Last bumped by Gergely on Fri Jul 06, 2018 7:06 pm.

Post Reply

Return to “Ideas and Suggestions”