Even distribution of potions into labs using splitters

Post pictures and videos of your factories.
If possible, please post also the blueprints/maps of your creations!
For art/design etc. you can go to Fan Art.

Post Reply
luhem7
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Nov 23, 2014 12:58 am
Contact:

Even distribution of potions into labs using splitters

Post by luhem7 »

(Someone's probably come up with this idea already, but I haven't stumbled across this yet. Forgive me most of the stuff here is already old news! :lol: )

So I've been playing the game for a while, went through two restarts of my map. One commom problem I had was with how I was distributing my potions into the research labs. My initial approach was naive and it had a belt line going by my set of labs. What happened here was that the first labs in the line would be greedy and stockpile up multiple potions and depriving labs later down the line of the same potions. Labs closer to the potions source would stockpile potions more than labs after way from the source of the potions.

My second approach was to loop my potion belt around the labs... but this didnt solve the greedy stockpiling problem either.

After thinking for a while, this is my third solution:

Image

Let me explain whats going on here:
You have two lines of potions coming in on either side of the line of labs: reds and greens on the right and blues and purples on the left. There are eight labs in total. Each line of potions splits once, then its branches split again, and those branches split a third time. If you are familiar with the binary tree data structure in Comp Sci, that is where I got the idea from.

I like this solution for the following reason:
Splitters seems to remember (maintain state) which direction it split previously. So if a splitter put one item on the left output belt previously, it puts the next item on the right output belt. (I think this is the bees knees!) The implication of this is, if you have a hierarchy of splitters like in the picture, you can pretty much guarantee that your items will be distributed in a round robin fashion among the various branches of the "splitter tree". This is really useful for research labs because ideally you want to maximize the number of running labs.

Using this method; given an input of 8 potions; I went from having:
2 running labs with 6 "idle" potions stockpiled between them
to
8 running labs with 0 "idle" potions stockpiled between them.

In my next map, I plan to use this to supply most facilities that take a long time to produce output.

Chibiabos
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Sun Apr 27, 2014 11:47 am
Contact:

Re: Even distribution of potions into labs using splitters

Post by Chibiabos »

Beaker production is slow, but consumption in labs is even slower. I think most of us (and bear in mind I'm not even really a novice at this game) pump out as many as we can and let them pile up on the output belts from our beaker-producing factories to the labs for the labs to consume however fast they can ... if one follows that, I think a K.I.S.S. (Keep It Simple, Stupid!) principle works -- have labs on both side of a belt carefully organized to have red beakers on one side, green on the other, all drawing off via inserters (and when it comes to cyan and purple, unfortunately, those will have to either go onto split conveyors on the opposite side of the labs from the red/green ( |BP|-[LAB]-|RG|-[LAB]-|BP| where |BP| is a conveyor with Blue on one half and Purple on the other, - are the inserters, [LAB] is the lab, |RG| is a conveyor with Red on one half and Green on the other ) or you'll have to re-organize [or set this up before you even get to blue/purple]) down simplified (compared with your setup) conveyors to have a [LAB]=|RG|BP|RG|=[LAB] arrangement (with the = representing alernating regular inserter [lab science production is so slow, I find it is not really sensible to use power-hungry fast inserters] and long inserter). These can be put in multiple chains, but I think the simplified setup I describe is more space and conveyor-efficient, as your setup has a lot of looping bends.

Alternatively, just a tweak to your setup, if you really can for some reason (geographic constraints or somesuch) only have a single column of labs, it would be simpler to use an arrangement best illustrated (short of trying to get a game setup to this point to create a screenshot) thus:

Code: Select all

