Let us override inserters remove fuel from furnaces

Post your ideas and suggestions how to improve the game.
Aeternus
Filter Inserter
Filter Inserter
Posts: 829
Joined: Wed Mar 29, 2017 2:10 am

Re: Let us override inserters remove fuel from furnaces

Post by Aeternus » Tue Feb 06, 2018 12:59 pm

bobingabout wrote:It's hard to keep track of how things work like this, since the devs keep changing it.

Currently though, you can ripple science packs through labs by having inserters remove them from one lab to put in another.... unless they turned that off again.
Yea, you can... but to be honest? I've found that the rippling actually makes research inefficient, since the research packs moving through the chain of inserters shuts down research. I'll stick with a dual belt setup on each side of the labs and use longhanded inserters for the wide belt. It consumes a bit more space, sure, but I'll take the extra productivity of the labs over space saved.

Fuel moving out of burners however... that could create both problems and solutions. When would a burner know when not to do that? If you want it to move metal plates onto a belt but not coal... that'd require a filter inserter. But in very early setups those would not be available, or may even be prohibitive powerwise.

mrvn
Smart Inserter
Smart Inserter
Posts: 2579
Joined: Mon Sep 05, 2016 9:10 am

Re: Let us override inserters remove fuel from furnaces

Post by mrvn » Tue Feb 06, 2018 3:06 pm

Aeternus wrote:
bobingabout wrote:It's hard to keep track of how things work like this, since the devs keep changing it.

Currently though, you can ripple science packs through labs by having inserters remove them from one lab to put in another.... unless they turned that off again.
Yea, you can... but to be honest? I've found that the rippling actually makes research inefficient, since the research packs moving through the chain of inserters shuts down research. I'll stick with a dual belt setup on each side of the labs and use longhanded inserters for the wide belt. It consumes a bit more space, sure, but I'll take the extra productivity of the labs over space saved.

Fuel moving out of burners however... that could create both problems and solutions. When would a burner know when not to do that? If you want it to move metal plates onto a belt but not coal... that'd require a filter inserter. But in very early setups those would not be available, or may even be prohibitive powerwise.
The BurnerLeach module already solves that.

Fuel is only leached for the inserter itself or if the target is a fuel using entity. So no fuel gets dumped onto the output belt. But fuel gets transfered between the iron plate furnace and steel plate furnace along with the iron plates.

PS: filter inserters are much less required since splitters can now filter from the start

User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 399
Joined: Wed Jul 12, 2017 5:45 pm

Re: Let us override inserters remove fuel from furnaces

Post by Oktokolo » Tue Feb 06, 2018 3:46 pm

mrvn wrote:I think burner inserters should have 2 states: Normal and refuel.
They don't need more state. They can only take any load if they are empty and hovering over their pickup location. Whenever that is the case they can decide what to pick up depending on whether anything needs refuelling and what items are available. If they themselves or their drop target needs refuelling and some matching fuel is available, pick that up - else do, what they do now: pick up anything needed by the drop target, or if that has no special needs (like a belt or empty tile or something that does not take anything), pick up the first available item.
mrvn wrote:Setting a filter for a non-existent item should make it only pick up fuel.
Filters limit, what can be picked up. That is a sane vanilla behaviour that really makes sense and is already established also for inserters that transport fuel from belts into their drop targets.
There are no vanilla filter burner inserters. But if there where, they could rather easily be side feeded by another burner inserter (burner inserter chaining already just works with InserterFuelLeech). So i don't think, easier feeding of filter burner inserters is worth the a deviation from the well-known vanilla behaviour of filters.
mrvn wrote:I would create a priority queue (heap in an array is probably a good data structure for it). Put all inserter into the queue sorted by T. Then each tick you check the top of the heap. While T <= tick count you re-check the fuel situation of the inserter and either switch it to refuel state or normal and reinsert it into the queue.
A priority queue could indeed be the way to go. I could at least calculate the way back to the pickup position and avoid rechecking an inserter until it is expected to be near that. The game is deterministic so (in theory) i could get perfect pick ups (one tick before vanilla behaviour kicks in) that way.
I could implement it as a linked list for O(1) insert and pop.
Aeternus wrote:I've found that the rippling actually makes research inefficient, since the research packs moving through the chain of inserters shuts down research.
The labs keep researching as long as they have at least one of each required pack in stock. Feeding enough packs will keep em stocked so that removal of some packs does not dry em out as long as you do not use stack inserters for linking the labs or let more inserters take from a lab than are feeding it.
Never had problems with chains of lengths up to 5 labs in sequence.
Aeternus wrote: Fuel moving out of burners however... that could create both problems and solutions. When would a burner know when not to do that?
That is an easy one: Remove fuel from a fuel inventory when the inserter itself or it's drop target needs refuelling. That is the logic implemented by InserterFuelLeech. It works just fine that way.
The only problematic case - where the player hand-feeds something that an inserter just has leeched some fuel for - is handled by the vanilla behaviour as expected: The suddenly unneeded fuel gets dropped into the drop target as soon as possible - wich could be never. It is the same behaviour you also get when force-feeding anything that is not chained.

