Oil Yield decreasing rate confusion.

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
Fexul
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Dec 29, 2017 1:21 pm
Contact:

Oil Yield decreasing rate confusion.

Post by Fexul » Tue Oct 08, 2019 2:43 pm

Hello Factorio friends,

I am preparing to launch my first rocket using some calculations but Oil production is giving me some headaches.

I'm trying to predict or at least estimate my production using information on the Wiki. Every time I run a test on Oil the pumpjack doesn't decrease 1% every 300 cycles.

I already read that the yield value shows no decimal so 22% could be in the range of 6.600 and 6.899 cycles. The thing is that even waiting 10 minutes (600 cycles) the yield is still showing 22%....

Did the formula changed on 0.17 or I've been doing something wrong?

Thank you very much.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 2994
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Oil Yield decreasing rate confusion.

Post by DaveMcW » Tue Oct 08, 2019 3:02 pm

While cycles left is ... greater than 20% of the initially available cycles, each pumpjack cycle reduces the number of cycles left by one.
Your oil patch started at 110%, dropped to 22%, and now can't drop any further.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 3740
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Oil Yield decreasing rate confusion.

Post by eradicator » Tue Oct 08, 2019 3:49 pm

Fexul wrote:
Tue Oct 08, 2019 2:43 pm
waiting 10 minutes
Testing is much more efficient if you increase the game speed. Just use the editor.

Code: Select all

/editor
Author of: Hand Crank Generator, Screenshot Hotkey 2.0
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Fexul
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Dec 29, 2017 1:21 pm
Contact:

Re: Oil Yield decreasing rate confusion.

Post by Fexul » Tue Oct 08, 2019 5:11 pm

DaveMcW wrote:
Tue Oct 08, 2019 3:02 pm
While cycles left is ... greater than 20% of the initially available cycles, each pumpjack cycle reduces the number of cycles left by one.
Your oil patch started at 110%, dropped to 22%, and now can't drop any further.
Mmn... interesting, so this means that % will never drop below 20% initial value. If I have one single yield of 200% it will drop until 40%. Thank you very much.
eradicator wrote:
Tue Oct 08, 2019 3:49 pm
Fexul wrote:
Tue Oct 08, 2019 2:43 pm
waiting 10 minutes
Testing is much more efficient if you increase the game speed. Just use the editor.

Code: Select all

/editor
Thanks.

User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 1812
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: Oil Yield decreasing rate confusion.

Post by BlueTemplar » Tue Oct 08, 2019 5:31 pm

I wish that we could know how far along the depletion curve each well is...
(Also, IMHO, the shown numbers are just confusing - the pumpjack should show a mining sped of 10 (L/s), rather than 1 !)

Honktown
Fast Inserter
Fast Inserter
Posts: 184
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Oil Yield decreasing rate confusion.

Post by Honktown » Tue Oct 08, 2019 5:37 pm

Did they change oil jacks? In .16 any starting value could drop to 2. This was the behavior for the longest time, previous to 2 it was 1 in old versions.

Worth noting is oil jacks only decrease if they're being used.

"edit": Just checked the wiki:

Code: Select all

20% of the initial yield or 2 oil per second, whichever is larger
Never knew that. All my oil wells dropped to 2 or above, but I had so much mining productivity and was using speed modules and I never thought there was a different value (they mostly stop running with enough productivity).

I mentioned in another thread, you only need 10-20 oil wells unless they're really, really poor, when you get Mining Productivity. I didn't calculate it out, but after launching 300+ rockets in one game, I can tell you only a handful of wells will last forever. Calculating it out a bit, an oil well with speed 3 modules, 2 oil production, and 100% productivity will produce 8 oil per second. A base refinery will consume 20/second, so only 2 1/2 fully depleted oil wells can completely run a refinery. With three productivity modules, the refinery consumes 11 oil per second, which less than one and a half jacks can keep running, with a drop in production rate 71.5% of what it used to be. However there's now free oil to run a second refinery. Three fully depleted pump jacks can run two production three refineries with oil to spare (With 100% productivity). Even if you had 0 productivity, you'd only need 6 completely depleted jacks. I have never calculated a depletion time, but if you're looking to keep producing oil for longer, the cutoff was around 7.5 I think. Above that, you gain more oil in total from productivity, than you would by using speed modules before it hits 2. (it gets confusing, but if you put prod 3's in a 10 jack, by the time a speedy jack hits 2 (4) you can now get more oil by switching to speed modules in the productivity jack, something like that, in exchange for having gotten it slower initially).

Fexul
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Dec 29, 2017 1:21 pm
Contact:

Re: Oil Yield decreasing rate confusion.

Post by Fexul » Tue Oct 08, 2019 7:19 pm

Honktown wrote:
Tue Oct 08, 2019 5:37 pm
Did they change oil jacks? In .16 any starting value could drop to 2. This was the behavior for the longest time, previous to 2 it was 1 in old versions.

Worth noting is oil jacks only decrease if they're being used.

"edit": Just checked the wiki:

Code: Select all

