fractal 2048 belt balancer (and bigger?)

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
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: fractal 512 belt balancer

Post by Qon »

JohnyDL wrote:
Qon wrote:Download the save file and remaking the blueprints in game with the 0.15 client.
I suggest you at least use a mod that lets you run faster (creative mode can do this) when selecting the bigger balancers. You don't want to lose minutes of holding down m1 and running around if you accidentally drop m1 or have to leave temporarily. ;)
Or you can do it with map mode zoom into one corner start the selection zoom out and zoom into the other corner blueprint selected in seconds (it's how I BP my XL balancers (and even a whole base from MP on more than occasion)

Also 24GB on my computer I'll give the bigger balancers a go ^_^
Oh right in v0.15 you can do that map trick. But with generated blueprints I don't have to select anything anymore ^_^
Red_Katana_001 wrote:
Qon wrote: If I made a 8192 balancer blueprint, would you actually use it? Well at least try open the bp in game, probably crashes before it's even made from the bp string...
well, after investigating your design, I can see the pattern in it so I could just make blueprints of little parts and then use them to make the bigger one so it won't crash the game
There's a reason I didn't make any balancers bigger than 512 when I made them manually. It's takes a lot of time to align the blueprints and make new sub-parts and reconnect them.

It would be a lot easier if I modified the new generator to make "slices" of the blueprints. So the code generates the blueprints in many parts that are all aligned on 1 line and centered in the top left corner so it is trivial (but still a bit time consuming) to just place the blueprint parts one after another. But each iteration is about 4-5 times larger (in parts and area) than the previous. If the biggest blueprint you can place is 512, a 8192-balancer would be 625 parts sized about a 512 balancer each. Note that by trying to continue my work by following the pattern this number would be vastly larger and require you to align and create a lot of parts which would be even more time consuming than placing all those parts.

What is the biggest balancer you can place? How much RAM do you have?
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Red_Katana_001
Burner Inserter
Burner Inserter
Posts: 15
Joined: Wed Apr 26, 2017 1:19 pm
Contact:

Re: fractal 512 belt balancer

Post by Red_Katana_001 »

Qon wrote:
Red_Katana_001 wrote:
Qon wrote: If I made a 8192 balancer blueprint, would you actually use it? Well at least try open the bp in game, probably crashes before it's even made from the bp string...
well, after investigating your design, I can see the pattern in it so I could just make blueprints of little parts and then use them to make the bigger one so it won't crash the game
There's a reason I didn't make any balancers bigger than 512 when I made them manually. It's takes a lot of time to align the blueprints and make new sub-parts and reconnect them.

It would be a lot easier if I modified the new generator to make "slices" of the blueprints. So the code generates the blueprints in many parts that are all aligned on 1 line and centered in the top left corner so it is trivial (but still a bit time consuming) to just place the blueprint parts one after another. But each iteration is about 4-5 times larger (in parts and area) than the previous. If the biggest blueprint you can place is 512, a 8192-balancer would be 625 parts sized about a 512 balancer each. Note that by trying to continue my work by following the pattern this number would be vastly larger and require you to align and create a lot of parts which would be even more time consuming than placing all those parts.

What is the biggest balancer you can place? How much RAM do you have?
I have got 12 GB of ram, and I have been able to place the 512 balancer without too much trouble, I might just go make the 1024 balancer and see what happens, if I have too much freetime this wekkend (which I prob wil) I might go up to 2048 or even 4096 and post blueprint string here if you'd like
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: fractal 512 belt balancer

Post by Qon »

Red_Katana_001 wrote: I have got 12 GB of ram, and I have been able to place the 512 balancer without too much trouble, I might just go make the 1024 balancer and see what happens, if I have too much freetime this wekkend (which I prob wil) I might go up to 2048 or even 4096 and post blueprint string here if you'd like
I do want blueprints and nice high res screenshots of all the big balancers :D
There is a factorio command for taking pictures at higher quality than you can with a regular screenshot if you feel like it.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Red_Katana_001
Burner Inserter
Burner Inserter
Posts: 15
Joined: Wed Apr 26, 2017 1:19 pm
Contact:

Re: fractal 512 belt balancer

Post by Red_Katana_001 »

Qon wrote:
Red_Katana_001 wrote: I have got 12 GB of ram, and I have been able to place the 512 balancer without too much trouble, I might just go make the 1024 balancer and see what happens, if I have too much freetime this wekkend (which I prob wil) I might go up to 2048 or even 4096 and post blueprint string here if you'd like
I do want blueprints and nice high res screenshots of all the big balancers :D
There is a factorio command for taking pictures at higher quality than you can with a regular screenshot if you feel like it.
I'd love to get to learn it!
Koub
Global Moderator
Global Moderator
Posts: 7774
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: fractal 512 belt balancer

Post by Koub »

Red_Katana_001 wrote:
Qon wrote:
Red_Katana_001 wrote: I have got 12 GB of ram, and I have been able to place the 512 balancer without too much trouble, I might just go make the 1024 balancer and see what happens, if I have too much freetime this wekkend (which I prob wil) I might go up to 2048 or even 4096 and post blueprint string here if you'd like
I do want blueprints and nice high res screenshots of all the big balancers :D
There is a factorio command for taking pictures at higher quality than you can with a regular screenshot if you feel like it.
I'd love to get to learn it!
https://wiki.factorio.com/index.php?sea ... arch&go=Go
Koub - Please consider English is not my native language.
Red_Katana_001
Burner Inserter
Burner Inserter
Posts: 15
Joined: Wed Apr 26, 2017 1:19 pm
Contact:

Re: fractal 512 belt balancer

Post by Red_Katana_001 »

Koub wrote:
Red_Katana_001 wrote:
Qon wrote:
Red_Katana_001 wrote: I have got 12 GB of ram, and I have been able to place the 512 balancer without too much trouble, I might just go make the 1024 balancer and see what happens, if I have too much freetime this wekkend (which I prob wil) I might go up to 2048 or even 4096 and post blueprint string here if you'd like
I do want blueprints and nice high res screenshots of all the big balancers :D
There is a factorio command for taking pictures at higher quality than you can with a regular screenshot if you feel like it.
I'd love to get to learn it!
https://wiki.factorio.com/index.php?sea ... arch&go=Go
thanks!
JohnyDL
Filter Inserter
Filter Inserter
Posts: 535
Joined: Fri May 16, 2014 3:44 pm
Contact:

Re: fractal 512 belt balancer

Post by JohnyDL »

more specifically https://wiki.factorio.com/Console#Large_Screenshots

I tend to use these settings

/c game.take_screenshot{showgui = false, resolution = {x = <x-size>, y = <y-size>}, show_entity_info = false, zoom = <zoom>}

with 24 GB I've experienced crashes at about 12000x12000 resolution, though it can supposedly go upto 16000x16000 (I think) but anything above 10000x10000 really is hard to manipulate and upload anyway, at zoom = 1 it's 32 pixels per tile, to give you a rough guess of how big to make the zoom and size

for super structures I also like to measure size with belts, so a blue balancer would have it's longest size measured in yellow and shortest in red to give the dimensions really obviously and easily extracted from the BP
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: fractal 512 belt balancer

Post by Qon »

Thanks Koub! I prefer the more comprehensive lua-api wiki though, but the extra options described there aren't necessary here.

Red katana, a few hints:
Your graphics card will probably not be able to take a zoom 1 quality screenshot of the balancers. Zooming out a bit is ok. We don't need 1GB screenshots, if the pictures are that big then a world share is more reasonable. The reason to use it is to use zoom level 0.1-0.5 instead of zoom level 0.005. I don't know what is actually reasonable numbers, those are very rough numbers. The point is that you should from the screenshot easily and comfortably see all it entities. So a high quality jpeg (instead of png) is probably needed to get the image size lower than the world size.

Also, the blueprint generator prints out the sizes of the blueprints. You need those numbers to take screenshots with the same aspect ratio as the blueprint. ;)