|SPLIT| [LAB] |SPLIT|
|BP|XX -[...]- XX|RG|
|BP|    [...]    |RG|
|SPLIT| [LAB] |SPLIT|
|BP|XX -[...]- XX|RG|
|BP|    [...]    |RG|
|SPLIT| [LAB] |SPLIT|
|BP|XX -[...]- XX|RG|
|BP|    [...]    |RG|
|SPLIT| [LAB] |SPLIT|
|BP|XX -[...]- XX|RG|
|BP|    [...]    |RG|
|SPLIT| [LAB] |SPLIT|
|BP|XX -[...]- XX|RG|
|BP|    [...]    |RG|
in which the |SPLIT| represents a splitter, the XX is just a dump spot from the splitters where the lab inserter will grab from as it needs, and [...] is just a placeholder for the labs since they are 3 tiles tall. Beakers will get distributed to the next lab that can use them in a chain. If there's a supply disruption that lowers the output of any one type of beaker, the simplified chain I describe will allow science to continue inching forward as best it can a lot more steadily, I think, tahn yours which would take much longer for science to progress at all, not until there's enough of every needed beaker type to supply all of your labs, and every beaker in your setup will grind through a lot of conveyor bends. Although the slow beaker-to-science production of labs would seem to make that loop, I think it would still be significant and inhibit efficiency for scaling up science.

I agree on your point that its best to maximize the number of running labs; however, I don't think your setup accomplishes this because (to recap my aforementioned points) it is more wasteful of space (the second method I described above requires two tile widths for each of the black/purple and red/green conveyors feeding the labs, yours requires four tiles wide after ignoring the originating supply conveyors) and there are a lot of unnecessary conveyor bends to supply your labs which significantly choke the amount of time it would take a beaker to get to a lab farthest away from your originating supply conveyor.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Even distribution of potions into labs using splitters

Post by DaveMcW »

The splitters on the red/green side cost more than the science packs you are saving. ;)

Chibiabos
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Sun Apr 27, 2014 11:47 am
Contact:

Re: Even distribution of potions into labs using splitters

Post by Chibiabos »

Screenshots of early setups (mockups really, just placed the buildings for screenshot purposes) for the [LAB]=|RG|BP|RG|=[LAB]
LCCCL setup.png
LCCCL setup.png (504.16 KiB) Viewed 14705 times


and |RGXX|-[LAB]-|XXBP|
CSLSC setup.png
CSLSC setup.png (565.56 KiB) Viewed 14705 times
setups I mentioned.

Kelderek
Filter Inserter
Filter Inserter
Posts: 250
Joined: Tue Nov 11, 2014 6:04 pm
Contact:

Re: Even distribution of potions into labs using splitters

Post by Kelderek »

Chibiabos wrote: I agree on your point that its best to maximize the number of running labs; however, I don't think your setup accomplishes this because (to recap my aforementioned points) it is more wasteful of space (the second method I described above requires two tile widths for each of the black/purple and red/green conveyors feeding the labs, yours requires four tiles wide after ignoring the originating supply conveyors) and there are a lot of unnecessary conveyor bends to supply your labs which significantly choke the amount of time it would take a beaker to get to a lab farthest away from your originating supply conveyor.
His belt setup is more efficient with regards to time. More labs using science packs will result in quicker technology advances. The way most people setup their maps, space is limitless, so why not make a more time-efficient lab setup? Even if his design used up 4 times as much space, why would that matter? Space is limitless. I would rather have faster tech advances than worry about wasting space, but that is just my opinion. The designs you've shown may be more compact, but they still suffer from the same problem of having the labs at the start of the line steal more science packs than they can use at one time -- this is much more of an issue when you have limited science packs like those from alien artifacts.

Also, you can always use fast or express transport belts/splitters if you are worried about how long it takes your science packs to travel to the labs.

I like the design in the OP, I may give it a try on my next map.

EDIT: actually after rereading what you said, I think I may have misunderstood. I think you're saying that the additional space used up by the extra transport belts and splitters would make the travel time long enough that you would gain no additional lab speed -- that may be true. It should be easy enough to test though: build both setups and connect each one to your science pack factories separately and time them on two different technologies that have the same cost.

Chibiabos
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Sun Apr 27, 2014 11:47 am
Contact:

Re: Even distribution of potions into labs using splitters

Post by Chibiabos »

