Factorio Multi Assembler

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.

binary101010
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue May 19, 2020 7:47 pm
Contact:

Factorio Multi Assembler

Post by binary101010 »

What do you want this factory to produce? Yes.
tl;dr;
I wanted to tinker around with the microcontroller mod and i "hate" the pre robotics gameplay when it comes to non bulk recipes (laser turrets, production buildings, specialized ammo...), handcrafting is slow, automation is tedious - so i engineered an factory design to produce virtually any recipe dynamically.
Demo
The production queue can be seen on right with Q being the number of recipes queued at the moment.

How does it work?
This screenshot provides an overview of the mostly vanilla proof of concept, only the microcontroller mod and the recipe combinator mod are required here.

Image

Resource provider
Source of raw resources (Iron, Wood...)

Multi Assembler
Dynamic assemblers with one microcontroller and two recipe combinators each, one reading the assemblers status, the other one setting the recipe delivered by the microcontroller, which in turn gets the recipe from the "wanted recipes" red signal network connecting the different subsystems.

Multi Assembler Microcontroller Code explained

Code: Select all

#
# This program manages the connected assemblers recipe based on the red signal network
#
# ### red signal input and output ###
# ----------------------------------------------------------------------
# The red signal network doubles as "assemblers working on recipe" and "recipes queued for production" network, this
# is achieved by using the most right digit (901 -> 1) as "should produce" flag with 1 indicating that the recipe 
# should be produced, and 0 indicating that the recipe should no longer be produced.
#
# The "assemblers working on recipe" part is achieved by adding 100 to the total number for each assembler working on the recipe.
# Any value in the red network with the exception of the "color red" signal can thus be described as
# (assemblersWorkingOnRecipe * 100 + shouldProduceThisRecipe) with shouldProduceThisRecipe being either 1 or 0.
#
# The "colour red" signal is defined as constant value of 9999 and must be present in order
# to reliably check the bottleneck state of an assembler.
# 
# Given the recipe set defined by the red signal network, the microcontroller will sort the signals
# and start producing the recipe with the lowest value,
# speak "least assemblers working on a given recipe".
#
# This rather modular approach allows for smarter logic to be defined
# when answering the big questions, aka what to produce with the given resources in which priority ect.
# without bloating the code of every single assembler


# ### green signal input ###
# ----------------------------------------------------------------------
# Required the bottleneck status of the connected assembler as input (colour green, yellow, red)

# ### green signal output ###
# ----------------------------------------------------------------------
# Same as red signal output, but should only be connected to the recipe combinator of the connected assembler


# Assembler instructions start here:

:reset # jump and entry point to reset the controller
clr mem1 mem2 mem3 mem4 out  # clear all registers, completely reset any temporary state
set 2000 mem3 # set mem3 to an high enough number for signal sorting, we want the smallest value, thus every queued recipe should initially be < 2000
bkr 1 # wait for at least one red signal, speak: "at least 1 recipe queued in the red recipe network"
:sort # jump point for queued recipes sorting loop
add 1 mem1  # increment loop counter
mov red@1 mem2 # remember the red signal, speak: "what is being produced in red signal at index(counter)"
tnq mem2 0 # check if the loop is finished, speak: "no more input found in red signal at index(counter)"
jmp :sorted # if the loop was finished in the prev step, we are done sorting, thus jump to :sorted
mov mem1 mem4 # now doing the actual sorting, mov mem1 to mem4, speak: "remember the loopCounter because otherwise it will be overwritten"
mov mem2 mem1 # mov our current red signal (what is being produced) to mem1
dig 1 # read the last character of the current recipe (eg. 301 -> 1), this value doubles as an "should produce (true|false)" flag  
swp mem1 mem4 # restore loop counter
teq mem4 1 # check if the current recipe should still be produced ("should produce" = 1)
jmp :sort # current recipe no longer wanted, sort next entry
tlt mem3 mem2 # do the actual sorting test
mov mem2 mem3 # checked value was smaller than cached value -> update cached value with new smallest value
jmp :sort # repeat sort for next entry
:sorted # everything sorted from here
set 100 mem3 # add 100 to lowest recipe, thus indicating that one more assembler is working on this recipe
mov mem3 out # mov the 100 x recipe to the output register, and thus updating the red currently produced network and starting the production in the current assembler, the production network count of each recipe can be defined as (assemblersWorkingOnRecipe*100+shouldProduceFlag) 
:probe # keep probing unti the currently set recipe is no longer wanted, this is essentially a "do while"
slp 180 # provide the assembler with 180 ticks of time to start the production as inserters need some time to insert the materials
mov green1 mem2 # rembember the current status of the green signal (bottleneck status)
fir mem2 # lookup the bottleneck state in the red signal network where the "color red" signal is propagated as an constant value
tnq mem1 9999 # check if the exact and known constant value was found in the red signal network
jmp :reset # red color constant was found, thus indicating that the current assembler status is "red - cannot produce" -> jump to reset and seek next recipe
fir mem3 # lookup the current recipe in the production network
dig 1 # again read the flag indicating if this recipe should still be produced
teq mem1 1 # check if the recipe should still be produced
jmp :reset # flag is 0, recipe should no longer be produced -> jump to reset and seek new recipe
jmp :probe # flag is 1, keep probing until this state changes
Possible improvements / features
  • Avoid the "180 tick do while" and react to events instead, eg. inserter read hand content
  • Invert the sorting logic, removing the "set 2000" part in the code and making the red assembler network semantically more logical "the higher the signal the more i want this recipe"
