Belt math, using lower tier belts to effect.

Circuit-free solutions of basic factory-design to achieve optimal item-throughput.
Involving: Belts (balancers, crossings), Inserters, Chests, Furnaces, Assembling Devices ...
Optimized production chains. Compact design.
Please provide blueprints!
Forum rules
Circuit-free solutions of basic factory-design to achieve optimal item-throughput
User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 883
Joined: Wed Jul 12, 2017 5:45 pm
Contact:

Re: Belt math, using lower tier belts to effect.

Post by Oktokolo »

Trebor wrote:
Thu Sep 05, 2019 10:11 pm
Not with my balancer above, uneven input OR uneven output have stable ratios. It’s only uneven inputs AND outputs that the ratios are different.
Does that mean, that one could chain two of those together and have stable ratios in all cases?

Trebor
Filter Inserter
Filter Inserter
Posts: 288
Joined: Sun Apr 30, 2017 1:39 pm
Contact:

Re: Belt math, using lower tier belts to effect.

Post by Trebor »

Oktokolo wrote:
Fri Sep 06, 2019 11:39 am
Trebor wrote:
Thu Sep 05, 2019 10:11 pm
Not with my balancer above, uneven input OR uneven output have stable ratios. It’s only uneven inputs AND outputs that the ratios are different.
Does that mean, that one could chain two of those together and have stable ratios in all cases?
Unfortunately not. The way splitters work chaining two may actually undo some of the mixing.

Trebor
Filter Inserter
Filter Inserter
Posts: 288
Joined: Sun Apr 30, 2017 1:39 pm
Contact:

Re: Clarification on the term "balancing"

Post by Trebor »

Impatient wrote:
Fri Aug 30, 2019 10:01 pm
...
"Balancing" in the context of Factorio means transforming one or several (n) rates of input (i1, i2, in) to one or several (m) rates of output (o1, o2, ... om), where all the rates of output are equal!
...
"Balancing" in the context of Factorio and in common language mostly is used when refering to the task to evenly distribute the items from a numer n of belts to another number m of belts.
...
I was thinking about these definitions and the direction this thread has gone and noticed your definitions are only concerned with the number of items on the output belts (output balanced) not where those items came from. Whereas @disentius and I have been have been concerned with balancing the input across the outputs (input balanced).

Trebor
Filter Inserter
Filter Inserter
Posts: 288
Joined: Sun Apr 30, 2017 1:39 pm
Contact:

Re: Belt math, using lower tier belts to effect.

Post by Trebor »

So if you only care about output balancing the standard 4 blue belt balancer works:
Screen Shot 2019-09-06 at 9.04.57 PM.png
Screen Shot 2019-09-06 at 9.04.57 PM.png (3.73 MiB) Viewed 6630 times


But if you need input balancing you may need something a little more complicated:
Screen Shot 2019-09-06 at 9.04.41 PM.png
Screen Shot 2019-09-06 at 9.04.41 PM.png (6.82 MiB) Viewed 6630 times


Please note if the input is starved or output is blocked input and output ratios may be different across belts.

User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: Belt math, using lower tier belts to effect.

Post by disentius »

Exactly.
Was planning to build this thing you did today:) Nice proof of concept.
If we forego perfect output mixing, these two classics work for even input balancing. I use these for unloading stations to empty wagons evenly. (started unloading trains to two or for belts per wagon a while ago)
Originals are here: https://imgur.com/a/sgAsj
4-N lanebalancer.gif
4-N lanebalancer.gif (11.32 MiB) Viewed 6613 times

User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 883
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: Belt math, using lower tier belts to effect.

Post by Impatient »

Yes, you are correct. The common understanding of the single word term "balancer" is, that equal amounts of items are routed to each output. If the balancer also draws equal amounts of items from each input then the design is "output AND input balanced". If one is also looking at lanes, then it is "output and input lane balanced". If an equal amount from each input is routed to each output, then it is a "mixer" (which, I think, as per its functionallity, must be input and output balanced). Etc. ...

User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 883
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: Belt math, using lower tier belts to effect.