Kelderek wrote:
Chibiabos wrote: I agree on your point that its best to maximize the number of running labs; however, I don't think your setup accomplishes this because (to recap my aforementioned points) it is more wasteful of space (the second method I described above requires two tile widths for each of the black/purple and red/green conveyors feeding the labs, yours requires four tiles wide after ignoring the originating supply conveyors) and there are a lot of unnecessary conveyor bends to supply your labs which significantly choke the amount of time it would take a beaker to get to a lab farthest away from your originating supply conveyor.
His belt setup is more efficient with regards to time. More labs using science packs will result in quicker technology advances. The way most people setup their maps, space is limitless, so why not make a more time-efficient lab setup? Even if his design used up 4 times as much space, why would that matter? Space is limitless. I would rather have faster tech advances than worry about wasting space, but that is just my opinion. The designs you've shown may be more compact, but they still suffer from the same problem of having the labs at the start of the line steal more science packs than they can use at one time -- this is much more of an issue when you have limited science packs like those from alien artifacts.

Also, you can always use fast or express transport belts/splitters if you are worried about how long it takes your science packs to travel to the labs.

I like the design in the OP, I may give it a try on my next map.

EDIT: actually after rereading what you said, I think I may have misunderstood. I think you're saying that the additional space used up by the extra transport belts and splitters would make the travel time long enough that you would gain no additional lab speed -- that may be true. It should be easy enough to test though: build both setups and connect each one to your science pack factories separately and time them on two different technologies that have the same cost.
I'm not sure his designs are more time-efficient. Each and every conveyor bend is a chokepoint that slows down distribution, and his design forces every beaker through an ever-increasing series of u-turn belt loops which means a beaker reaching the farthest lab on his line from his beaker feed will take potentially significantly longer (the longer the line of labs, the worse this will be presuming he precisely replicates this setup), and even ignoring that, if he somehow successfully forces an exactly even distribution of beakers to all labs, he won't get a single tick of science until every lab gets all requisite beakers (red, green, blue and purple). Its also going a bit against the flow against the notion of expandable lines.

Inserters will not keep feeding a building (whether its a laboratory with beakers, or a factory with resources) that's already stuffed. Yes, I think it will feed enough for 2 or 3 iterations, but after that it will wait until the building chomps through its production (in this case, a science lab eating the beakers and producing ticks of science) before feeding another. You and he seem to think the inserters for the first lab will just keep piling in beakers indefinitely, faster than the building can use them, which in my experience has not been the case. The inserters stop loading a building when it is 'full' (and by full I mean 2 or 3 iterations worth of whatever production it is working on ... the building can actually hold a lot more if you dump the resources in manually).

Kelderek
Filter Inserter
Filter Inserter
Posts: 250
Joined: Tue Nov 11, 2014 6:04 pm
Contact:

Re: Even distribution of potions into labs using splitters

Post by Kelderek »

Chibiabos wrote: Inserters will not keep feeding a building (whether its a laboratory with beakers, or a factory with resources) that's already stuffed. Yes, I think it will feed enough for 2 or 3 iterations, but after that it will wait until the building chomps through its production (in this case, a science lab eating the beakers and producing ticks of science) before feeding another. You and he seem to think the inserters for the first lab will just keep piling in beakers indefinitely, faster than the building can use them, which in my experience has not been the case. The inserters stop loading a building when it is 'full' (and by full I mean 2 or 3 iterations worth of whatever production it is working on ... the building can actually hold a lot more if you dump the resources in manually).
It is easiest to notice if you have say 10 labs in a line and you are limited only by purple science packs. Each time your assembler crafts the purple packs it yields 10 of them which go down the line and all 10 will end up inside the first 3 or 4 labs and the other labs don't get any at all. It is common to use productivity modules in the assembler that makes purple packs and that slows it down enough that there is a gap between how often you get those sets of 10 purple packs, so it is quite possible that you will have an endless case of only 3 or 4 labs working at a time. But this situation can happen at any tier of science packs and is most noticeable when you have slow production of the packs.

I'm sure a deign could be made with fewer bends in the belt lines, but it would take up a bit more space. I guess it also depends on how far away your science pack assemblers are from your labs.

