Belt Balancers - how they work and how to make them (2024)

Post Reply

  • Print view

9 posts• Page 1 of 1

EX_plode
Manual Inserter
Belt Balancers - how they work and how to make them (1)
Posts: 3
Joined: Sat Jul 07, 2018 3:57 pm
Contact:

Contact EX_plode

Send private message

Belt Balancers - how they work and how to make them

  • Quote

Postby EX_plode »

I have created what I call "A compilation of research and occasionally a useful guide" on the designing of belt balancers, as this is a complex topic that I have recently been doing a lot of research into, and there seems to currently be a dearth of guides available. There are plenty of copy-and-paste designs on the wiki, but nobody seems to be explaining why they work, or how to make them yourself. I have attempted to do this.

The introduction of the guide follows:

This “guide” is the sum total of my belt-balancing knowledge after approximately 15 hours of research, testing and investigation. In it, I explain some of the theory behind how belt balancers work and how to design them properly. I have come up with a reliable method to design one-to-many splitters and many-to-one mergers. I have also come up with a method to design many-to-many balancers, but the designs produced are too large to be of practical use.

Bear in mind that the following information is merely the conclusions I have reached from my own investigation; I do not have answers to some of the questions raised, and there is always the possibility that I am wrong about something.

However, I hope that at the very least I will shed some light on the mysterious belt spaghetti, and perhaps give you a 15-hour head-start on your own learning.

Download here:

Factorio Belt Balancers v1.0.pdf
Belt Balancers - A compilation of research and occasionally a useful guide
(8.44 MiB) Downloaded 18951 times

Top

jcranmer
Long Handed Inserter
Belt Balancers - how they work and how to make them (2)
Posts: 90
Joined: Wed Jun 29, 2016 9:59 pm
Contact:

Contact jcranmer

Send private message

Re: Belt Balancers - how they work and how to make them

  • Quote

Postby jcranmer »

You say that it's impossible to build a perfect 3-1 balancer that will still balance its inputs evenly, even if some of them are missing. It's not, at least not if you allow a little bit of circuit network. Here's how:

Build a standard 4-to-1 pyramid. Hook the unused output back into the unused input. Attach one belt of all three inputs to the same circuit, holding the number of items on each input belt. Enable the feedback loop only when that number is more than 18 (i.e., only enable the feedback loop when all three lanes have items on them).

Doing a test where each input lane uses a different item, and summing up the results via flowmeter, confirms that, after a short settling period, the consumption rate on a blue belt over three seconds is exactly 40 items each if all three are enabled, or 60 items each for the two active inputs if only two are enabled, for each combination of two lanes.

I guess it might not work correctly if one of the lanes is <⅓ belt and the other two are >⅓ belt. But with that kind of disparity of input, the idea of perfect balancing is already sort of ill-defined. When you're reducing the number of belts, you usually just care about the balancer itself not being the throughput bottleneck; guaranteeing exactly even pull of all inputs is pretty much limited in use-case to even drawing between railway carriages, where all the inputs should be always saturated anyways.

EX_plode
Manual Inserter
Belt Balancers - how they work and how to make them (3)
Posts: 3
Joined: Sat Jul 07, 2018 3:57 pm
Contact:

Contact EX_plode

Send private message

Re: Belt Balancers - how they work and how to make them

  • Quote

Postby EX_plode »

jcranmer wrote:You say that it's impossible to build a perfect 3-1 balancer that will still balance its inputs evenly, even if some of them are missing. It's not, at least not if you allow a little bit of circuit network. Here's how:

Build a standard 4-to-1 pyramid. Hook the unused output back into the unused input. Attach one belt of all three inputs to the same circuit, holding the number of items on each input belt. Enable the feedback loop only when that number is more than 18 (i.e., only enable the feedback loop when all three lanes have items on them).

You are quite right, I have tested it and it does work.
Working at full capacity:

Belt Balancers - how they work and how to make them (4)
3-to-1 full
full.jpg (140.33 KiB) Viewed 80912 times

Working with one belt empty:

Belt Balancers - how they work and how to make them (5)
3-to-1 one empty belt
2to1.jpg (138.76 KiB) Viewed 80912 times

Working with two half belts and one empty belt:

Belt Balancers - how they work and how to make them (6)
3-to-1 2 half belts to one whole
2halfto1whole.jpg (138.45 KiB) Viewed 80912 times

Top

Zavian
Smart Inserter
Belt Balancers - how they work and how to make them (7)
Posts: 1646
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Contact Zavian

Send private message

Re: Belt Balancers - how they work and how to make them

  • Quote

Postby Zavian »

I think it would work without the circuits.

Top

EX_plode
Manual Inserter
Belt Balancers - how they work and how to make them (8)
Posts: 3
Joined: Sat Jul 07, 2018 3:57 pm
Contact:

Contact EX_plode

Send private message

Re: Belt Balancers - how they work and how to make them

  • Quote

Postby EX_plode »

Zavian wrote:I think it would work without the circuits.

Nope. If the loop is active when there are only two full inputs, the balancer pulls twice as much from one input as the other. I have tested it.

Top

alercah
Fast Inserter
Belt Balancers - how they work and how to make them (9)
Posts: 151
Joined: Sun Apr 07, 2019 5:19 am
Contact:

Contact alercah

Send private message

Re: Belt Balancers - how they work and how to make them

  • Quote

Postby alercah »

This is an excellent, helpful post. I am curious about the mathematical theory of balancing and looked into things a bit, it seems that this 3-1 balancer now behaves correctly, and other bugs such as straightforward 4x4 balancers not working correctly seem fixed as well. I imagine this is all due to https://www.factorio.com/blog/post/fff-287? Would love to hear if others disagree.

Top

Mr. Tact
Filter Inserter
Belt Balancers - how they work and how to make them (10)
Posts: 460
Joined: Sat Mar 26, 2016 3:37 pm
Contact:

Contact Mr. Tact

Send private message

Re: Belt Balancers - how they work and how to make them

  • Quote

Postby Mr. Tact »

jcranmer wrote:

Sun Jul 08, 2018 5:38 am

You say that it's impossible to build a perfect 3-1 balancer that will still balance its inputs evenly, even if some of them are missing. It's not, at least not if you allow a little bit of circuit network. Here's how:

Build a standard 4-to-1 pyramid. Hook the unused output back into the unused input. Attach one belt of all three inputs to the same circuit, holding the number of items on each input belt. Enable the feedback loop only when that number is more than 18 (i.e., only enable the feedback loop when all three lanes have items on them).

Doing a test where each input lane uses a different item, and summing up the results via flowmeter, confirms that, after a short settling period, the consumption rate on a blue belt over three seconds is exactly 40 items each if all three are enabled, or 60 items each for the two active inputs if only two are enabled, for each combination of two lanes.

I guess it might not work correctly if one of the lanes is <⅓ belt and the other two are >⅓ belt. But with that kind of disparity of input, the idea of perfect balancing is already sort of ill-defined. When you're reducing the number of belts, you usually just care about the balancer itself not being the throughput bottleneck; guaranteeing exactly even pull of all inputs is pretty much limited in use-case to even drawing between railway carriages, where all the inputs should be always saturated anyways.

Okay, since no one else has asked I will -- how exactly did you figure that out? Belt Balancers - how they work and how to make them (11)

Professional Curmudgeon since 1988.

Top

jcranmer
Long Handed Inserter
Belt Balancers - how they work and how to make them (12)
Posts: 90
Joined: Wed Jun 29, 2016 9:59 pm
Contact:

Contact jcranmer

Send private message

Re: Belt Balancers - how they work and how to make them

  • Quote

Postby jcranmer »

The trite answer: math.