Quirks and remarks
  • An mostly vanilla build as shown in the PoC above is not feasible for larger quantities, but should be possible if combined with techniques like sushi belting and increasing the initial delay of the "do while". This is not covered in the demo map as i am using the warehouse mod to work around this.


Recipe Logic
Defines what recipes can be produced based on the given resources and the recipes configured in the "production targets" constant combinators.
In essence this subsystem will emit a constant signal of "1" for each recipe which a.) should and b.) can be produced to the red multi assembler network.

At the moment this subsystem is rather basic and can be improved upon (see quirks and remarks).

Recipe Logic Microcontroller Code (TOP) explained

Code: Select all

#
# This program removes recipes that are present in the red assembler network, but are not longer wanted because the production target is hit.
#
# ### red signal input and output ###
# ----------------------------------------------------------------------
# The red signal is connected to the recipe "cache" of the recipe logic subsystem.
# The cache contains the currently set recipes for production
# If the subsystem gets stuck for whatever reason, simply reset the cache combinator

# ### green signal input
# ----------------------------------------------------------------------
# The green signal represents an set of recipes that are wanted for production because the production target is not yet hit.

:reset # reset and entry point
clr mem1 mem2 mem3 mem4 out # reset all registers and temporary states
set 1 mem1 # avoid 0 black signal when reading red@1
:loop # jump point to iterate over the input set
clr mem2 mem3 mem4 # clear iteration states
mov red@1 mem2 # read the cached recipe at the current iteration
add 1 mem1 # increment the loop counter
tnq mem2 0 # check if there are more recipes in the cache set
jmp :reset # no more recipes, loop finished jump to program entry point
swp mem1 mem4 # move iteration register to mem4 as mem1 gets overriden 
mov mem2 mem1 # copy type of mem2 to mem1, so that the type of recipe matches and not just the quantity
fig mem2 # lookup the iteration recipe in the green input
swp mem1 mem4 # restore iteration variables
slp 60 # wait 60 ticks just because the endless loop combinator sound is nerv wrecking 
teq mem4 0 # check if the recipe is still a production target
jmp :loop # yes it is, check the next recipe in the cache
swp mem1 mem4 # no it is not, move iteration register to mem4 as mem1 gets overriden
mov mem2 mem1 # move mem2 to mem1 to once again make sure that the types match and not just the quantity 
set 1 mem2 # set mem2 to one, so we have an known quantity
sub mem2 2 # substract two of mem2, giving us a minus one signal
mov mem1 out # emit the minus one signal in order to remove the recipe from the cache
clr out # stop emitting minus values instantly or the cache will cache minus values
swp mem1 mem4 # restore iteration counter
jmp :loop # check next recipe
Recipe Logic Microcontroller Code (BOTTOM) explained

Code: Select all

#
# This program checks if the given recipe can be produced based on the resources in stock
#
# ### red signal input ###
# ----------------------------------------------------------------------
# Receives the "color red" signal if any resource of the currently checked recipe is not available

