Page 1 of 1

Circuit Network - Separate Signal with Identical Item Count

Posted: Wed Apr 19, 2017 12:18 pm
by Bortos
I have a signal containing two items of identical count. How do I separate them so I have one item output from one combinator, and the other item on another?

i.e. 1 Signal of n unique items => N signals of 1 unique item.

Limitation: Use virtual signals only. No explicit item signals, as it should handle any input signal and respond to changes.

Use case: Take a 'crafting materials' signal and send each item to its filter inserter. Crafting materials signal would indicate the materials required to assemble some item, and it would come the Crafting Combinator mod, for example.

Note: this becomes a problem when there are two items with identical count, and I don't think there's a way to do that.

e.g. Input signal of 2 copper plates and 2 iron plates
Result should have 2 different signals sent to 2 filter inserters, one with copper plates and the other being iron plates.

One way I can see this working is by sending the input through a decider combinator that returns 1 item count (EACH > 0 => EACH(1)), and summing it with a Constant Combinator that has a unique item count for every single item that may be encountered in the input signal. That way each item has a unique count.

A second way is by using a smart inserter to pick up objects in a chest and pulse the item. Then subtract that item from the filter. I've tried working on that, but it is difficult.

It's almost as if I need an item indexer operation on the decider combinator, or something. I'm not sure the new 0.15 additions would help either
Edit: Solution Found! https://youtu.be/PqD3XvoOk1U

Re: Circuit Network - Separate Signal with Identical Item Count

Posted: Wed Apr 19, 2017 1:20 pm
by Deadly-Bagel
...What is the actual question here?

- nvm, over my head lol -

Re: Circuit Network - Separate Signal with Identical Item Count

Posted: Wed Apr 19, 2017 1:55 pm
by aaargha
I don't know a good solution for the signal splitting problem but I did look at fine control of inserters via filters a while back. The use case then was basically "put only X, Y, Z of items A, B, C into a box from a mixed belt". Here is my "final" design, replacing the rear (or both) stack filter inserter with a regular filter inserter may yield better results as they can have more than one filter active at a time. Here is the original discussion.

Re: Circuit Network - Separate Signal with Identical Item Count

Posted: Wed Apr 19, 2017 5:06 pm
by Bortos
aaargha wrote:I don't know a good solution for the signal splitting problem but I did look at fine control of inserters via filters a while back...
Learn something knew every day! That's handy.
Deadly-Bagel wrote:If you're looking to load a chest with various amounts of different items that's easy.
I'm trying to turn a signal of N item types, into N signals of 1 item type. E.g. Input Signal = 4 steel, 2 copper. Output should have 2 signals (#1: 4 steel) (#2: 2 copper).

It will be used to remove the configuration required in my crafting combinator assember blueprint seen here: https://www.youtube.com/watch?v=0Vti2Xjj5bM
In the above video I fill up two lanes of conveyor belts with items I've configured, but I have to configure it manually. I would like to separate the items from the Crafting Combinator signal (outputs the materials required for crafting the input signal) into individual signals.

Image

The above image can separate each item signal but cannot do so when two items have identical count. It does so by storing the input pulse, and subtracting 1 of each item. Every time an item count == 1, it pulses that item and increments X.

Re: Circuit Network - Separate Signal with Identical Item Count

Posted: Wed Apr 19, 2017 6:09 pm
by Bortos
Solved!

https://www.youtube.com/watch?v=e_m9cDj-LBU

Now I need to get it to clear and update automatically when an input signal changes.

Edit: Managed to hook it up with crafting combinator, and automatically clear all memory cells when the value changes. See: https://youtu.be/PqD3XvoOk1U

Re: Circuit Network - Separate Signal with Identical Item Count

Posted: Wed Apr 19, 2017 7:36 pm
by aaargha
Man, that is sneaky! Now you just need to put the filter inserter into one of those one swing per tick configurations and you'll have an almost instantaneous reset time :)

Re: Circuit Network - Separate Signal with Identical Item Count

Posted: Sun Jul 30, 2017 3:05 pm
by Honey.Badger
Your solution doesn't show any configuration in the combinators... can you post a blueprint?

Re: Circuit Network - Separate Signal with Identical Item Count

Posted: Fri Mar 23, 2018 9:59 am
by brenny
Hey, does anyone have a blueprint for this?

Re: Circuit Network - Separate Signal with Identical Item Count

Posted: Tue Oct 09, 2018 6:52 pm
by Cadde
This was the most promising solution to my identical problem. But it's quite hacky IMHO. This is due to game mechanics and the recipe combinator quirks.

At first simply created a belt with a bunch of inserters in line, chests limited to one stack and used that to split the items up. The items were fed by bots to an inserter chest. Each of the items would have to be in separate chests by the end of the day before continuing to the next state, processing.

BUT, it just annoyed me... Why is something so (what should be) simple, so damn complex in game. Whatever happened to min/max signals? Why can't we split signals? Why is there only red/green wires?

So i gave in to it... I made a mod: https://mods.factorio.com/mod/signalsplittercombinator

Image

Which at least saves some hassle in setting up an auto crafting base.