Infinite resource (e.g., oil) calculations
Posted: Mon Sep 05, 2016 6:43 am
I was mathing out the requirements for the 8 hour speed run, and I needed to know how much oil I could expect from oil fields. Since I couldn't find detailed technical information on how infinite resources work, I decided to experiment myself and then run the numbers. Here's the results for those who have the same questions.
Infinite resources internally have an amount value (like finite resources); this value is compared to a Lua-specified "normal" value to compute the yield: an amount equal to the normal value is 100% yield. There is also a minimum amount beyond which the number cannot fall. Every mining cycle (calculated as for regular resource mining drills), the amount value falls by 1 unit, and the output is multiplied by the yield fraction to output the number of resources.
In the following calculations, let s be the starting yield, measured as a fraction (so 100% yield means s = 1); n the normal Lua yield amount (for oil, this is 15000 as of 0.13), m the minimum yield fraction (for oil m = 1500 / 15000 = 0.1), u the resource output per cycle at 100% yield (1 for oil), and t be a parameter indicating the number of mining cycles elapsed.
It then holds that the internal amount value at time t is a(t) = sn - t. The time it takes this field to deplete is then ṫ = sn - mn. (I'll give a table later for several values). The resource yield at any given time t is y(t) = u·a(t) / n = u·(s - t / n). We can then solve for the amount of resources yielded per depletion:
Depletion is quadratic in the starting yield, so doubling the yield quadruples the output. For oil, the resulting formula is (s · 7500 - 749.5) · (s + 0.1). Example values for oil are:
For estimation purposes, a rocket requires 41,505 petroleum gas to launch (required techs (and no more!), rocket silo, 72 rocket parts, 1 satellite, 4 productivity 3 modules for the rocket silo (that's why you only need 72 parts, not 100)). That comes out to about 103,763 oil without cracking or advanced oil processing (i.e., gas is 40% of oil as opposed to 55%/75%/90%, depending on your mixture of processes), which is about 12 oil fields at 60% starting yield for 6 hours. Given that the average oil yield is about 45% in the starting field today at default settings, the 8-hour achievement run is virtually impossible on default settings for oil (12 oil fields for 8 hours at 45% yields 41,029 gas at a 90% conversion ratio--the max you get without productivity).
Infinite resources internally have an amount value (like finite resources); this value is compared to a Lua-specified "normal" value to compute the yield: an amount equal to the normal value is 100% yield. There is also a minimum amount beyond which the number cannot fall. Every mining cycle (calculated as for regular resource mining drills), the amount value falls by 1 unit, and the output is multiplied by the yield fraction to output the number of resources.
In the following calculations, let s be the starting yield, measured as a fraction (so 100% yield means s = 1); n the normal Lua yield amount (for oil, this is 15000 as of 0.13), m the minimum yield fraction (for oil m = 1500 / 15000 = 0.1), u the resource output per cycle at 100% yield (1 for oil), and t be a parameter indicating the number of mining cycles elapsed.
It then holds that the internal amount value at time t is a(t) = sn - t. The time it takes this field to deplete is then ṫ = sn - mn. (I'll give a table later for several values). The resource yield at any given time t is y(t) = u·a(t) / n = u·(s - t / n). We can then solve for the amount of resources yielded per depletion:
Code: Select all
Sum[y(t) for t = 0 .. ṫ] = Sum[u·(s - t/n) for t = 0 .. sn - mn]
= u·Sum[s - t/n for t = 0 .. sn - mn]
= u·(s·(sn - mn + 1) - Sum[t/n for t = 0 .. sn - mn])
= u·(s·(sn - mn + 1) - 1/n · Sum[t for t = 0 .. sn - mn])
= u·(s·(sn - mn + 1) - 1/n · (sn - mn)(sn - mn + 1) / 2
= u·(sn - mn + 1)(s - (s - m) / 2)
= ½u·(sn - mn + 1)(2s - s + m)
= ½u·(sn - mn + 1)(s + m)
Code: Select all
Yield Total Time (hours)
30% 600.2 0.83
35% 844.0 1.04
40% 1125.2 1.25
45% 1444.0 1.46
50% 1800.3 1.67
55% 2194.1 1.88
60% 2625.3 2.08
65% 3094.1 2.29
70% 3600.4 2.50
75% 4144.2 2.71
80% 4725.4 2.92
90% 6000.5 3.33
100% 7425.6 3.75
125% 11644.4 4.79
150% 16800.8 5.83
175% 22894.7 6.88
200% 29926.1 7.92
250% 46801.3 10.00
350% 91801.8 14.17
400% 119927.0 16.25
500% 187427.5 20.42
600% 269928.0 24.58
700% 367428.5 28.75
800% 479929.0 32.92
900% 607429.5 37.08
1000% 749930.0 41.25