Dynamic Storage Chest Logistic Filters

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
MartinG
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sun Jan 23, 2022 11:50 pm
Contact:

Dynamic Storage Chest Logistic Filters

Post by MartinG »

Can storage chest filters be set with circuit logic?

To manage overflowing inventory - it would be great if you could have an empty chest and when a robot drops something into it, the circuit logic would read the contents and set the filter for that item.

A selector combinator can then return the stack size of the item.
Multiply the stack size by a factor of 40 for 40 stacks out of a 48-stack chest.
When the number of items exceeds 40 stacks, an inserter is enabled to drop the item onto a belt for recycling.
If a robot picks up the last item, everything resets and the empty chest is available for the next item.

Multiple items might be en route to the chest, but whichever makes it first, sets a blacklist filter to move the additional items via inserter to an active provider chest.

I have this somewhat working with a parameterized BP, but you still have to set the item filters.
Lighthouse
Inserter
Inserter
Posts: 37
Joined: Wed Nov 20, 2024 3:09 am
Contact:

Re: Dynamic Storage Chest Logistic Filters

Post by Lighthouse »

My solution to that problem is not dynamic but looks like this:
A buffer chest requests a full chests (I just set 1 mio for everything) - this will be filled after requestor chests but before storage chests and is still available for logistic requests of other entities (except other buffer chests).
Filtered storage chests are set next to and unloaded into the recycler - loaded only when buffer and requestor chests are full.

Not what you asked for though.
Tertius
Smart Inserter
Smart Inserter
Posts: 1184
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Dynamic Storage Chest Logistic Filters

Post by Tertius »

If you want to recycle everything that's above some threshold, you can do this with 1 requester chest, 1 roboport, 1 of arithmetic, decider and constant combinator. Not recycle or check whole chest content, just directly recycle every single piece over limit as soon as it pops up as surplus.

Items are added to the logistic network from everywhere. They end up in some unsorted storage heap distributed over the logistics network. It doesn't matter where they actually are, they're just available from somewhere for the robots to pick up.

To make our item limiter, define thresholds In the constant combinator. For example 4000 inserters, 5000 belts, etc.
Use the decider combinator to read the content of the logistics network from a roboport on one wire, the thresholds from the constant combinator on the other wire, and pass only the items that have a threshold. (without this filtering, items without threshold effectively have a threshold 0, which is probably not what we want)
Wire the arithmetic combinator to the filtered items on one wire and the constant combinator (thresholds) with the other wire and subtract the thresholds from the filtered items. You get all filtered items with surplus as positive values. These are the ones we want to get rid of.
Now wire this to the requester chest and set it to "set requests", so the requester chest requests the surplus.
Add an inserter to the requester chest that moves items from that chest into the recycler.
MartinG
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sun Jan 23, 2022 11:50 pm
Contact:

Re: Dynamic Storage Chest Logistic Filters

Post by MartinG »

Here's what I have so far.

The first BP is the sorting "tree" that can be extended as far as you like:


Then, to set the filters on the tree, just paste this parameterized BP over the matching part of the tree.
It can be flipped horizontally so it can be pasted on either side of the tree.


Would still prefer a dynamic filter option, but this works for now.
Post Reply

Return to “Gameplay Help”