Setting stack size for smart smelter with bricks and steel

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
wingot
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Feb 15, 2018 7:27 am
Contact:

Setting stack size for smart smelter with bricks and steel

Post by wingot »

Hi all,

I have created a "Smart Smelter" setup using bots, primarily based on Teathymeterror's setup from last year (that itself is based on Scarhoof's setup). I have attached a picture of my setup, however pretty well all the logic seems to work beyond figuring out how to set the stack sizes to not be an issue and prevent clogging of the furnaces.

The solution that I currently have in place is that if stone or iron is requested to be placed into the smelter, that another decider combinator detects this and outputs a signal S with a value of 2 or 5 respectively for bricks or steel. This value of S is then sent along the same circuit network as the filter signal, and all the stack filter inserters are set up to "set stack size" based on a control signal of "S". Most of the time this seems to work fine, and when the demand is for iron plates to be inserted they are inserted 5 at a time, and stone is inserted 2 at a time.

Frequently (as in, far too frequently to ignore) an issue shows up at changeover time though, where less than 5 iron or only 1 stone wind up being placed into the smelters. I originally thought this was an issue with the input running out (the iron plates literally ran out at one point) and so set up an interceptor that overrides the iron plate or stone signals if there is not adequate spare demand, and I have also heavily increased the quantity of logistics bots in play. However, the issue still occurred, and I was able to confirm that the issue occurs even when plenty of stock is in the input chest.

As far as I can tell I think this is related to different ticks being used to specify the two different signals (what to filter on and how many to insert), and the issue seems particularly prominent if there is a very short demand for a type of item (say, stone) and a flicker occurs. So, the main question is: how can I ensure that the tick that the item filter requests occur is the same tick that the stack size requests occur? Alternatively, has someone else had the same situation and came up with a novel solution to this dilemma of the furnaces getting jammed.
Attachments
Smelter.png
Smelter.png (3.68 MiB) Viewed 1034 times

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

Re: Setting stack size for smart smelter with bricks and steel

Post by mrvn »

You need to add arithmetic combinators with "each + 0 = each" to the signal paths so all signals travel in parallel.

When designing your circuits it's best to start with all your signals coming in from the left on power poles. Then build the circuit from left to right placing each combinator directly to the right of its inputs. And you can only use signals directly to the left as input. If there is a gap for any input then you need to add "each + 0 = each" combinators to the signal till there isn't.

When you are all done and everything works then you can move things around and optimize.

wingot
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Feb 15, 2018 7:27 am
Contact:

Re: Setting stack size for smart smelter with bricks and steel

Post by wingot »

mrvn wrote:You need to add arithmetic combinators with "each + 0 = each" to the signal paths so all signals travel in parallel.

When designing your circuits it's best to start with all your signals coming in from the left on power poles. Then build the circuit from left to right placing each combinator directly to the right of its inputs. And you can only use signals directly to the left as input. If there is a gap for any input
Yes, this was originally figured out using the left to right method, although not allowing for gaps (think I just skipped over them if nothing was required).
mrvn wrote: then you need to add "each + 0 = each" combinators to the signal till there isn't.
Oooh, I like that, each + 0, sort of like a repeater to add in the delay. I did actually do something like that since making this post and it *mostly* fixed it (still occasional clog, but nowhere near as common), however only the steel and stone had the extra delays built in. You've made me realise that the copper and iron signals coming in are skipping 2 layers of ticks as well which could also be causing issues.

I'll decompress the logic back out and look for processing gaps in the processing. Appreciate the advice.

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

Re: Setting stack size for smart smelter with bricks and steel

Post by mrvn »

There are some mods out there to set the game speed. I think there even is one to single step. Or set it directly on the lua console. If you can't see the error from the design then those and some lights can help you see the signal changes in slow motion.

Post Reply

Return to “Gameplay Help”