First time with oil processing ratios

Calculate optimal ratios for feeding recipes, search through the research-tree, specialized tools to view game-information.
Post Reply
Taego
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Sep 13, 2020 6:15 pm
Contact:

First time with oil processing ratios

Post by Taego »

I started playing Factorio a week ago and I am on my first run.

I got technology for advanced oil processing and set up pipes when my plastic and sulfur stopped flowing because I didn't know how to use heavy oil and light oil.

I checked on the wiki and found that I should crack heavy oil to light oil and light oil to petroleum gas in a ratio of 20:5:17 to keep the petroleum gas flowing for sulfur and plastic.

Then I found that I would also need to use heavy oil for lubricant and light oil for solid fuel.
I don't think the 20:5:17 ratio will be the same if I also want to produce any lubricant or solid fuel.

I have a chemical engineering degree so I set out to do the calculation myself to find the equations behind the ratio.

I set up the problem using the details from the wiki as below:
100 crude is consumed every 5 seconds to produce 25 heavy oil, 45 light oil, and 55 petroleum gas every 5 seconds in each advanced oil process.
A heavy oil to light oil cracker can be used to consume 40 heavy oil every 2 seconds to produce 30 light oil every 2 seconds.
A light oil to petroleum gas converter can be used to consume 30 light oil every 2 seconds to produce 20 petroleum gas every 2 seconds.

Lubrication is produced according to personal preference as a constant and consumes 10 heavy oil per second to yield lubrication.
Solid fuel is produced according to personal preference as a constant and consumes 10 light oil every 2 seconds to yield 1 solid fuel every 2 seconds.

What is a set of equations relating advanced oil processes, heavy oil to light oil crackers, and light oil to petroleum gas crackers (after choosing preferences for lubrication and solid fuel production plants) so that heavy oil and light oil are consumed at an equal rate while creating excess petroleum gas.

I attached a picture of my system diagram and calculations to the equations to include lubricant and solid fuel.
I proved the optimal ratio of 20:5:17 with 0 lubricant and 0 solid fuel producing chemical plants and found that with 1 chemical plant making lubricant and 1 chemical plant making solid fuel, the ratio changes to 14:3:11.

Additionally there are different ratios that can be found easily with the attached excel and inputting how many chemical plants one would like to use making lubricant and/or solid fuel.

That's all, let me know any questions and I hope this is helpful enough to be updated into wiki.

Sincerely, Taego
Attachments
Factorio oil processing.xlsx
(9.65 KiB) Downloaded 3 times
20200913_172746.jpg
20200913_172746.jpg (3.41 MiB) Viewed 145 times
20200913_172756.jpg
20200913_172756.jpg (3.33 MiB) Viewed 145 times

Impatient
Filter Inserter
Filter Inserter
Posts: 624
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: First time with oil processing ratios

Post by Impatient »

reading your post, i think, trying to solve the advanced oil cracking math seems to be something, some players try their brains on as an involuntary bonus challenge.

When i first tried to find out how much crude and water i need to make this and that, i found out, that everything put together yields a set of linear equations. which can be solved for any inputs and outputs needed. like you, i made an excel sheet to do all the calculations automatically.

... no, actually, first i tried helmod to do the calculations for me. but i found out, that helmod did not take into account, that heavier oil products can be cracked into lighter ones and it always had a surplus of heavy and light oil. so, helmod obviously did not use linear equations. But I was not able set it up correctly.

then i made the excel sheet and was able to calculate the exact amount of crude for any given output without surplus. I was pretty proud, I admit. 'still am a bit.

but only then - of course or maybe luckily (because I got the chance to successfully solve a math problem and boost my self-confidence) - i discovered, that Kirk's factorio calculator exists and also does the linear equations right.

so in case you had enough of the bonus challenge, check out Kirk Douglas' factorio calculator.
Last edited by Impatient on Mon Sep 14, 2020 7:10 pm, edited 2 times in total.

Impatient
Filter Inserter
Filter Inserter
Posts: 624
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: First time with oil processing ratios

Post by Impatient »

Taego wrote:
Sun Sep 13, 2020 9:59 pm
... and I hope this is helpful enough to be updated into wiki.

