Bot Cell Diffusion build - could use some help!
Posted: Sun Apr 24, 2016 8:31 pm
I've been playing around with a new idea I had (maybe somebody else has already done it but I didn't see any). I'ts never going to be "the most efficient" or fastest, just for fun. It was inspired by the chains idea (https://youtu.be/EEvVFkzTtWY?t=377), but I wanted to do it with bots. Bots are nice because they have really good throughput, but as your factory size gets really large and the logistics network gets really large, the bots start taking really, really long journeys (maybe having to stop to recharge, etc.). This is not really a "problem" in that throughput is probably fine, but I wanted to see if I could design that issue away.
So I had this idea of building a factory out of large square cells, each cell precisely sized the same as a small logistics network, and the walls of the cell are a bunch of requester and provider chests with smart inserters in between. The chests are for transporting the stuff you use commonly, so basically the same stuff you'd put on a main bus. You can test the contents of one cell with the other, and turn on the smart inserters such that chest contents always went to the cell which had less. In this way you could have diffusion of materials across cells.
This is what a cell looks like: Note that the logistics network size ends precisely on the chests on it's side of the cell wall, so bots can only give and take to chests within its own cell: The "advantages" are that the furthest distance a bot can possibly travel is simply from one end of the cell to the other, so they rarely stop for charging, and there are raw materials available everywhere, so you can basically plop down any kind of bot-based assembly chain anywhere in any cell and they can get at copper, steel. circuits, or whatever else you decided to transfer along cell walls. Also it looks really cool in my opinion anywa (my build is messy as hell, but if you were the kind of guy that liked optimizing assembly lines for perfect squares, etc., it would be fun to design compact builds constrained in cell walls). You can also build totally in 2D, just spread out in every direction and materials will get there. You can also just build right on top of any deposit you feel like and absorb it directly into your network.
Many disadvantages: number of different items you can diffuse across cell walls is limited to the number of chests/inserters you have along the cell wall, which is limited by length of wall. You also need at least one chest pair/inserter in each direction, so that further limits items by half. Item throughput is limited to how fast a smart inserter can transfer items. So you have to duplicate chest->inserters for items you plan on using a lot, so I have 4X copper and 4x iron and 2x green circuits, which further cuts down on the total number of different items you can pass back and forth, and it's still not going to be as fast as a belt bus. Because you don't have access to a full logistics network, you have no way of using bots to bring back a finish project that's not passed through cell walls with bots, so ironically you have to belt back finished products (like, say, assemblers, solar panels, accumulators train tracks, trains, capsules, ammo, probably rocket components and stuff like that.
That being said, it's kind of a fun build, and sort of mindless in its own way - need more space to build stuff, literally just blueprint down a cell anywhere you have room. Need more red circuits? Just plop down a bunch of red circuit assembly lines in any cell, and they will pull the plastic and copper and green circuits from the cell walls, and the red circuits will end up saturating your cell network soon enough. Need more iron? Just build a cell over a deposit and throw on a bunch of drills and furnaces and those plates will end up in your network as well. Here's 6 cells - clockwise from top left: bunch of steel smelters, nothing, nothing, a cell on top of copper with furnaces supplying the network with copper, requester and provider chest assembly, then green circuits and smart insert production: It's fun watching the bots bring stuff across the cells: And it's cool at night watching the cell "nucleus" (the roboports) light up as well as the cells walls: Where I could use some help:
Suprisingly, it wasn't obvious how to build the simple cell wall requester->smart inserter->passive provider chunk such that movement tends towards the side with less stuff, while also making sure that there are materials in the provider chests. The way I have written it is basically, sum amounts of left side chests (requester+provider) and sum right side. If left is less than or equal to right side, then pull contents from right to left. Similar for right side. The effect of this is that even if they are tied for resources, they pull contents from the other side. That results in a lot of "churn", where both sides just suck resources from each other while bots pick them up from the provider chests and drops them in the requester chest. See the iron part of the cell wall here: Basically, all the inserters are firing like crazy (iron from left to right and right to left) while a swarm of bots just moves them up and down from provider to requesters. (If it's not obvious, in this image, the left and right inserters alternate, so the top is right requester->left provider, and 2nd from the top is left provider->right requester. This has the effect of tying up bots (not that much of an issue, though sometimes if lots of bots are churning and it's a very busy cell (lots of throughput of other items), it can result in a big mess of charging bots. But worst of all, sometimes it will simply tie up a ton of resources. So in this example, there might be ~150 iron per pair of chests here that just get swapped back and forth, while the cell wall on the other side of the wall may actually need the iron badly (it may be sitting at 0 because the cell next to it is sucking up iron for steel production), so while there should be a lot of iron available, a lot of it is stuck on this endless merry-go-round.
Here's what I discovered. If I had them test for "if my side is less than but not equal to the other side, then pull resources to my side", then I could get stuck where both sides had a bunch of materials in the requester boxes, but wouldn't pull them over to the other side. So I could end up with a stack of iron in the left requester and a stack on the right, with no iron in either of the providers, so there would be none available (bots can't pull out of a requester). So I had to test for "less than or equal to" to get them to default to pull something over. But that results in this churn. The churn stops only when there is full saturation of every requester and provider chest in the network . If anybody could help me design a simple mechanism with requester and provider chests that consistently pulled from the heavy side, and also was stable and did not result in churn, that would be super helpful.
So I had this idea of building a factory out of large square cells, each cell precisely sized the same as a small logistics network, and the walls of the cell are a bunch of requester and provider chests with smart inserters in between. The chests are for transporting the stuff you use commonly, so basically the same stuff you'd put on a main bus. You can test the contents of one cell with the other, and turn on the smart inserters such that chest contents always went to the cell which had less. In this way you could have diffusion of materials across cells.
This is what a cell looks like: Note that the logistics network size ends precisely on the chests on it's side of the cell wall, so bots can only give and take to chests within its own cell: The "advantages" are that the furthest distance a bot can possibly travel is simply from one end of the cell to the other, so they rarely stop for charging, and there are raw materials available everywhere, so you can basically plop down any kind of bot-based assembly chain anywhere in any cell and they can get at copper, steel. circuits, or whatever else you decided to transfer along cell walls. Also it looks really cool in my opinion anywa (my build is messy as hell, but if you were the kind of guy that liked optimizing assembly lines for perfect squares, etc., it would be fun to design compact builds constrained in cell walls). You can also build totally in 2D, just spread out in every direction and materials will get there. You can also just build right on top of any deposit you feel like and absorb it directly into your network.
Many disadvantages: number of different items you can diffuse across cell walls is limited to the number of chests/inserters you have along the cell wall, which is limited by length of wall. You also need at least one chest pair/inserter in each direction, so that further limits items by half. Item throughput is limited to how fast a smart inserter can transfer items. So you have to duplicate chest->inserters for items you plan on using a lot, so I have 4X copper and 4x iron and 2x green circuits, which further cuts down on the total number of different items you can pass back and forth, and it's still not going to be as fast as a belt bus. Because you don't have access to a full logistics network, you have no way of using bots to bring back a finish project that's not passed through cell walls with bots, so ironically you have to belt back finished products (like, say, assemblers, solar panels, accumulators train tracks, trains, capsules, ammo, probably rocket components and stuff like that.
That being said, it's kind of a fun build, and sort of mindless in its own way - need more space to build stuff, literally just blueprint down a cell anywhere you have room. Need more red circuits? Just plop down a bunch of red circuit assembly lines in any cell, and they will pull the plastic and copper and green circuits from the cell walls, and the red circuits will end up saturating your cell network soon enough. Need more iron? Just build a cell over a deposit and throw on a bunch of drills and furnaces and those plates will end up in your network as well. Here's 6 cells - clockwise from top left: bunch of steel smelters, nothing, nothing, a cell on top of copper with furnaces supplying the network with copper, requester and provider chest assembly, then green circuits and smart insert production: It's fun watching the bots bring stuff across the cells: And it's cool at night watching the cell "nucleus" (the roboports) light up as well as the cells walls: Where I could use some help:
Suprisingly, it wasn't obvious how to build the simple cell wall requester->smart inserter->passive provider chunk such that movement tends towards the side with less stuff, while also making sure that there are materials in the provider chests. The way I have written it is basically, sum amounts of left side chests (requester+provider) and sum right side. If left is less than or equal to right side, then pull contents from right to left. Similar for right side. The effect of this is that even if they are tied for resources, they pull contents from the other side. That results in a lot of "churn", where both sides just suck resources from each other while bots pick them up from the provider chests and drops them in the requester chest. See the iron part of the cell wall here: Basically, all the inserters are firing like crazy (iron from left to right and right to left) while a swarm of bots just moves them up and down from provider to requesters. (If it's not obvious, in this image, the left and right inserters alternate, so the top is right requester->left provider, and 2nd from the top is left provider->right requester. This has the effect of tying up bots (not that much of an issue, though sometimes if lots of bots are churning and it's a very busy cell (lots of throughput of other items), it can result in a big mess of charging bots. But worst of all, sometimes it will simply tie up a ton of resources. So in this example, there might be ~150 iron per pair of chests here that just get swapped back and forth, while the cell wall on the other side of the wall may actually need the iron badly (it may be sitting at 0 because the cell next to it is sucking up iron for steel production), so while there should be a lot of iron available, a lot of it is stuck on this endless merry-go-round.
Here's what I discovered. If I had them test for "if my side is less than but not equal to the other side, then pull resources to my side", then I could get stuck where both sides had a bunch of materials in the requester boxes, but wouldn't pull them over to the other side. So I could end up with a stack of iron in the left requester and a stack on the right, with no iron in either of the providers, so there would be none available (bots can't pull out of a requester). So I had to test for "less than or equal to" to get them to default to pull something over. But that results in this churn. The churn stops only when there is full saturation of every requester and provider chest in the network . If anybody could help me design a simple mechanism with requester and provider chests that consistently pulled from the heavy side, and also was stable and did not result in churn, that would be super helpful.