Code: Select all

C:\QDocs\Dropbox\Qode>
C:\QDocs\Dropbox\Qode\factoriomods/8_balancer.txt     size:        8x10 stringsize:        945
C:\QDocs\Dropbox\Qode\factoriomods/16_balancer.txt    size:       16x26 stringsize:       3201
C:\QDocs\Dropbox\Qode\factoriomods/32_balancer.txt    size:       32x62 stringsize:      11901
C:\QDocs\Dropbox\Qode\factoriomods/64_balancer.txt    size:      64x144 stringsize:      43885
C:\QDocs\Dropbox\Qode\factoriomods/128_balancer.txt   size:     128x328 stringsize:     164285
C:\QDocs\Dropbox\Qode\factoriomods/256_balancer.txt   size:     256x736 stringsize:     612717
C:\QDocs\Dropbox\Qode\factoriomods/512_balancer.txt   size:    512x1632 stringsize:    2353269
C:\QDocs\Dropbox\Qode\factoriomods/1024_balancer.txt  size:   1024x3584 stringsize:    9276045
I don't know the sizes of the 2048-balancer and above though.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
JohnyDL
Filter Inserter
Filter Inserter
Posts: 535
Joined: Fri May 16, 2014 3:44 pm
Contact:

Re: fractal 512 belt balancer

