KirkMcDonald / kirkmcdonald.github.io

Simple web-based calculator for the game Factorio.
Apache License 2.0
540 stars 148 forks source link

Add beacon power consumption #184

Open dfht684 opened 4 years ago

dfht684 commented 4 years ago

The power consumption calculates module usage and considers even mining power usage if calculating iron plate smelting. Strangely, it doesn't account for the individual beacons used for the external speed module boost. This detail is significant - consider smelting for 1 electric furnace in a typical beacon row setup (8 beacons, 16 speed 3 modules total) with 2 productivity 3 modules:

That said, I'm not too sure how to programatically handle shared beacons within a row and across rows since the more rows you place next to one another, the efficiency improves.

For 45 metal plates/s (nearest rounding):

200 metal plates/s (nearest rounding, roughly 1 blue belt of steel)

DidierLoiseau commented 4 years ago

This could take into account the number of belts produced, since you would typically have 1 row per belt or per 2 belts produced (make this configurable per item type?). This would give the number of rows R.

Let F be the number of factories, and M the number of modules in the beacons.

For M = 16, you can often achieve 1 beacon per factory (so F beacons) + 3 at the end of each row (3R beacons) + an additional row of beacons for the last row (so 3 + F/R additional beacons). That's thus 3 + 3R + F + F/R beacons in total.

For M = 24, I think (not used to this setup) you generally need 5 (resp. 4 if you manage only 3 tiles between factories in a given row) beacons per factory (resp. 5F or 4F) + 3 at the end of each row (3R) + an additional row of 3 (resp. 2) beacons per factory in the last row + 1 to close the last corner (resp. 3F/R + 1 or 2F/R + 1). This gives 1 + 3R + 5F + 3F/R (resp. 1 + 3R + 4F + 2F/R) in total.

I have also seen M = 20, but I'll let that exercise to the reader. I suppose other setups are almost never used, except for factories that are not 3×3 (and mods, I assume).

If the calculator could already handle those configurations it would be nice. I think it would be good to do it in a separate column with a subtotal just for beacons.