Max Rate Calculator


Calculates maximum consumption/production rates of assemblers, plants, etc. Current version 200.0.49 supports Space Age but NOT anything to do with Quality - that's on the way. Also, idle Recyclers present 0.0 for each product quantity. Active recyclers are ok.

Utilities
5 months ago
0.15 - 2.0
143K

i Handling very high crafting speeds

4 years ago

I think this might have popped up in a previous bug thread about improper rate calculations vs actual rates.

The effective productivity of a machine increases when the machine exceeds the 60 tick limit for crafting recipes, i.e. crafting speed > recipe time * 60.

For example, I'm playing with Krastorio 2 crafting recipe is 0.5s 1x copper plate -> 2x copper wire. My assembling machine has crafting speed 58.25 and productivity +40%. This mod calculates the theoretical rates, 116.5 input 326.2 output. However, this exceeds the tick limit of 60 recipe crafts per second. The actual input of copper plate is 60/s since each craft uses 1 plate x tick limit. But, the actual output rate is not 60 * 2 wire * 1.4 productivity per second.

I did some tests using numbers from the production stats panel and came up with a formula.

actual productivity = crafting speed / recipe time / 60 * productivity
- 60 is from the tick limit.

So for my example, actual productivity = 58.25 / 0.5 / 60 * 0.4 = ~0.7767
Then the actual output = 60 * recipe output amount * (1 + actual productivity) = 60 * 2 * (1 + 0.7767) = 213.2/s copper wire

Note that I did not test this formula extensively. I tested, using creative mod to avoid input and output limits, on two recipes copper wire and sulfuric acid.

4 years ago

I'll look into it. My test runs often use copper wire assemblers with lots of speed beacons - the challenge is running enough inserters to keep it fed, and the numbers have seemed to match the production charts. But, as I say, I'll look into it with the Kras2 recipes.

4 years ago
(updated 4 years ago)

I've reproduced your set up and are seeing the numbers you are. I hadn't ever tested the limits with those large Kras2 assemblers. Thanks for pointing it out!

I've got my calculations corrected for this, but want to run some tests before I release. Should be soon.

It looks like the extra high speed bonus applies to what the prod modules do, but the base amount is sped up by no more than 60.

Where I wound up:

    local ideal_rate = crafting_speed / crafting_time
    local game_limited_rate  = math.min(ideal_rate, 60)

-- input: local amount = ingred.amount * game_limited_rate

-- output: amount = amount * game_limited_rate + (amount - catalyst_amount) * productivity * ideal_rate

4 years ago

Yes without productivity modules the extra speed does nothing.

Kudos for getting on this so quickly I look forward to the update :)

4 years ago

See version 3.4.45

New response