20% of the initial yield or 2 oil per second, whichever is larger
Never knew that. All my oil wells dropped to 2 or above, but I had so much mining productivity and was using speed modules and I never thought there was a different value (they mostly stop running with enough productivity).

I mentioned in another thread, you only need 10-20 oil wells unless they're really, really poor, when you get Mining Productivity. I didn't calculate it out, but after launching 300+ rockets in one game, I can tell you only a handful of wells will last forever. Calculating it out a bit, an oil well with speed 3 modules, 2 oil production, and 100% productivity will produce 8 oil per second. A base refinery will consume 20/second, so only 2 1/2 fully depleted oil wells can completely run a refinery. With three productivity modules, the refinery consumes 11 oil per second, which less than one and a half jacks can keep running, with a drop in production rate 71.5% of what it used to be. However there's now free oil to run a second refinery. Three fully depleted pump jacks can run two production three refineries with oil to spare (With 100% productivity). Even if you had 0 productivity, you'd only need 6 completely depleted jacks. I have never calculated a depletion time, but if you're looking to keep producing oil for longer, the cutoff was around 7.5 I think. Above that, you gain more oil in total from productivity, than you would by using speed modules before it hits 2. (it gets confusing, but if you put prod 3's in a 10 jack, by the time a speedy jack hits 2 (4) you can now get more oil by switching to speed modules in the productivity jack, something like that, in exchange for having gotten it slower initially).
I like playing with formulas and I was trying to create a Decreasing Rate formula, just to see the behavior while changing some parameters (like using modules). Right now I'm playing on a game with low frequency Oil, no modules condition and also running the energy system on Solid Fuel. In order to achieve my Oil needs while Rocket technology finishes I would like to know how Oil extraction rate changes over time.

The first test I was doing was extracting Oil from a single 56% Yield. I'll run some tests using the new Editor changing the speed of the game.

Honktown
Fast Inserter
Fast Inserter
Posts: 184
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Oil Yield decreasing rate confusion.

Post by Honktown » Tue Oct 08, 2019 7:36 pm

Coal liquefaction yo, I see a lot of megabase-y people use it for self-contained rocket fuel

Edit: ps. It gets pretty bad running on solid fuel, but I don't know if you're fighting biters. I've been playing a lot of enemy-heavy games, and I was using over 340 boilers at one point, because with very high settings you have to rush flame turrets, and then switch off of them later. You also initially don't have room for solar, and even when you do, it's a bit depressing thinking about switching 100-200 megawatts over to solar when you currently have like... 20 solar panels. My power consumption could jump from 100-150 MW to over 600 trying to keep up with biters. Did the math out recently, for 100 MW, you're consuming 8 1/3rd fuel blocks per second.

Adamo
Filter Inserter
Filter Inserter
Posts: 439
Joined: Sat May 24, 2014 7:00 am
Contact:

Re: Oil Yield decreasing rate confusion.

Post by Adamo » Wed Oct 09, 2019 3:37 am

OK, so, I haven't strongly tested this, but I did setup a similar resource prototype, and based on the prototype values that an oil-like resource uses, I THINK the way it works is as follows. If anyone can tell me where I'm wrong, please do.

The map displays a percentage, but a percentage of what? There is a value in the resource prototype that defines what "100%" is in terms of fluid units, and then there are a few values that define approximately how much they will start with (something above this 100% value), and then there's a value for the minimum amount in fluid units the resource can have. There's another value that's set to "true" because it's an infinite resource, and there's another value required with that truth that defines how much in fluid units the resource will use each time it ticks on the infinite resource. I'm pretty sure this is "10" on the crude-oil resource, which correlates with the "10" fluid output that's set to come out of the resource (these values are set separately). I *believe* the actual amount that outputs from the resource, using no modules, is this value, 10, times the current amount in the resource by fluid count divided by the fluid amount in fluid units that correspond to 100% on the resource prototype, and so then whatever that minimum fluid value is set to, as a percentage of the fluid value corresponding to 100%, defines the speed (relative to the output value of "10") with which the resource outputs when it is "depleted".

P.S. there is also a value in the prototype that defines at what radius it will include all of the resource patches together; and this is how you then get the total percentage of the entire bunch of oil patches: counting up the total fluid in all of them and divide by that fluid count that corresponds to 100%.

Honktown
Fast Inserter
Fast Inserter
Posts: 184
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Oil Yield decreasing rate confusion.

Post by Honktown » Wed Oct 09, 2019 12:58 pm

Fexul wrote:
Tue Oct 08, 2019 7:19 pm
I like playing with formulas and I was trying to create a Decreasing Rate formula, just to see the behavior while changing some parameters (like using modules). Right now I'm playing on a game with low frequency Oil, no modules condition and also running the energy system on Solid Fuel. In order to achieve my Oil needs while Rocket technology finishes I would like to know how Oil extraction rate changes over time.

The first test I was doing was extracting Oil from a single 56% Yield. I'll run some tests using the new Editor changing the speed of the game.
From some mentions in this thread, it seems oil depletes per cycle, so in terms of time, productivity will make it last longer before depletion (in terms of product and time). From the math, you probably want to first make a function of production and depletion from cycles, then use that in a function of production/depletion over time (should just be multiplying the rate).

