How to avoid an oil deadlock

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Jupiter
Fast Inserter
Fast Inserter
Posts: 174
Joined: Thu Jun 23, 2016 2:38 pm
Contact:

Re: How to avoid an oil deadlock

Post by Jupiter »

Frightning wrote:
Jupiter wrote:
brunzenstein wrote:
Harkonnen604 wrote:What's the problem in putting like 16 tanks for PG and LB (with pumps at exit) and a lot of chemical plants to convert HO/LO instantly before they start blocking the whole process? In other words - what is the purpose of storing HO/LO?
The point is that the oil resource / well is used economical and don't run dry producing / dumping in never uses storage tanks.
No, the point is to never let your wells stop producing. A well can provide an infinite amount of oil so not always 24/7 producing at max capacity is actually a waste of oil. You use a little for lub, acid and plastic and the rest goes into fuel.
This is precisely the reason why Crude Oil and its derivatives are worth storing in the event that you are producing more than you are consuming. That said, you also want to crack as needed to satiate demand (thereby reducing storage needs and optimally converting Crude Oil Products into the proportions you actually need).
No you don't store. There is no point in doing that. You just immediately convert to rocket fuel. If you don't then no matter how many tanks you have, they'll get filled up some times and the deadlock is back.

Frightning
Filter Inserter
Filter Inserter
Posts: 807
Joined: Fri Apr 29, 2016 5:27 pm
Contact:

Re: How to avoid an oil deadlock

Post by Frightning »

Jupiter wrote:
Frightning wrote:
Jupiter wrote:
brunzenstein wrote:
Harkonnen604 wrote:What's the problem in putting like 16 tanks for PG and LB (with pumps at exit) and a lot of chemical plants to convert HO/LO instantly before they start blocking the whole process? In other words - what is the purpose of storing HO/LO?
The point is that the oil resource / well is used economical and don't run dry producing / dumping in never uses storage tanks.
No, the point is to never let your wells stop producing. A well can provide an infinite amount of oil so not always 24/7 producing at max capacity is actually a waste of oil. You use a little for lub, acid and plastic and the rest goes into fuel.
This is precisely the reason why Crude Oil and its derivatives are worth storing in the event that you are producing more than you are consuming. That said, you also want to crack as needed to satiate demand (thereby reducing storage needs and optimally converting Crude Oil Products into the proportions you actually need).
No you don't store. There is no point in doing that. You just immediately convert to rocket fuel. If you don't then no matter how many tanks you have, they'll get filled up some times and the deadlock is back.
Outside of fueling rockets, making Rocket Fuel is only worthwhile if you have prod2 modules or higher (and put them into solid fuel-rocket fuel plant), otherwise it's better to stick with solid fuel. You also seemed to miss the fact that I said 'in the event that you are overproducing', it is wise to not crack HO to LO unless you actually have more demand for LO than production, or more demand for PG and hence need light oil to feed into LO-PG cracking. Reason being that for all you know, you might need that HO later for Lub production (or for Flamethrower ammo). Likewise for LO, you don't necessarily know if you will suddenly need more of it for SF or to crack into PG later (or Flamethrower ammo again). This why it can be worthwhile to store HO and LO, once you crack it, or convert to SF, there's no going back, better to keep it in the most flexible form possible in the event of excess being present. (I have automated the regulation of when to crack w/ combinators in 0.12.35, nice simple system that only cracks when demand for the cracking product is outpacing supply)

Harkonnen604
Filter Inserter
Filter Inserter
Posts: 285
Joined: Thu Jun 09, 2016 5:56 am
Contact:

Re: How to avoid an oil deadlock

Post by Harkonnen604 »

In such situations I'd prefer to store everything as crude oil and stop refineries at all (it's easier to manage without tanks for HO/LO), and that's what actually happens when one of LB/PG tanks gets full. If you have enough chemical plants, you don't need any intermediate HO/LO stored at all. If you want to keep reserve for rebalancing, keep it as crude oil, like 9 tanks.

