Help with circuit and chests contents comparison

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
cicatrix
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Feb 27, 2017 9:43 am
Contact:

Help with circuit and chests contents comparison

Post by cicatrix »

TL;DR

3 chests:
#1 contains 800 units of U
#2 contains 100 units of Pu
#3 is empty

What I need is to make a circuit that checks the condition is #3 has no less than twice the number of Pu in #2 (200 in this case) and while it's true output 1 or 0 otherwise.
I need to take 200 units of U out of #1 and send the rest 600 elsewhere

So, if #2 has 500, I need to have 1000 in #3, if #2 has 10, I need to have 20 in #3 etc.
Basically, I need a circuit that compares the contents of two chests and outputs a signal when the number of units in the second one is less than twice the amount in the first one.
What it takes to have such a network?



Boring stuff:
Hello, I'm trying to automate my nuclear power plant and the problem is as such:

1 spent nuclear fuel can be reprocessed yielding 1 Plutonium + 8 Uranium
The whole output is placed into a chest.
Now I have a filter that takes only plutonium from this chest and places it into another one.

To make another unit of nuclear fuel I need 2 uranium + 1 metal plate + 1 plutonium, therefore, I need to take 2 out of 6 uranium ore from the chest.

I have a arithmetic combinator wired to the chest with plutonium that reads the number of plutonium slags in there and multiplies it by 2.

What I need now is to make a circuit that outputs 1 while the third chest has less than needed units of Uranium.
urza99814
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Sat Dec 10, 2016 12:57 am
Contact:

Re: Help with circuit and chests contents comparison

Post by urza99814 »

I think you just need two arithmetic combinators and a decider

Two arithmetic source from chest 3
Pu * 2 -> Pu
U * 1 -> U (just to block feedback of Pu count)

Then your decide takes from the output of both of those:
If Pu > U, output 1


Depending on what you're doing you might also find this setup useful using three arithmetics:
Output of chest 3 goes to: Pu * 2 -> Pu
Then the output of that goes to: Pu - U -> U and a second one in parallel of U-Pu -> Pu and then plug both outputs into a filter inserter configured to set the filler from the network... That way i think it'll filter U if you don't have enough U, or Pu if you don't have enough Pu
Post Reply

Return to “Gameplay Help”