Good luck with actually testing it, I'd like to see if the results match with how we're told it works.

Something tangentially related. I started using fuel blocks in my current game, and it's a game with much tighter resource management. If you use fuel blocks made from a refinery that's cracking heavy and only using light, it takes away 2.88 megajoules from each fuel block. If you're trying to do a game with worse oil production/no solar or nuclear/no modules, it's worth bringing up in relation to how much oil you'll need/consume in the long run.

Fexul
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Dec 29, 2017 1:21 pm
Contact:

Re: Oil Yield decreasing rate confusion.

Post by Fexul » Wed Oct 09, 2019 5:07 pm

Honktown wrote:
Wed Oct 09, 2019 12:58 pm
... it's worth bringing up in relation to how much oil you'll need/consume in the long run.
We did that and that's why I'm trying to determine the behavior of Oil production.

Ok guys, I did some testing yesterday and found some very useful results that I'm going to share right now.

I was playing using Editor to speed up the time and found out that every 300 cycles reduces 1% of one single Yield. I found that the Map doesn't update this value so I had to check the output information that pumpjack was giving. Using this we start defining Decreasing Rate, 1 cycles takes 1 second so... Decreasing Rate = 1%/300seconds = 0.003333...%/s; this value is per pumpjack... This means that just by using the map we could calculate:

Total Decreasing Rate = 0.003333 * n (%/s); where n: Numbers of Pumpjacks.

We could take, for example, an Oil field with 8 pumpjack... Total Decreasing Rate = 0.026664 %/s.

Another thing I could verify is what DaveMcW told us. Any Yield will eventually drop it's value to 20% the initial or "20%" whichever is larger. This is all we need to estimate our production rate over time.

I have a field with 8 pumpjack with a value of 2,556%. The Total Decreasing Rate is 0.026664%/s and it will drop to 511.2%. With a simple rule of three it takes 76,687.668 seconds (21.3 hours) to deplete this field. Of course, assuming that there's no module or beacon... which is my case. This seems like a very long time but... Factorio is a time machine... at least for me... that won't last very much...

The Wiki defined the Oil production as O = Yield Value / 10, my field outputs Oil at a rate of 2,556%/10 = 255.6 Crude Oil/s.

We now define the formula...

O(t) = [ (Field Value) - (Total Decreasing Rate * t) ]/10

O(t) = (Field Value / 10) - (0.0003333 * n * t)
where t: time in seconds ; Field Value: % as shown in map ; n: Number of Pumpjack on the field

This formula exist as long as the field is greater than 20% initial Field Value or "20%" flat. The first condition will be: 0<= t <= td; td is Depletion Time:

td = (Field Value* 0.8)/Total Decreasing Rate = (0.8 * Field Value) / (0.003333 * n)

td = 240.024 * (Field Value / n)

td = 240.024 * ( 2,556 % / 8 ) = 76,687.668s to deplete my Field.

The second condition to use this formula is the amount of % per Yield. This is because the minimum value is 20% initial value or 20%. If you have a Yield that has 50% or 90% you will find that 20% is (50*0.2) 10% and (90*0.2) 18%. Any Yield that has a value below 100% must use the same formula but td would now be:

td = { [ (Field Value) - (20*n) ] / Total Decreasing Rate } = { [ (Field Value) - (20*n) ] / 0.003333 * n }

td = [ 300.03 * (Field Value / n) ] - [6000.6]

Usually the Fields are discovered by Radars so we don't have any clue about every Yield value... so we could use a new term... Yield average (Ya) = Field Value / n ; if Yield average < 100% then use what I just said before.

Conclusion:

Total Decreasing Rate = 0.003333 * n

O(t) = (Field Value / 10) - (0.0003333 * n * t) ; 0<= t <= td AND Ya > 100%
td = 240.024 * (Field Value / n)
Yield average (Ya) = Field Value / n

If Ya<100% then td = [ 300.03 * (Field Value / n) ] - [6000.6]

I hope this could be useful for you guys.

Honktown
Fast Inserter
Fast Inserter
Posts: 184
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Oil Yield decreasing rate confusion.

Post by Honktown » Wed Oct 09, 2019 5:53 pm

I shouldn't say "almost completely useless", but it'd be interesting to make a calculator, so you could put in oil wells, and it would do the logic of above/below 2 by depletion, and then you could determine production for each well over time and integrate to get the actual amount being produced / was produced by that time. By the numers, looks like if there's wells below 10, you want a patch with as many wells as possible, because they're stable above 20%. Two 7.5 wells would go down to 2*2 = 4, but a single 15 well will go down to 3.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 2994
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Oil Yield decreasing rate confusion.

Post by DaveMcW » Thu Oct 10, 2019 12:10 am

The best strategy to maximize oil yield is to explore in a straight line. Resource yield increases with distance from the spawn point, so you quickly find wells with over 500% initial yield.

The drawback is that biter yield also increases with distance from the spawn point...

Post Reply

Return to “Gameplay Help”

Who is online

Users browsing this forum: Kidster3001