Attached my programmable and scalable bot auto mall for the assembling machine, foundry, and electromagnetic plant.
TLDR: The mall is able to make any item that assemblers, foundries, and electromagnetic plants can craft and any product that contains these items. Just add what you want and wait for it to start crafting! If it gets stuck use the reset button. Dont touch the timer combinators unless you know what you are doing.
How does it work?
Fully annotated lobotomized version:
Rough inner workings
Whatever you put into the request combinator at the top that is part of the request module, will be analyzed and broken up into its ingredients by the product analyzer and a list of ingredients that are used throughout the entire crafting tree is made. The list is then processed by the craft processing module and then send to the assembler control module. The assembler control module then sends the ingredients of the request for crafting; one item after the other based on the factorio-inherent item hierarchy. It has several modules that correct, for example, for items that are already part of the network or have multiple product recipes. The crafting is done by the crafting module. The crafting module has 3 major parts, one that requests raw materials, a low throughput assembler that deals with requests below 50 and a high throughput assembler array that deals with requests above 50 units. This module can be indefinitely extended by just copying the assembler extension array that is to the very right. If you are interested in the details of how the machine works, the blue print book contains a lobotomized version of the machine that is sort of organized into functional modules. The ingredient calculator is lobotomized in a separate blueprint and published here viewtopic.php?t=129919.
How to use the machine?
At the top you will find 5 combinators. These are the ones you will interact most with.
The left one is for requests. Just add whatever you want in here.
The 2nd from the left is to overclock the machine. I recommend having it at around 600 ticks. If you go below that machine will start stalling. If your bots are not legendary and have at least 300% movement speed, you have to increase the ticks. I suggest 1000 ticks to begin with. If you see its working with your upgrades, you can start speeding it up. This timer essentially controls how long the machine waits before a new craft is started. 260 ticks was the minimum time needed for bots in my testing setup to bring all the items into the chest. If the items are not in the chest, the machine will recraft whatever is not in the chest. If you go below 260 ticks there are issues with the communication between modules.
The middle combinator adjusts the reset period for the machine if it is idle. This is set to 1000 ticks. If you were to remove items from the chests, they will be remade no later than 1000 ticks. Dont make this any faster than this or faster than the overclock module. Slower always ok.
The second from the right combinator is a global reset. It resets all memory cells and restarts the machine. I tired to iron out all stallings, but if it doesnt work, please let me know what you have done so that I can fix it.
The very right combinator increases the efficiency of the machine. There is a grace period after a craft has finished the length of which depends on the item that has been crafted. If you upgrade parts of the machine to other qualities update this combinator with a new crafting speed to squeez the last bit of efficiency out. Essentially, it divides the ticks needed for the last crafts to finish by the crafting speed. This is mostly important for lengthy crafts like T3 modules in a case where the crafts have started before the reset signal has been received. This allows to continue for one craft before it empties the assemblers.
You also need all of the basic resources that are in the buffer chests available in your network. It is possible to have this machine do everything starting with the raw materials that an assembler can make but that lowers the throughput massively because it has to craft copious amounts of raw materials on top of the request.
How do you scale it?
The assembler extension module consists of two columns with each 2 assemblers. You can extend the machine indefinitely to the right, and if you put the work into it, also below. To extend, simply copy the outer two assembler columns and paste them onto each other by overlapping one column. This way you dont have to connect them manually. If you wish to expand into other direction, you have to extend the wires manually. On top of copying the column, you also need to change a combinator in the raw material request module. You will find a combinator with an upward facing arrow. Adjust the content of this combinator according to its description to set the right amount of materials for the requester chests.
Important notes
Make sure you have enough chests for what you are requesting. There is some temporary storage but that is not infinite.
Cool, thats it. I dont have a background in computer science or engineering, so I may have done things in a very inefficient, awkward way, hence the user name. But the thing does the job. If you have any suggestion for improvement etc, I welcome feedback very much!! I have a few insights into electrical engineering and programming now because I build this thing and read a bit, so feel welcome to contribute to this
Let me know if it does its job!
inefficient
List of known issues and or help :
- Machine doesnt craft less than 4 heating towers
If you craft less than 4 heating towers, the machine doesnt work. The reason for this is that the boiler comes ahead of the stone furnace in the item hierarchy although the stone furnace being an ingredient of the boiler. If you craft 5 this is not a problem, because my machine puts tag on the layers of a craft, ie. the stone furnace is a layer below the boiler when calculating the recipe and I always request more crafts for lower layers than higher layers to make the machine run more smoothly. The layer of the furnace requests 25% more, so if you craft below 4, it wont request extra and you request the same amount of boilers and stone furnaces and then the boiler will end up ahead of the stone furnace in the crafting que. I am trying to think up a solution for that without to much bloat. Technically one could tag each layer by adding a signature quantity that is substracted later but I have to see.
- Help the machine works but some items are not crafted
I have crafted all items with the machine yet, especially many weapons. There is a constant combinator with the description: All raw materials that can be used in the assembler . Add the raw ingredients of whatever the machine doesnt want to craft here using a similar quantity as all the other materials. This is essentially a list of all ingredients that can be used and serves as a filter.
- Machine doesnt craft some items or you want to make some items with a different type of assembler e.g. belts with assemblers instead of foundry
There are two combinators that funnel items to the corresponding assemblers. They have groups called all_machine_foundry etc. . These are the items that are made by foundries. If you delete some of them, they are instead made by the assemblers. Usually changing one combinator is enough if you dont change the group name. I usually have multiple automalls, so I make a new group instead. If you do that, you have to manually change both combinators to the correct group. Credits
I am indebted to the user Tertius and his Combinator cook book 2.0 and take on the Full dynamic bot high speed mall. Most of the logic blocks I use are from his post viewtopic.php?t=124776&hilit=cookbook and I took inspiration from his fluid handling in his mall viewtopic.php?p=643640&hilit=dynamic+bot+mall#p643640.
