Factorio

Factorio

View Stats:
NF_Crenos Apr 10, 2022 @ 3:51pm
"Automatic" logistics sorting?
So I've just started making a sorting station for my logistics network. The way I'm doing it is: Bots drop stuff in Storage chests-> inserters takes the content onto belt that goes around a bunch of Filter Inserters-> Filter Inserters puts the set item into Passive Provider chests.

Fairly easy, but I have to manually set all items. Which is tedious.
So I thought to myself "why not make it even worse for myself?" I was thinking of a way to make it so inserters filter out whatever the PREVIOUS inserter picked up, effectively making a self-refreshing blacklist or whitelist of sorts, while also taking into account the content of each chest.

I dunno if I'm explaining it properly even to myself. I want every inserter in to pick up everything they see, MINUS the item that already exists in a local chests that other inserters have picked up.
So when a chest has an item in it, lets say Iron Plates, no other inserters will take Iron Plates off the belt. When there's no chests with Iron Plates, the "blacklist" updates, and inserters with empty chests will allow Iron Plates.

I can't even think of a way to start properly conceptualizing this build. I'm REALLY bad with circuit network stuff too.
Also, I don't mind if it's complicated as heck compared to just simply making a manual sorting area. I just wanna know if it can be done.
< >
Showing 1-7 of 7 comments
Fel Apr 10, 2022 @ 4:18pm 
The blacklist part is fairly easy to do as you just need to read the content of all of your "sorted" chests but the problem is that several inserters could start picking up an item not on the blacklist before it gets to any chest and there isn't really a way around it without making it quite complex since you would also need to read all inserters and process their signal into the blacklist and into the other inserters before they start picking up the same item...
(end of rant)


In theory it can be done but the deeper you dig, the more complex it becomes.
If you want to do it for the sake of doing it then you can go for it but it's really one of those projects that are too complex to be worth it in normal cases.
AlexMBrennan Apr 10, 2022 @ 4:31pm 
The correct way to solve this problem is to not bother - just build more storage chests and wait for the items to be requested.

Fairly easy, but I have to manually set all items. Which is tedious.
So I thought to myself "why not make it even worse for myself?" I was thinking of a way to make it so inserters filter out whatever the PREVIOUS inserter picked up, effectively making a self-refreshing blacklist or whitelist of sorts, while also taking into account the content of each chest.
It's possible but very ugly.

The way I would do it is to set the inserter whitelist based on the contents of the chest or, if the chest is empty, a random item from the belt in front of the inserter.

Then you take the contents of the chest, set its value to -100 and add it to what is on the belt in front of all subsequent inserters to only add items which have not already been picked up to the whitelist.

https://steamcommunity.com/sharedfiles/filedetails/?id=2792592300

0eNrtnW9v4kYQxr+LX1bm5P2/Rmql+xxVhRzYJJbARsakjU757rUhuSSwu56Zi6go+6ZXCAz2PI93Z3722j+yu/Xebbu66bP5j6xets0um//5I9vVD021Ht/rn7cum2d17zZZnjXVZny1cst65brZst3c1U3Vt132kmd1s3L/ZHP2kk8G6Luq2W3brp/duXX/4cv85a88c01f97U7bsrhxfOi2W/uXDdED8XIs227G77WNuOvjqG+qTx7zuYz+029jNt0EomDI4m3SOUQKc9WdeeWxz9zT1yB30JQXAmOK1FxVUzWs9gfcvopss6zwT19164Xd+6xeqqHLw/feA25GP62OoTZje/e192uX5x55Knu+v3wzs8NOn5i9n00yOjNvhqNWowvNtuqO2zhPPt9+EK777d7REj35Lrn/rFuHo6xt8/DJu6bfnHftZtF3QzBsvl9td65l+NvN8cdPWw+G//TudVHf9bDKzZIv6y75b7uD68PZn7onGtOP2nOPjj8Cg+FLYY/+xyswY5QKEcYlCPMf+CIqvkoXsgYfxCM8Tny19iCvcvrdYP67AYWkNuC5TYouUtwXI2Ky4qfge/rdT/YqG52rhv+5zxy+Q05sLwlbNOu3KK9X7RbN8h++AaDS6NOj8P8s3JylCJ/3fzjfPQ2y/3ct7prm9l2XfUuG3U+TwN8yrLBLMh4FlxT3a3dYlXvxn9fLfq+b52rVovHqlmNR10/bN+wK323//CJt/ePHx2TisqjgTmYcXwqzqwmfYEFasgat8ObZn6VY9Z36mDlHY0Opg/PRsDBir2XK7veufVs+eh2Hp1Z8dnz0DG1CM6tp7MwOz2ooXuAK4zGHf4feerXCySKuZiOayc4ULv30qjq6v5x4/p6GZdP4+R7D/trCrpq+ThmeOfGMIt3EWesGHT8MK1lv1FkPITHFCsKU5pyGRLA4Lsg4+/TmMWH0oFQJaXX0anX8ShvoL0OZyhHqYCjeEHRziTtPDkuwdpxlHYipB2jdJQ6dZShROuJjpKVsHmSc4owJgkTmw9jwoyjGE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II1AlaoGE0RhiVhYgVJVBjgOkRjCDiYXRQHGxnHczbELo0l7Ftx2X2buCzXhpYvmhLPZYtru5XqBEKzFsawbYHPFbuyXOmJm8kYIDWwjIQbi4Qbz8dgG4cA0LnTcixuZBjcOBZTgarMiq9BUZZ2YoQlU3k0mSiNgfO+RZ8YKVCmsmFTTVz7a6H3gKfdlLhIfDNcVWpovzYxtFngeQirSRqypCEGbOakkcQiq6+gxoaKSIsbR6RW4Z6NEoLU1lIVYLeuAA5LhS7ZtCWaLAfAclmgIwVod8nQD306b/t9cTn64UywuAL9iB9YXAruTaTeOwCBb6RWoka2MoTqSwruTbSXRWeQGFUsgd1FqdEPUoIdrAb94CdYXAIpvCwoLCcgKCuCWuBJIShnhxkZGfjaCKSduGVHCX2ATsGQ7Taq2y7D3fbZoBzeRE6BNAn8eZPO4hOadxgdJDw8GnT+4VGkeTbM1LtjYi2TpuRGSSZUMdR0/wJjEx1F