Post by JohnyDL »

I could do all those at zoom 1 then I guess 0.5 for the 2048, 0.25 for 4096 and 0.125 for 8192 would be reasonable ^_^

Which I wasn't separated from my PC this week
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: fractal 512 belt balancer

Post by Qon »

JohnyDL wrote:I could do all those at zoom 1 then I guess 0.5 for the 2048, 0.25 for 4096 and 0.125 for 8192 would be reasonable ^_^
Which I wasn't separated from my PC this week
A balancer that is 1024 x 3584 tiles is going to be 32 times larger in each axis counting pixels at zoom=1. So 32 768 x 114 688 pixels or 3 758 096 384 pixels. Even without alpha values thats 11 274 289 152 Bytes or 10.5 GiB. Only todays most extreme graphics cards have that much VRAM. Also I doubt even those could actually store anything of that the size of that as a single image, even if you go beyond top of the line consumer graphics cards.

Also, the game can't handle it.
Lua-API wiki wrote:resolution :: Position (optional): Maximum allowed resolution is 16384x16384 (resp. 8192x8192 when anti_alias is true), but maximum recommended resolution is 4096x4096 (resp. 2048x2048)
And it's not reasonable if the image is many, many times larger than the save file q:

Edit:
I have ideas for an altered design which is significatly smaller and uses less splitters. It will look different though. And I like the current look...
Last edited by Qon on Fri Sep 29, 2017 9:40 am, edited 1 time in total.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: fractal 512 belt balancer

Post by Qon »

So changing the code was fairly easy. The new style looks completely different. Basically it removes all the balancers from the balancers and what's left is the mixers...
When you double the inputs (and width) they grow less (!) than twice as much in length. [length = n=> n == 8 ? 10 : length(n / 2) + n * 0.625 + 4]
And the old ones grew more than twice in length / iteration.

And I have a 2048 balancer now! Since they are so much smaller I can generate an extra iteration with the same amount of RAM as before :D

But no testing has been done so far... this announcement might just embarrass me :o

Code: Select all

C:\QDocs\Dropbox\Qode\factoriomods/8_balancer.txt     size:        8x10 stringsize:        945 generation time:      0 encode time:      0
C:\QDocs\Dropbox\Qode\factoriomods/16_balancer.txt    size:       16x24 stringsize:       3081 generation time:   0.01 encode time:      0
C:\QDocs\Dropbox\Qode\factoriomods/32_balancer.txt    size:       32x48 stringsize:       9921 generation time:   0.03 encode time:      0
C:\QDocs\Dropbox\Qode\factoriomods/64_balancer.txt    size:       64x92 stringsize:      30909 generation time:   0.07 encode time:   0.02
C:\QDocs\Dropbox\Qode\factoriomods/128_balancer.txt   size:     128x176 stringsize:      95397 generation time:   0.26 encode time:   0.06
C:\QDocs\Dropbox\Qode\factoriomods/256_balancer.txt   size:     256x340 stringsize:     302945 generation time:   0.57 encode time:   0.18
C:\QDocs\Dropbox\Qode\factoriomods/512_balancer.txt   size:     512x664 stringsize:     997165 generation time:   2.28 encode time:   0.78
C:\QDocs\Dropbox\Qode\factoriomods/1024_balancer.txt  size:   1024x1308 stringsize:    3493077 generation time:    8.4 encode time:   3.99
C:\QDocs\Dropbox\Qode\factoriomods/2048_balancer.txt  size:   2048x2592 stringsize:   12867581 generation time:   32.7 encode time:  15.52

Code: Select all

