Page 1 of 1

Combinator Q: how to count inserter throughput

Posted: Wed May 10, 2017 5:38 am
by vanatteveldt
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:

Image

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

Re: Combinator Q: how to count inserter throughput

Posted: Wed May 10, 2017 6:05 am
by DaveMcW
Power switch: Copper plate (chest) < 4800
Inserter: Read hand contents pulse
Arithmetic combinator (memory loop): Copper plate (inserter) + 0 → Copper plate

Re: Combinator Q: how to count inserter throughput

Posted: Wed May 10, 2017 7:37 am
by vanatteveldt
DaveMcW wrote:Power switch: Copper plate (chest) < 4800
Inserter: Read hand contents pulse
Arithmetic combinator (memory loop): Copper plate (inserter) + 0 → Copper plate
Sorry I'm probably dense here, wouldn't that count the amount of items transported rather than the time it took to transport X items?

Re: Combinator Q: how to count inserter throughput

Posted: Wed May 10, 2017 7:46 am
by DaveMcW
Er, right.

Power switch: Copper plate (chest) < 4800
Arithmetic combinator: T + 1 → T

Connect power to start the counter, deconstruct it to reset.

Re: Combinator Q: how to count inserter throughput

Posted: Wed May 10, 2017 8:13 am
by vanatteveldt
DaveMcW wrote:Er, right.

Power switch: Copper plate (chest) < 4800
Arithmetic combinator: T + 1 → T

Connect power to start the counter, deconstruct it to reset.
Great thanks. Never thought of using the power switch as an on/off signal, much easier!