Handling precise fluid amounts... how?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
adam_bise
Fast Inserter
Fast Inserter
Posts: 102
Joined: Fri Jun 08, 2018 10:42 pm

Re: Handling precise fluid amounts... how?

Post by adam_bise » Thu Sep 13, 2018 1:23 pm

Xtrafresh wrote:
Wed Sep 12, 2018 10:10 pm
adam_bise wrote:
Tue Sep 11, 2018 9:37 pm
IIRC not all of the fluid math is visible in the GUI, I think there are fractions not represented on screen. If so, I don't know how you will achieve such precision, but your end goal may still be achievable.

What are you wanting to end up with? A completely empty supply train for every rocket? Given that fluids may not be absolutely predictable, you might settle for simply topping off a certain number of tanks on each train visit.
That is indeed the goal here, though it's starting to look like a utopia. For example, every 5th train produces two extra RCU's and two extra LDSs because of the production module math. I'm not quite ready to calculate backwards to see how much less of each resource every 35th train should take along as a result :shock:
A few things come to mind:

Perhaps load your excess surplus and send them into outer space along with the rocket.. lol

You could also burn off some fluids with a boiler, or use recursive blueprints to decon your pipes and tanks and completely empty them between trains.

If it were me I would experiment with priming the factory with fluids and then trying to establish a fluid equilibrium using barrels. I don't know what you intend to do with the empty barrels, if you are bringing them back, perhaps figure out how many empty barrels you should introduce into the loop. If you always have some excess fluid, I would figure out how to dispose of them.

It's situations like this where disassembling items would be handy, along with automating BPs without mods.

Xtrafresh
Fast Inserter
Fast Inserter
Posts: 100
Joined: Mon Jun 12, 2017 4:57 pm

Re: Handling precise fluid amounts... how?

Post by Xtrafresh » Fri Sep 14, 2018 7:15 am

adam_bise wrote:
Thu Sep 13, 2018 1:23 pm
A few things come to mind:

Perhaps load your excess surplus and send them into outer space along with the rocket.. lol

You could also burn off some fluids with a boiler, or use recursive blueprints to decon your pipes and tanks and completely empty them between trains.

If it were me I would experiment with priming the factory with fluids and then trying to establish a fluid equilibrium using barrels. I don't know what you intend to do with the empty barrels, if you are bringing them back, perhaps figure out how many empty barrels you should introduce into the loop. If you always have some excess fluid, I would figure out how to dispose of them.

It's situations like this where disassembling items would be handy, along with automating BPs without mods.
Sadly there's no space on the rocket once the satellite is loaded. :lol:

Burning things off in a boiler seems fun too, but even though I'm using quite a few mods, I like to build in such a way that only Nixie Tubes and LTN are needed aside from vanilla. And those two should be vanilla :p

I was indeed planning to go the buffered equilibrium route you describe. The barrels alll get packed back onto the train. Basically, the last wagons in the train will be alternative fluid wagons.

Bauer
Fast Inserter
Fast Inserter
Posts: 132
Joined: Fri May 05, 2017 12:48 pm

Re: Handling precise fluid amounts... how?

Post by Bauer » Fri Sep 14, 2018 9:19 am

Have you tried to NOT use any pumps and/or pipes?
I did a setup in 0.15 with barrell -> assembler (converter) -> assembler (client) that worked pretty predictably.

Xtrafresh
Fast Inserter
Fast Inserter
Posts: 100
Joined: Mon Jun 12, 2017 4:57 pm

Re: Handling precise fluid amounts... how?

Post by Xtrafresh » Fri Sep 14, 2018 3:35 pm

Bauer wrote:
Fri Sep 14, 2018 9:19 am
Have you tried to NOT use any pumps and/or pipes?
I did a setup in 0.15 with barrell -> assembler (converter) -> assembler (client) that worked pretty predictably.
That sounds intriguing... can you show me what that looks like?

DaleStan
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Mon Jul 09, 2018 2:40 am

Re: Handling precise fluid amounts... how?

Post by DaleStan » Fri Sep 14, 2018 3:48 pm

If I'm understanding that option correctly, it will not work for oil refining or cracking, as you can't fit the necessary number of (un)barreling assemblers around a refinery or chemical plant, unless you use pipes.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 1739
Joined: Tue Jun 20, 2017 12:02 am

Re: Handling precise fluid amounts... how?

Post by Jap2.0 » Fri Sep 14, 2018 7:38 pm

It looks like this might be improved somewhat in 0.17.
There are 10 types of people: those who get this joke and those who don't.

Xtrafresh
Fast Inserter
Fast Inserter
Posts: 100
Joined: Mon Jun 12, 2017 4:57 pm

Re: Handling precise fluid amounts... how?

Post by Xtrafresh » Sat Sep 15, 2018 6:13 pm

I'm not sure this will change error handling... but it'll need to be re-tested for sure!

Xtrafresh
Fast Inserter
Fast Inserter
Posts: 100
Joined: Mon Jun 12, 2017 4:57 pm

