KirkMcDonald / kirkmcdonald.github.io

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

Vanilla Expensive Advanced Oil Processing, Fluid Consumption #204

Closed MarcoMue closed 4 years ago

MarcoMue commented 4 years ago

image

This shows that i would consume a lot more Fluids then i actually do.

image image

DRY411S commented 4 years ago

FYI, the results are identical in Vanilla Normal Mode, since none of the oil and plastic recipes are different in expensive mode.

This isn't a bug in my opinion. The issue here is that the calculator is showing what non-integer refineries and crackers need to produce. But you cannot build non-integer refineries and crackers.

Plastic makers with 5 beacons (10 modules) have a craft speed of 3.05. They each require 61 gas per second. For 16 plastic makers, that's 976 gas per second, 58560 gas per minute). [As shown by the calculator, and being consumed in the game, in your screenshots].

However, you cannot build 3.9 refineries. I assume that you have built 4. That extra 0.1 refinery will be producing additional gas, which means that less of the heavy and light needs to be cracked into gas. Therefore less heavy and light is being consumed in game than the calculator shows.

I presume (but haven't done the maths), that this then has a knock on-effect on the amount of crude per minute being consumed. The 3.9 refineries will be running 100% of the time, consuming the amount of crude that the calculator suggests. But the 4 refineries will not be running 100% of the time due to the additional gas being produced. (4 refineries at that speed will be producing over 1,000 gas per second (including cracking). Your plastic makers will consume less than that, so the refineries won't run all the time.) You can see this from the fluids produced in game screenshot. The amount produced of light and heavy is also less than the calculator.

MarcoMue commented 4 years ago

I am using 0.1 (2.5%) more refineries but im using 7k (22%) less crude oil. This is no rounding error. And if i get the exact raw output but using a different input this seems like a bug.

DRY411S commented 4 years ago

I am using 0.1 (2.5%) more refineries but im using 7k (22%) less crude oil. This is no rounding error. And if i get the exact raw output but using a different input this seems like a bug.

It's not a bug. Now I HAVE done the maths.

The 3.9 refineries claimed by the calculator (with the beacons) run at 8.55 speed. So they could consume 40,014 crude per minute but the calculator claims that they need only 39,128.038.

So the refineries required is actually 3.9*39128.038/40014 = 3.813648928. You can see this by changing the precision of the kirkmcdonald output (see the link at the bottom).

3.813648928 refineries at 8.55 speed consumes 3.8136489288.5520*60 crude per minute: 39128.038 (exactly what the calculator says):

Because of the 30% productivity bonus the refineries produce (per second):

Light Heavy Gas
381.50 211.94 466.28

The crackers run at 6.55 speed. Including the 30% productivity bonus, the heavy to light crackers convert the 211.94 heavy per second, and produces (per second):

Light

206.64

The light to gas crackers now have 206.64+381.50 ligt per second to crack. They run at 6.55 speed and achieve a 30% bonus. This translates into gas (per second) of:

Gas

509.72

Add this to the gas from the refineries 466.28 and you get 976 per second. Or if you prefer 58560 gas per minute from 39,128.038 crude per minute. Which is exactly what the calculator said it would be.

Ergo, it's not a bug. But it isn't realistic. because it doesn't use whole numbers for the refineries and crackers.

That's why, when I use the calculator, I take the number of refineries it suggests, round it up to the nearest integer, and do my own calculations for crackers. In this case I would build 4:2:7 .

Workings out at: https://docs.google.com/spreadsheets/d/1r11aCUfDkluxYNaqKR9D9JxJW-UsPpA8OJ5Nh3hdYpM/edit#gid=2105048551

Calculation for just the gas (no plastic) and increasing the precision to show the refineries and crackers to 2 dp (like my spreadsheet): https://kirkmcdonald.github.io/calc.html#data=1-0-0&cp=3&min=3&mprod=60&dm=p3&db=s3&dbc=16&items=petroleum-gas:r:58560&modules=advanced-oil-processing:;s3:32,heavy-oil-cracking:;s3:24,light-oil-cracking:;s3:24

DRY411S commented 4 years ago

refinery.zip

^^This attached factorio save, is a 4:2:7 oil build, using the same beacons and modules as your kirk calculator. There are 16 chemical plants making plastic, again using the beacons and productivity modules you used in the calculator.

NO fluids are buffered anywhere. The water and crude oil are created using infinity pipes from the 'editor extensions' mod, to ensure that the flow is guaranteed.

To use the save you will need to install the editor extensions mod

It produces these stats. Exactly what the calculator say it should be. (Note that there are no stats for crude and water produced, because these are created by the infinity pipes. But you can see that the fluids consumed are the same as the calculator)

image image

Why is your game consuming less fluids to produce the plastic? I don't know. I cannot reproduce your results, but I can make a build in line with the calculator specification which produces exactly the results that the calculator predicts. Do you have any mods installed?

MarcoMue commented 4 years ago

I cant reproduce my own findings anymore, so i guess i did a mistake with my initial setup. I close this.