Post by Impatient »

ThreePounds wrote:
Wed Aug 21, 2019 7:22 am
... Will these work if the outputs are backing up?
Oktokolo wrote:
Sun Sep 01, 2019 3:47 pm
...
The until now unseen belt balancer would have more than two inputs and more than two outputs. It would evenly balance inputs to unblocked outputs so that every unblocked output gets roughly the same (does not have to be count-perfect) amount of item throughput. Inputs are assumed to contain the same item type, so mixing order doesn't matter. Input and output lanes are assumed to be balanced already. So it is only about balancing belts - not lanes.
I think I found a partial solution for that problem. "Partial" because I am not yet sure, if the way to solve it can be generalized to every n>>m problem.

(Also it uses priority splitting, which some players might consider "cheating", when used in balancers, as the parent forum "Mechanical Throughput Magic (circuit-free)" originates from a time, where priority splitting was not available.)

But anyways, as far as I can forsee it, it does what you were asking for.

I was thinking about the various designs presented in this thread in combination with my analysis, of why the balancers, usually used, can not handle blocked outputs, in a way, that every unblocked output gets the same amount of item throughput. In my analysis here viewtopic.php?f=202&t=74800&start=40#p454217 I wrote
Impatient wrote:
Sun Sep 01, 2019 7:10 pm
... the culprit is the fact, that only the vanilla Factorio splitter, which is a 2>>2 balancer, can be used to split, mix and combine the contents of belts. For 2 outputs of an n>>m, there is always 1 "last" splitter inside the balancer. "Last" in the sense of "the last splitter before those 2 outputs". If one of the outputs is blocked, the other output gets ALL the inputs from that splitter, not just one half of it.
And this hit me: What if I add another splitter for each output, that routes the items back to the input, if that output is blocked (using priority splitting)? That way, blocked outputs do not cause uneven distribution in a standard design balancer because the ouputs of that standard design balancer are always unblocked. After that, again using priority splitting (priority merging), the items from the blocked output are fed back to the input.


Here is my 2nd attempt on a 4>>4 "reactive" balancer (until some better term comes up I call the designs "reactive", as they "react" to blocked outputs):

factorio.4-4balancer.reactive.2.jpg
factorio.4-4balancer.reactive.2.jpg (318.02 KiB) Viewed 6603 times


The balancer is in blue and the input rates are 15/s.

In the core, marked in red, is the standard 4>>4 balancer. Each output has a splitter added to it, that priority splits to the bus. If an output of the reactive balancer is blocked, the items are routed back to the input side. In this example I use priority merging to feed the looped items back on the input belts. Priority merging because for this idea to work, the loops - as far as I understand it - must be emptied. Because if they are not, then a situation might emerge, where the items from a blocked output can not be looped back, thus the output of the core balancer becomes blocked and the outputs of the core balancer become unbalanced.

Here is my 1st attempt, "mis"using adapting an 8>>8 balancer for the purpose of splitting items from blocked outputs back to the input side. I don't know if it is that good. I didn't give it much thought:

factorio.4-4balancer.reactive.jpg
factorio.4-4balancer.reactive.jpg (197.5 KiB) Viewed 6603 times


I am not sure on this particualr design, because I think it can lose its reactive functionality after a while, as the loopback belt from that blocked output will fill up until no additional amounts can be looped back to the input side. Better to priority merge the looped back items into the input belts as done in the 2nd attempt example. For now I guess, that it is the better way. I need to do more testing on this and test it on various n>>m problems and try different ways of implementation.

But the basic idea is to loop back items from blocked outputs to the input side. That is it.

What do you think?
Last edited by Impatient on Sat Sep 07, 2019 5:53 pm, edited 1 time in total.

Trebor
Filter Inserter
Filter Inserter
Posts: 288
Joined: Sun Apr 30, 2017 1:39 pm
Contact:

Re: Belt math, using lower tier belts to effect.

Post by Trebor »