Re: Handling precise fluid amounts... how?

Post by Xtrafresh » Thu Sep 20, 2018 12:21 am

It looks like my prayers have been answered!

https://mods.factorio.com/mod/CompressedFluids

If I just set the compression rate to 1, this mod won't change anything except for delivering perfect input/output counts between two ends of a pipe. :mrgreen:
I'll still need to use barrels, but rounding errors should be a thing of the past :D

adam_bise
Fast Inserter
Fast Inserter
Posts: 102
Joined: Fri Jun 08, 2018 10:42 pm

Re: Handling precise fluid amounts... how?

Post by adam_bise » Fri Sep 21, 2018 2:30 pm

Xtrafresh wrote:
Thu Sep 20, 2018 12:21 am
It looks like my prayers have been answered!

https://mods.factorio.com/mod/CompressedFluids

If I just set the compression rate to 1, this mod won't change anything except for delivering perfect input/output counts between two ends of a pipe. :mrgreen:
I'll still need to use barrels, but rounding errors should be a thing of the past :D
Good find! That should help immensely!

Xtrafresh
Fast Inserter
Fast Inserter
Posts: 100
Joined: Mon Jun 12, 2017 4:57 pm

Re: Handling precise fluid amounts... how?

Post by Xtrafresh » Mon Sep 24, 2018 2:18 am

Dammit... :(
Image

Back to the drawing board :(

quyxkh
Filter Inserter
Filter Inserter
Posts: 593
Joined: Sun May 08, 2016 9:01 am

Re: Handling precise fluid amounts... how?

Post by quyxkh » Mon Sep 24, 2018 4:33 am

If there's rounding errors going on they're down way, way below 1e-5, I think you're not doing enough priming -- it doesn't take much, but there's going to be a small amount of fluid in the pipes and pumps and tanks. There's less than 5 barrels worth in flight in this one, it got there very fast (it's been hovering around five since just after startup, counting from the time an inserter picks it up to load the unbarreller to the time an inserter picks it up to unload the barreller, half a _million_ cycles ago. On a toy map even my little rig can handle game speed 200).

snap@T17018224=1072x784+1378.25+23,z2.jpg
snap@T17018224=1072x784+1378.25+23,z2.jpg (62.51 KiB) Viewed 247 times

quyxkh
Filter Inserter
Filter Inserter
Posts: 593
Joined: Sun May 08, 2016 9:01 am

Re: Handling precise fluid amounts... how?

Post by quyxkh » Mon Sep 24, 2018 4:44 pm

I have to admit that playing the skeptic and looking at that last example, I didn't find it all that convincing, so I built a better demo. It's a concrete production plant that meters everything that goes in and everything that comes out, and calculates the ingredient ratios and the excess water barrels consumed beyond the expected number (i.e. the number of water barrels that have been picked up but not yet used by delivered products).

The left 'nator on the top row shows the buffered water barrel count, left on the second row shows the total percent ratio of ingredients to production cycles (i.e. bricks should stabilize at 500, barrels at 200: 1 product cycle consumes 5 bricks, 5 is 500% of 1).

With no throttling on the unbarrelling at all the production line carries ~120±~5 barrels, stable across tens of thousands of cycles. This is as expected from a quick estimate of buffer capacities (6 barrels in the assemblers, that's two cycles in the input buffers plus one in process, 2 in each pipe segment, plus the loading inserter's hand and the unbarreller's buffers) but the dead minimum with empty pipes would be 48+whatever the unbarreller needs to keep up, you could probably build circuitry to achieve that?

Attachments
snap@T4739333=2032x848+1448.75+33.75,z2.jpg
snap@T4739333=2032x848+1448.75+33.75,z2.jpg (117.76 KiB) Viewed 227 times

quyxkh
Filter Inserter
Filter Inserter
Posts: 593
Joined: Sun May 08, 2016 9:01 am

Re: Handling precise fluid amounts... how?

Post by quyxkh » Mon Sep 24, 2018 5:19 pm

Last little fillip: this keeps the buffering down to 60 barrels, 48 for the assemblers plus slop in the pipes and unbarreller.

It works by putting a storage tank at the end of the pipeline and unbarrelling while the tank has <500 fluid in it, 500/25000 is 2% so steady state that should keep 2 water in the pipes, 29 pipes is 1.16 barrels plus ten in the tank plus 48 in the assemblers, this looks like a method for calculating the needed buffering exactly.

.

Xtrafresh
Fast Inserter
Fast Inserter
Posts: 100
Joined: Mon Jun 12, 2017 4:57 pm

Re: Handling precise fluid amounts... how?

Post by Xtrafresh » Wed Sep 26, 2018 6:54 pm

Wow, some deep work there, thanks for joining me on this merry chase!
I'll probably keep a few hundred units of each in the buffers that I'll be using, and find a way to limit the exact number of barrels extracted.

Post Reply

Return to “Gameplay Help”