Struggling with Circuit Network

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Samlish
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Mar 26, 2016 9:32 pm
Contact:

Struggling with Circuit Network

Post by Samlish »

Hi guys, I'm trying to set up a circuit network to update a signal on a timer. I have a circuit network which tracks the contents of my logistics network, attached to a constant combinator with various signals set to negative values. I then use a series of decider combinators to filer for the signals I'm interested in, and output them, like so:
11-12-2024, 16-12-35.png
11-12-2024, 16-12-35.png (180.36 KiB) Viewed 313 times
11-12-2024, 16-13-12.png
11-12-2024, 16-13-12.png (452.42 KiB) Viewed 313 times
11-12-2024, 16-13-22.png
11-12-2024, 16-13-22.png (123.05 KiB) Viewed 313 times
The point of all this is that I want to have drones take excess items from the storage to a requester next to some recyclers, which will recycle anything that gets put in, and spit it out into an active provider. The drones pick up whatever comes out of the active provider, and then if there's still an excess, take it to the requester again, round and round. Doing that should net me a steady supply of steadily improving quality ingredients. (It's all set up for fulgora recycling, I'm certain there's better ways to do this but this is part of my learning :P

The problem is that right now, the signals update very quickly, and the drones are endlessly carrying items back and forth, and because the network can't read the content of the drones' hands, nor the content of a requester chest (Remember a requester can EITHER use the network to set requests, or to read its content) then although it does balance itself out nicely, it ties up an impossible and ever-increasing number of drones.

What I'd like to do to solve this problem, is set up a timer (I've got that bit figured out at least) that once every 10 or 20 or whatever seconds sends a pulse of each of the input signals to a memory cell, which stores the content of that pulse, and outputs that steadily to the requesters. So far I've gotten as far as sending the pulse, but I can't figure out how to store it and keep outputting that signal until the timer resets again. Can anyone suggest a setup that might work? Ideally with screenshots

This is as far as I've gotten:
11-12-2024, 16-29-17.png
11-12-2024, 16-29-17.png (88.94 KiB) Viewed 313 times
Attachments
11-12-2024, 16-12-02.png
11-12-2024, 16-12-02.png (2.07 MiB) Viewed 313 times
Tertius
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Struggling with Circuit Network

Post by Tertius »

Samlish wrote: Tue Nov 12, 2024 4:11 pm [...] I want to have drones take excess items from the storage to a requester next to some recyclers, which will recycle anything that gets put in, and spit it out into an active provider.
[...]
The problem is that right now, the signals update very quickly, and the drones are endlessly carrying items back and forth, and because the network can't read the content of the drones' hands, nor the content of a requester chest
In short, that's your description.

Yes, one thing to keep in mind is that as soon as a logistic robot picks up an item, this item vanishes from the logistic network inventory, and in case it is inserted into a logistics chest such as a storage chest or buffer chest, it's added again. It's not added again if the item is carried to a requester chest, since a requester chest isn't providing its content to the network. So the chest you should choose to pull items to trash is a requester chest.

To select the items to trash, you seem to employ a huge number of decider combinators. It seems you're handling every item and quality individually. You can use a single decider with the EACH operator to do it all at once. It's also possible to define values with arbitrary qualities in a constant combinator, not just the normal flavor, so you need one single constant combinator to define all your thresholds at once.

So use one decider combinator you connect to a roboport to get the logistics network inventory. In one constant combinator, you define all items with all quality flavors, so if you have 18 different items to handle with 5 qualities, this combinator gets 18*5=90 entries. Quite a chore to enter. Make the numbers positive - it's easier to edit. Use an arithmetic combinator with EACH * -1 to negate these values or directly subtract EACH(green) from EACH(red), where green is the roboport inventory and green is the constant combinator. Then filter the result for EACH > 0 and you have the items your requester chests should request for trash.

Before you subtract, you should filter the roboport inventory and remove all items you don't want to process. Put a filter that removes all items from the roboport inventory and feed this filtered list to the subtraction. This filter is an arithmetic combinator and a decider combinator, both with the EACH and not every signal individually.

To select/pull all legendary items, or whatever quality you want to filter, no matter what item it is, you can use the quality filter of the selector combinator.
Samlish
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Mar 26, 2016 9:32 pm
Contact:

Re: Struggling with Circuit Network

Post by Samlish »

That's all super helpful, I'll have a go at that! Thank you!
adam_bise
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Jun 08, 2018 10:42 pm
Contact:

Re: Struggling with Circuit Network

Post by adam_bise »

If it were me I would just wire the gold chests to an arithmetic combinator each minus 1k output each to a requestor chest on set requests. Every item in gold chests over 1k will be pulled to requestor where an inserter can put in a recycler.

You could mask that with a constant combinator -99k iron wheels to chest wire would keep at least 100k in storage, +999 non-stackable item like cars would only allow one car in storage, etc.

If you just want to clean gold chests, this would avoid dealing with the rest of the logi network. But honestly, I keep gold chests clear with requestors near a consumer with a priority splitter, or by supplying items in a buffer chest which also has a request for the same item it is supplying.
Post Reply

Return to “Gameplay Help”