This is why I like using different items on the input belts, it allows you to see that no items from the bottom belt are consumed:
Screen Shot 2019-09-07 at 10.41.40 AM.png
Screen Shot 2019-09-07 at 10.41.40 AM.png (7.21 MiB) Viewed 6590 times
This balancer is not input balanced.

User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 883
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: Belt math, using lower tier belts to effect.

Post by Impatient »

Yes. It isn't and I think it can not be made input balanced. The implementation with the misused adapted 8>>8 might be input balanced as the items from each loopback are distributed to all outputs evenly and not fed into one input belt.

In the picture you posted I see you are running the blueprint with 45/s on each input. This way, at least, you can not verify that it is reactive. Just in case.
Last edited by Impatient on Sat Sep 07, 2019 5:52 pm, edited 1 time in total.

Trebor
Filter Inserter
Filter Inserter
Posts: 288
Joined: Sun Apr 30, 2017 1:39 pm
Contact:

Re: Belt math, using lower tier belts to effect.

Post by Trebor »

This one took a while to stabilize but it is input balanced:
Screen Shot 2019-09-07 at 11.07.05 AM.png
Screen Shot 2019-09-07 at 11.07.05 AM.png (9.01 MiB) Viewed 6586 times

User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 883
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: Belt math, using lower tier belts to effect.

Post by Impatient »

Side note: Interesting that the digits say, that the throughput is 48, where the max throughput of a blue belt should be 45. Or is this some other number than the output rate?

Edit: Small errors in calculating average over time I guess.

Trebor
Filter Inserter
Filter Inserter
Posts: 288
Joined: Sun Apr 30, 2017 1:39 pm
Contact:

Re: Belt math, using lower tier belts to effect.

Post by Trebor »

48 = 8 * 6 (8 items on each of 6 belt tiles). The right most column shows how many items are on a belt (output belts), the bottom row shows which items are being consumed (input belts). The other number show how much of an input belt is on an output belt.

-------

I propose 3 attributes for categorizing belts:
  • Output Balanced - All output belts have the same number of items per second
  • Input Balanced - All inputs are consumed with the same number of items per second
  • Perfect Mix - Items from input belts are spread evenly across output belts
Thoughts?

User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 883
Joined: Wed Jul 12, 2017 5:45 pm
Contact:

Re: Belt math, using lower tier belts to effect.

Post by Oktokolo »

Impatient wrote:
Sat Sep 07, 2019 11:46 am
(Also it uses priority splitting, which some players might consider "cheating", when used in balancers, as the parent forum "Mechanical Throughput Magic (circuit-free)" originates from a time, where priority splitting was not available.)
I don't consider using splitters to their full potential to be cheating.
Impatient wrote:
Sat Sep 07, 2019 11:46 am
But anyways, as far as I can forsee it, it does what you were asking for.
Yes, it indeed does that just fine
Impatient wrote:
Sat Sep 07, 2019 11:46 am
Here is my 2nd attempt on a 4>>4 "reactive" balancer (until some better term comes up I call the designs "reactive", as they "react" to blocked outputs):
I call it a "belt balancer" or "output-balanced belt balancer". The other commonly accepted belt balancers don't balance and are therefore fakes. Don't know what people use them for.
Impatient wrote:
Sat Sep 07, 2019 11:46 am
Here is my 1st attempt, "mis"using a 8>>8 balancer for the purpose of splitting items from blocked outputs back to the input side. I don't know if it is that good. I didn't give it much thought:
Looks like it is providing even output in all cases. So it is fine for me. It only takes slightly longer for loopbacks to empty when outputs become unblocked. But that just equals to the consuming belt be lengthended by the length of the loopback, wich is expected beahaviour.
Impatient wrote:
Sat Sep 07, 2019 11:46 am
But the basic idea is to loop back items from blocked outputs to the input side. That is it.
What do you think?
That is an ingenious use of priority splitting. I thank you for building the first actual vanilla belt balancer not needing circuits, wagons/cars, or bots. I already assimilated the blueprint of the smaller version into my blueprint library.
Also, as someone has once mathematically proven, that you can build any 2^N balancer from 4x4 balancers and your 4x4 balancer is handling blocked outputs correctly, i believe that you implicitly solved the case for any NxM balancer (not only the 2^N ones).

