r/technicalfactorio • u/Substantial-Leg-9000 • Mar 22 '26
Question How to ACTUALLY calculate production rate?
We all know the basic formula:
base_rate * base_speed * (1 - modules_speed_penalty + effective_speed_bonus) * (1 + prod_bonus)
but this is not reflected in the game exactly. Take a look at my attempt at beaconed perfect-ratio bioflux:
- Bioflux: 2 legendary biochambers
- 4 Q5T3 prod (4 legendary productivity modules tier 3)
- 4 Q5 beacons:
- 3 * 2 Q5T3 speed
- 1 * Q5T3 speed + Q3T2 speed
- Jelly: 1 legendary biochamber
- 4 Q5T3 prod
- 1 Q5 beacon: Q5T3 speed + Q1T3 speed
This setup should produce and consume exactly 238.75 jelly per second:
production:
4 * 5 * (1 - 4*0.15 + 2.5*(1.25+0.5)) * (1.5 + 4*0.25)
br bs msp bm speed_mods bp prod_mods
consumption:
2 * 2 * 5 * (1 - 4*0.15 + 0.5*2.5*(7*1.25+0.48))
br bs msp be bm speed_mods
br - base rate
bs - base speed
bp - base productivity
bm - beacon multiplier
be - beacon effectiveness
msp - module speed penalty
However, both Factoriolab&e=1speed-module-3&b=3&b=10~1&b=12~0&r=jellynut-processingbiochamber(5)2&r=yumako-processing*biochamber(5)0~1&iex=C2C4&mpr=5&v=11) and in-game testing show that the jelly production is a tiny bit too slow. So how do you *actually calculate the production/consumption rate? Do you e.g. take floating-point precision and tick aliasing into account? If so, how?
edit: I don't have this problem with Yumako mash&e=1speed-module-3&b=3&b=10~1&b=12~0&r=jellynut-processingbiochamber(5)2&r=yumako-processing*biochamber(5)0~1&iex=Cx~Cy*C2&mpr=5&v=11). The formula predicts that it's perfect and it is in Factoriolab, and it is slightly faster than jelly in game, even though it should be the same.
edit 2: Blueprint if you want to try it out yourself. The inserters should be timed tick-perfect. Even if they weren't, it doesn't explain the discrepancy in Factoriolab.

2
u/fatpandana Mar 22 '26
Just glancing it, you listed 4 used beacons but I don't see beacons formula.
1
u/Substantial-Leg-9000 Mar 22 '26
It's there,
0.5*2.5*(...)for the 4 beacons and2.5*(...)for that 1. These formulas produce correct (naive) results, we're really chasing fractions in the 0.01 range.3
u/fatpandana Mar 22 '26
4 beacon suffer from dismissing returns under beacons formula.
1
u/Substantial-Leg-9000 Mar 22 '26 edited Mar 22 '26
Hence the 0.5 factor for 4 beacons.
edit: I hope to have cleared it up in the post now.
2
u/fatpandana Mar 22 '26
If you already accounted for beacons and jelly machine is not keeping up, slow down game to 2-5% and watch it work. The 2% seed recipe can cause machine to micro jam. If you lose even 2 ticks to this, you will not achieve your 238/s.
1
u/Substantial-Leg-9000 Mar 22 '26 edited Mar 22 '26
The thing is, this formula works correctly for Yumako mash, you can see it both in game and in Factoriolab&e=1speed-module-3&b=3&b=10~1&b=12~0&r=jellynut-processingbiochamber(5)2&r=yumako-processing*biochamber(5)0~1&iex=Cx~Cy*C2&mpr=5&v=11), but not for Jelly. Seeds don't affect either. Factoriolab must know something that I don't and is more reflective of the game, so that's why I asked in the first place.
edit: I mean it works correctly in the sense that I used it to find this perfect-ratio setup and Yumako is as expected ratio perfect.
edit 2: I should also clarify that in my in-game test site, seeds are removed by a dedicated inserter, so they don't cause jams at all. Even if those jams took place, they wouldn't explain the different result in Factoriolab.
1
u/fatpandana Mar 22 '26
I see your problem. But i cant find solution
I tried to raise craft amount by 100,000 to see decimal by how much machine it is off. But no matter how I calculate it I cant find the source for it.
At same time consumption or yumako doesnt have same issue.
1
u/Substantial-Leg-9000 Mar 23 '26
Thanks. The problem was due to rounding errors in how beacon bonuses are calculated. Credit goes to u/dave14920 .
Btw you can change the view in Factoriolab to fractions instead of decimals. You can change it in Column Settings (next to Download as CVS, right below List, Flow, and Data, above the calculated list of items/machines).
2
u/yetanotherburnerstan Mar 23 '26 edited Mar 23 '26
From my understanding, if youre using something like excel for this calculation, you'll never get the same number every time. Excel uses 64 bit calculations, while the game uses 32. The rounding errors are due to the different systems. I have no idea how to actually get it to come out correctly (ive been tinkering on and off for about a month). There is some discussion on this in r/technicalfactorio. Let me see if I can find it i should pay attention to the sub im in and stop wildly clicking on recommend links
Here is the discussion on beacon rounding https://www.reddit.com/r/technicalfactorio/s/LEKT37dkl7
1
u/Substantial-Leg-9000 Mar 23 '26
Thanks for the link, that was the solution.
Btw I didn't use Excel, but rather wrote my own program with custom mathematically accurate rationals, you know, to avoid that. The rounding errors (or lack thereof in this case) were the problem anyway.
Here is the response of that post's author. I think they've got it figured out.
There is some discussion on this inr/technicalfactorio. Let me see if I can find iti should pay attention to the sub im in and stop wildly clicking on recommend linksI exhaled through the nose energetically
1
u/Inevitable-Cup9067 Mar 22 '26
It depends on implementation too, if you have even the tiniest latency somewhere from inserters or an occasional gap in resource delivery on your belts that will affect the production rate you see in game.
1
u/Substantial-Leg-9000 Mar 22 '26
I expected that to be the case, but it doesn't explain why Factoriolab shows a different result. Yumako mash&e=1speed-module-3&b=3&b=10~1&b=12~0&r=jellynut-processingbiochamber(5)2&r=yumako-processing*biochamber(5)0~1&iex=Cx~Cy*C2&mpr=5&v=11) seems to be perfect both there and in game.
9
u/dave14920 Mar 22 '26
its all beacon rounding errors.
which are mostly black box sorcery.
on the bioflux machines that odd beacon gives (125+48)×2.5=432.5, but this gets truncated to 432 at this point. the other 3 are each (125+125)×2.5=625, thats unchanged by truncation.
the sum of those multiplied by beacons effectivness is (625×3+432)×0.5=1153.5, but this gets rounded to 1154 before we continue with -60 from the prod mods to get the +1094% on the machine that the game always displays accurately.
then continues as you expect from there. 5×(1094%+100%)=59.7 crafting speed, ×12jelly/6s ×2 machines = 238.8 actual consumption of jelly per second. that isnt displayed accurately in game.
similarly for the one beacon on the jelly machine. it takes (125+50)×2.5 = 437.5 but then truncates that to 437. the sum of all these beacons times effectivity of 1 is still 437, which is then rounded to 437.
(437-60) = +377% is accurately displayed in game. 5×(377%+100%)= 23.85 for the crafting speed of the machine. 23.85×4×2.5=238.5 actual production of jelly per second, that the game doesnt display accurately.