Jump to content

Balanced 2xN pipe splitters.


Recommended Posts

If you don't know what a pipe splitter/balancer is or what it's for, you probably don't play Factorio! Good for you. Keep it that way it ain't called Cracktorio for nothing.

2x2 Balancer

Let's start with the basic 2x2 pipe balancer 

0qo2zn9ux7k31.png?width=1366&format=png&

(I did not invent this balancer, the screenshot is from this post on reddit from 4 years ago.)

That design is literally perfection it cannot be improved upon, the output pipes can even be in different directions, it can turn a corner or split in two directions. It's just a great pattern.

The basic purpose of the 2x2 balancer is to take two pipes and evenly distribute the flow over two output pipes. This is arguably most useful when say one of the input pipes is empty (being starved by some prior consumer) and the other is full, so then the two output pipes both get half instead of one continuing to be starved. If both input pipes are full you're just going to get two full output pipes anyway and unlike in Factorio, in ONI there is generally little merit to input-balancing.

2x3 Balanced Splitter

It's also pretty trivial to make a perfect 2x3. The basic principle of the 2x2 balancer is that the output slots of the bridges split their output evenly in two directions before re-merging into bridge inputs, but you can easily split the output in 3 directions then join those two new outputs together to make a 3rd output belt. Here's the basic idea it can even be made a bit more compact but I made it a little more open for clarity.

image.thumb.png.31790a7e5f5d7cda76712154b14da1bf.png

(Note that in some cases you need a bridge to force the flow, it seemed to work okay without one but if the packets are going in the wrong direction force them into a bridge input)

2x4 Splitters

Anyway, now onto the 2x4, here the most important principle is "full throughput", if any two of the output pipes are "open" you want both input pipes to be fully drawn from.

For example a basic "double T" 2x4 splitter has each input pipe split into two output pipes but it degrades to half throughput if a pairs of pipes drawing from the same input are open.
image.thumb.png.c7b72cd14055c2c93851a0562674d354.png

Here only the top pipe is being drawn from, and the bottom pipe is backed up and not moving.

Of course this can be remedied by adding a 2x2 balancer on each output pipe, like so:

image.thumb.png.611ae96b8aca586805f586dbf5e95bd9.pngimage.thumb.png.1f3cb13cfc805f90350660dfd995e0e4.png

Now if any two pipes there is full throughput.

This balancer does have a flaw. If 3 output pipes are open when what happens is one of the pipes gets full flow and the other two output pipes each get half flow instead of the 3 pipes getting 3/4 flow, all of the input is still being consumed and so this is usually acceptable.

But it's also possible to return to the 2x2 strategy, and instead of splitting the output in 2 or 3 directions, splitting it in 4 directions and then merging those outputs into bridge inputs, something like this:

image.thumb.png.48a6996c061c320eb950da6833213f6c.pngimage.thumb.png.88e7e416e568c61bc34fed76d09f7846.png
image.thumb.png.4b6473fcb4beaeca9e0dd9b12acb3d4a.png

The result is more of a nasty knot blob of bridges but it is perfectly balanced meaning that all open output pipes get the same amount, and the input pipes are drawn from evenly.

Obviously there are a lot of topologically equivalent ways to arrange the pipes. Can you come up with a better layout?

What about bigger splitters?

Nope! The fact that (unmodded) ONI has only 3 tile long bridges makes it enormously impractical. I mean it doesn't stop players making them but running more than 2 pipes in parallel just gets super messy in general.

Is pipe balancing Useful?

As I said previously, I don't think there's much use for input-balancing in ONI. Even output balancing is a bit dubious in value compared with just using simple priority - saturating the most important consumers and letting overflow go to less important consumers. But I think there is value to the idea of "full throughput", being able to take a pair of input pipes and split that into output pipes with a guarantee of full throughput regardless of which combination of pipes is being pulled from.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...