[2.0.21] Foundry at high speeds is fluid output bound

Things that has been reported already before.
nctdev
Burner Inserter
Burner Inserter
Posts: 19
Joined: Tue Sep 03, 2019 6:30 pm
Contact:

[2.0.21] Foundry at high speeds is fluid output bound

Post by nctdev »

I'm trying to extract 480 stone/s (2 saturated belts) from a foundry that is producing 516/s. No matter the setup I use, I cannot get over 450 stone/s from one foundry.

This is the test setup:
Image
Blueprint:

It should make 516 stone + 8613 molten copper per second from 6891 lava.
It makes 450 stone + 7500 molten copper per second from 6000 lava.

The foundry just gets stuck every so often, because its fluid capacity is too low:
Image
It gets stuck when craft + productivity bars are about to reach 100% at the same time too.
It is not the inserter delay, because setup like this also cant produce over 450 stone/s:
Image

With production rates so high I would expect the machine inventory size to be much higher.

It also seems impossible to use machines at 6000 fluid/s per input/output - highest I could achieve was 4500 for single and 7500 for double i/o - straight to/from infinity pipes. Adding storage tanks in between also didnt help.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14817
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.21] Foundry inventory size causes flickering production

Post by Rseding91 »

This looks like the fluid output is backed up, not the stone output, which means you just need to extract it faster - with a pump.
If you want to get ahold of me I'm almost always on Discord.
nctdev
Burner Inserter
Burner Inserter
Posts: 19
Joined: Tue Sep 03, 2019 6:30 pm
Contact:

Re: [2.0.21] Foundry inventory size causes flickering production

Post by nctdev »

Yes the fluid is backed up. Is it expected that foundry cannot hold even 2 cycles worth of craft materials?

Using pumps, like this?
Image
Setup above also caps at 450 stone/s because of fuild internal buffer. Attaching a pump directly to output hard caps its throughput at 3k from available 6k.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14817
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.21] Foundry inventory size causes flickering production

Post by Rseding91 »

No, pumping directly from the output of the machine.
If you want to get ahold of me I'm almost always on Discord.
MechBFP
Long Handed Inserter
Long Handed Inserter
Posts: 68
Joined: Sun Nov 03, 2024 4:02 am
Contact:

Re: [2.0.21] Foundry inventory size causes flickering production

Post by MechBFP »

Rseding91 wrote: Mon Dec 02, 2024 1:08 pm No, pumping directly from the output of the machine.
Why would you want to connect a pump directly to the output when pipes have way higher throughput in the new fluid model?
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 620
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: [2.0.21] Foundry inventory size causes flickering production

Post by Hares »