Also note that the topic is about deadlock - that's not the situation when refineries stop producing because there is no place to spit out HO/LO/PG. Deadlock is when one of tanks is full and the other is dry, and production can't continue due to that (e.g. PG can't be consumed to bots because they need LB which is dry), but this is easily averted by adding temporary extra storage to tanks that got full, rebalancing proportions on pumps, and then removing those temporary extra tanks once situation came to equilibrium by pumping them off.

Frightning
Filter Inserter
Filter Inserter
Posts: 807
Joined: Fri Apr 29, 2016 5:27 pm
Contact:

Re: How to avoid an oil deadlock

Post by Frightning »

Harkonnen604 wrote:In such situations I'd prefer to store everything as crude oil and stop refineries at all (it's easier to manage without tanks for HO/LO), and that's what actually happens when one of LB/PG tanks gets full. If you have enough chemical plants, you don't need any intermediate HO/LO stored at all. If you want to keep reserve for rebalancing, keep it as crude oil, like 9 tanks.

Also note that the topic is about deadlock - that's not the situation when refineries stop producing because there is no place to spit out HO/LO/PG. Deadlock is when one of tanks is full and the other is dry, and production can't continue due to that (e.g. PG can't be consumed to bots because they need LB which is dry), but this is easily averted by adding temporary extra storage to tanks that got full, rebalancing proportions on pumps, and then removing those temporary extra tanks once situation came to equilibrium by pumping them off.
The only reason to not want your refineries running full tilt as much as possible is because Crude Oil is denser than its derivative products (you avoid expansion problems). However, this tradeoff comes with needing more Oil Refineries in order to handle burst production. I think Crude Oil storage is also useful, but for a different reason: windfall oil.

When you get a new oil patch secured, you have no reason not to get it up and running; pumping oil at full tilt (with fastest speed modules available to you). The sooner you get that oil out the more you will have gotten at any given time in the future. This creates a problem where, when a decent deposit is new, it's producing TONS of oil, way more than you actually need or even want to have Oil refining infrastructure built for. Once it's been running for long enough, that rate will slow to a trickle and now you can gradually work down that reserve you accumulated.

At the same time, to minimize the number of refineries needed, you need HO and LO storage to hold the products (no reason to crack them preemptively because you lose flexibility for doing so), making even a few dozen storage tanks is fairly inexpensive (I've gotten by with far less in some of my saves), and you get a nice set of buffers to the various stages of the process, which helps to reduce the likelihood of a deadlock, or at least give you more time to foresee that will occur and make appropriate adjustments (such as switching back to basic oil processing in the Lub v PG situation w/ Logi bots).

Kelderek
Filter Inserter
Filter Inserter
Posts: 250
Joined: Tue Nov 11, 2014 6:04 pm
Contact:

Re: How to avoid an oil deadlock

Post by Kelderek »

Harkonnen604 wrote:In such situations I'd prefer to store everything as crude oil and stop refineries at all (it's easier to manage without tanks for HO/LO), and that's what actually happens when one of LB/PG tanks gets full. If you have enough chemical plants, you don't need any intermediate HO/LO stored at all. If you want to keep reserve for rebalancing, keep it as crude oil, like 9 tanks.

Also note that the topic is about deadlock - that's not the situation when refineries stop producing because there is no place to spit out HO/LO/PG. Deadlock is when one of tanks is full and the other is dry, and production can't continue due to that (e.g. PG can't be consumed to bots because they need LB which is dry), but this is easily averted by adding temporary extra storage to tanks that got full, rebalancing proportions on pumps, and then removing those temporary extra tanks once situation came to equilibrium by pumping them off.
We are talking about deadlock here and it boils down to this:
1. Your refineries are running because you are capable of using up everything they produce.
-OR-
2. Your refineries shut off and you store your crude oil until the demand picks up again.

A well designed system can handle changes in demand in real time without needing any storage tanks at all or at least a minimal number just for measurement. Don't forget that there are oil products inside all of your pipes which is a form of storage and should be sufficient to cover the small gaps when the system starts and stops.

Also, if you store your crude at all, do it in barrels. It is far more space efficient to use barrels and chests for storage and you are probably already doing this if you use trains.

Frightning
Filter Inserter
Filter Inserter
Posts: 807
Joined: Fri Apr 29, 2016 5:27 pm
Contact:

Re: How to avoid an oil deadlock

Post by Frightning »

Kelderek wrote:
Harkonnen604 wrote:In such situations I'd prefer to store everything as crude oil and stop refineries at all (it's easier to manage without tanks for HO/LO), and that's what actually happens when one of LB/PG tanks gets full. If you have enough chemical plants, you don't need any intermediate HO/LO stored at all. If you want to keep reserve for rebalancing, keep it as crude oil, like 9 tanks.

Also note that the topic is about deadlock - that's not the situation when refineries stop producing because there is no place to spit out HO/LO/PG. Deadlock is when one of tanks is full and the other is dry, and production can't continue due to that (e.g. PG can't be consumed to bots because they need LB which is dry), but this is easily averted by adding temporary extra storage to tanks that got full, rebalancing proportions on pumps, and then removing those temporary extra tanks once situation came to equilibrium by pumping them off.
We are talking about deadlock here and it boils down to this:
1. Your refineries are running because you are capable of using up everything they produce.
-OR-
2. Your refineries shut off and you store your crude oil until the demand picks up again.

A well designed system can handle changes in demand in real time without needing any storage tanks at all or at least a minimal number just for measurement. Don't forget that there are oil products inside all of your pipes which is a form of storage and should be sufficient to cover the small gaps when the system starts and stops.

Also, if you store your crude at all, do it in barrels. It is far more space efficient to use barrels and chests for storage and you are probably already doing this if you use trains.
I think you're missing an important subtlety. What you describe is great if you have a nicely built factory that is producing at a fixed rate and hence has fixed oil product demands (in terms of crude at least). But if your demand is irregular due to backlogging (e.g. you make a certain thing faster than needed and hence storage fills to desired capacity and then it backlogs, lowering demand). Conversely, it also requires that you are consistently feeding it adequately. Without buffers, even a fairly brief window of a lack of adequate feed can cause it to stop. In both cases, having non-trivial buffers can allow you to keep things running smoothly. The question is really: how much of a buffer is enough. That depends on two things: average throughput and severity of irregularities. Higher throughput increases amount of storage needed to handle an irregularity of proportionally the same size. Likewise the more irregular things are, the more buffer capacity you need to ensure smooth operation.

User avatar
brunzenstein
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Tue Mar 01, 2016 2:27 pm
Contact:

Re: How to avoid an oil deadlock

Post by brunzenstein »

Frightning wrote:
Jupiter wrote:
brunzenstein wrote:
Harkonnen604 wrote:What's the problem in putting like 16 tanks for PG and LB (with pumps at exit) and a lot of chemical plants to convert HO/LO instantly before they start blocking the whole process? In other words - what is the purpose of storing HO/LO?
The point is that the oil resource / well is used economical and don't run dry producing / dumping in never uses storage tanks.
No, the point is to never let your wells stop producing. A well can provide an infinite amount of oil so not always 24/7 producing at max capacity is actually a waste of oil. You use a little for lub, acid and plastic and the rest goes into fuel.
This is precisely the reason why Crude Oil and its derivatives are worth storing in the event that you are producing more than you are consuming. That said, you also want to crack as needed to satiate demand (thereby reducing storage needs and optimally converting Crude Oil Products into the proportions you actually need).
Not pumping more oil then (soon to be) needed would be more economical as well as make preemptive storage unnecessary.

Kelderek
Filter Inserter
Filter Inserter
Posts: 250
Joined: Tue Nov 11, 2014 6:04 pm
Contact:

Re: How to avoid an oil deadlock

Post by Kelderek »

Frightning wrote:I think you're missing an important subtlety. What you describe is great if you have a nicely built factory that is producing at a fixed rate and hence has fixed oil product demands (in terms of crude at least). But if your demand is irregular due to backlogging (e.g. you make a certain thing faster than needed and hence storage fills to desired capacity and then it backlogs, lowering demand). Conversely, it also requires that you are consistently feeding it adequately. Without buffers, even a fairly brief window of a lack of adequate feed can cause it to stop. In both cases, having non-trivial buffers can allow you to keep things running smoothly. The question is really: how much of a buffer is enough. That depends on two things: average throughput and severity of irregularities. Higher throughput increases amount of storage needed to handle an irregularity of proportionally the same size. Likewise the more irregular things are, the more buffer capacity you need to ensure smooth operation.
Well your oil processing needs to match your oil supply, if it proves to be insufficient then you need to expand both. But since oil is infinite, it usually works smoothly and consistently. But I suppose you're right that there could be a train accident somewhere that causes the flow of crude to my refineries to stop, so that is why it is helpful to have a small stockpile of crude in barrels between the train unloading and the refineries.

I think the big difference between what we're suggesting is that I am choosing to use storage for solid/rocket fuel instead of for liquids. My refineries will run as long as the demand for ANY oil product is non-zero. The system adjusts the ratios of what is output based on that demand. If the only demand in the system is for 10 lube and 0 petroleum then it will make 10 lube exactly and dump the remaining outputs to solid/rocket fuel and then stop.

Frightning
Filter Inserter
Filter Inserter
Posts: 807
Joined: Fri Apr 29, 2016 5:27 pm
Contact:

Re: How to avoid an oil deadlock

Post by Frightning »

Kelderek wrote:
Frightning wrote:I think you're missing an important subtlety. What you describe is great if you have a nicely built factory that is producing at a fixed rate and hence has fixed oil product demands (in terms of crude at least). But if your demand is irregular due to backlogging (e.g. you make a certain thing faster than needed and hence storage fills to desired capacity and then it backlogs, lowering demand). Conversely, it also requires that you are consistently feeding it adequately. Without buffers, even a fairly brief window of a lack of adequate feed can cause it to stop. In both cases, having non-trivial buffers can allow you to keep things running smoothly. The question is really: how much of a buffer is enough. That depends on two things: average throughput and severity of irregularities. Higher throughput increases amount of storage needed to handle an irregularity of proportionally the same size. Likewise the more irregular things are, the more buffer capacity you need to ensure smooth operation.
Well your oil processing needs to match your oil supply, if it proves to be insufficient then you need to expand both. But since oil is infinite, it usually works smoothly and consistently. But I suppose you're right that there could be a train accident somewhere that causes the flow of crude to my refineries to stop, so that is why it is helpful to have a small stockpile of crude in barrels between the train unloading and the refineries.

I think the big difference between what we're suggesting is that I am choosing to use storage for solid/rocket fuel instead of for liquids. My refineries will run as long as the demand for ANY oil product is non-zero. The system adjusts the ratios of what is output based on that demand. If the only demand in the system is for 10 lube and 0 petroleum then it will make 10 lube exactly and dump the remaining outputs to solid/rocket fuel and then stop.
The downside to choosing to store as Solid/Rocket Fuel over fluid form is lost flexibility. If you suddenly had demand for LO or PG, you have to process more crude to fill it, whereas if you store LO and PG, you now have a reserve which could fill that demand without even needing to run your refineries (for a while at least).

Frightning
Filter Inserter
Filter Inserter
Posts: 807
Joined: Fri Apr 29, 2016 5:27 pm
Contact:

Re: How to avoid an oil deadlock

Post by Frightning »

brunzenstein wrote:
Frightning wrote:
Jupiter wrote:
brunzenstein wrote:
Harkonnen604 wrote:What's the problem in putting like 16 tanks for PG and LB (with pumps at exit) and a lot of chemical plants to convert HO/LO instantly before they start blocking the whole process? In other words - what is the purpose of storing HO/LO?
The point is that the oil resource / well is used economical and don't run dry producing / dumping in never uses storage tanks.
No, the point is to never let your wells stop producing. A well can provide an infinite amount of oil so not always 24/7 producing at max capacity is actually a waste of oil. You use a little for lub, acid and plastic and the rest goes into fuel.
This is precisely the reason why Crude Oil and its derivatives are worth storing in the event that you are producing more than you are consuming. That said, you also want to crack as needed to satiate demand (thereby reducing storage needs and optimally converting Crude Oil Products into the proportions you actually need).
Not pumping more oil then (soon to be) needed would be more economical as well as make preemptive storage unnecessary.
Not necessarily: If your demand were to increase later to the point that it exceeded your max available production rate, then it would actually have been better to have left the pumps running and been storing the crude or derivate products if your refineries were faster than consumption. You get more oil out of a crude oil field at time x if you had it running continuously with the highest speed modules you have access to than under any other condition (time pumps not running at max possible speed=lost potential oil output).

Kelderek
Filter Inserter
Filter Inserter
Posts: 250
Joined: Tue Nov 11, 2014 6:04 pm
Contact:

Re: How to avoid an oil deadlock

Post by Kelderek »

Frightning wrote:The downside to choosing to store as Solid/Rocket Fuel over fluid form is lost flexibility. If you suddenly had demand for LO or PG, you have to process more crude to fill it, whereas if you store LO and PG, you now have a reserve which could fill that demand without even needing to run your refineries (for a while at least).
It's really 6 or one half dozen of the other. Your statement here implies that there is a delay associated with ramping up the production starting with crude, but in practice it is nearly instant. Again remember that all of the pipes count as small amounts of storage -- which exists at each stage of the oil process, and that is enough to handle the demand until the refineries and chem labs finish their first activity, which only takes a few seconds.

Frightning
Filter Inserter
Filter Inserter
Posts: 807
Joined: Fri Apr 29, 2016 5:27 pm
Contact:

Re: How to avoid an oil deadlock

Post by Frightning »

Kelderek wrote:
Frightning wrote:The downside to choosing to store as Solid/Rocket Fuel over fluid form is lost flexibility. If you suddenly had demand for LO or PG, you have to process more crude to fill it, whereas if you store LO and PG, you now have a reserve which could fill that demand without even needing to run your refineries (for a while at least).
It's really 6 or one half dozen of the other. Your statement here implies that there is a delay associated with ramping up the production starting with crude, but in practice it is nearly instant. Again remember that all of the pipes count as small amounts of storage -- which exists at each stage of the oil process, and that is enough to handle the demand until the refineries and chem labs finish their first activity, which only takes a few seconds.
You're thinking on too small a time frame. That small amount of pipe storage will hold you over a few seconds or may a minute or two if you have lots of long pipes, but sooner or later, if you're infrastructure isn't up to the task, it will start to slow because your storage is depleted. Having even a modest sized buffer prevents this, and gives you time to build the additional infrastructure needed to meet demand.

Jupiter
Fast Inserter
Fast Inserter
Posts: 174
Joined: Thu Jun 23, 2016 2:38 pm
Contact:

Re: How to avoid an oil deadlock

Post by Jupiter »

Frightning wrote:
Kelderek wrote:
Frightning wrote:The downside to choosing to store as Solid/Rocket Fuel over fluid form is lost flexibility. If you suddenly had demand for LO or PG, you have to process more crude to fill it, whereas if you store LO and PG, you now have a reserve which could fill that demand without even needing to run your refineries (for a while at least).
It's really 6 or one half dozen of the other. Your statement here implies that there is a delay associated with ramping up the production starting with crude, but in practice it is nearly instant. Again remember that all of the pipes count as small amounts of storage -- which exists at each stage of the oil process, and that is enough to handle the demand until the refineries and chem labs finish their first activity, which only takes a few seconds.
You're thinking on too small a time frame. That small amount of pipe storage will hold you over a few seconds or may a minute or two if you have lots of long pipes, but sooner or later, if you're infrastructure isn't up to the task, it will start to slow because your storage is depleted. Having even a modest sized buffer prevents this, and gives you time to build the additional infrastructure needed to meet demand.

Any early resources-shortage warning systems would indeed be useful for any raw resource. Then the question becomes, how much buffer do you want which translates directly to 'how much time do I want to fix any problems?' and 'at what rate do I consume (and expect to consume when a shortage might actually happen)?'.

Maybe it'll be useful to measure how much time it takes for you to setup a brand new working outpost + trainlines + extra stops at your mainstation.

This does not apply to building more refining (or smelting) capacity as this capacity should be increased as soon as you build more assemblers and stuff. Building assemblers and checking smelting capacity should always be done together.

guitarmanmike
Burner Inserter
Burner Inserter
Posts: 14
Joined: Thu Mar 17, 2016 4:01 pm
Contact:

Re: How to avoid an oil deadlock

Post by guitarmanmike »

Probably the simplest way to avoid a deadlock on oil is to add a steam engine and pump to each of the three types of storage and wire the pump to turn on at =2400. This will let the steam engine consume the extra oil product that is causing your refineries to stop. Yes it is wasting the abundant product(steam engine is an infinite consumer of liquids) but it will work and would actually let you get 2400 of each type in storage without requiring perfect ratios of storage/consumption.

You could also make the wiring of the pumps more complex to only turn on the infinite consumer if the type is full and one of the other types is empty. This way it is less likely to turn on and waste oil but is still effective in preventing a refinery shut off. Also it has the advantage of not filling up your storage with almost useless solid fuel (other than rocket products or trains)

Post Reply

Return to “Gameplay Help”