Oil, derivates and combinators?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
User avatar
brunzenstein
Smart Inserter
Smart Inserter
Posts: 1117
Joined: Tue Mar 01, 2016 2:27 pm
Contact:

Oil, derivates and combinators?

Post by brunzenstein »

Is there a lean way to manage with a clever combinator setting the output (refining) of oil products according to the actual factory demand without having over or under production?
Fahrradkette
Inserter
Inserter
Posts: 45
Joined: Thu Aug 27, 2015 4:37 pm
Contact:

Re: Oil, derivates and combinators?

Post by Fahrradkette »

Do you have estimates on what you're mainly consuming on how spiky the demand is?

In general, use always-on pumps to get the refined products into 3 "input tanks". Also have 5 "output tanks", one each for lubricant, heavy oil, light oil and two for petrol (one for plastics, one for sulfuric acid). From these tanks use always-on pumps to push it to your factory, in doing so the system stays responsive.

Using this system in combination with cracking plants, you can keep your fluid production to a minimum, if you're mainly consuming petrol.
But if you're consuming heavy/light oil and/or your demand changes heavily it's gona be very complicated since you'd have to use oil processing lvl1 to get more heavy oil.

Hope I could help
Regards Kette
Koub
Global Moderator
Global Moderator
Posts: 7784
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Oil, derivates and combinators?

Post by Koub »

The thing is you can always transform any excess of heavy or light oil into petroleum, but you can't do the reverse. If your factory encoutners a (longer than expected) spike in heavy or light oil need, there is no way you can prevent stalling, except by "burning" excess petroleum gas (by making solid fuel, or even destroying it).
Koub - Please consider English is not my native language.
User avatar
brunzenstein
Smart Inserter
Smart Inserter
Posts: 1117
Joined: Tue Mar 01, 2016 2:27 pm
Contact:

Re: Oil, derivates and combinators?

Post by brunzenstein »

Fahrradkette wrote:Do you have estimates on what you're mainly consuming on how spiky the demand is?
No - Thats exactly the point I do not want to take care off myself. I envision a fully automated oil management system able take care of itself - it should flexible react to its own needs. I want to achieve a true "production on demand" where the factory shuts the oil well on / off or regulates the pump to / from the reservoir tank to the refining site.
Automated by combinators. Tanks only used as in between backup during low time but not in bulk on stock
That way a lot of resourses may be far economically "on demand" managed and not dumb produced on stock in tanks.
Just like the automobile industry works nowadays.
Last edited by brunzenstein on Wed Jul 20, 2016 8:00 am, edited 1 time in total.
Fahrradkette
Inserter
Inserter
Posts: 45
Joined: Thu Aug 27, 2015 4:37 pm
Contact:

Re: Oil, derivates and combinators?

Post by Fahrradkette »

Koub wrote:The thing is you can always transform any excess of heavy or light oil into petroleum, but you can't do the reverse. If your factory encoutners a (longer than expected) spike in heavy or light oil need, there is no way you can prevent stalling, except by "burning" excess petroleum gas (by making solid fuel, or even destroying it).
Good call, I forgot about destroying it in a steam engine:)

Guess we could work out the requirements for the logic now:

-refine as few as possible crude oil
-keep as few as possible liquids in storage

-on high demand of petroleum, use advanced oil processing
-on high demand of light oil, use advanced oil processing
-on high demand of heavy oil/lubricant or high level of petroleum storage, use basic oil processing

-first fill the output tanks to keep the refinery running
-on excess of heavy oil, first make lubricant
-start cracking when tanks of heavy/light oil are about to reach max capacity

-if petroleum gets high, first switch to basic oil processing, then make solid fuel, then put it in the steam engine

What do you think of that order, is it the correct one?


If the priorities are set, I think the combinator logic can be figured out.
Controlled pumps should be:
-Crude oil tank to advanced oil processing
-Crude oil tank to basic oil processing

-Heavy oil "input tank" to heavy oil "output tank"
-Lubricant plant to lubricant "output tank" (there is an always-on pump from heavy oil "input tank" to the lubricant plant)
-Heavy oil "input tank" to light oil cracking plant (which has an always-on pump to push the light oil to the light oil "input tank")

-Light oil "input tank" to light oil "output tank"
-Light oil "input tank" to petroleum cracking plant (which has an always-on pump to push the petroleum to the "input tank")

