Page 1 of 1

Generic sushi belt manager

Posted: Tue Feb 27, 2018 2:54 pm
by imajor
This build manages a sushi belt by adding missing items from a chest. The good thing is that the list of items it manages is not fixed, it will work with whatever is in the chest. So if you need like batteries in the belt, just put a few stacks into the chest, and it will put them on the belt with gaps.

Image

Five tiles of the conveyor belt is read, the inventory is normalized by the left combinator (by normalizing I mean if something has more than 0, it will be reduced to 1). The chest content is also normalized, and multiplied by -1. Then these two will be summed at the inserter, and the result of that will set the filter of the inserter. The value for a given item type will only be 1 if the item is in the chest, but it is not in that five tiles of the conveyor belt. All the conveyor belts are set to read their content, I forgot to show that on the screenshot.

This is only managing one side of the belt, so that might be full soon. In that case the row of readers on the conveyor belt can be extended to longer, and items will spread more.

Re: Generic sushi belt manager

Posted: Tue Feb 27, 2018 4:45 pm
by Atlas
So if I understand it right, the two combinators on the right read what is on the belt and send it to the inserter as negative and the one on the left reads contents of the chest and sends it to the inserter too. So I suppose the inserter is set to work if the signal =/= 0, right?

Re: Generic sushi belt manager

Posted: Tue Feb 27, 2018 4:58 pm
by imajor
Atlas wrote:So if I understand it right, the two combinators on the right read what is on the belt and send it to the inserter as negative and the one on the left reads contents of the chest and sends it to the inserter too. So I suppose the inserter is set to work if the signal =/= 0, right?
Sorry, I forgot the inserter:

Image

It is setting the filter based on the signal, so it will always pick up the item which is needed at the belt and the chest contains it. It is not necessary to enable/disable the inserter, because if the belt has every item on the given section, the signal will be all zero, so there will be no filter set on the inserter. So it will not do anything.

Re: Generic sushi belt manager

Posted: Tue Feb 27, 2018 5:06 pm
by mrvn
You could improve this by computing "number of items that fit below the readers / number of item types in chest - 1" and adding an item if there are less than that under the reader. The density of items on the belt would auto adjust to the number of item types in the chest.

Re: Generic sushi belt manager

Posted: Tue Feb 27, 2018 5:07 pm
by Atlas
Nice work

Re: Generic sushi belt manager

Posted: Tue Feb 27, 2018 5:24 pm
by imajor
This is a short video showing how it works. You can see as I add two new item in the chest which were not present on the belt before. And the filter inserter also refills the items which the burner inserter removes at the left side.

https://www.youtube.com/watch?v=s2qgkE5oO5A

Re: Generic sushi belt manager

Posted: Tue Feb 27, 2018 5:27 pm
by imajor
mrvn wrote:You could improve this by computing "number of items that fit below the readers / number of item types in chest - 1" and adding an item if there are less than that under the reader. The density of items on the belt would auto adjust to the number of item types in the chest.
True, but then it wouldn't able to add new items into the belt, because it would be full already.

Re: Generic sushi belt manager

Posted: Tue Feb 27, 2018 5:47 pm
by eradicator
Oh. A generic solution would certainly be awesome. The only problem i see here is the single input inserter being too slow. A generic solution for belt based input (one item type per input belt), or multiple/stack inserters would be nice to have.

Re: Generic sushi belt manager

Posted: Wed Feb 28, 2018 11:28 am
by Fractaliste
If you replace the left decider combinator by a constant combinator you should be able to provide items with some ratio on the belt.

Re: Generic sushi belt manager

Posted: Wed Feb 28, 2018 11:31 am
by imajor
What do you mean by replacing? Ignoring the content of the chest?

Re: Generic sushi belt manager

Posted: Wed Feb 28, 2018 4:24 pm
by mrvn
imajor wrote:
mrvn wrote:You could improve this by computing "number of items that fit below the readers / number of item types in chest - 1" and adding an item if there are less than that under the reader. The density of items on the belt would auto adjust to the number of item types in the chest.
True, but then it wouldn't able to add new items into the belt, because it would be full already.
I assumed sometimes items would get removed from the belt. So over time place for new items would open up.