The blacklist part is fairly easy to do as you just need to read the content of all of your "sorted" chests
You can only have 5 whitelisted/blacklisted items for filter inserters and 1 for stack filter inserters so this isn't going to work.
Last edited by AlexMBrennan; Apr 10, 2022 @ 4:34pm
Premu Apr 10, 2022 @ 4:32pm 
I'm not sure I understand the benefit of this approach, but I have an idea to get started. You need to have some logic combinators for each inserter, though. I assume you want to make sure each chest only contains items of a single type? So you would need to set the value dynamically, but once set the filter should never change again in the future, or at least not until the chest is empty? That's quite a challenging task.

Have some constant combinators with signals for each of the potential goods arriving on your sushi belt. Set the values to one. Also, you need a few combinators for each chest:

1. A combinator (let's call it A1, A2, ...) which has output values of the chest content of all chests before as seperate signals. (For examply something like "* + 0 = *", with inputs from its own chest as well the output of the combinator of the chest before)
2. A second combinator B1, B2,... which multiplies all inputs from A with -1.
3. A combinator C1, C2, ... which checks if its chest n is empty. Use also the values of Bn and the constant combinators as input. If the chest n is empty, send the input values to the inserter to set its filter. The filter will then not be set to any item already stored in the chests 1 to n-1.
4. Additionally, connect each inserter with its box to set the filter. If anything is in the box, the inserter will be set to the good in the box.

I hope you get the general idea. I haven't tried it out and it might have a few problems, but you might use that as starting point. It might also lead to situations in which the whole system could get blocked.
NF_Crenos Apr 10, 2022 @ 4:44pm 
Originally posted by Premu:
Snip
No idea myself, lmao. I guess I wanted to know if it's doable? From other comments here it seems that it is, but gets ridiculously complex. The way I am doing it does run the risk of clogging the system, especially wood which can't really be recycled back into the factory somewhere. But I can live with that.
Ty for the help though!
Fel Apr 10, 2022 @ 4:48pm 
Wood can be sent to be burnt instead of other fuels in boilers or furnaces and it's fairly easy to force the wood first on the belt with input priority on a splitter.
astrosha Apr 10, 2022 @ 6:59pm 
Storage Chests that have had their Filter set only take that one item. With this in mind you probably don't need that dedicated sorter.

Also, Storage Chests and Buffer Chests have a higher priority than Passive Provider Chests. This means that if you request 100 Red Belts, and have 100 each in a Passive Provider and a Storage Chest, the Storage Chest will be emptied before the Passive Provider gets drawn upon.
Stellar Remnant Apr 10, 2022 @ 7:28pm 
Instead of passive providers, I use buffer chests for my mall. Set them to request 10k, dump stuff to be sorted in storage, and it automatically gets put where it belongs. Then each mall output inserter gets set to read the logistic network and stop after however so many you want.
Last edited by Stellar Remnant; Apr 10, 2022 @ 7:29pm
< >
Showing 1-7 of 7 comments
Per page: 1530 50

Date Posted: Apr 10, 2022 @ 3:51pm
Posts: 7