-Petroleum "input tank" to plastic production petroleum "output tank"
-Petroleum "input tank" to sulfuric acid production petroleum "output tank"
-Petroleum "input tank" to solid fuel plant
-Petroleum "input tank" to steam engine for destroying it

Did I miss anything?

I'm thinking of some sort of a timer-based logic, it reads the content of the storage tanks and, after a set amount of ticks, simultaneously switches on the needed pumps for one tick.
BlakeMW
Filter Inserter
Filter Inserter
Posts: 954
Joined: Thu Jan 21, 2016 9:29 am
Contact:

Re: Oil, derivates and combinators?

Post by BlakeMW »

Koub wrote:The thing is you can always transform any excess of heavy or light oil into petroleum, but you can't do the reverse. If your factory encoutners a (longer than expected) spike in heavy or light oil need, there is no way you can prevent stalling, except by "burning" excess petroleum gas (by making solid fuel, or even destroying it).
Or perhaps stockpile plastic and/or sulfur.
User avatar
brunzenstein
Smart Inserter
Smart Inserter
Posts: 1117
Joined: Tue Mar 01, 2016 2:27 pm
Contact:

Re: Oil, derivates and combinators?

Post by brunzenstein »

Fahrradkette wrote: I'm thinking of some sort of a timer-based logic, it reads the content of the storage tanks and, after a set amount of ticks, simultaneously switches on the needed pumps for one tick.
Exactly!
User avatar
brunzenstein
Smart Inserter
Smart Inserter
Posts: 1117
Joined: Tue Mar 01, 2016 2:27 pm
Contact:

Re: Oil, derivates and combinators?

Post by brunzenstein »

BlakeMW wrote:
Koub wrote:The thing is you can always transform any excess of heavy or light oil into petroleum, but you can't do the reverse. If your factory encoutners a (longer than expected) spike in heavy or light oil need, there is no way you can prevent stalling, except by "burning" excess petroleum gas (by making solid fuel, or even destroying it).
Or perhaps stockpile plastic and/or sulfur.
No stockpiling - that's a waste of material and resource.
The point is to produce with minimum footprint - getting maximal output with minimum material produced/used.
BlakeMW
Filter Inserter
Filter Inserter
Posts: 954
Joined: Thu Jan 21, 2016 9:29 am
Contact:

Re: Oil, derivates and combinators?

Post by BlakeMW »

Throwing away petroleum is a waste, taking petroleum you're otherwise going to throw away, and turning it into sulfur or plastic which can be used later, is not a waste. With that said - it's pretty unusual that you ever have excess petroleum, only really in mods can it happen.
aka13
Filter Inserter
Filter Inserter
Posts: 801
Joined: Sun Sep 29, 2013 1:18 pm
Contact:

Re: Oil, derivates and combinators?

Post by aka13 »

brunzenstein wrote:Is there a lean way to manage with a clever combinator setting the output (refining) of oil products according to the actual factory demand without having over or under production?
Yes, you don't even need combinators for that 8-)

Just setup cracking setups for heavy-light, heavy-lube, light-petroleum, and use a pump to input the needed fluid for the setup. Connect a tank of each fluid to the corresponding pump, so you can setup the pumps with the logic "If there is more heavy oil than light oil, crack heavy-to-light", etc. Its a very cheap and sufficient setup for almost any factory.

Also, a good idea is to use efficiency modules in multiple refineries + beacons with speed, and a switch which powers refineries off if every ressource you want produced are at the amounts you want them to be, so you can stop wasting energy on beacons when you dont need them.
Pony/Furfag avatar? Opinion discarded.
Fahrradkette
Inserter
Inserter
Posts: 45
Joined: Thu Aug 27, 2015 4:37 pm
Contact:

Re: Oil, derivates and combinators?

Post by Fahrradkette »

I guess you're missing the point. As far as I understood him, he wants a lean production, preferring to not crack at all since some material get lost in the process.

Obviously, in most cases demand for petroleum is the highest but he, as far as I understand him, wants a system which adopts to the demand.
So imagine, for some time he's not producing red/blue circuits and therefore not using petroleum but making flamethrower ammo from heavy/light oil. In this case the system should use basic oil processing rather then advanced oil processing. He wants it so it dynamically switches in between those depending on demand.