starxplor
Fast Inserter
Fast Inserter
Posts: 164
Joined: Sun May 18, 2014 11:25 pm
Contact:

Re: Even distribution of potions into labs using splitters

Post by starxplor »

This is espcially good for research that uses multiple of each flask per research operation. Especially with some of the high cost Dytech research items, using 5-8 red packs per operation, this layout would eliminate the problem of having some labs sit there with 3-4 science packs and never receiving more. Every pack created is eventually used.

As for the belt curves, that is a severe issue in this design as demonstrated, but I am sure if you throw in a bit of grey matter, you can come up with a way to spread it out and not have (as many) bends.

Ca_Putt
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sat May 31, 2014 9:44 am
Contact:

Re: Even distribution of potions into labs using splitters

Post by Ca_Putt »

Unless you really go overboard with Labs, not having maximum compression for belts really does not slow down your tech. Especially as all those turns are AFTER the initial Splitter and thus the compression on these belts is already halved.

A problem that could come up with the Tree-setup when more than 1 of your (needed) Techpacks are not abundant or you need 2 of a non-abundant techpack per Step. As unlike a panicle(central belt with Labs to both sides) setups it is not sure that labs, which get non-abundant pack A also get non-abundant pack B. In the Hypothetical case of a tech that needs 1r1g1b with only red being abundant* the other two having 5 produced per Techtime each on 10 Labs, it's quite possible(rather likely) that a tree setup gives every lab one of either resulting in 0 labs working. With a panicle setup you'd most likely get 3 working labs, with slow inserters, fast belts, and some luck maybe even 5, but never less than 2.

However as the most common case is that only one Pack is scarce the Tree setup has the advantage of evenly distributing this rare pack maximizing the Lab usage, while other setups tend to favor the first or first two(ladder setup with a splitter for each Lab) labs.

tbh, I currently use a modular "clover" setup(four labs surrounding a requester chest) which is even less lab efficient as the stacksize bonus for inserters moves more packs than the lab would normally request. But it's good to keep Packproduction capped and saves me all the belt-hassle.

*the ensuing dilemma would be even more likely with blue being abundant due to the distribution mechanic with red and green sharing a belt. But when do you ever have abundant blue packs and only 5 red packs ;)

User avatar
-root
Filter Inserter
Filter Inserter
Posts: 651
Joined: Tue Jul 01, 2014 11:24 pm
Contact:

Re: Even distribution of potions into labs using splitters

Post by -root »

You know, does it need to be anything as big or as crazy as what has been suggested? Just run a loop of two belts around your labs. All the labs will have access to all the science packs. Or did I miss something? :mrgreen: :lol:

aXa
Burner Inserter
Burner Inserter
Posts: 15
Joined: Mon Nov 24, 2014 4:51 pm
Contact:

Re: Even distribution of potions into labs using splitters

Post by aXa »

Registered to say that whether efficient or not, your design is pretty cool and quite beautiful. I guess it speaks to fellow programmers :)

My usual design is very simple and is as follow:

Double belt in the middle, one belt for red and green, another for blue and purple. Labs on both sides of the double belt with short and long inserter for each lab.

Ironmarck
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Nov 24, 2014 4:37 pm
Contact:

Re: Even distribution of potions into labs using splitters

Post by Ironmarck »

I'm new here, i have registered specificaly to post this before i forget:

Code: Select all

|2^n| |...| |...||...|||2^n LABS|
|2^n| |...| |8| |SPLIT|     |...|
|2^n| |...| |8| |2|        -|LAB|
|2^n| |...| |8| |2| |SPLIT| |...| 
|2^n| |...| |8| |2| |1|     |...|
|2^n| |...| |8| |2| |1|    -|LAB|
|2^n| |...| |8| |2| |SPLIT| |...|
|2^n| |...| |8| |SPLIT|     |...|
|2^n| |...| |8| |4|        -|LAB|
|2^n| |...| |8| |4| |SPLIT| |...|
|2^n| |...| |8| |4| |1|     |...|
|2^n| |...| |8| |4| |1|    -|LAB|     
|2^n| |...| |8| |4| |SPLIT| |...|
|2^n| |...| |8| |4| |2| 
|2^n| |...| |8| |SPLIT|
|2^n| |...| |SPLIT|
|2^n| |...| |16|  