function pad(s, n) {return ' '.repeat(Math.max(0,-n-s.toString().length)) + s + ' '.repeat(Math.max(0,n-s.toString().length))}
length = n=> n == 8 ? 10 : length(n / 2) + n * 0.625 + 4
for(n = 8; n < 10000000; n*=2) console.log(`${pad(n,-10)} x ${pad(length(n), 10)} lengthdiff: ${pad(length(n)-n,-10)} lengthratio:  ${pad(length(n) / n, -10)}`)
         8 x 10         lengthdiff:          2 lengthratio:        1.25 
        16 x 24         lengthdiff:          8 lengthratio:         1.5 
        32 x 48         lengthdiff:         16 lengthratio:         1.5 
        64 x 92         lengthdiff:         28 lengthratio:      1.4375 
       128 x 176        lengthdiff:         48 lengthratio:       1.375 
       256 x 340        lengthdiff:         84 lengthratio:    1.328125 
       512 x 664        lengthdiff:        152 lengthratio:    1.296875 
      1024 x 1308       lengthdiff:        284 lengthratio:  1.27734375 
      2048 x 2592       lengthdiff:        544 lengthratio:    1.265625 
      4096 x 5156       lengthdiff:       1060 lengthratio:  1.2587890625 
      8192 x 10280      lengthdiff:       2088 lengthratio:  1.2548828125 
     16384 x 20524      lengthdiff:       4140 lengthratio:  1.252685546875 
     32768 x 41008      lengthdiff:       8240 lengthratio:  1.25146484375 
     65536 x 81972      lengthdiff:      16436 lengthratio:  1.25079345703125 
    131072 x 163896     lengthdiff:      32824 lengthratio:  1.25042724609375 
    262144 x 327740     lengthdiff:      65596 lengthratio:  1.2502288818359375 
    524288 x 655424     lengthdiff:     131136 lengthratio:  1.2501220703125 
   1048576 x 1310788    lengthdiff:     262212 lengthratio:  1.2500648498535156 
   2097152 x 2621512    lengthdiff:     524360 lengthratio:  1.2500343322753906 
   4194304 x 5242956    lengthdiff:    1048652 lengthratio:  1.2500181198120117 
   8388608 x 10485840   lengthdiff:    2097232 lengthratio:  1.250009536743164
Attachments
New smaller style to the left, largest is 512. Largest to the right is 256.
New smaller style to the left, largest is 512. Largest to the right is 256.
ousu(170929-012311-50).jpg (664.3 KiB) Viewed 8962 times
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: fractal 512 belt balancer

Post by Qon »

pieppiep wrote:
Qon wrote:[*] The 256 balancer requires 75k UG belt, 18k express belts and 2.4k express splitters.
I think you mean the 512 balancer needs 2.4k (2304 to be exact) or the 256 needs 1024 splitters.

2^x belt balancer : x*2^(x-1) splitters
I meant what I said. The old design wasn't perfectly efficient in it's splitter usage.
But thanks to you I did some extra thinking through the fractal design and came up with something that uses the amount of splitters your formula provides.
Jap2.0 wrote:It could be either way. Large balancers might not be perfectly efficient in terms of splitter usage - when you have something that big, the challenge is to make it work. To make it work with the least possible amount of splitters...
Nah dude, I'm good at the game. I can do both ;)
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
JohnyDL
Filter Inserter
Filter Inserter
Posts: 535
Joined: Fri May 16, 2014 3:44 pm
Contact:

Re: fractal 512 belt balancer

Post by JohnyDL »

Qon wrote:
JohnyDL wrote:I could do all those at zoom 1 then I guess 0.5 for the 2048, 0.25 for 4096 and 0.125 for 8192 would be reasonable ^_^
Which I wasn't separated from my PC this week
A balancer that is 1024 x 3584 tiles is going to be 32 times larger in each axis counting pixels at zoom=1. So 32 768 x 114 688 pixels or 3 758 096 384 pixels. Even without alpha values thats 11 274 289 152 Bytes or 10.5 GiB. Only todays most extreme graphics cards have that much VRAM. Also I doubt even those could actually store anything of that the size of that as a single image, even if you go beyond top of the line consumer graphics cards.
Oops yes I forgot the extra x32 factor in the second message cause tile width and pixel width don't line up, I'm a dumb dumb, anyway I'll work something out next week if no-one beats me to it.
Qon wrote:
pieppiep wrote:
Qon wrote:[*] The 256 balancer requires 75k UG belt, 18k express belts and 2.4k express splitters.
I think you mean the 512 balancer needs 2.4k (2304 to be exact) or the 256 needs 1024 splitters.

2^x belt balancer : x*2^(x-1) splitters
I meant what I said. The old design wasn't perfectly efficient in it's splitter usage.
But thanks to you I did some extra thinking through the fractal design and came up with something that uses the amount of splitters your formula provides.
When I worked out an iterative formula for count prefect binary balancers I got