In order to design such a system we have to figure out the break even points, like from when on it's worth switching oil processing (best case), when we should start cracking (second best) and when we have to get rid of petroleum (worst case). We also have to figure out what level the individual tanks should be, relative to each others.

Our combinator logic has 8 inputs: 3 tanks which are filled by the refineries and 5 tanks which store the products to be used by the factory.
It has 10 outputs: the pumps I mentioned before, we can treat the solid fuel plant and steam engine as one since it's considered worst case for the system anyways.

Btw, I think on my proposed system, the always-on pumps should be on the input side of the cracking plants so the system is more responsive. What's your thoughts on it?

Also, I really appreciate if you'd point out mistakes, like redundant or missing pumps. As soon as we agree on the physical layout we can go over and figure out the functions i.e. activation patterns for the pumps depending on fluid level in the tanks.


Edit
so we want a rule set, for instance on excess (has yet to be defined, I appreciate your input) of heavy oil:
[use advanced processing]
firstly: store it on the refinery side till almost full
secondly: store it on the output side till it's full
thirdly: make lubricant till it's full
lastly: crack it down to light oil
/Edit
Last edited by Fahrradkette on Wed Jul 20, 2016 11:56 am, edited 1 time in total.
Frightning
Filter Inserter
Filter Inserter
Posts: 813
Joined: Fri Apr 29, 2016 5:27 pm
Contact:

Re: Oil, derivates and combinators?

Post by Frightning »

brunzenstein wrote:Is there a lean way to manage with a clever combinator setting the output (refining) of oil products according to the actual factory demand without having over or under production?
My preferred way to manage oil products via combinators is to use 3 of them, 2 deciders, 1 arithmetic (this is still in 0.12.35, but I imagine things are similar in 0.13). The arithmetic combinator serves as a logical and-gate, taking as inputs the outputs of the decider combinators, which act as the necessary conditions. The decider combinators output a 1 if the condition is met, and do so on the same signal type, those signals are fed into the and-gate, which then outputs the control signal (usually use a letter named signal, such as C) which is in turn wired to a pump on the line that feeds the relevant cracking plants.
bobucles
Smart Inserter
Smart Inserter
Posts: 1708
Joined: Wed Jun 10, 2015 10:37 pm
Contact:

Re: Oil, derivates and combinators?

Post by bobucles »

You can't have too much petroleum for any normal factory. It is the highest demand oil product for building stuff, and frequently you have to crack the lower tiers just to get more. So don't worry too much about filling up on it.
User avatar
brunzenstein
Smart Inserter
Smart Inserter
Posts: 1117
Joined: Tue Mar 01, 2016 2:27 pm
Contact:

Re: Oil, derivates and combinators?

Post by brunzenstein »

bobucles wrote:You can't have too much petroleum for any normal factory. It is the highest demand oil product for building stuff, and frequently you have to crack the lower tiers just to get more.
And thats exactly what I want to achieve:
Fully automatic "Deliver in Demand" - and on demand by the factory itself only - like the car industry works.
Fahrradkette
Inserter
Inserter
Posts: 45
Joined: Thu Aug 27, 2015 4:37 pm
Contact:

Re: Oil, derivates and combinators?

Post by Fahrradkette »

To be honest, that sounds a bit vague ;)

If you want to optimize your factory towards less buffer used, you'd have to live with stuff not being delivered in time. In the cars industry, they usually have heli pads so if a supplier is late on his delivery, he can use that. I don't know if you want to implement anything like this in your factory :P

PS: I figured out, that in order to optimize the oil processing for least storage, we only need 5 controlled pumps and 3 storage tanks for measurement. If you still want that, please tell me the boundary conditions, like using basic oil processing if there is more then 2k petroleum or light oil. I want numbers :)
User avatar
brunzenstein
Smart Inserter
Smart Inserter
Posts: 1117
Joined: Tue Mar 01, 2016 2:27 pm
Contact:

Re: Oil, derivates and combinators?

Post by brunzenstein »