User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 883
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: Belt math, using lower tier belts to effect.

Post by Impatient »

Trebor wrote:
Sat Sep 07, 2019 3:33 pm
I propose 3 attributes for categorizing belts:
...
Thoughts?
This nomenclature sounds right to me.
Last edited by Impatient on Sat Sep 07, 2019 5:45 pm, edited 1 time in total.

User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 883
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: Belt math, using lower tier belts to effect.

Post by Impatient »

@Oktokolo

Thank you for the appreciation. :-)
Oktokolo wrote:
Sat Sep 07, 2019 4:12 pm
I call it a "belt balancer" or "output-balanced belt balancer". The other commonly accepted belt balancers don't balance and are therefore fakes. Don't know what people use them for.
Ok, I would call it "dynamically output-balanced belt balancer". As IMO the implicit common understanding of "belt balancer" is that it distributes evenly to outputs as long as the number of unblocked outputs stays the same as specified. n>>m, where m (unblocked) is static. But that is just a minor detail and my understanding, which can be wrong.

I kept thinking, that if that idea of looping items from blocked outputs back to the input can be achieved by an adapted 8-8 balancer to handle all 4-4 cases, then I can use an adapted 16-16 balancer to handle all 8-8 cases (if it is also throughput unlimited, which eg the standard 8-8 balancer is). And by "all" I mean really everything. 8-7, 8-6, ..., 5-3, ..., 1-8, 1-7, ... etc. . I would call it an "universal 8-8 balancer".

But ... haha, AM I REALLY THE FIRST ONE TO HAVE THIS IDEA?

https://www.google.com/search?client=fi ... l+balancer

The answer is "NO!" ;-) There are not a lot of results, but there are.

@Oktokolo: For you the book with universal 4-4 balancers https://factorioprints.com/view/-LXrbqQfO03t3sVOBuXf
and another single design https://factorioprints.com/view/-LiPtLEdh0cwi9nXFaP4

@disentius: For you the universal 8-8 LANE balancer
https://factorioprints.com/view/-LXuNaLX0gBY2FuCWN54
(It looks as huge and complex as expected for an 8-8 universal lance balancer :-D )

@Trebor: For you the universal 4-4 output AND input balanced belt balancer
https://www.reddit.com/r/factorio/comme ... _balancer/
(it seems some of the universal designs are input balanced others are not, depending on how the items from blocked outputs are merged with the inputs)
The design posted there has a slight error. Here is my fixed version of it

When following the trail of credits it seems the ideas go back to this design, by user kroppeb


Image

which looks pretty similar to the 2nd attempt I made today. So, not the first but same idea. :-)

User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: Belt math, using lower tier belts to effect.

Post by disentius »

thanks, imp :D
And you are right, the discussion over balancers is as old as factorio. Every time something changes, it crops up again.

User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: Belt math, using lower tier belts to effect.

Post by disentius »

BTW, this 8-8 by tzwaan is smaller, and works beautifully. (tested it)
https://www.reddit.com/r/factorio/comme ... /?sort=old

tamanous
Fast Inserter
Fast Inserter
Posts: 138
Joined: Wed Aug 10, 2016 8:35 am
Contact:

Re: Belt math, using lower tier belts to effect.

Post by tamanous »

As posted here, this one is input & output balanced and can handle uneven inputs and outputs. I didn't do sideloading, as it may cause unbalanced output when followed by a splitter while being fed by uneven input.

And yes, its too much spagetti...


Image



Trebor
Filter Inserter
Filter Inserter
Posts: 288
Joined: Sun Apr 30, 2017 1:39 pm
Contact:

Re: Belt math, using lower tier belts to effect.

Post by Trebor »

Here is a 6 belt to 4/2 belt splitter balancer.
6-4-2_belt_split.2.gif
6-4-2_belt_split.2.gif (16.96 MiB) Viewed 4896 times

Post Reply

Return to “Mechanical Throughput Magic (circuit-free)”