mrvn
Smart Inserter
Smart Inserter
Posts: 2579
Joined: Mon Sep 05, 2016 9:10 am

Re: Let us override inserters remove fuel from furnaces

Post by mrvn » Thu Feb 08, 2018 10:26 am

Oktokolo wrote:
mrvn wrote:I think burner inserters should have 2 states: Normal and refuel.
They don't need more state. They can only take any load if they are empty and hovering over their pickup location. Whenever that is the case they can decide what to pick up depending on whether anything needs refuelling and what items are available. If they themselves or their drop target needs refuelling and some matching fuel is available, pick that up - else do, what they do now: pick up anything needed by the drop target, or if that has no special needs (like a belt or empty tile or something that does not take anything), pick up the first available item.
What you are describing is the current behaviour which leads to the burner inserter running out of fuel. They MUST NOT pick up anything but fuel if they are short on fuel themself.
Oktokolo wrote:
mrvn wrote:Setting a filter for a non-existent item should make it only pick up fuel.
Filters limit, what can be picked up. That is a sane vanilla behaviour that really makes sense and is already established also for inserters that transport fuel from belts into their drop targets.
There are no vanilla filter burner inserters. But if there where, they could rather easily be side feeded by another burner inserter (burner inserter chaining already just works with InserterFuelLeech). So i don't think, easier feeding of filter burner inserters is worth the a deviation from the well-known vanilla behaviour of filters.
I'm not talking about adding filter burner inserter the user can use. I'm talking about making burner inserters internally be filter burning inserters and filter for fuel only if and only if they should refuel them self instead of picking up whatever they normally do.
Oktokolo wrote:
mrvn wrote:I would create a priority queue (heap in an array is probably a good data structure for it). Put all inserter into the queue sorted by T. Then each tick you check the top of the heap. While T <= tick count you re-check the fuel situation of the inserter and either switch it to refuel state or normal and reinsert it into the queue.
A priority queue could indeed be the way to go. I could at least calculate the way back to the pickup position and avoid rechecking an inserter until it is expected to be near that. The game is deterministic so (in theory) i could get perfect pick ups (one tick before vanilla behaviour kicks in) that way.
I could implement it as a linked list for O(1) insert and pop.
You are thinking of covering just one pickup. But if the burner inserter has 5 coal in the fuel slot then it can do 200 pick ups. You don't have to check it for nearly 8 minutes.
Oktokolo wrote:
Aeternus wrote:I've found that the rippling actually makes research inefficient, since the research packs moving through the chain of inserters shuts down research.
The labs keep researching as long as they have at least one of each required pack in stock. Feeding enough packs will keep em stocked so that removal of some packs does not dry em out as long as you do not use stack inserters for linking the labs or let more inserters take from a lab than are feeding it.
Never had problems with chains of lengths up to 5 labs in sequence.
The trick there is to override the stack size to 1 or the inserters can take out all the science packs of a color.