MechBFP wrote: Mon Dec 02, 2024 1:21 pm Why would you want to connect a pump directly to the output when pipes have way higher throughput in the new fluid model?
1200 u/s [pump throughout] × 2.5 [legendary quality] × 2 [# of pumps] = 6k < 8.5k

It looks impossible to get the max output from this foundry with just pumps to the output.
warbaque
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sun Apr 05, 2020 1:34 pm
Contact:

Re: [2.0.21] Foundry inventory size causes flickering production

Post by warbaque »

With molten metals from ores, bonus production tick stops foundry for a tick.

1000 molten metal produced during single tick and 100+ metal still in buffer, foundry has to stop for a tick empty buffers.

After ~5000 fluid per second foundry can no longer empty its buffers fast enough:

+1220%, 5156/s, no pauses
+1237%, 5223/s, you lose 1 tick out of 30 -> effective output = 5049/s
+1253%, 5285/s, no pauses
+1270%, 5352/s, no pauses
+1304%, 5484/s, you lose 1 tick out of 29 -> effective output = 5295/s
+1338%, 5617/s, you lose 1 tick out of 28 -> effective output = 5416/s
+1471%, 6137/s, you lose 1 tick out of 26 -> effective output = 5900/s
+1593%, 6613/s, you lose 1 tick out of 24 -> effective output = 6337/s
+2440%, 9922/s, you lose 4 tick out of 20 -> effective output = 7938/s

It's annoying that foundry keeps turning off for 1 tick every now and then, especially since max fluid throughput isn't documented well anywhere.

edit: I was able to get 1 extra tick production by adding more pumps.
+2440%, 9922/s, you lose 3 tick out of 20 -> effective output = 8434/s

Actual output fluctuates a lot from tick to tick (50/t to 160/t), limited by fullness ratio.
Darain
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Oct 22, 2024 11:47 am
Contact:

Re: [2.0.21] Foundry inventory size causes flickering production

Post by Darain »

warbaque wrote: Wed Dec 04, 2024 6:55 am With molten metals from ores, bonus production tick stops foundry for a tick.

1000 molten metal produced during single tick and 100+ metal still in buffer, foundry has to stop for a tick empty buffers.

After ~5000 fluid per second foundry can no longer empty its buffers fast enough:

+1220%, 5156/s, no pauses
+1237%, 5223/s, you lose 1 tick out of 30 -> effective output = 5049/s
+1253%, 5285/s, no pauses
+1270%, 5352/s, no pauses
+1304%, 5484/s, you lose 1 tick out of 29 -> effective output = 5295/s
+1338%, 5617/s, you lose 1 tick out of 28 -> effective output = 5416/s
+1471%, 6137/s, you lose 1 tick out of 26 -> effective output = 5900/s
+1593%, 6613/s, you lose 1 tick out of 24 -> effective output = 6337/s
+2440%, 9922/s, you lose 4 tick out of 20 -> effective output = 7938/s

It's annoying that foundry keeps turning off for 1 tick every now and then, especially since max fluid throughput isn't documented well anywhere.

edit: I was able to get 1 extra tick production by adding more pumps.
+2440%, 9922/s, you lose 3 tick out of 20 -> effective output = 8434/s

Actual output fluctuates a lot from tick to tick (50/t to 160/t), limited by fullness ratio.
Are you able to share some of your solutions to extracting a higher effective output? I tried using pumps directly into storage tanks, even legendary pumps, but it was somehow worse than without a pump+storage tank solution, just underground pipes to my LDS machines.

I could, in theory, just add 1 more foundry. But it's really annoying that calculator/solver suggests that I only need the machine running 90% of the time to output 356k molten copper per minute, and I am just short, at around 353k per minute, and to solve it by overkilling with one whole extra machine and more real estate
robot256
Smart Inserter
Smart Inserter
Posts: 1043
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: [2.0.21] Foundry inventory size causes flickering production

Post by robot256 »

Pumps have been nerfed to 1200/sec so almost always slow down flow now. Try adding just tanks to the pipes between factories, because the flow rate is fastest when the connected pipe network is mostly empty. Adding tanks will increase the amount of fluid you can buffer without getting close to the full state.
warbaque
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sun Apr 05, 2020 1:34 pm
Contact:

Re: [2.0.21] Foundry inventory size causes flickering production

Post by warbaque »

Darain wrote: Sat Dec 14, 2024 9:41 am Are you able to share some of your solutions to extracting a higher effective output? I tried using pumps directly into storage tanks, even legendary pumps, but it was somehow worse than without a pump+storage tank solution, just underground pipes to my LDS machines.

I could, in theory, just add 1 more foundry. But it's really annoying that calculator/solver suggests that I only need the machine running 90% of the time to output 356k molten copper per minute, and I am just short, at around 353k per minute, and to solve it by overkilling with one whole extra machine and more real estate
I did some more tests and my initial effective output estimates were wrong.

e.g. iron ore -> molten
theoretical max production = 9921.875/s (=500 * 2.5 / 32 * 254)

effective output is not (max production) * (active ticks) / (total ticks), but (production) * (production cycles) / (total ticks)

Here's a minimal setup:



19 tick loop, where there is
  • 2 production cycles
  • 3 bonus production cycles
  • 3 ticks (1+2) where output is full
-> total production
= 7894/s (=500 * 5 / 19 * 60)
or
= 131.579 per tick

And then we can measure output by reading machine output:



With 9 pumps (quality doesn't matter) I can get 7894/s

normal quality pumps:
  • 1: 1200/s
  • 2: 2400/s
  • 3: 3600/s
  • 4: 4800/s
  • 5: 6000/s
  • 6: 7200/s
  • 7: 7692/s
  • 8: 7692/s
  • 9: 7894/s
legendary pumps:
  • 1: 3000/s
  • 2: 6000/s
  • 3: 7031/s
  • 4: 7142/s
  • 5: 7500/s
  • 6: 7500/s
  • 7: 7692/s
  • 8: 7692/s
  • 9: 7894/s
warbaque
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sun Apr 05, 2020 1:34 pm
Contact:

Re: [2.0.21] Foundry inventory size causes flickering production

Post by warbaque »

I improved tester circuitry to just measure production ticks.




12-16-2024, 04-33-07.png
12-16-2024, 04-33-07.png (21.16 KiB) Viewed 1248 times
evanrinehart
Inserter
Inserter
Posts: 38
Joined: Fri Jul 31, 2020 11:16 pm
Contact:

Re: [2.0.21] Foundry at high speeds is fluid output bound

Post by evanrinehart »

The foundry output buffer is 1000 and the recipe adds 500 each time. Then even with a totally empty output pipe, the molten iron empties at 100 per tick reduced by the fullness factor of the output buffer. This is slow enough that eventually the buffer is over 500 when a craft completes, stalling the machine.

It's not obvious increasing the buffer would fix it.

Taking out the output fullness factor would allow output up to 100 fluid per tick per pipe connection, in this case 12k/s.

But somewhere I saw they are experimenting with a different tweak to the factor. I hope nothing drastic changes to the new fluid system because I really like it.
Darain
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Oct 22, 2024 11:47 am
Contact:

Re: [2.0.21] Foundry at high speeds is fluid output bound

Post by Darain »

evanrinehart wrote: Mon Dec 16, 2024 9:54 pm The foundry output buffer is 1000 and the recipe adds 500 each time. Then even with a totally empty output pipe, the molten iron empties at 100 per tick reduced by the fullness factor of the output buffer. This is slow enough that eventually the buffer is over 500 when a craft completes, stalling the machine.

It's not obvious increasing the buffer would fix it.

Taking out the output fullness factor would allow output up to 100 fluid per tick per pipe connection, in this case 12k/s.

But somewhere I saw they are experimenting with a different tweak to the factor. I hope nothing drastic changes to the new fluid system because I really like it.
This whole fullness factor is probably the thing that stumps me the most - if, in theory, I am consuming more, the fullness factor should be lower for the same molten copper production settings, yes? And yet, in my own real world observations, adding more LDS machines did not improve molten copper throughput. I was still "hard stuck" on somewhere around 346k molten copper per minute, on a single foundry with Q5 Prod 3s, and 6-beaconed with Q5 Speed 3s. On paper FLabs suggested 360k, and even adding more beacons did nothing to improve the situation. Strangely, doing it in a test world to an infinity pipe that was always empty, adding beacon(s) seemed to push that one foundry to the target 360k molten copper / minute.

I have since opted to not push my foundries that much to the limit, much to my annoyance as that means more productivity modules that are really troublesome to obtain. But that's just how it is for the time being. I think I will reduce the quality of the prod3s too, as I don't need it to be the best possible, if I am splitting the workload over more machines.
warbaque
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sun Apr 05, 2020 1:34 pm
Contact:

Re: [2.0.21] Foundry inventory size causes flickering production

Post by warbaque »

Rseding91 wrote: Mon Dec 02, 2024 1:08 pm No, pumping directly from the output of the machine.
I did a bit more testing and for example if you want to boost chem plant output to 8653 fluid per second from 8645, you just need to add 135 pumps (for a total of 201) :lol:

Funnily, if I output directly to turbines, I also need 201 turbines to consume all that steam...
Darain wrote: Sat Dec 14, 2024 9:41 am Are you able to share some of your solutions to extracting a higher effective output?
Darain wrote: Tue Dec 17, 2024 8:58 am Strangely, doing it in a test world to an infinity pipe that was always empty, adding beacon(s) seemed to push that one foundry to the target 360k molten copper / minute.
These were the best I was able to get

e.g.
- molten iron/copper from lava with 7 output pumps = 7500/s (450000/min)
- molten iron/copper from ore with 9 output pumps = 7894/s (473640/min)
12-16-2024, 22-53-09.png
12-16-2024, 22-53-09.png (1.37 MiB) Viewed 1026 times
12-16-2024, 22-53-21.png
12-16-2024, 22-53-21.png (1.15 MiB) Viewed 1026 times
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 632
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [2.0.21] Foundry at high speeds is fluid output bound

Post by raiguard »

Duplicate of 118644.

This is a side effect of the fluid transfer rate being restricted based on the fullness of the source and sink. I have some ideas on how to fix it but they likely won't be implemented until 2.1.
Don't forget, you're here forever.
warbaque
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sun Apr 05, 2020 1:34 pm
Contact:

Re: [2.0.21] Foundry at high speeds is fluid output bound

Post by warbaque »

raiguard wrote: Wed Dec 18, 2024 11:18 pm Duplicate of 118644.

This is a side effect of the fluid transfer rate being restricted based on the fullness of the source and sink. I have some ideas on how to fix it but they likely won't be implemented until 2.1.
Yeah, there are some quirks with the new fluid system, but it's still a big improvement over the old version :D

Is there some open discussion concerning algorithm improvements somewhere? I have some ideas that could be helpful (mostly inspired from modded minecraft or from other simulation approximations I've done). After all, what we want is simple, intuitive and computationally efficient system.
Trific
Fast Inserter
Fast Inserter
Posts: 156
Joined: Thu Dec 31, 2020 7:57 pm
Contact:

Re: [2.0.21] Foundry at high speeds is fluid output bound

Post by Trific »

evanrinehart wrote: Mon Dec 16, 2024 9:54 pm The foundry output buffer is 1000 and the recipe adds 500 each time. Then even with a totally empty output pipe, the molten iron empties at 100 per tick reduced by the fullness factor of the output buffer. This is slow enough that eventually the buffer is over 500 when a craft completes, stalling the machine.

It's not obvious increasing the buffer would fix it.
It would improve it. Right now the buffer has to drop to less than half full for a craft to complete. When it is half full, each outlet empties at half (50/tick) the amount it empties when it is full (100/tick). If the output buffer is increased to 2000, then it has to drop to 1500 to accept a new craft, and at that point, it is still pushing 3/4 of its capacity, resulting in significant overall output. Double it again, and you're now looking at it pushing 7/8's of its rated capacity while it still has sufficient room to accept a new craft. That would likely at least come close to allowing a foundry to push it's max production.
evanrinehart
Inserter
Inserter
Posts: 38
Joined: Fri Jul 31, 2020 11:16 pm
Contact:

Re: [2.0.21] Foundry at high speeds is fluid output bound

Post by evanrinehart »

I would believe there would be some increase in performance for the foundry (and chemical plant doing steam condensation, maybe others) but unless you can get 100% of the way to the theoretical rate predicted by calculators, people will still be posting "duplicate" complaints into the future at the cost of 2x or 4x more buffering.

Maybe with a genius enough change to the transfer formula you could get 100% predicted performance with even less buffer than we already have :lol:
Locked

Return to “Duplicates”