Combinator Q: how to count inserter throughput
Posted: Wed May 10, 2017 5:38 am
The reason for this post is stupid, I thought the wiki figure on stack inserter throughput was outdated but I simply confused belt->container with container->container throughput.
However, it prompted me to try to measure inserter throughput and I think I have room to learn about combinators . This is what I came up with:
the bottom constant combinator is the control set to output 1 red (the stop signal).
This is fed into the middle decider, which outputs green 1 IF red <= 0.
This is fed into the top decided, which is a counter set to output [green input count] IF [green > 0]. The red wire loops output back to input, creating the counter.
The green signal is also used to start the stack inserter [green > 0]
So, if I switch off the control stop signal, the stack inserter starts moving and the counter starts counting.
If the chest reaches 4800 items, the bottom decider outputs 1 red, stopping the counter. You can also stop the counter and inserter manually by re-activating the control combinator.
The top two arithmetic are really stupid, I use the top right to reset the counter by doing [each * -1 -> each] and feeding it back to the counter, then removing the wire again.
The top left I use to subtract 10k so I can see the actual figure.
The good news is that I get 10391 ticks to fill the chest, giving me a throughput of 4800 / 10391. * 3600 = 1663 which is within rounding error of the calculated value of 60*2.31*12. So the contraption works.
So my question to the combinator gurus: how can I do this better / easier / more efficiently?
However, it prompted me to try to measure inserter throughput and I think I have room to learn about combinators . This is what I came up with:
the bottom constant combinator is the control set to output 1 red (the stop signal).
This is fed into the middle decider, which outputs green 1 IF red <= 0.
This is fed into the top decided, which is a counter set to output [green input count] IF [green > 0]. The red wire loops output back to input, creating the counter.
The green signal is also used to start the stack inserter [green > 0]
So, if I switch off the control stop signal, the stack inserter starts moving and the counter starts counting.
If the chest reaches 4800 items, the bottom decider outputs 1 red, stopping the counter. You can also stop the counter and inserter manually by re-activating the control combinator.
The top two arithmetic are really stupid, I use the top right to reset the counter by doing [each * -1 -> each] and feeding it back to the counter, then removing the wire again.
The top left I use to subtract 10k so I can see the actual figure.
The good news is that I get 10391 ticks to fill the chest, giving me a throughput of 4800 / 10391. * 3600 = 1663 which is within rounding error of the calculated value of 60*2.31*12. So the contraption works.
So my question to the combinator gurus: how can I do this better / easier / more efficiently?
blueprint