Helmod: Assistant for planning your factory

by Helfima

Assistant for planning your factory. Can calculate required ingredients, products, machines, modules, and beacons. Can also calculate power production / consumption.

Utilities
10 days ago
0.14 - 1.1
373K

b Beacon power consumption is all or nothing -- beacon counts should be rounded up to integers

4 years ago
(updated 4 years ago)

Beacons consume a constant 480 kW at all times, regardless of the usage of associated assemblers. Also partially used assemblers still require a full complement of beacons.

Currently helmod appears to do two things that throw off the beacon count and power calculations:

  • It computes the beacon count by doing assembers / ratio, but it does not round the assembler count up to an integer in this calculation. So if there are 4 assemblers and the ratio is 2/7, but the block only requires "3.01" assemblers, helmod will display 4 assemblers but only 3.01*7/2 = 11 beacons instead of the actual 14 called for by the ratio. This is an issue because unlike most other entities in the game, beacons don't contribute to a "pool" of bonuses; they're based on proximity, so even if you only need 11/14 of the bonus each beacon provides, you still need all 14 beacons.
  • It computes power requirements by doing 480kW * beacons but as with above it does not round the beacon count up first. So if, for example, helmod determines that you need 2.01 beacons, it will display 3 beacons but report the beacon power usage as 2.01*480kW = 965kW instead of the actual value of 1.44MW.

To fix this I suggest two changes:

  1. Round the assembler count up to the next integer when dividing it by the assembler:beacon ratio. This will let helmod honor the entered ratio correctly.
  2. Round the computed beacon count up to the next integer when computing power requirements. This will make the power usage correct for the beacon count.

Note that for #2 the implication is that two separate rounding steps are done, i.e.

⌈ ⌈ assemblers βŒ‰ / ratio βŒ‰ * 480

Is correct, while:

⌈ assemblers / ratio βŒ‰ * 480

Is not.

Helmod 0.9.33.

4 years ago
(updated 4 years ago)

It's not a bug
the rounded values is only displayed values not use in the calculation.

4 years ago
(updated 4 years ago)

No I know. That's the problem. :)

I'm saying the rounded values need to be used in the calculations, too:

The beacon count should be computed from the rounded assembler count. Currently it is not.

Then, the beacon power total should be computed from the rounded beacon count. Currently, it also is not.

4 years ago

if you compute on the rounded value the result it's totaly wrong
if you mix calculation with exact value and rounded it's crasy to understand the result
in your sample you want calculation with a specified number machine
a sample
recipe A machine = 0.1
recipe B machine = 0.2
recipe C machine = 0.3
result with rounded values display:
recipe A machine = 1
recipe B machine = 1
recipe C machine = 1
result with rounded values calculation:
recipe A machine = 1
recipe B machine = 2
recipe C machine = 3

New response