Page 1 of 1

An exposition on storage silos

Posted: Fri Jun 30, 2017 4:58 am
by gstv87
Warning: heavy reading, and, pictures.

Disclaimer: these pictures were taken from an old v0.12 installation, which I can't upgrade to 0.15 since my system is not 64bit.
However, the logic behind these builds is simple enough that they can be copied into later versions, and adapted for more advanced systems.
I provide the respective blueprints, but they are 0.12 blueprints. They can be brought over to 0.15 easily. I just can't do it *myself*.
Also, my perspective when building this was top-to-down. I made the models appear left-to-right for the sake of clarity.

First of all, I'll need to explain the basis behind these builds.
They sprout out from other minor structures that I developed randomly as I played along, or from things I read in the Factorio wiki. I didn't check the forums to see if there was anything similar to this. If there is, sorry, I wasn't aware of it.
The logic for these structures is based on three minor systems I came across and developed during gameplay: the 3-way splitter, the regulator, and the control array.
The 3-way splitter, I did see around. It's widely known. However, I had to iterate over it's structure many times while building another system which I won't detail here, which was a potion assembler that ran on one single supply line of raw materials. The 3-way splitter eventually developed into 3-to-2 splitter, 5-to-1 splitter, 9-to-1 splitter, etc, depending on what proportion of materials I needed at a given point. That's how I came to use it as a base component for these structures... I knew it, I handled it, and it worked.
The regulator, another piece that spun off that build, is a smart chest that sends signals to a main saturation line, which is fed into the control array. The control array then cuts the feed of materials to the production line depending on the state of the saturation line: too many ores! -> cut the drills.
(Essentially, a *buffer*, but for the purposes of this build, a *regulator*)
The control array is a stack of decider combinators, which sends a request signal to the control line opening the feed of materials into the bus when the saturation is clear. It's built in such a way that for every requested product, it triggers the feed of the relevant ingredients: "build Circuits!" -> "feed Iron (-> feed ore to furnace!) and Wire [-> feed Copper! (-> feed Ore to furnace!)] to the production line!"
There is also constant combinators acting as main control panels, where I would input the signal I needed to control the system. From these controls, I could manually override feeds or increase the production of an ingredient from an outside line.

There is also the automatic, which I assume somebody has come up with already, which is a bi-stable circuit that triggers or kills a signal based on the load level of a smart chest: too low a load -> open the input, chest full -> close the input.
I use these signals to passively control remote systems such as a refinery, which needs coal to produce plastic, or the auxiliary power system that runs on fuel for the boilers. Since they're not always on, I just send materials out on demand.
Again, discovered it on my own, but it is something that's bound to be discovered naturally at some point... It's one of those "only one way to do it" kind of things.

That being said, here's the development of the reasoning and the process:

nº1: The problem.
When I first started playing Factorio, I quickly got the basics of it, but everything ground to a slow crawl once I got past basic science. Blue science just took exponentially more materials than I had, and I didn't have the map resources set to "high"; I was playing in "hard" mode basically. So it took me a while to figure out how to get the materials I needed, and I kept building larger and larger factories that simply weren't cutting it because the map wasn't what I needed it to be. So, I reset the map, but I didn't want it to be "easy" mode, so I set the terrain segmentation to high. This prevented me from building super big factories and having to manage the space a lot more.
Now, with enough materials coming in, I needed a place to store them. I just couldn't build a big complete "just in time" production line because I didn't have the space, and producing too much quantity of complex items would just waste resources; so the main focus was to make a storage system that was compact, cheap and efficient. I wanted it to be able to store and output materials on demand, and I needed it to be modular, scalable and upgradable, because, again, I couldn't expand outwards mindlessly.
I had seen a few designs on-line that were super high-tech, with dozens of storage lines, and many of them were using robots..... those couldn't work, but it didn't mean they couldn't be adapted.

Image
A simple automatic controller.
The two left-most combinators are bi-stable: the input of one feeds into the output of the other, on a separate channel (red) as the main control line (green).
When the bottom-right combinator detects a low amount of material, it sends a positive signal, which engages the bi-stable relay.
When the top-right combinator validates the preset amount of materials, it sends a negative signal, which resets the bi-stable relay.

Image
A schematic of a basic control array.
The logic array triggers a request for ingredients when triggered with a signal for complex products.
The main bus feeds through the production line and into the storage array where it is cleared of unused materials.
If there is a request for materials, or the supply line is out, it takes the materials out to the assembly line and loops back, with the surplus ingredients and the completed products.