# ### red signal output ###
# ----------------------------------------------------------------------
# Emits the currently checked recipe to an recipe combinator in order to check its ingredients

# ### green signal input
# ----------------------------------------------------------------------
# The green signal represents an set of recipes that are wanted for production because the production target is not yet hit.

# ### green signal output
# ----------------------------------------------------------------------
# Same as red signal output, but will emit the value to the recipe cache only

:reset # entry and reset jump point
clr mem1 mem2 mem3 mem4 out # clear all registers and temporary states
set 1 mem1 # avoid 0 black signal when reading input
:loop # iteration jump point
bkg 1 # wait for any input on the red wire
clr mem2 mem3 mem4 out # clear all registers and temporary states
mov green@1 mem2 # read "wanted recipe" at current iteration position
tnq mem2 0 # check if we finished iterating
jmp :reset # iteration finished, restart program
mov mem2 out # mov current recipe to output
slp 90 # wait 90 ticks for the surrounding combinators to finish their calculation wheter or not the recipe is missing resources 
mov red1 mem3 # read the "red color resource missing" signal
add 1 mem1 # increment loop counter
teq mem3 0 # check if the current recipe can be produced
jmp :loop # it cannot be produces (red color > 0), move to the next recipe
set 2 mem2  # set the recipe amount to two, this is the predefined value which will be relayed to the cache, other values are ignored by the cache
mov mem2 out # outputs the current recipe to the cache
nop # wait one extra tick as this signal needs to pass trough an additional combinator
clr out # clear the output
jmp :loop # check next recipe
Possible improvements / features
  • Add configurable recipe priorities aka "I want laser turrets before walls, and belts before everything else"
  • Better recipe priorities based on recipe complexity / production targets, "I want 5 assemblers to produce cables needed in bulk for circuits, while i only want one assembler at max producing power armor"
  • Possible solution: Calculate the priority based on the distance to the production target. The higher the difference between production target and in stock items, the lower the signal to the red multi assembler network.
Quirks and remarks
  • If intermediate products go missing or cannot be produced (say you manually provide blue circuits, and remove them again after an recipe with blue circuits was added to the production queue), the recipe will be stuck indefinitely in the production queue. In order to solve this, simply reset the cache combinator of this subsystem.
  • Items with large stack sizes may lead to problems if the steel chest contains less than (number of assemblers * item stack size + 1). That's because the assemblers will "eat up" all the resources of the steel chest, which in turn leads to the system thinking no resources of this type are available, and thus aborting the production.
  • Slow raw resource input or intermediate recipe production will lead to an slow flipping binary state of "I can produce this higher tier recipe" and "I no longer have enough resources for this recipe", ultimately this is a resource input problem, but it could be handled in a more graceful way for other queued recipes.
  • Depending on the setup, production targets are not hit exactly because of an production target evaluation delay when checking if the recipe should still be produced, in some cases this leads to overproduction.
Production Target Constant Combinators
Add the recipes you want the Multi Assembler to produce here. The quantity defines the production target.

Missing Resource Indicator
Will flash red if any resources required to produce an recipe are missing in the steel chest of the multi assembler.
The missing resources are shown as positive values in the combinator to the right of the flashing light.

Production Queue Visualizer
Optional component, simply visualizes the amount of the currently queued recipes.
Download
Demo Map, Tested with version 0.18.21
https://1drv.ms/u/s!AnCArPA4VxPUi324cxr ... y?e=VNwHGp (Microsoft OneDrive)

PoC Vanilla Blueprint

Code: Select all