Fahrradkette wrote:To be honest, that sounds a bit vague ;)
No - its precise vague :D
The point is that its possible to split the cracking process for a single product in a way that only one specified product will be produced without any side product.
That way one product can be called or halted right on demand by the factory itself.
Especially with the new network awareness of belts / train stations that should be possible. Below picture (®Troll Norris) shows that the production can be done e.g. with exclusive output of gas oil only.
Any overflow (by delay in production as long as the stop signal comes into effect) goes into a provided storage tank.
Additional benefit that such decentralized specialized producing entities provide is, that they must not be (like in former USSR :-) ) on a central place but can be placed near where they are actually needed. And in this case oil and water is near.
Last edited by brunzenstein on Wed Jul 20, 2016 7:52 pm, edited 4 times in total.
garath
Fast Inserter
Fast Inserter
Posts: 154
Joined: Wed Apr 13, 2016 2:11 pm
Contact:

Re: Oil, derivates and combinators?

Post by garath »

brunzenstein wrote:
bobucles wrote:You can't have too much petroleum for any normal factory. It is the highest demand oil product for building stuff, and frequently you have to crack the lower tiers just to get more.
And thats exactly what I want to achieve:
Fully automatic "Deliver in Demand" - and on demand by the factory itself only - like the car industry works.
In your first post, you asked for "lean". Now, you are emphasizing "fully automatic". In my opinion, you can have one or the other but not both. If you want lean, then you need to make a number of assumptions. For example, building on what bobucles said:

1. Petroleum Gas is the highest demand oil product.
2. After Petroleum, you need Lubricant.
3. Crack Heavy to Light and Light to Petroleum--so long a you have what you define as an adequate lubricant supply because with nowhere for heavy and light to go, oil production stops.

In order to create a "lean" setup based on these three assumptions, you simply check the Lubricant storage tank and then turn on/off heavy oil cracking.

But let's say you want fully automatic. You would need to define what you mean by "fully automatic". In my mind, it means you want your factory to communicate back to oil production how much oil it needs based upon EVERY end product produced by your factory that needs oil. This requires you to add circuitry to every end product in your factory whose intermediate products require oil and then connect that circuitry back to oil production. In my opinion, adding all that circuitry throughout your entire factory is the very opposite of "lean".
User avatar
brunzenstein
Smart Inserter
Smart Inserter
Posts: 1117
Joined: Tue Mar 01, 2016 2:27 pm
Contact:

Re: Oil, derivates and combinators?

Post by brunzenstein »

garath wrote: In my opinion, adding all that circuitry throughout your entire factory is the very opposite of "lean".
Most probably your right- but hey - this is virtual reality at its best and a lot of clever boys around at this green and in such an enviroment there is always a way ;)
Fahrradkette
Inserter
Inserter
Posts: 45
Joined: Thu Aug 27, 2015 4:37 pm
Contact:

Re: Oil, derivates and combinators?

Post by Fahrradkette »

brunzenstein wrote:in such an enviroment there is always a way ;)
What I know about lean/timwood/wormpit, this sounds really like one of those 7 wastes: "over engineering" :)

PS: clarity about objectives helps a lot, especially on how to weight them :)
Jupiter
Fast Inserter
Fast Inserter
Posts: 174
Joined: Thu Jun 23, 2016 2:38 pm
Contact:

Re: Oil, derivates and combinators?

Post by Jupiter »

I asked myself the same question and posted this thread: viewtopic.php?f=18&t=28872

I settled with a setup that I described in my last post (last, as of this writing). Here I copied my post:
====================================================

I settled with this conceptual design (which I was able to create thanks to all you guys, thank you!):

Image

This isn't to scale of course and water isn't even hooked up but it shows the idea quite well.

The inputs below accept, from left to right, heavy oil, light oil and pet. gas.

Logic:
The pumps to the gas tank are on if A > 0 (if gas < 2.5K).
The pumps to production of solid fuel from gas are on if A == 0 (if gas == 2.5K).
The pumps to LO->gas cracking are on if A > 0 (if gas < 2.4K).
The pumps to production of solid fuel from LO are on if A == 0 (if gas >= 2.4K).
The pumps to lubricant production are on if A > 0 (if lubricant < 2.5K).
The pumps to HO->LO cracking are on if A == 0 (if lubricant == 2.5K).

This ensures that the consumption of HO and gas (for lub and sulfur/plastics) always has priority over production of rocket fuel but if there is no consumption then everything is used for rocket fuel; no buffering. My pumpjacks should never be idle.
Post Reply

Return to “Gameplay Help”