9

I have built a simple factory that produces construction and logistics robots. However, since these robots get made very quickly (they only take half a second), the bottleneck is currently my production of flying robot frames. I am totally okay with this—I don’t need to make new robots at maximum speed—but it does make me worry that one of the two kinds of robots will be favored—that is, one of the requester chests will get all the frames.

To try and mitigate this, I have built a small circuit alongside my robot production. It looks like this:

There are three decider combinators:

screenshot of circuit

  • The first two just check if there are flying robot frames in the chest, and if there are, they output 1.
  • The third checks if both of the first two combinators output 1—that is, it is functioning as an AND.

This third combinator is wired to the two smart inserters, which wait for a truthy signal before activating.

This design is not 100% perfect because of the inserter stack size bonus (one side might get more frames), but this could be corrected by just waiting until both chests have as much as the maximum movable stack size. I don’t care too much, though, as long as both sides get some frames.

It does seem a tad complicated for a relatively simple problem, though. Is there a simpler way to accomplish this goal? Are combinators even needed?

  • You can edit the inserters so that they only move one item, regardless of stack size bonus. I know you can do this in 0.15, I forget if it's a new feature. – mmatthews May 16 '17 at 14:50
6

Your solution basically switches on both inserters, only when both boxes are filled with at least one frame.

You can do this easier by just directly wiring the inserters and chests crosswise (connect each inserter with the other inserter's source) and checking for "frames > 0".

If both chests have at least one frame, both inserters move. If only one of them contains a frame, the opposite inserter would move, but can't (because there is nothing to take).

This still does not help you with the stack size bonus, but at least you get rid of the inserters.

  • frames > 4 as the check would have them evenly split, even considering stack bonus – Caleth Mar 21 '16 at 14:13
  • 1
    @Caleth It does not. In fact it makes the problem worse. Just consider one chest already having five frames and the other zero. When a robot brings four or less frames to the other chest, it would automatically be emptied, so the factory with five frames in its chest will never get any frames (unless your robots bring frames faster than inserter and factory can handle, which makes the setup unnecessary). The same change in the OP's setup would however solve the problem, so you may want to post it as a separate answer. – Tim Mar 21 '16 at 14:56
8

Since they are so close, you could have a single requester chest feed a splitter

  • Yeah, I did think about that, but then I have to bring belts back into things. In this case it would be even more compact, though, I guess, given that the combinators take up that much space, anyway. – Alexis King Mar 21 '16 at 6:41
  • 1
    Grabbers can grab directly from the splitter output, so you only need an extra grabber to pull from the requester-chest. – BlueRaja - Danny Pflughoeft Mar 21 '16 at 6:47
  • Yeah, I’ve figured that out in my playing so far. I think it would actually be pretty compact—this is almost certainly a better solution for this particular problem. I won’t accept this answer just yet, but if nobody comes up with anything else, I’ll probably accept it. Playing with the circuit system was fun and well worth my time, but this is really more practical. – Alexis King Mar 21 '16 at 6:51
  • "But then I have to bring belts back into things" - this belt hate reminds me of all the arguments about programming techniques. – user253751 Mar 21 '16 at 9:49
1

If you want to make sure they're made at the same rate, I recommend lock-stepping the output.

Make your assembly machines each output to a buffer chest, and then conditionally output from the buffer only when both chests have a bot. (You'll want to override stack size to 1 on the exit inserters if you have stack research)

Here's an example:

Each decider outputs 1 to the same channel when there are any bots. The exit inserters are only enabled if that channel is greater than 1. (Each '1' signal from the deciders are added together)

You can see in this example that there are logistic bots in the left chest, but the exit inserters aren't firing. If I added a construction bot or the machine makes one, then both the top inserters will fire.

example

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.