nº2: The design.
The first thing I established was that I needed to de-serialize the entire thing, and go parallel. Or, at least, make a fast enough system that would work as well as a parallel system, in series.
Given that I had worked with 3-way and 4-way splitters before, I concluded that I would need one such system to act as a main distributor: they were compact, efficient and cheap.
When it came to adding inserters at the end of the splitter lines, I realized I wouldn't have enough space to fit a 4-way splitter, since the power poles wouldn't reach as far. So, it had to be a 3-way one. Also, 3 began to be a recurring thing, since I had previously built a line with three inserters moving materials in and out of a belt, so I sought to include that concept into the build, since it had been very effective and prevented a lot of bottlenecks in that previous game.

Image
The "fist". A 3-way splitter. Outputs items as a 33/33/33% ratio.
The return line had proven to be very versatile earlier, and it provided a larger contact line for other mechanisms to get access to the splitter, while still being an intricate part of it.

Given that now I had a much bigger supply of materials, I needed a structure that could process that throughput of materials fast enough, and that it would connect to the splitter in some way. Having established that 3-to-1 inserters per belt was the way to go, I sought to fit that to the splitter.

Image
The "wrench". An engineer's primary solution.
3 feeders and 3 collectors provided a fast enough response to deal with an increased supply of materials.
On top of that, running the main bus on a loop granted that any materials not taken by the collector would eventually be re-processed.

Even with the "wrench" in place, the system eventually did bottleneck, so I needed a fool-proof way to control it, so that it would be almost 100% automated. One way of doing it, was through signals. The game's own condition logic and evaluation logic is pretty basic, but it was just what I needed: a binary "On, If" and "Off, If" switch.
Enter, the regulator.

Image
Basic regulator.
One smart chest in parallel with an item line, provides periodic pulses to a main saturation line (red wire).
When the output inserter cannot output materials due to the line being saturated for whatever reason, the chest sends a sustained signal, which activates the saturation line.

So, combining a fast (and smart) collector, a distributor, a regulator, and a storage array, we get:


The storage silo, Mark 1.
Image

This was the very first version that got the job done, of taking materials, storing them, and providing a way to retrieve them either manually from the output buffer chest, or automatically through the control line and the output inserter.
The output inserter and the output line was added last, once there was an actual main bus to attach it to.
It ran a good while with just the output chest as a main provider of items.

While this system was compact and modular (I could just remove the end bit and keep adding chests to it), it presented a few problems.
First, given that the return line is serialized, it takes materials from the top line, leaving the bottom lines to bottleneck against the slow throughput.
This created unevenness across the stack, making the introduction of smart chests as load monitors impossible. Also, it would cause the saturated stacks to overload, and compromise the distributor in the end.
Second, with the introduction of the output latch inserter, the long inserters couldn't keep up with providing enough materials to the output buffer chest, even with the item stack bonus in place, because the return line was (again) serial, not parallel.
Also, it took a long time for the return line to fill up and cause the main storage array to being filling up itself, giving out the false image of the silo being empty.
But, for the most part it got the job done for a good long while.
I managed to build an entire line of Mk1s, compact enough to fit on the island I was in, and with enough storage space.

nº3: Improvement.
Having spotted the problems with the Mk1, I set out to build an improved version.
The first problem to be tackled was the slow throughput. Simple enough to fix, I just got rid of the long inserters.

Image
The Mark 1-A.
Now the throughput delay is localized on the last long inserter before the output buffer, which is intrinsecal part of the design, and can't be removed easily.
The new, direct return line still causes unevenness in the stored load, but re-serializing a parallel line requires another structure that would deal with
bottlenecking and saturation as well.

Here's where things got a bit tricky.
I needed a system that would merge three lines back into one, fast enough so as to not cause bottlenecks, and using parts that function in sets of twos.
Basically, to fit a square peg into a round hole, as with the 3-way splitter, but in reverse.
So, that's exactly what I did: reverse a 3-way splitter.

Image
"The finger", or 3-to-1 condenser.
The core principle of the splitter was "feed the surplus back into the system".
That's the same mechanic here: one line out, 3 lines get repeatedly re-processed.

The condenser proved to be a major asset, not only for the silos, but for other processes involving distributing materials between 3 lines as well.
Given that the entry is inmediately re-serialized at the input, all the processed items are evenly mixed together in the case that they are of different type.
The mixing process deals with the uneven unload of the silo (if the entire assembly bottlenecks and stops, the three input lines stop all at the same time),
and the effects of the mix affect the input batch as a whole.

Image
A 3-way condenser in tandem with a 3-way splitter, evenly distributing potions in a hard 33% ratio, regardless of item class.
The bulk of the input batch is evenly splitted at the end of the process, each class of item part of the bulk evenly splitted as well.

