Swapping the input from one colour wire and outputting it on another. Is this possible?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
equitime77
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Mon Mar 28, 2016 11:07 am
Contact:

Swapping the input from one colour wire and outputting it on another. Is this possible?

Post by equitime77 »

So I have two chests (warehouses actually) that are connected together on a green wire to connect to something else. I want to even the chests out so that they don't get so much in one than another. I'm trying to use decider combinators to see if one chest is less than the other and so enable inserters. If I connect the green wire to the combinator it carries the total of the two chests. I wonder if it is possible to output the green to a decider and then output on the red signal. (Thus just carrying the amount in that one chest.) That way I can connect the two chests to the decider combinator for the above small system.

Unless there is a far better way of doing this...

Thanks

Bauer
Filter Inserter
Filter Inserter
Posts: 346
Joined: Fri May 05, 2017 12:48 pm
Contact:

Re: Swapping the input from one colour wire and outputting it on another. Is this possible?

Post by Bauer »

Connect the green wire (sum of all warehouses) to an arithmetic combinator (each divide by the negative number of warehouses (-2) -> each). Connect output with a green wire to the inserters. Add individual red wires from the warehouses to their inserter(s). Each inserter now has the content of the warehouse minus the average of all warehoueses. Activate the inserter if the signal is negativ (or zero -- to break symmetry), because then the content of the warehouse is below average.

Trebor
Filter Inserter
Filter Inserter
Posts: 288
Joined: Sun Apr 30, 2017 1:39 pm
Contact:

Re: Swapping the input from one colour wire and outputting it on another. Is this possible?

Post by Trebor »

Bauer’s solution is the best.

But for completeness converting from red to green: use an arithmetic combinator with each + 0 = each, red wire in, green wire out.

equitime77
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Mon Mar 28, 2016 11:07 am
Contact:

Re: Swapping the input from one colour wire and outputting it on another. Is this possible?

Post by equitime77 »

Trebor, I tried doing this and got no output. I will try Bauer. Thank you to both of you for replying.

Trebor
Filter Inserter
Filter Inserter
Posts: 288
Joined: Sun Apr 30, 2017 1:39 pm
Contact:

Re: Swapping the input from one colour wire and outputting it on another. Is this possible?

Post by Trebor »

Maybe it was my notation.

Condition: each + 0
Output: each input count

Post Reply

Return to “Gameplay Help”