This idea is simple in the first but it gets soon very complex. Let's just begin:
The splitter has a left and right "gate". Each gate can be connected to the (circuit) network.
If connected and there is a signal the gate let only those items through, which are in the signal. It works just as a simple filter, that picks out this items.
This simple filter enables some useful possibilities, but is of course not enough. It doesn't work as "if a filter is present it picks all items of that type"! But see next point how to achieve that.
The next step is a "NOT" gate, that can be turned on for each side.
So the simplest case would be to have one constant combinator emitting a signal "coal", that goes into both sides of the splitter and one side is "NOT". The result is then, that on one side only coal comes out, on the other the "rest" (NOT coal).
This sub-feature is not thought completely through and needs further discussion!
Let's assume a belt full of steel and you want to split this into 3 belts with each exactly 1/3. Currently this is a complex setup with 3 or 4 splitters. With this suggestion only two splitters and one combinator are needed.
How this works: Let's say the left side of the first splitter is wired with the input of a constant combinator. The signal on that wire is "2 steel".
Because the right side is not wired, it falls back to it's default, which is "1 of anything" . Here as overview:
Code: Select all
LEFT RIGHT 2 of steel 1 of anything (implicit default)
The rest is simple, split the left output again into two parts and we have fun.
The whole balancing subject is also not ready worked out and needs to be discussed deeper. For example: How to balance "anything" on both side, cause the current behavior of the splitter is not really "balanced", it allows an overflow of up to 5 items, before going to the other side; the question is, if the ratio should be fixed, or work as already known. In other word: Should the splitter work differently if circuits connected with default ratio of 1:1 or not.
I see also, that this is eventually over-engineered, cause - see down - if the splitter has a counter and a gate, this functionality can achieved with combinators only.
Till here you might think that the connection to the circuit network is some kind of useless overhead. But the reason for that is, that you can now use the splitter as a gate or switch. Usage: Switch on/off streams of items, depending on any possible condition, that can be calculated by the combinators.
Depending on how long you open a gate you can estimate how much items are going through. With one splittter you can insert a more or less exact mix two of item types (two lanes of a belt) into another belt.
For exact ratios see next point!
As the splitter has inputs he can have also outputs. The simplest would be counters: Every item passing on one side increases the counters of that side. If I connect a wire to the output I can access these counters by combinators. Very practical usage is in combination with the above explained switch-behavior.
We need then also a "RESET" signal to set all (or some item-)counters back to zero. [I don't know how to implement this, but a common way to implement that is to have either a special signal on the input or to have an own input just for that. In the end it doesn't matter, how this implemented.]
The practical usage is, that you count the number of items passing the splitter (on one side) and if the right number is reached the filter can be turned off. And before opening the gate again the counters can be reset.
Splitter as Joiner
The above stuff looks at the splitter only as a splitter.
The same functionality for splitting should work also for joining.
- Filter: it makes a difference if you filter on input or output side of the splitter. But for now assume, that the filter exists on both sides!
- Joining with exact ratio: Input items are mixed together in the right ratios (in the above example would take 2 steel from before mixing in 1 other item from right)
- Gate/Switch: Cause the gate is just a changing filter it works on both sides. See above.
- Counter: Due to practical reasons the counter works only on the output side. But see down.
Changing the Filter Input/Output Side
As you might see above, the behavior that the filter works on both sides (input and output, not left and right) sucks sometimes.
For that you have a switch in the splitter that enables per splitter (both input/outputs) that the filter works for both sides (default), on the input side only or on the output side only.
If working on the input side, the function of the counter changes also to count only the input-items, not the output items.
Situations, in which we need to have different filters on input and output side are not possible and not needed, cause they can simply replaced with two splitters, one on the input and the directly following other on the output side.
As mentioned some threads behind this one, it seems to be a much better idea to remove counting etc. and instead add priorities, where the items are moved by preference left or right. See below!
The splitter is extended to the following functionality:
- two circuit-network inputs for the filter function (one for each side).
- two circuit-network output for the counter (and reset signal?).
- A switch per left and right side of the splitter, which inverses the circuit filter logic (NOT filter) if turned on.
- A switch for targeting the circuit filter to the input and/or output side of the splitter into one of three modes: both-sides, input-only, output-only
Internally the splitter has to be extended to enable the filter-feature. The balancing/ratio-feature needs more discussion and is a bit questionable. The counter feature can be eventually coupled to a "counter-combinator". Whatever this is.
With v0.13 the smart inserter should fall apart, the same is valid for this suggestion, there is not just the new "smart splitter" as an own entity, it is the same splitter that we all know, but the abilities of it have to be researched.