The longer answer: in many cases, you can model a splitter as something that distributes all of its inputs equally over its outputs. This allows you to convert any splitter network into a directed graph, with the vertices being splitters and the edges being belts connecting them. You can build a set of linear equations, where each splitter is an equation and the variables are the total throughput on the graph. Manipulating these equations allows you to solve for the outputs in terms of the inputs, even if the graph is cyclic. Usually, I do this under the assumption that there are at least as many outputs as inputs (which adds a sanity condition that no belt should ever have more than 100% items going through it), but I figured that the mirror case can work if the mirror case is applied: the problem of one belt evenly distributing to three output belts being isomorphic to the the problem of one output belt evenly pulling from three input belts. I did test it, of course.

Building a "perfect" M-N balancer, when M≤N, works like this: when N is a power of 2, an N-N balancer is built as a recursive butterfly network (build 2 N/2-N/2 balancers, and then hook one output from each sub-balancer into two outputs). When N is not a power of 2, you build the next largest power-of-2 balancer, and then hook the unused outputs up to unused inputs to go around again. An M-N balancer (when M<N) is built by building an N-N balancer and simply ignoring excess inputs. I don't actually have a formal proof for the non-power-of-2 case, but the sketch of correctness is that you're not gumming things up as you would by leaving splitters with no outputs; in the steady state, the total output must equal the total input (since you're not accumulating things somewhere); and the correctness of the underlying butterfly network means that all of the outputs must have identical output.

I will point out one complication with this model, which is why I put "perfect" in scare quotes. Essentially, it assumes that the output is always going to be ready to drain a splitter rather than filling up and clogging the network. The resulting networks can't balance things perfectly if some inputs aren't producing and some outputs aren't consuming. The most obvious failure is in the 4-4 balancer: this model says you need 4 splitters to do the trick, while the usual blueprint people use has 6 splitters. That's because the 4-splitter model can only route one full lane of the bottom half of input to the top half of output, so if the top inputs aren't producing and the bottom outputs aren't consuming, the balancer can only deliver 1 belt worth of goods instead of the 2 that the inputs and outputs are capable of producing/consuming. The 2 extra splitters add another belt's worth of cross-half capacity to allow any combination of inputs to deliver to an equal number of outputs at full throughput. This model of balancer I've seen called "count-perfect" or "full-throughput". There is a mathematical model that satisfies this case (switching networks), but I'm nowhere near as well-versed there as I am in linear algebra and graph theory, so I've eschewed it.

Top

Itemfinder
Inserter
Belt Balancers - how they work and how to make them (13)
Posts: 29
Joined: Thu Feb 21, 2019 4:46 pm
Contact:

Contact Itemfinder

Send private message

Re: Belt Balancers - how they work and how to make them

  • Quote

Postby Itemfinder »

jcranmer wrote:

Wed May 08, 2019 1:47 am

I will point out one complication with this model, which is why I put "perfect" in scare quotes. Essentially, it assumes that the output is always going to be ready to drain a splitter rather than filling up and clogging the network. The resulting networks can't balance things perfectly if some inputs aren't producing and some outputs aren't consuming. The most obvious failure is in the 4-4 balancer: this model says you need 4 splitters to do the trick, while the usual blueprint people use has 6 splitters. That's because the 4-splitter model can only route one full lane of the bottom half of input to the top half of output, so if the top inputs aren't producing and the bottom outputs aren't consuming, the balancer can only deliver 1 belt worth of goods instead of the 2 that the inputs and outputs are capable of producing/consuming. The 2 extra splitters add another belt's worth of cross-half capacity to allow any combination of inputs to deliver to an equal number of outputs at full throughput. This model of balancer I've seen called "count-perfect" or "full-throughput". There is a mathematical model that satisfies this case (switching networks), but I'm nowhere near as well-versed there as I am in linear algebra and graph theory, so I've eschewed it.

Check this out..
https://www.reddit.com/r/factorio/comme ... dium=web2x

Top

Post Reply

  • Print view

9 posts• Page 1 of 1

Return to “Gameplay Help”

Jump to

  • General
  • ↳ Releases
  • ↳ News
  • ↳ General discussion
  • ↳ Multiplayer
  • ↳ Find Servers / Tools / Guides
  • ↳ Show your Creations
  • ↳ Videos
  • ↳ Combinator Creations
  • ↳ Mechanical Throughput Magic (circuit-free)
  • ↳ Railway Setups
  • ↳ Energy Production
  • ↳ Medium/Big/Gigantic Sized Structures
  • ↳ Fan Art
  • ↳ Gameplay Help
  • ↳ Spread the Word
  • ↳ Off topic
  • ↳ This Forum
  • ↳ Celebration Party
  • Support
  • ↳ Gameplay Help
  • ↳ Discover Factorio Wiki
  • ↳ Discover Others Creations
  • ↳ Discover Mods
  • ↳ Discover Tools Around Factorio
  • ↳ Technical Help
  • ↳ Bug Reports
  • ↳ Resolved for the next release
  • ↳ Fixed for 2.0
  • ↳ Assigned
  • ↳ Not a bug
  • ↳ Pending
  • ↳ 1 / 0 magic
  • ↳ Duplicates
  • ↳ Minor issues
  • ↳ Desyncs with mods
  • ↳ Won't fix.
  • ↳ Resolved Problems and Bugs
  • Factorio Direction
  • ↳ Ideas and Suggestions
  • ↳ Outdated/Not implemented
  • ↳ Frequently Suggested / Link Collections
  • ↳ Implemented Suggestions
  • ↳ Implemented in 2.0
  • ↳ Development Proposals
  • ↳ Balancing
  • Contributions
  • ↳ Mods
  • ↳ Download mods
  • ↳ Mod portal Discussion
  • ↳ Mods
  • ↳ Mod Packs / Libs / Special Interest
  • ↳ 5dim's mod
  • ↳ Angels Mods
  • ↳ Atomic Power
  • ↳ Bob's mods
  • ↳ DyWorld
  • ↳ F.A.R.L
  • ↳ Logistic Train Network
  • ↳ MoMods
  • ↳ Reika's Mods
  • ↳ Resource Spawner Overhaul
  • ↳ Yuoki Industries
  • ↳ PyMods
  • ↳ Questions, reviews and ratings
  • ↳ Modding Discussions
  • ↳ Modding discussion
  • ↳ Modding help
  • ↳ Ideas and Requests For Mods
  • ↳ Modding interface requests
  • ↳ Implemented mod requests
  • ↳ Implemented for 2.0
  • ↳ Already exists
  • ↳ Won't implement
  • ↳ Documentation Improvement Requests
  • ↳ Resolved Requests
  • ↳ Development tools
  • ↳ Tools
  • ↳ Mod and installation managers
  • ↳ Cheatsheets / Calculators / Viewers
  • ↳ Development tools
  • ↳ Special interest mods and libraries
  • ↳ Modding Development
  • ↳ Multiplayer / Dedicated Server
  • ↳ Multiplayer Board
  • ↳ Archive
  • ↳ Maps and Scenarios
  • ↳ Translations
  • ↳ Texture Packs
  • ↳ Fan Art
  • ↳ Wiki Talk
  • ↳ To be sorted
  • ↳ Campaign / Scenario suggestions
Belt Balancers - how they work and how to make them (2024)

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Edwin Metz

Last Updated:

Views: 5690

Rating: 4.8 / 5 (78 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Edwin Metz

Birthday: 1997-04-16

Address: 51593 Leanne Light, Kuphalmouth, DE 50012-5183

Phone: +639107620957

Job: Corporate Banking Technician

Hobby: Reading, scrapbook, role-playing games, Fishing, Fishing, Scuba diving, Beekeeping

Introduction: My name is Edwin Metz, I am a fair, energetic, helpful, brave, outstanding, nice, helpful person who loves writing and wants to share my knowledge and understanding with you.