Balancer [2^n] = 2 * Balancer [2^(n-1)] + 2^(n-1)
Balancer [1] = 0

I'm glad it comes up with the identical sequence for splitter count

1:0, 2:1, 4:4, 8:12, 16:32, 32:80, 64:192, 128:448, 256:1024, 512:2304, 1024:5120

When I did it as it made logical sense to me, the logic being you need to balance each half and then balance each lane from each half with a lane from the other half so 2 * one size smaller + 1 splitter for every 2 belts

but with that you don't end up being full through put, as should be obvious, it's only half way there. An easy way to visualise it in your head is to think of 2 lanes filling 1 splitter at the input and following all the splits to 2 lanes output by the same splitter at the other end of the balancer, with this number of splitters you should only find one line that does that.

So you then need to do a little more for full throughput, I worked out a maximum bound for the full throughput but not a formula for the perfect number, I'm guessing it's only another half as many splitters as you have rows, but I can't be certain of that as seemingly any layout I pick for redistributing the lanes to that last set of splitters in my head I can think of a set of lanes input and the outputs to match that it wouldn't provide full throughput. That's not to say it couldn't be done just to say I can't visualise and test things on this scale without my computer and factorio in front of me and while that would give you a minimum bound for full throughput balances of size 2^n, n>2 I'm not sure it works perfectly. These are the ranges I get for full throughput balancers.

4:6-6, 8:16-20, 16:40-56, 32:96-144, 64:224-352, 128:512-832, 256:1152-1920, 512:2560-4352, 1024:5632-9728

As I recall the best I've managed for my 16 to 16 is 48 splitters giving me full throughput, 288 for the 64 to 64, 1.5k for the 256 to 256. Which might mean the answer is in the middle of the range or that there are better solutions I haven't found or something else. I don't know.
Last edited by JohnyDL on Sat Sep 30, 2017 12:02 pm, edited 2 times in total.
Jap2.0
Smart Inserter
Smart Inserter
Posts: 2370
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: fractal 512 belt balancer

Post by Jap2.0 »

Qon wrote:
pieppiep wrote:
Qon wrote:[*] The 256 balancer requires 75k UG belt, 18k express belts and 2.4k express splitters.
I think you mean the 512 balancer needs 2.4k (2304 to be exact) or the 256 needs 1024 splitters.

2^x belt balancer : x*2^(x-1) splitters
I meant what I said. The old design wasn't perfectly efficient in it's splitter usage.
But thanks to you I did some extra thinking through the fractal design and came up with something that uses the amount of splitters your formula provides.
Jap2.0 wrote:It could be either way. Large balancers might not be perfectly efficient in terms of splitter usage - when you have something that big, the challenge is to make it work. To make it work with the least possible amount of splitters...
Nah dude, I'm good at the game. I can do both ;)
If making 512 belt balancers with the least amount of splitters only qualifies you as good... then I must be absolutely horrible :).
There are 10 types of people: those who get this joke and those who don't.
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: fractal 512 belt balancer

Post by Qon »

Jap2.0 wrote:If making 512 belt balancers with the least amount of splitters only qualifies you as good... then I must be absolutely horrible :).
Shhh, just don't tell anyone and it won't matter. No-one will suspect a thing. Just keep practising and you might get good before anyone notices.

And it's a 2048-balancer that's the largest I've managed to generate so far. :cry:

And I actually ran 32 items through my 32 balancer to see if it actually balances items now! I noticed that it didn't! I was horrified! And then I realised that I forgot to reset the splitters (I had run some throughput tests on them before). So I re-printed the balancer and tested it again. Yeah it does work, I'm not a complete idiot. So now the balancers aren't only verified mathematically (inductivly) in my head any more q:
Look at me, being a proper engineer and stuff. I'm testing my creations properly for several seconds after I post about them like a responsible adult.
Attachments
Sneaky-peeky of my teeny-tiny 256-balancer
Sneaky-peeky of my teeny-tiny 256-balancer
ousu(170930-004658-82).jpg (1.36 MiB) Viewed 8924 times
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Red_Katana_001
Burner Inserter
Burner Inserter
Posts: 15
Joined: Wed Apr 26, 2017 1:19 pm
Contact:

Re: fractal 512 belt balancer

Post by Red_Katana_001 »