Solved the problem of serialization, I came up with:

The Mark 2.
Image

Initial versions of this silo had, as shown, three fast inserters taking items out at the output end.
This caused a saturation of the condenser, which I quickly fixed with a new regulator.

Image

Now, this regulator introduced an internal saturation line, which drove the back end of the silo.
As the chests takes materials, the signal cuts the feed of items into the condenser.
The internal saturation line would prove to be a major part of the next version of silo.


Now, by this point most of my facility was running on fast belts, and the collector assembly of the silos still ran on normal belts.
This wasn't a big problem, because the entire factory was running with a basic overload watcher in place, so general saturation was partially dealt with: there was no need for a general saturation line controlled by the storage array.
The only problem with the system, was the output rate.
*One* inserter handling materials that had been previously processed 3 or more at a time, for a factory that was eating 4 or more materials at once across many different processes, just wasn't cutting it.
It had an initial big burst output of materials while the buffer was full, but as soon as it dropped to zero, the throughput was that of the red inserter moving items from the return line.
In one case, I had to strap a secondary output line directly to the return line, so that the system would output twice as fast, for the duration of that initial burst.
In another case, I had to add an extra storage column, with it's own control structure, to store solid fuel next to the coal, which up to that point had been the generic "fuel" for my setup.

Image
The Mark 2-A.
New solid fuel line added. The system starts to become way too messy.

Also, given that I was taking more items than I was processing, the metal silos began to fill up.
I needed a bigger silo, and a silo that could output more materials at once, with this same operative structure.

nº4: Standarization.

Since I was running out of space, and I couldn't add more modifications to the old Mk1 and 2's, I set out to take all the improvements from these versions, and create a new one from scratch.
As established, it required a many-to-one collector, a one-to-many distributor, a regulator, a control line, an output latch, and a fast output line.
Moving up from regular belts to fast belts pretty much screwed up the regulator system, because the normal inserters just couldn't keep up with the throughput. They were missing items passing by, effectively always giving a "line clear" signal.
The good thing was that the distributor wasn't getting as clogged up anymore, because the inserters in the storage array were doing their job and moving items towards the back quickly enough. So, without much of a need for the regulator, I took it away. The only regulator that remained was the output regulator, to look after the condenser.
Additionally, since I needed more storage space, I had to add more chests. I couldn't expand away from the main bus, so I had to expand sideways.
That meant three things: one, the structure needed to be much more compact, width-wise; two, it had to be a 4-way array, two 3-way arrays just couldn't fit; and three, I needed a super-compact 4-way splitter which had a one-center-and-two-sides structure that would fit with the new array.

Image
The reverse fountain.
A take on actual silo feed lines, which load from the "top".
My perspective was vertical in this case, with the main bus towards the top of the screen, at the "bottom" of the actual structure.
Flipping the entire thing over meant that the regulators were now closer to the main bus, and close to one another both input and output systems, so they were easier to wire.
Also, the thing just looks damn cool.


Taking the design from the Mk2A, with it's split storage area, and adding the "fountain" to it, plus, a new collector array:


Image
The Mark 3.
A model of simplicity.

The Mk 3 was a breath of fresh air for an almost collapsed facility.
I added two of these to the input line of mineral, and they took most of the load going into the furnaces, so now there wasn't as much metal going through the main bus, and the silos holding the smelted metal could finally let go and reduce their overload.
In fact, these silos worked a little too well when it came to providing big loads of material: given that the output latch releases 4 times as much material, constanty, without bursts, the main bus collapsed.
Like, totally collapsed. I had to input negative values on the control panel to stop the entire thing.
I clearly needed a new regulator system.... so, I brought it back.


Image
The Mark 3-A
New slow regulator on the output line, controlling the flow out the main storage array.
Notice that the collector array still runs parallel to the main bus. This will change in the final version due to a better use of the belt's throughput.


The Mk 3A brought it back to the basics, with all the improvements added to it.
It ran flawlessly taking whatever load of materials I threw to it, while providing a passive, constant supply of materials, courtesy of the regulator.
However.... it still was unable to output large amounts of material. It needed a final tweak. Something that would differentially switch from low to high output on demand, without causing bottlenecks.
For this, a modification of the bus itself was needed, to spread a massive half-belt throughput into an even full-belt one.
So, making use of the logic network and the control line, I was able to add yet another section to the structure, still well within the design parameters.

Image
The Mark 3-B