...
I am pretty sure that is not going to happen. As far as I understood, the devs' intention for factorio is, it to be about problem solving and creativity. There might be some minor examples to clarify how to use certain game features, but putting a solution to a problem on the wiki would be outright against their intention imo.

There are some websites though, dedicated to collecting solutions and teaching concepts and best practices for those who like it. also here on the forum users go wild with posting solutions and discussing them.

Koub
Global Moderator
Global Moderator
Posts: 5932
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: First time with oil processing ratios

Post by Koub »

You never know the real need in lubricant and solid fuel of a factory at a given time, unless you know the factory itself and what you're doing with it. The need for light oil or heavy oil can vary depending on what you're doing at a given moment, and mess up your ratios for a substantial time, effectively locking up your refining facility..
Koub - Please consider English is not my native language.

Helfima
Fast Inserter
Fast Inserter
Posts: 191
Joined: Tue Jun 28, 2016 11:40 am
Contact:

Re: First time with oil processing ratios

Post by Helfima »

Impatient wrote:
Mon Sep 14, 2020 4:05 am
...
... no, actually, first i tried helmod to do the calculations for me. but i found out, that helmod did not take into account, that heavier oil products can be cracked into lighter ones and it always had a surplus of heavy and light oil. so, helmod obviously did not use linear equations.
...
hello,
helmod uses the Simplex method, for that you have to activate "Matrix Solver" in a block
in this sample you can see the inefficient recipes (heavy oil craking and solid fuel from pretrolium gas)
fuel-plastic.png
fuel-plastic.png (240.94 KiB) Viewed 117 times

Taego
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Sep 13, 2020 6:15 pm
Contact:

Re: First time with oil processing ratios

Post by Taego »

Impatient wrote:
Mon Sep 14, 2020 4:05 am

so in case you had enough of the bonus challenge, check out Kirk Douglas' factorio calculator.
Oh good! I'm glad there is a calculator for this that helps thank you.
Impatient wrote:
Mon Sep 14, 2020 5:00 am
Taego wrote:
Sun Sep 13, 2020 9:59 pm
... and I hope this is helpful enough to be updated into wiki.

...
I am pretty sure that is not going to happen. As far as I understood, the devs' intention for factorio is, it to be about problem solving and creativity. There might be some minor examples to clarify how to use certain game features, but putting a solution to a problem on the wiki would be outright against their intention imo.
I didn't realize this before and I completely understand and support the concept, I actually had fun with my little bonus challenge and I wouldn't want to take that away from others.
Koub wrote:
Mon Sep 14, 2020 5:34 am
You never know the real need in lubricant and solid fuel of a factory at a given time, unless you know the factory itself and what you're doing with it. The need for light oil or heavy oil can vary depending on what you're doing at a given moment, and mess up your ratios for a substantial time, effectively locking up your refining facility..
Yes, I figured since this was my first time I would start stock piling lubricant and solid fuel and leave space to add more/take away lubricant and solid fuel converters later.
Most people might have sudden demand for lubricant and solid fuel in which case if they used this they would have to adjust ratios every time demand increases.

Thanks again

Impatient
Filter Inserter
Filter Inserter
Posts: 624
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: First time with oil processing ratios

Post by Impatient »

Helfima wrote:
Mon Sep 14, 2020 5:54 am
Impatient wrote:
Mon Sep 14, 2020 4:05 am
...
... no, actually, first i tried helmod to do the calculations for me. but i found out, that helmod did not take into account, that heavier oil products can be cracked into lighter ones and it always had a surplus of heavy and light oil. so, helmod obviously did not use linear equations.
...
hello,
helmod uses the Simplex method, for that you have to activate "Matrix Solver" in a block
...
I am sorry for putting helmod into a bad light here. Maybe I should have studdied helmod's features more in depth. I updated my previous post.

To give helmod and Helfima the props, from my perspective the main advantage of helmod is, that, as it is a mod and works inside the game, it also can take into account all items and recipes from installed mods, where the factorio calculator only works with vanilla recipes and items out of the box. The factorio calculator on the other side can be used without the game.

Post Reply

Return to “Cheatsheets / Calculators / Viewers”

Who is online

Users browsing this forum: No registered users