Qon wrote:
Jap2.0 wrote:If making 512 belt balancers with the least amount of splitters only qualifies you as good... then I must be absolutely horrible :).
Shhh, just don't tell anyone and it won't matter. No-one will suspect a thing. Just keep practising and you might get good before anyone notices.

And it's a 2048-balancer that's the largest I've managed to generate so far. :cry:

And I actually ran 32 items through my 32 balancer to see if it actually balances items now! I noticed that it didn't! I was horrified! And then I realised that I forgot to reset the splitters (I had run some throughput tests on them before). So I re-printed the balancer and tested it again. Yeah it does work, I'm not a complete idiot. So now the balancers aren't only verified mathematically (inductivly) in my head any more q:
Look at me, being a proper engineer and stuff. I'm testing my creations properly for several seconds after I post about them like a responsible adult.
I think I'm just gonna stay with the old design because I like it a bit more and has more fractals (I think)
JohnyDL
Filter Inserter
Filter Inserter
Posts: 535
Joined: Fri May 16, 2014 3:44 pm
Contact:

Re: fractal 512 belt balancer

Post by JohnyDL »

I wouldn't say more fractals just different ones :)

I'm quite liking the newest ones they're similar to work I've done in the past and make obvious sense to me the originals were sezpinsky like which is nice but simplicity and understandability is more important to me though maybe reversing the order of the sections would make the new ones more pleasing

Code: Select all

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 /\  /\  /\  /\  /\  /\  /\  /\  /\  /\  /\  /\  /\  /\  /\  /\ 
/  \/  \/  \/  \/  \/  \/  \/  \/  \/  \/  \/  \/  \/  \/  \/  \
   /\      /\      /\      /\      /\      /\      /\      /\   
  /  \    /  \    /  \    /  \    /  \    /  \    /  \    /  \  
 /    \  /    \  /    \  /    \  /    \  /    \  /    \  /    \ 
/      \/      \/      \/      \/      \/      \/      \/      \
       /\              /\              /\              /\       
      /  \            /  \            /  \            /  \      
     /    \          /    \          /    \          /    \     
    /      \        /      \        /      \        /      \    
   /        \      /        \      /        \      /        \   
  /          \    /          \    /          \    /          \  
 /            \  /            \  /            \  /            \ 
/              \/              \/              \/              \
               /\                              /\               
              /  \                            /  \              
             /    \                          /    \             
            /      \                        /      \            
           /        \                      /        \           
          /          \                    /          \          
         /            \                  /            \         
        /              \                /              \        
       /                \              /                \       
      /                  \            /                  \      
     /                    \          /                    \     
    /                      \        /                      \    
   /                        \      /                        \   
  /                          \    /                          \  
 /                            \  /                            \ 
/                              \/                              \
                               /\                               
                              /  \                              
                             /    \                             
                            /      \                            
                           /        \                           
                          /          \                          
                         /            \                         
                        /              \                        
                       /                \                       
                      /                  \                      
                     /                    \                     
                    /                      \                    
                   /                        \                   
                  /                          \                  
                 /                            \                 
                /                              \                
               /                                \               
              /                                  \              
             /                                    \             
            /                                      \            
           /                                        \           
          /                                          \          
         /                                            \         
        /                                              \        
       /                                                \       
      /                                                  \      
     /                                                    \     
    /                                                      \    
   /                                                        \   
  /                                                          \  
 /                                                            \ 
/                                                              \
I also have a feeling Qon want's me to get on and actually publish to everyone some work I showed him 3/4 weeks ago xD (it's still on my radar not forgotten and there's already a discord server of people that know about it)
JohnyDL
Filter Inserter
Filter Inserter
Posts: 535
Joined: Fri May 16, 2014 3:44 pm
Contact:

Re: fractal 512 belt balancer

Post by JohnyDL »

JohnyDL wrote:So you then need to do a little more for full throughput, I worked out a maximum bound for the full throughput but not a formula for the perfect number, I'm guessing it's only another half as many splitters as you have rows, but I can't be certain of that as seemingly any layout I pick for redistributing the lanes to that last set of splitters in my head I can think of a set of lanes input and the outputs to match that it wouldn't provide full throughput. That's not to say it couldn't be done just to say I can't visualise and test things on this scale without my computer and factorio in front of me and while that would give you a minimum bound for full throughput balances of size 2^n, n>2 I'm not sure it works perfectly. These are the ranges I get for full throughput balancers.

4:6-6, 8:16-20, 16:40-56, 32:96-144, 64:224-352, 128:512-832, 256:1152-1920, 512:2560-4352, 1024:5632-9728

