Skip to content Skip to sidebar Skip to footer

Factorio Change Which Side Track Feed

Okay, so you (all of you, yes!) goaded me into making a perfect deterministic alternator. After lots of thinking and some wasted hours, I actually made one. So this will be a lengthy post about it.

Premises:
1) Given a 2-items belt input, make a machine that will produce a 1-1 mix of those items into the output.
2) The machine should work as fast as possible.
3) The machine should be as compact as possible.
4) If the input is unsuitable to produce 1-1 mix, the machine should stop.

Thoughts:

  • Making this without some sort of a control loop is not possible, as there's a "hardware" limitation of having only 2 conditions max per one smart inserter (and the alternator requires 3-4 in some places). So, the control loop must be used to "compress" 2 conditions into 1. Think of it as a mechanical analogue to braces.
  • Maximum possible throughput of such an alternator equals to 1 fast inserter throughput. Making a deterministic alternator with 2 output inserters is not possible, as it is not protected from clogged output (one inserter will become clogged before the other, thus producing all sorts of 2-1 or 2-2 artifacts even with all possible logic overflow protection).
  • The alternating system can work with split input and thus produce output with greater speeds (using several alternators together), but the result is not guaranteed to be 1-1 mix, as each splitter (used to join the output) can introduce errors. Thus, with 2 alternators outputting to 1 splitter, the result could become 2-2 (as well as with all kinds of 2-1 artifacts), with 4 alternators (and 3 splitters) -- 4-4, and so on. However, it's still guaranteed that the error won't become larger than splitter count, and it's also guaranteed that both input items are always used proportionally, thus a sufficiently large batch of output items will maintain 50%-50% split ratio, even with splitter-introduced errors. So the machine, despite some quirks, is quite modular.

Now, the schematics:
1)
Image
A "base" variant. Has the maximum -- 1 fast inserter -- throughput (note the equal distances between items in the output), but as you can see, it produces 2-1 artifacts when the input becomes unbalanced (a shortage of item1 will produce 2 pieces of item1 when it becomes available again, same with item2). So, if there are frequent shortages of one item in the input, the output could become pretty unbalanced.
However, the basic idea was good enough, so I'll be doing most of my explanations on this schematic. The "perfect" variant is just a slight upgrade of it.

2)
Image
The final "perfect" variant. Always produces the required 1-1 mix, no matter what (short of biters eating parts of the machine). However, it's still not absolutely perfect, as it skips a beat between outputting each pair of items (note the uneven distances between items in the output).

Now, here comes the hard part: explanations.

Expand

1. The layout.
Image
The machine comes with 2 separate modules that doesn't even need to be close. The only requirement is a 2-way logic circuit connection: the synchronization circuit must be connected with 1 color wire to the alternator, and the alternator must be connected with (another) 2 color wires back to the synchronization part.

The alternator is a 3x4 unit, consisting of 2 electric poles, 4 smart inserters, 3 smart chests, and 1 output inserter (fast or smart, depending on schematic). The synchronization circuit is a symmetrical loop of 2 parts (so each part have the same functionality as the other one, two are used only to provide a loop); consisting of 1 electric pole, 2 smart chests, 2 simple chests, and 4 smart inserters.

2. The flows.
Image
Self-explainable. I haven't captured a "detailed info" screen, so I'm posting this one instead. The synchronization circuit moves one item (any item) between chests.

3. The wiring.
Image
Capital letters -- A, B, C designate separate circuit networks. Lowercase letters designate inserters. Roman numerals designate chests. Given the input of iron and copper plates,

Chests I and II connected to B with red;
Chest III connected to C with both;
Chests IV-1 and IV-2 connected to A with green.
Inserter "a" connected to B with red, conditions "iron plates <1, filter iron plates";
Inserter "b" connected to B with red, conditions "copper plates <1, filter copper plates";
Inserter "c" connected to B with red, condition "copper plates =1", and to A with green, condition "pipe =1" (pipe is my item used in the synchro loop, it could be anything);
Inserter "d" connected to B with red, condition "iron plates =1", and to A with green, condition "pipe =1";
Inserters "e1" and "e2" connected to C with both, conditions "iron plates <1, copper plates <1";
Inserters "f1" and "f2" connected to C with both, conditions "iron plates =1, copper plates =1".

The #2 schematic is upgraded in the following ways:
Image
Chests I and II are also connected to B with green.
Inserter "g" connected to B with both, conditions "iron plates =1, copper plates =1".

PS: I dare someone to make a truly perfect alternator, which will always be deterministic and will work with the full throughput (1 fast inserter, or even faster, geez).

pacefrod1962.blogspot.com

Source: https://forums.factorio.com/viewtopic.php?t=3211

Postar um comentário for "Factorio Change Which Side Track Feed"