But seriously, if your research is limited by the number of science labs then build more science labs. Otherwise rippling or not your research will go at the speed you produce science packs.
Oktokolo wrote:
Aeternus wrote: Fuel moving out of burners however... that could create both problems and solutions. When would a burner know when not to do that?
That is an easy one: Remove fuel from a fuel inventory when the inserter itself or it's drop target needs refuelling. That is the logic implemented by InserterFuelLeech. It works just fine that way.
The only problematic case - where the player hand-feeds something that an inserter just has leeched some fuel for - is handled by the vanilla behaviour as expected: The suddenly unneeded fuel gets dropped into the drop target as soon as possible - wich could be never. It is the same behaviour you also get when force-feeding anything that is not chained.
I've run into that problem a time or two. Really annoying. Entities should accept one handful of input from an inserter over what the player can feed into it with ctrl+click. Weather that means that ctrl+click inserts only stack size - inserter stack bonus many items or them accepting a full hand when available <= stack size I don't care. The later would probably be easier to code.

User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 399
Joined: Wed Jul 12, 2017 5:45 pm

Re: Let us override inserters remove fuel from furnaces

Post by Oktokolo » Thu Feb 08, 2018 1:48 pm

mrvn wrote:
Oktokolo wrote:
mrvn wrote:I think burner inserters should have 2 states: Normal and refuel.
They don't need more state. They can only take any load if they are empty and hovering over their pickup location. Whenever that is the case they can decide what to pick up depending on whether anything needs refuelling and what items are available. If they themselves or their drop target needs refuelling and some matching fuel is available, pick that up - else do, what they do now: pick up anything needed by the drop target, or if that has no special needs (like a belt or empty tile or something that does not take anything), pick up the first available item.
What you are describing is the current behaviour which leads to the burner inserter running out of fuel. They MUST NOT pick up anything but fuel if they are short on fuel themself.
It is not the current behaviour in vanilla. It is the behaviour i implemented in my mod. It would be absolutely reliable, if it where implemented in vanilla because it would be guaranteed to be executed whenever the inserter would be abaut to pick something up.
mrvn wrote: I'm not talking about adding filter burner inserter the user can use. I'm talking about making burner inserters internally be filter burning inserters and filter for fuel only if and only if they should refuel them self instead of picking up whatever they normally do.
That would probably work and i already requested it as alternative for more direct control over inserter behaviour for mods.
mrvn wrote: You are thinking of covering just one pickup. But if the burner inserter has 5 coal in the fuel slot then it can do 200 pick ups. You don't have to check it for nearly 8 minutes.
Yes, that would probably be more UPS-friendly. Will implement it and update the priority queue whenever another inserter leeches fuel from an inserter or it's drop target.
mrvn wrote: I've run into that problem a time or two. Really annoying.
You shall not hand feed automated stuff. ;)

mrvn
Smart Inserter
Smart Inserter
Posts: 2579
Joined: Mon Sep 05, 2016 9:10 am

Re: Let us override inserters remove fuel from furnaces

Post by mrvn » Mon Feb 12, 2018 10:29 am

Oktokolo wrote:
mrvn wrote:
Oktokolo wrote:
mrvn wrote:I think burner inserters should have 2 states: Normal and refuel.
They don't need more state. They can only take any load if they are empty and hovering over their pickup location. Whenever that is the case they can decide what to pick up depending on whether anything needs refuelling and what items are available. If they themselves or their drop target needs refuelling and some matching fuel is available, pick that up - else do, what they do now: pick up anything needed by the drop target, or if that has no special needs (like a belt or empty tile or something that does not take anything), pick up the first available item.
What you are describing is the current behaviour which leads to the burner inserter running out of fuel. They MUST NOT pick up anything but fuel if they are short on fuel themself.
It is not the current behaviour in vanilla. It is the behaviour i implemented in my mod. It would be absolutely reliable, if it where implemented in vanilla because it would be guaranteed to be executed whenever the inserter would be abaut to pick something up.
It is the current behaviour in vanilla (for the first inserter, not for chaining them). The problem is the "and some matching fuel is available". If no fuel is available the burner inserter will pick up some iron ore and put it in the furnace and then it runs out of fuel. My suggestion with using filters is just to make sure it waits for fuel when none is available.

User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 399
Joined: Wed Jul 12, 2017 5:45 pm

Re: Let us override inserters remove fuel from furnaces

Post by Oktokolo » Mon Feb 12, 2018 9:16 pm

mrvn wrote:The problem is the "and some matching fuel is available". If no fuel is available the burner inserter will pick up some iron ore and put it in the furnace and then it runs out of fuel. My suggestion with using filters is just to make sure it waits for fuel when none is available.
The player has to ensure that inserters always have fuel available for pickup. That is a legitimate (and easy) challenge.