As I recall the best I've managed for my 16 to 16 is 48 splitters giving me full throughput, 288 for the 64 to 64, 1.5k for the 256 to 256. Which might mean the answer is in the middle of the range or that there are better solutions I haven't found or something else. I don't know.
I got the 16:48, 64:288: and 256:1536 to work by taking advantage of their square numbers

(4*4to4)to(4*4to4)to(4*4to4), (8*8to8)to(8*8to8)to(8*8to8) and (16*16to16)to(16*16to16)to(16*16to16), basically allowing the full throughput by allowing N unique paths from each of the input N to N balancers to each of the outputs... I then thought maybe I could do a 32 to 32 by (8*4to4)to(4*8to8)to(8*4to4) should do the same leverage right, well taking it one or 2 steps forward I realised your fractal has done the hard work for me
Qon wrote:Image
the way your balancer does it's conversion from (2 * N to N) to (N * 2 to 2), that's how you leverage it into full throughput, but you don't tag it onto the same end again no the genius bit is tagging it onto the other end for full through put with the smallest number of splitters, in effect you get the exploit I was using to get throughput with fewer splitters pushed to it's limit. Not (N to N) to (N to N) sharing a few splitters which is the common way of guaranteeing full throughput while trying to use a few less splitters. No, instead you do (N * 2 to 2) to (2 * N to N) to (N * 2 to 2) Now it doesn't matter if you use the fractal N to N in the middle though I'm betting you will or some alternative (as I might), so long as it's one of the count perfect balancers with 1, 4, 12, 32, 80 etc splitters it will work. And you end up hitting that minimum sequence of splitters required for full throughput

4:2*1+4=6, 8:2*4+8=16, 16:2*12+16=40, 32:96, 64:224, 128:512, 256:1152, 512:2560, 1024:5632

I haven't practically tested it or used d4rkc0d3r's balancer program yet (I will) but the logic holds each splitter input has 2 distinct routes to each output splitter and any input pair and output pair also have distinct routes. In my head I can extend this to any equal number of lanes whether they share splitters or not as half a lane would go to one of the N to N and the other to the other and could meet back up at the other side at any point, exchanging part of one route with part of another doesn't effect the throughput and 2 half lanes can easily share the same lane without adding bottle necks. Do you agree with me on this logic?
Red_Katana_001
Burner Inserter
Burner Inserter
Posts: 15
Joined: Wed Apr 26, 2017 1:19 pm
Contact:

Re: fractal 512 belt balancer

Post by Red_Katana_001 »

JohnyDL wrote:
JohnyDL wrote:So you then need to do a little more for full throughput, I worked out a maximum bound for the full throughput but not a formula for the perfect number, I'm guessing it's only another half as many splitters as you have rows, but I can't be certain of that as seemingly any layout I pick for redistributing the lanes to that last set of splitters in my head I can think of a set of lanes input and the outputs to match that it wouldn't provide full throughput. That's not to say it couldn't be done just to say I can't visualise and test things on this scale without my computer and factorio in front of me and while that would give you a minimum bound for full throughput balances of size 2^n, n>2 I'm not sure it works perfectly. These are the ranges I get for full throughput balancers.

4:6-6, 8:16-20, 16:40-56, 32:96-144, 64:224-352, 128:512-832, 256:1152-1920, 512:2560-4352, 1024:5632-9728

As I recall the best I've managed for my 16 to 16 is 48 splitters giving me full throughput, 288 for the 64 to 64, 1.5k for the 256 to 256. Which might mean the answer is in the middle of the range or that there are better solutions I haven't found or something else. I don't know.
I got the 16:48, 64:288: and 256:1536 to work by taking advantage of their square numbers

(4*4to4)to(4*4to4)to(4*4to4), (8*8to8)to(8*8to8)to(8*8to8) and (16*16to16)to(16*16to16)to(16*16to16), basically allowing the full throughput by allowing N unique paths from each of the input N to N balancers to each of the outputs... I then thought maybe I could do a 32 to 32 by (8*4to4)to(4*8to8)to(8*4to4) should do the same leverage right, well taking it one or 2 steps forward I realised your fractal has done the hard work for me
Qon wrote:Image
the way your balancer does it's conversion from (2 * N to N) to (N * 2 to 2), that's how you leverage it into full throughput, but you don't tag it onto the same end again no the genius bit is tagging it onto the other end for full through put with the smallest number of splitters, in effect you get the exploit I was using to get throughput with fewer splitters pushed to it's limit. Not (N to N) to (N to N) sharing a few splitters which is the common way of guaranteeing full throughput while trying to use a few less splitters. No, instead you do (N * 2 to 2) to (2 * N to N) to (N * 2 to 2) Now it doesn't matter if you use the fractal N to N in the middle though I'm betting you will or some alternative (as I might), so long as it's one of the count perfect balancers with 1, 4, 12, 32, 80 etc splitters it will work. And you end up hitting that minimum sequence of splitters required for full throughput