0eNrtnVty47gVQLcyxc+UNMULgiDpSmcNme/0lIuSaZs11KMoqnucLi8gC8nGspKQkh+yTErguRqn08lU9cxYblyReBwC4AHwLZhV22Jdl8smuPoWlPPVchNc/e1bsCnvlnnVfdY8rIvgKiibYhFMgmW+6H7KN5tiMavK5d10kc/vy2UxjYLHSVAub4rfgyt5nJwNcVPMy5uins5Xi1m5zJtVfRDAPP46CYplUzZlsb+g3Q8P18vtYlbU7TecijMJ1qtNm3S17L69DTdNf44nwUP3P+133JR1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gw4C5PowVKdhnktEDHuHoegwQKsNTHH/8i3A6SvM/au36MePkOhv1IJ2C2Tq0cBugeqktUCT9fdz69QioDW2nQ6E8JZ+bNqOfu+n4FZYDtErDjsoCmR1qQRhuYrLoXqGUS1BySRd/dism23gTu9Dp5b3XA3NOaxFnfrc3K9h4JLYcuumcMCE/QLpiEuGVK0t1Ot1bh9IT7MLOE7UMHC2h+Zwp2GgywUWGtUQT9V9cJSEQE8wdFrvwZoRzlBAQjxF+8H5ykdIvO5kUctHSKfqZThGPmIKlQ/m2NrwTTZ65Ur5FI0OZ8zFrvWVH1zTmZoRQnsRLrEaleFU3QjdnFxFoaRGaqMpGhDO3CUC9ghUh0mAPQLVUZJOj0DQ1evhaZq71iPgbYdCPRrYfUS970U+9+mJucZd7DXR3BIljuH36SHzXQs4YvCITqzlLe5BXz5b+nILfYWtataBKO2FFyb6OkTstJmGTi818F2C870IRVHRAr9LUNoPFoIJeFxUr+xD0A6l0fURaLBG1QNTCMrLgHGMYKND9WhrsSI3zW3dIIVptM91wPO9MVbhZHrrOILM9286bIfSA9eJzIQd0txMNnDTkdh2t/jl/KKGQW2Xi18WrxkdTlK4Gc7bq4it2VdiwnEMG61UfgRZVSfWz03QBLdsIB/mZzDmJ8imnY1vZ/NekGkwA82socrIwBT6DcSGIDFVWNSN+WIKZT6bOUVN/GNTCsQ0OJ4isDlz/sE21Wcw+wi2GY3MNJiABqt1A7ZppdA0s00rCdNgDrLwNcsWoMGamQFXpV4KXJFz0TjB9mtFrhfN+ECPrdCJN3BiL6bnMOBfz183gPJjeiizfVMM911KZwsqDCnGiMUhiU+n/wOGjwXN
Raw multi assembler code (sadly not part of the blue print)

Code: Select all

:reset
clr mem1 mem2 mem3 mem4 out
set 2000 mem3
bkr 1
:sort
add 1 mem1
mov red@1 mem2
tnq mem2 0
jmp :sorted
mov mem1 mem4
mov mem2 mem1
dig 1
swp mem1 mem4
teq mem4 1
jmp :sort
tlt mem3 mem2
mov mem2 mem3
jmp :sort
:sorted
set 100 mem3
mov mem3 out
:probe
slp 180
mov green1 mem2
fir mem2
tnq mem1 9999
jmp :reset
fir mem3
dig 1
teq mem1 1
jmp :reset
jmp :probe
Raw recipe logic assembler code top (sadly not part of the blue print)

Code: Select all

:reset
clr mem1 mem2 mem3 mem4 out
set 1 mem1
:loop
clr mem2 mem3 mem4
mov red@1 mem2
add 1 mem1
tnq mem2 0
jmp :reset
swp mem1 mem4
mov mem2 mem1
fig mem2
swp mem1 mem4
slp 60
teq mem4 0
jmp :loop
swp mem1 mem4
mov mem2 mem1
set 1 mem2
sub mem2 2
mov mem1 out
clr out
swp mem1 mem4
jmp :loop

Raw recipe logic assembler code bottom (sadly not part of the blue print)

Code: Select all

:reset
clr mem1 mem2 mem3 mem4 out
set 1 mem1
:loop
bkg 1
clr mem2 mem3 mem4 out
mov green@1 mem2
tnq mem2 0
jmp :reset
mov mem2 out
slp 90
mov red1 mem3
add 1 mem1
teq mem3 0
jmp :loop
set 2 mem2 
mov mem2 out
nop
clr out
jmp :loop


PS: I am not a native speaker, if you need clarification on some parts feel free to ask.

The design was made possible by the following mods:
extermeon
Burner Inserter
Burner Inserter
Posts: 9
Joined: Thu May 18, 2017 7:44 pm
Contact:

Re: Factorio Multi Assembler

Post by extermeon »

Great work! How about version for a fCPU? :)
Post Reply

Return to “Show your Creations”