Generic sushi belt manager
Generic sushi belt manager
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.
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.
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
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
Sorry, I forgot the inserter: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?
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
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
Nice work
Re: Generic sushi belt manager
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
https://www.youtube.com/watch?v=s2qgkE5oO5A
Re: Generic sushi belt manager
True, but then it wouldn't able to add new items into the belt, because it would be full already.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.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Generic sushi belt manager
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.
-
- Inserter
- Posts: 28
- Joined: Wed Dec 06, 2017 9:20 am
- Contact:
Re: Generic sushi belt manager
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
What do you mean by replacing? Ignoring the content of the chest?
Re: Generic sushi belt manager
I assumed sometimes items would get removed from the belt. So over time place for new items would open up.imajor wrote:True, but then it wouldn't able to add new items into the belt, because it would be full already.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.