mrvn
Smart Inserter
Smart Inserter
Posts: 2579
Joined: Mon Sep 05, 2016 9:10 am

Re: Let us override inserters remove fuel from furnaces

Post by mrvn » Tue Feb 13, 2018 10:06 am

Oktokolo wrote:
mrvn wrote:The problem is the "and some matching fuel is available". If no fuel is available the burner inserter will pick up some iron ore and put it in the furnace and then it runs out of fuel. My suggestion with using filters is just to make sure it waits for fuel when none is available.
The player has to ensure that inserters always have fuel available for pickup. That is a legitimate (and easy) challenge.
Jet every once in a blue moon some burner inserter fails to get fuel for some reason or another.

It might be easy with a simple half coal / half iron ore belt but when you start chaining inserter, boiler, furnaces and even burning assembler you get races where fuel is temporarily lacking. Especially at startup. I also noticed that inserters insert fuel into burning assemblers last if other ingreediences are available increasing the risk of a chained inserter running out of fuel.

User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 399
Joined: Wed Jul 12, 2017 5:45 pm

Re: Let us override inserters remove fuel from furnaces

Post by Oktokolo » Tue Feb 13, 2018 2:55 pm

mrvn wrote:It might be easy with a simple half coal / half iron ore belt but when you start chaining inserter, boiler, furnaces and even burning assembler you get races where fuel is temporarily lacking.
Any burner-assembler-containing part of the factory has to be connected to the coal first. That is something, the player should be able to live with.
mrvn wrote:Especially at startup. I also noticed that inserters insert fuel into burning assemblers last if other ingreediences are available increasing the risk of a chained inserter running out of fuel.
That is the real problem. And it can be solved by prioritizing needed fuel over anything else in the pickup logic. Inserters have access to all the state they need. Vanilla burner inserters even do pick up fuel for themselves when they need it even if there is enough other stuff to pick up. The missing parts are the decision logic to take the drop target's fuel inventory into account and the pickup logic to pick from fuel inventories (leeching) too.

mrvn
Smart Inserter
Smart Inserter
Posts: 2579
Joined: Mon Sep 05, 2016 9:10 am

Re: Let us override inserters remove fuel from furnaces

Post by mrvn » Tue Feb 13, 2018 3:53 pm

Oktokolo wrote:
mrvn wrote:It might be easy with a simple half coal / half iron ore belt but when you start chaining inserter, boiler, furnaces and even burning assembler you get races where fuel is temporarily lacking.
Any burner-assembler-containing part of the factory has to be connected to the coal first. That is something, the player should be able to live with.
mrvn wrote:Especially at startup. I also noticed that inserters insert fuel into burning assemblers last if other ingreediences are available increasing the risk of a chained inserter running out of fuel.
That is the real problem. And it can be solved by prioritizing needed fuel over anything else in the pickup logic. Inserters have access to all the state they need. Vanilla burner inserters even do pick up fuel for themselves when they need it even if there is enough other stuff to pick up. The missing parts are the decision logic to take the drop target's fuel inventory into account and the pickup logic to pick from fuel inventories (leeching) too.
Except I believe that logic is also flawed when the belt isn't saturated. They pick up the item nearest to the pickup point even if fuel is also available. Or I'm seeing it wrong and fuel is only on the previous belt tile when they decide what to pick up. Hard to tell when exactly an item crosses from one belt tile to the other. I guess with circuit logic it should be easy to test. Enable a belt full of fuel in one tick so it moves onto the next belt tile and enable the burner inserter
a tick later.

Zavian
Smart Inserter
Smart Inserter
Posts: 1122
Joined: Thu Mar 02, 2017 2:57 am

Re: Let us override inserters remove fuel from furnaces

Post by Zavian » Tue Feb 13, 2018 4:59 pm