The Mk 3B fits a 2-way high-yield output line, in line with the original low-yield system.
The way it works is simple: the outer-most chests (closer to the output) are smart chests.
The first low-yield line feeds into the regulator, as before. The second, high-yield line feeds into the smart chests via a middle line of inserters controlled by the main control line.
When the main control line requests less than 3 (processes requesting material), the storage array feeds the smart chests as always.
When the smart chests are full, the saturation line engages, and the secondary latch closes. This line opens and closes as the silo is being emptied slowly, replenising the load of the smart chests.
The middle line (flow controller) is always enabled, constantly passing materials through, from the secondary latch to the primary latch.
When the main control line requests more than 3, the flow controller shuts down.
With the feed to the smart chests cut off, the secondary feed (high-yield) bleeds into the external lines, bypassing the regulator and feeding directly into the main bus.
If the request line is restored to less than 3, the flow controller engages once again, taking the load from the high-yield line, and feeding it into the low-yield system.
If the low-yield system is full, the saturation line cuts the secondary feed and the system normalizes.
With the shuffler added to the collector assembly, and the collector line now running against the bus line, the collector is able to take on twice the throughput, because the shuffler spreads it evenly across the belt, and the increased load is diverted away from the actual collector array as it goes through.

So,.... there you have it.
How to create a simple storage system out of stock parts, that is compact and efficient.

(whew, that was some post...)

Here are some pictures of the actual map I had.

Image
The load regulator of the auxiliary power line.
This line calls up for fuel when the smart chest gets depleted.

Image
Another section of the same line.
This controller is inverted, overriding the supply of coal when the chest is full, when the request is coal for plastic.
"coal, when plastic, only if not not-coal" that's the logic.

Image
The brains of the facility.
This array opens up request lines for ingredients when there is a signal for a composite product.
That yellow belt running down the middle,.... it's been there since day 1.
All the smelted metal, the surplus ingredients and the finished products came down this line.
Below it, was the old condenser assembly, where the 3-to-1 system was first used and perfected.

Image
The control panel.
Currently reading: "refinery enabled", "refine fuel", "produce steel", "produce gears", "produce circuits", "produce cannon shells"
"Produce cannon shells", which calls up for steel itself, stacks up with "produce steel" requesting extra supply of materials.

Image
An old flow regulator assembly near the furnaces.
This controller is also inverted. The signal means "halt this (all) production"

Image
Another section of the same line.
Four Mk3s handling the unload from a nearby train.
The saturation line from the regulators above controls the aperture of these output lines, through the constant combinator assembly above.

Image
The main storage area.
Two Mk3Bs on the left, handling the heaviest load of raw materials. While the iron line is congested, it's not collapsed.
Two Mk3As on the middle, fitted with shufflers, handling steel and circuits
The prototype Mk3B to the far right, as the red circuit silo.
Main bus and production area off to the top.

Image
Old Mk2s in the process of being retired.
There's the hybrid Mk2A that was loaded with fuel, to the left.
You can see the tight space I had to work with.


Image
High view of the same area.
There's a mini Mk3 to the right, taking on fuel.
Just compact enough to fit between the bus and that pond there.
Old science assemblers on the top left, out of service.

blueprints (up to 0.13 only!)
Mk1
Mk1A
Mk2_0
Mk2_1
Mk2A
Mk3
Mk3A
Mk3B
a basic control array, with signals pre-set
control array
a schematic of the original layout of the factory, featuring the old 3-to-1 condenser.
original setup layout

Re: An exposition on storage silos

Posted: Mon Aug 07, 2017 1:02 pm
by TheVeteraNoob
Instead of using the 3:1 splitter on the input it would make nuch more sense to do the balancing logic via circuits. Something like "enabled if n< average". And had the chests outputting to a lane balancer. This way you could expand the buffers width without having to design a complex splitter. However i will admit i don't fully understand this build. I don't really see what the controllers are doing or what the "output latch" does. So perhaps it couldn't be that way. But i don't see why a buffer would need to be complicated

Re: An exposition on storage silos

Posted: Mon Aug 07, 2017 2:03 pm
by Jap2.0
If you aren't on 64-bit you can still update to 0.13.

Re: An exposition on storage silos

Posted: Sat Aug 12, 2017 7:06 am
by gstv87
TheVeteraNoob wrote:I don't really see what the controllers are doing or what the "output latch" does.
download the basic control array blueprint, and look at the signaling.
Jap2.0 wrote:If you aren't on 64-bit you can still update to 0.13.
I have, since.
I posted the whole thing as a showcase of basic logic, without the advanced components of 0.15, or mods.
since belts themselves can now be connected to the circuit network, that probably renders the regulator structure obsolete, so the whole thing would run much faster.