Best way to reliably alternate multiple items on one lane?
Posted: Sat Jan 13, 2018 3:11 pm
by Oktokolo
My use case is optimizing away belts for production that needs more than two ingredients in small and fixed quantities without using bots.
For this i need a reliable and compact way to fill a single lane with two or more items, so that the products are placed in sequence on that single lane without ever leaving out one product or placing items multiple times in a row. If any item is unavailable, no item should be placed to avoid clogging the lane.
I am experienced with rainbow sushi belts but want to avoid the sushi loop to reduce the overall footprint.
After trying different approaches i had the following that seems to work:
reliable item alternator.png (84.63 KiB) Viewed 13060 times
Availability detection outoputs E = 1 if both items are available. Item selection loops through hand placed items on its belt loop and stops if E != 1. The arithmethic combinator next to the inserter multiplies the selected item with E, so the inserter does not see the selected item if any item is unavailable.
It needs a lot of space for the logic. Also, the item-selection loop and the availablility-detection logic don't scale too well for more ingredients. Are there more space-efficient designs?
As the two-on-a-lane case is rather common due to a lot of recipes using three or four ingredients, i am interested in optimizations usable only for that case too.
Re: Best way to reliably alternate multiple items on one lane?
Posted: Sat Jan 13, 2018 8:41 pm
by quyxkh
Easier once circuit-speak starts virally taking over your mind: don't bother with the single-lane requirement, make a loop and set the filter for loading it by absence, feed the read-hold from some loop segment(s) and a constant -1 for the ingredients you want through an Each<0⇒1 Each to the set-filter input, the more segments you wire for detection the less full the belt will be, wiring just one segment is enough to leave room for two ingredients, even if one of them's temporarily unavailable there'll be room left for it when it arrives:
snap@T150905=586x636+21.484375-8.3984375,z2.jpg (25.87 KiB) Viewed 13039 times
(I made that by just shutting off the iron-plate signal in the constant combinator).
Here's a single-lane variant if you really want that,
snap@T219256=546x457+21.1875-6.54296875,z2.jpg (18.47 KiB) Viewed 13039 times
it needs two read-hold segments to avoid flooding with the 16.16 splitters.
Re: Best way to reliably alternate multiple items on one lane?
Posted: Sat Jan 13, 2018 10:27 pm
by Oktokolo
I try to avoid the sushi loop here. I know, that it simplyfies avoiding the clogging in case of missing ingredients. But it also needs routing the ingredients belt back to the input.
Re: Best way to reliably alternate multiple items on one lane?
Re: Best way to reliably alternate multiple items on one lane?
Posted: Sun Jan 14, 2018 3:01 am
by eradicator
I've tried using something almost identical to the russian video before, but it was very prone to clogging up slowly, as the inserters in front grab one type of item and the assemblers further down the line are clogged with the other types. I suspect in the video it only seems to work so seemlessly because they use slow inserters, slow belts and probably have no stack bonus. That said if someone can show that it works with bluebelt + stackserters just fine i'll be very happy .
(Btw, because the video doesn't really explain it: The mechanic used is that you can fit exactly 2 yellow belts on a red belt when sideloading, and 3 yellow on a blue. As long as all belts move at full speed this gives perfect ratios even without any circuitry.)
Re: Best way to reliably alternate multiple items on one lane?
Posted: Sun Jan 14, 2018 1:23 pm
by Oktokolo
eradicator wrote:I've tried using something almost identical to the russian video before, but it was very prone to clogging up slowly, as the inserters in front grab one type of item and the assemblers further down the line are clogged with the other types.
You have to have the last assemblers of the line grab from multiple tiles of the belt. Statistically with only one recipe beeing made, equal quantities of each ingredient should reach the tail of the belt when observed over large enough a time frame. This limits the length of the assembling line, but with 10 assemblers grabbing ingredients on each side it worked for me when letting the last assemblers grab from two tiles of the belt. You could even split the belt on the end and let the last assemblers grab from five tiles...
I am not going for higher belt speeds on this because merging multiple yellow outputs to a red or blue is easy enough and beltwork generally is incredibly beautifull to look at since the HD overhaul.