mrvn wrote:
Oktokolo wrote:
mrvn wrote:It might be easy with a simple half coal / half iron ore belt but when you start chaining inserter, boiler, furnaces and even burning assembler you get races where fuel is temporarily lacking.
Any burner-assembler-containing part of the factory has to be connected to the coal first. That is something, the player should be able to live with.
mrvn wrote:Especially at startup. I also noticed that inserters insert fuel into burning assemblers last if other ingreediences are available increasing the risk of a chained inserter running out of fuel.
That is the real problem. And it can be solved by prioritizing needed fuel over anything else in the pickup logic. Inserters have access to all the state they need. Vanilla burner inserters even do pick up fuel for themselves when they need it even if there is enough other stuff to pick up. The missing parts are the decision logic to take the drop target's fuel inventory into account and the pickup logic to pick from fuel inventories (leeching) too.
Except I believe that logic is also flawed when the belt isn't saturated. They pick up the item nearest to the pickup point even if fuel is also available. Or I'm seeing it wrong and fuel is only on the previous belt tile when they decide what to pick up. Hard to tell when exactly an item crosses from one belt tile to the other. I guess with circuit logic it should be easy to test. Enable a belt full of fuel in one tick so it moves onto the next belt tile and enable the burner inserter
a tick later.
For smelting, smelters don't use much coal, you can normally keep the coal side of the belt pretty full (assuming you have enough coal mining). If you can put coal on the inside of the belt, coal should always be available, and closer to the inseters, so they should always pick coal up when they need it. Also they probably have trouble picking up from a moving red or blue belts, so you probably shouldn't use burner inserters to pick up from anything faster than a yellow belt.

Regarding chaining fuel through multiple boilers etc, why would you do that in stock in 0.15 or 0.16?

User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 399
Joined: Wed Jul 12, 2017 5:45 pm

Re: Let us override inserters remove fuel from furnaces

Post by Oktokolo » Tue Feb 13, 2018 9:05 pm

Zavian wrote:Regarding chaining fuel through multiple boilers etc, why would you do that in stock in 0.15 or 0.16?
There is the obvious case of making steel directly from ore with double smelter columns. But i also tested a space-efficient three-row boiler setup that looks great:
triple row boiler setup.jpg
triple row boiler setup.jpg (124.98 KiB) Viewed 753 times
There is no reason not to do it. Even the snail-slow burner inserters are fast enough if you use two of them for the first row.

If we had the option to chain all the other stuff too, that would even enable inserter-chained production streets for a lot of the slower recipes (like science packs):
ingredient-leeching blue science.jpg
ingredient-leeching blue science.jpg (228.21 KiB) Viewed 753 times
We would also get a new use case for filter inserters for loop avoidance - now that filter splitters do everything better for what we used filter inserters for before...

mrvn
Smart Inserter
Smart Inserter
Posts: 2579
Joined: Mon Sep 05, 2016 9:10 am

Re: Let us override inserters remove fuel from furnaces

Post by mrvn » Thu Feb 15, 2018 11:33 am

I'm playing with Bobs, Angels, AAI and burnerleach mods and then you start with burner assembler and burner science labs. You can do a very simple red science setup by putting a wooden chest in the middle, fill it with 10 iron plate stacks, 5 copper plate stacks and one coal stack. Attach one assembler to the top for iron gear wheels and 2 to the sides for red science packs. Then add 4 science labs (2 left, two right) attached to the red science assemblers. All with burner inserters. Thanks to burnerleach everything will get coal from the chest in the middle.

Similar with ore mining, ore crushing, smelting and creating stone and stone bricks from the excess crushed stone.

Note that you don't have any belts and no electricity at the start for quite a while. I tend to keep the chained setup even when I do until I finish setting up the more complex ore sorting chain with angels smelting instead of putting crushed ore directly into stone furnace.

arj562000@yahoo.com
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Feb 25, 2018 8:57 am

Furnace Coal Daisy Chains

Post by arj562000@yahoo.com » Sun Feb 25, 2018 9:01 am

Can we please have inserters be able to take coal out of furnaces and insert into other furnaces? The ability to do this with Labs is amazing, and it should be the same with furnaces! :D

User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm

Re: Furnace Coal Daisy Chains

Post by impetus maximus » Sun Feb 25, 2018 11:37 am


User avatar
Kayanor
Global Moderator
Global Moderator
Posts: 550
Joined: Sat May 10, 2014 7:20 am

Re: Furnace Coal Daisy Chains

Post by Kayanor » Sun Feb 25, 2018 1:31 pm

impetus maximus wrote:54431
Merged.

Post Reply

Return to “Ideas and Suggestions”