This would theoreticaly be able to supply 2^n labs with 2n belt lines (mirrored in each side). It gets rid of all the curves, and makes it more space-eficient the more labs you have.
Could someone who owns the game please test this?


TheSAguy
Smart Inserter
Smart Inserter
Posts: 1449
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Re: Even distribution of potions into labs using splitters

Post by TheSAguy »

-root wrote:You know, does it need to be anything as big or as crazy as what has been suggested? Just run a loop of two belts around your labs. All the labs will have access to all the science packs. Or did I miss something? :mrgreen: :lol:
That's what I did :
Research Layout:
Image

User avatar
GewaltSam
Filter Inserter
Filter Inserter
Posts: 344
Joined: Thu May 08, 2014 5:42 pm
Contact:

Re: Even distribution of potions into labs using splitters

Post by GewaltSam »

I don't get it. In my last factories I simply put down 20 labs (which, in my opinion, are nearly too much for vanilla factorio), two yellow belts in the middle, a yellow and a red inserter. I didn't even bother with calculating the needed factories for green, red and blue (it changes through the game and level of tech, anyway) - I built it expandable and out of experience big enough to keep the research and every lab running constantly.

Even distribution is not needed at all if you saturate the line with enough pots for every lab. Sure, the first one grabs two or three of every science pot, before the next does the same - but it's one pot after another after that (the labs, like every other furnace and factory, only keep a few packs stacked as buffer). So you shouldn't get any remarkable "bonus" out of even distribution. Your research will start up faster after the system was starved of pots, but I don't see that as a real advantage that justifies the hassle of setting it up more complicated than I do. To be honest, I don't even see an advantage if I got 60 labs. I would go for enough pot production, faster belts, and, if that is not enough, a second row of labs with separate belts.

N35t0r
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Aug 23, 2014 9:29 pm
Contact:

Re: Even distribution of potions into labs using splitters

Post by N35t0r »

I guess it highly depends on your play stile, but I usually burn through all the red/green only techs long before I have an established blue pack production, large enough to saturate the 8-10 labs I usually plop down...

luhem7
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Nov 23, 2014 12:58 am
Contact:

Re: Even distribution of potions into labs using splitters

Post by luhem7 »

Ironmarck wrote:I'm new here, i have registered specificaly to post this before i forget:

Code: Select all

|2^n| |...| |...||...|||2^n LABS|
|2^n| |...| |8| |SPLIT|     |...|
|2^n| |...| |8| |2|        -|LAB|
|2^n| |...| |8| |2| |SPLIT| |...| 
|2^n| |...| |8| |2| |1|     |...|
|2^n| |...| |8| |2| |1|    -|LAB|
|2^n| |...| |8| |2| |SPLIT| |...|
|2^n| |...| |8| |SPLIT|     |...|
|2^n| |...| |8| |4|        -|LAB|
|2^n| |...| |8| |4| |SPLIT| |...|
|2^n| |...| |8| |4| |1|     |...|
|2^n| |...| |8| |4| |1|    -|LAB|     
|2^n| |...| |8| |4| |SPLIT| |...|
|2^n| |...| |8| |4| |2| 
|2^n| |...| |8| |SPLIT|
|2^n| |...| |SPLIT|
|2^n| |...| |16|  

This would theoreticaly be able to supply 2^n labs with 2n belt lines (mirrored in each side). It gets rid of all the curves, and makes it more space-eficient the more labs you have.
Could someone who owns the game please test this?
Dang! I love this.. I knew my design was too complicated with all those bends and all. I am definitely going to use this design instead! (also you should play this game... although it might seem to suck up a lot of time out of no where!)

But yeah, I think this design was mostly me trying to be more time efficient that I should be, just thought it would be cool to share :)

Post Reply

Return to “Show your Creations”