4:2*1+4=6, 8:2*4+8=16, 16:2*12+16=40, 32:96, 64:224, 128:512, 256:1152, 512:2560, 1024:5632

I haven't practically tested it or used d4rkc0d3r's balancer program yet (I will) but the logic holds each splitter input has 2 distinct routes to each output splitter and any input pair and output pair also have distinct routes. In my head I can extend this to any equal number of lanes whether they share splitters or not as half a lane would go to one of the N to N and the other to the other and could meet back up at the other side at any point, exchanging part of one route with part of another doesn't effect the throughput and 2 half lanes can easily share the same lane without adding bottle necks. Do you agree with me on this logic?
this is getting complicated...
JohnyDL
Filter Inserter
Filter Inserter
Posts: 535
Joined: Fri May 16, 2014 3:44 pm
Contact:

Re: fractal 512 belt balancer

Post by JohnyDL »

Red_Katana_001 wrote:this is getting complicated...
Sorry yeah, I've practically written a book on balancers the thing I shared with Qon it's safe to say I may have done an abnormally large amount of thinking about balancers, I think when I get my PC back and I can do some image editing and show off what I mean it will all make sense until then this is the solution to full throughput

Code: Select all

                               /\                               
                              /  \                              
                             /    \                             
                            /      \                            
                           /        \                           
                          /          \                          
                         /            \                         
                        /              \                        
                       /                \                       
                      /                  \                      
                     /                    \                     
                    /                      \                    
                   /                        \                   
                  /                          \                  
                 /                            \                 
                /                              \                
               /                                \               
              /                                  \              
             /                                    \             
            /                                      \            
           /                                        \           
          /                                          \          
         /                                            \         
        /                                              \        
       /                                                \       
      /                                                  \      
     /                                                    \     
    /                                                      \    
   /                                                        \   
  /                                                          \  
 /                                                            \ 
/                                                              \
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 /\  /\  /\  /\  /\  /\  /\  /\  /\  /\  /\  /\  /\  /\  /\  /\ 
/  \/  \/  \/  \/  \/  \/  \/  \/  \/  \/  \/  \/  \/  \/  \/  \
   /\      /\      /\      /\      /\      /\      /\      /\   
  /  \    /  \    /  \    /  \    /  \    /  \    /  \    /  \  
 /    \  /    \  /    \  /    \  /    \  /    \  /    \  /    \ 
/      \/      \/      \/      \/      \/      \/      \/      \
       /\              /\              /\              /\       
      /  \            /  \            /  \            /  \      
     /    \          /    \          /    \          /    \     
    /      \        /      \        /      \        /      \    
   /        \      /        \      /        \      /        \   
  /          \    /          \    /          \    /          \  
 /            \  /            \  /            \  /            \ 
/              \/              \/              \/              \
               /\                              /\               
              /  \                            /  \              
             /    \                          /    \             
            /      \                        /      \            
           /        \                      /        \           
          /          \                    /          \          
         /            \                  /            \         
        /              \                /              \        
       /                \              /                \       
      /                  \            /                  \      
     /                    \          /                    \     
    /                      \        /                      \    
   /                        \      /                        \   
  /                          \    /                          \  
 /                            \  /                            \ 
/                              \/                              \
                               /\                               
                              /  \                              
                             /    \                             
                            /      \                            
                           /        \                           
                          /          \                          
                         /            \                         
                        /              \                        
                       /                \                       
                      /                  \                      
                     /                    \                     
                    /                      \                    
                   /                        \                   
                  /                          \                  
                 /                            \                 
                /                              \                
               /                                \               
              /                                  \              
             /                                    \             
            /                                      \            
           /                                        \           
          /                                          \          
         /                                            \         
        /                                              \        
       /                                                \       
      /                                                  \      
     /                                                    \     
    /                                                      \    
   /                                                        \   
  /                                                          \  
 /                                                            \ 
/                                                              \
Post Reply

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