KirkMcDonald / kirkmcdonald.github.io

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

Recipe Ratios 1.0 #208

Closed blandau closed 3 years ago

blandau commented 3 years ago

I'm worried that I have this wrong but at the same time I do think there is a problem. I don't know how wide spread this is, but you can see this when looking at the Advanced Circuit recipe.

The ratio of Advanced Circuit assemblers to Copper Wire assemblers is 6:1. As long as the same Assembler type is used for both Advanced Circuit and Copper Wire, this ratio is true.

Math for proof: Advanced Circuit takes 4 copper wire. Advanced Circuit craft time is 6s. Copper wire produces 4 wire every 1s Therefore, over 6s the Copper Wire will produce 24 wire. Six Advanced Circuit assemblers will require 24 copper wire over 6s.

Settings: Assembler 2 Fast belt Steel Furnace

Chosen Recipe - Advanced Circuit Advanced Circuit - Factories: 1, Items/Second: 0.125 0.125 x 6 = 0.75 (the craft speed of the assembler which proves this part is correct)

Copper wire in list shows: 0.4167 Factory, Items/Second 1.25 However, what this should be as proven above is: Items/Second: 0.5000025 (4 wire/s divided by 6s multiplied by craft speed of assembler), Factories: 0.125 (0.75s, craft speed, over 6s)

Proof of correct numbers: Items/Second 0.5000025 x 6 = 3.000015 (or 3), which is 0.75 of 4 or 4 wire/s (0.75 is craft speed of assembler) Factories: 0.125 x 6 = 0.75 (craft speed of the assembler)

If we apply the same multiplication to the current numbers shown, we can see how they are incorrect for Copper Wire: Items/Second: 1.25 x 6 = 7.5, not 3 Factories: 0.4167 x 6 = 2.5 factories, not 0.75

DRY411S commented 3 years ago

My guess is that this is almost exactly the same as issue #206

The copper wire calculation includes what's required to make the green circuits that are ingredients into the red circuits. Click on the green circuit icon to exclude them from the calculation, and watch the copper wire assemblers magically change into what you expect them to be. 0.16667 (1/6th copper wire to 1 red circuit maker).

blandau commented 3 years ago

Whoops....you're correct. I forgot that what is shown is an aggregated recipe list.

DRY411S commented 3 years ago

It's a very powerful feature to turn off the 'dpendency' ingredient calculations, that's not obvious in the UI. Similarly the orange 'pop out' link on the right to see a breakdown for every ingredient.