chemart / soas

View on GitHub

Self-Organizing Assembly Systems (SOAS) — The chemical abstract machine applied to a factory floor. Molecules are robots, grippers, feeders and human operators, each advertising a multiset of skills, plus the manufacturing order. Reaction rules let a resource th…

chemistry official · built in non-chemical fidelity: reconstructed constructive #banzhaf-yamamoto

How it works

The chemical abstract machine applied to a factory floor. Molecules are robots, grippers, feeders and human operators, each advertising a multiset of skills, plus the manufacturing order. Reaction rules let a resource that offers a needed skill join a growing coalition, provided interfaces are compatible - so an assembly line assembles *itself* out of available modules to satisfy the order. Because the rules are formal, the resulting configurations can be verified rather than tested, and the published case study yields 48 correct lines.

S
CHAM molecules of a shop floor: manufacturing resource agents (MRAs - robots, axes, grippers, feeders, positioning devices, the generic human operator), each with a type, a multiset of skills (type plus items subtype, direction, range, gripper-type, count, accuracy), the skills it requires from partners, and physical interfaces typed circular/square/triangular/oval/ straight/diamond/star with sign + (held) or - (holding); the order (generic assembly plan, GAP), a list of tasks, each an object of parts, a start point and the operations (sets of skills) it requires; coalitions (dynamic coalition agents) of MRAs formed for one task, carrying their provided skills, the operations still required and their free interfaces; and assembly lines, partial assignments of complete coalitions to tasks. Species ids: r1 for an MRA, gap2 for the order (also the empty line), gap2->t(2)[f1,g1,r1] for a coalition, gap2{t(1)=unassigned-human;t(2)=f1+g1+r1;...} for a line · implicit
R
initiate (rule type 4, task-coalition matching) M, O -> M, O, [T|M] when MRA M offers a skill task T of order O requires; join (types 1-3, interface compatibility, composition patterns, composite skills) M, C -> M, C, C+M when M is not in C, offers a skill C still requires, a composition pattern links the skills of M and C, and both have a free interface of one type and opposite signs (both become occupied); assign-generic O, [T|unassigned-human], ... -> L (every task the generic human operator completes, at once); assign L, C -> L+C when C is complete, its task is open in L, C shares no MRA with L, and every task still open keeps a complete coalition sharing no MRA with L+C. · arity variable
A
maximally-parallel · none

Parameters

namedefaultmeaning
system
enum · structural
"tape-roller-gap2" published case study: tape-roller-gap2 = the four-part adhesive tape roller dispenser of JAmI 2012 (six tasks, soas-maude assembly/gap2.maude); tape-roller-gap1 = the two-part dispenser of JAmI 2010 (four tasks, assembly/gap1.maude, whose pick&place tasks start at named feeders); custom = the mras, gap and parts parameters
tape-roller-gap2 | tape-roller-gap1 | custom
mras
str · structural
"" system=custom only: the manufacturing resource agents of the shop-floor repository, as text (see the module docstring); nothing is evaluated as Python
one MRA per line, 'name type[/subtype] | skills | required skills | interfaces', e.g. 'g1 gripper/2finger | open-close(range=70.0) | | circular+'
gap
str · selection
"" system=custom only: the generic assembly plan, i.e. the product order that triggers the self-organising process
first line 'name number', then one task per line, 't(N) | type | object | start point | operations', e.g. 't(2) | pick&place | p1 | feeder | pick&place'
parts
str · structural
"" system=custom only: the parts to assemble; they complete the order's tasks and the grippers with the grip and feed skills they need
one part per line, 'name type | gripper subtype | grip positions', e.g. 'p1 body-case | 2finger | (25,0,10) (25,60,10)'
patterns
str · structural
"" composition patterns (rule type 2): typical module combinations, the only rule set the papers leave open to the user
one composition pattern per line, 'skills & skills'; empty means the six patterns of soas-maude semantics/patterns.maude
unavailable
list · structural
[] MRAs missing from the solution, for the resilience scenarios of the papers (a module becomes unavailable and the system self-organises again)
names from mras; e.g. [r1] for a robot that has failed or left the shop floor
floor
list · spatial
[1000, 10000] shop-floor extent [length, depth] for the serpentine layout of rule type 5; the line turns north when the length is used up
two positive integers in mm; soas-maude uses [1000, 10000] with conveyors 300 long and 50 wide
max_species
int · structural
5000 species budget of the closure, shared by the coalitions and the assembly lines; status truncated when exceeded
[1, 1e+06]; the published case studies close at 582 (gap2) and 87 (gap1) species

Self-Organizing Assembly Systems (SOAS)

One of the artificial chemistries of Banzhaf & Yamamoto, Artificial Chemistries (MIT Press, 2015), §20.1; first proposed by Frei, Di Marzo Serugendo & Serbanuta, 2010-2012.

Its generator ships with the chemart library, so loading it runs no code from the hub and needs no trust_remote_code.

import chemart

net = chemart.generate_network("chemart/soas", seed=0)   # same as "soas"
print(net.summary())

What to look for

  • an assembly system designs itself: from an order and a repository of modules, coalitions form that cover every task, and are arranged in a shop-floor layout (2012 sec. 5.5)
  • 48 correct assembly lines for the four-part tape roller dispenser, 12 for the two-part one (published Maude specification; the 2012 paper's sec. 5.5 says 47, its discussion 48)
  • coalitions only form between physically compatible modules: a gripper is held by an axis or a robot on a circular interface, a middle axis needs a base axis, and a gripper whose opening is too small for the part is never used (the 55 mm gripper g2 cannot take the 60 mm body case)
  • every line is correct by construction: each task gets a complete coalition, no module works at two stations, and each feeder feeds the part its task consumes
  • the process terminates incomplete when the modules cannot provide the required skills, leaving tasks unassigned and no line (2010 sec. 7, Wermelinger's first property); removing the screw-driver gripper g4 leaves t(5) unassignable, removing one robot leaves too few workers for the four pick&place tasks
  • resilience: after a module becomes unavailable the remaining modules still self-organise whenever enough skills are left (the two-part order still yields 6 lines without robot r1)

Implementation decisions

  • The book describes SOAS in one paragraph. The chemistry is reconstructed from the two JAmI papers and, where they print rules only as K-notation figures, from the authors' own Maude specification soas-maude 1.0, which is the published version of the rules (the 2012 paper links it). Rule types 1-4 and the layout rules (type 5) are implemented; the derivation of the layout-specific assembly instructions (type 6, concrete robot movements) is not a reaction and is out of scope.
  • Running soas-maude 1.0 under Maude 3.5.1 gives, for the six-task order gap2: 165 coalition molecules (1, 44, 44, 44, 31, 1 for t(1)..t(6)), of which 30 are complete (1, 8, 8, 8, 4, 1), and 48 assembly lines; for the four-task order gap1: 46 coalitions and 12 lines. This module reproduces all of these counts.
  • The 2012 paper contradicts itself on the number of solutions: sec. 5.5 says 'Maude generates 47 possible solutions', while the discussion of the same run right after says '48 solutions' and describes a 25th solution. Executing the published specification gives 48, which is also 24 permutations of the four workers (r1, r2, r3 and the axis coalition a1+a4+a7) over the four pick&place tasks times 2 ways of splitting the body-case feeders f1 and f3; the entry follows the data.
  • A coalition molecule is identified by its task and its members, as in soas-maude, where the join rule refuses to build a coalition whose members already form one for that task; the first derivation found is kept. For both published case studies every derivation of the same members yields the same molecule (extras.analysis.coalition_conflicts is 0), so the network does not depend on that order. Every derivation path is recorded as a reaction, since which one fires first is not determined.
  • Coalitions of the generic human operator (unassigned-human, soas-maude's generic-human standing for any number of operators) are assigned to their tasks at once and never make a module exclusive, mirroring the Maude equation that assigns them before any other choice; all other assignments are one reaction each. The 2010 paper names two operators human1 and human2; the 2012 modules replace both with the generic one.
  • The 2010 case study is offered as tape-roller-gap1 with the 2012 modules: the 2010 Maude sources are not published, and the module names of the 2012 release differ (its r3 is the ABB robot, while fig. 19 of the 2010 paper shows r3 as the Scara). Its published trace (t1 by an operator, t2 by r3 with gripper g1, t3 by r1 with gripper g2, t4 by an operator) is reachable, and the open interfaces of the four coalitions of figs. 23-26 are reproduced.
  • Skill matching, the subtraction of provided from required skills and the exact set difference used for a joining module's own requirements follow soas-maude (MATCH-SKILLS, SUBSTRACT-SKILLS, semantics/combine.maude). The rarely reachable case where Maude's first equation consumes an identical offered skill is not modelled: a required skill is removed whenever some offered skill matches it. The counts above confirm this makes no difference for the published systems.
  • The layout (rule type 5) is a deterministic function of a finished line and is reported per line in extras.analysis, not as reactions; positions reproduce appendix B of the 2012 paper. Its shop-floor extent is the `floor` parameter (soas-maude uses 1000 x 10000 mm, with the conveyor length 300, conveyor width 50 and module width 50 kept as published constants). When the floor is too small for a line the specification has no solution and the layout is null.
  • The v1 parameters robot_types and manufacturing_order (both typed matrix) become the modules (mras), the order (gap) and the parts as text in a documented notation, plus the composition patterns, the unavailable modules and the floor. Parts carry only what the rules read (type, gripper subtype, grip positions); weights, materials and dimensions are dropped.
  • constructive was false in v1; coalitions and assembly lines are built at run time by the rules and cannot be enumerated up front, so it is true. provides gains stoichiometry, catalysts, initial-state and sequence-structure-function and loses compartments: the nested cells are part of a molecule's structure, not membranes with their own reactions.

Sources

  • Banzhaf, W. & Yamamoto, L. (2015). Artificial Chemistries, section 20.1 (SOAS as a practical application of ACs for self-assembly: CHAM rules by which industrial robots self-assemble into a customised assembly line for a manufacturing order, simulated in Maude, giving feasible configurations that can be proved correct).
  • Frei, R., Di Marzo Serugendo, G. & Serbanuta, T. F. (2010). Ambient intelligence in self-organising assembly systems using the chemical reaction model. Journal of Ambient Intelligence and Humanized Computing 1(3):163-184. doi:10.1007/s12652-010-0016-0. Rule types 1-4 (sec. 5.1-5.4), the Maude/K model (sec. 6.1-6.4) and the simulation trace of the four-task case study (sec. 6.5, figs. 15-26). http://www.cui.unige.ch/~dimarzo/papers/JAmI2010.pdf
  • Frei, R., Serbanuta, T. F. & Di Marzo Serugendo, G. (2012/2014). Self-organising assembly systems formally specified in Maude. Journal of Ambient Intelligence and Humanized Computing 5:491-510. doi:10.1007/s12652-012-0159-2. The completed specification: six-task case study (sec. 3), the modules (sec. 5.1), layout and transport linking (sec. 5.3, figs. 9-13), LSAI derivation (sec. 5.4) and the execution result (sec. 5.5, appendices A and B). http://www.cui.unige.ch/~dimarzo/papers/JAmI2012.pdf
  • Frei, R. & Di Marzo Serugendo, G. (2011). Self-organizing assembly systems. IEEE Transactions on Systems, Man and Cybernetics - Part C 41(6):885-897. doi:10.1109/TSMCC.2010.2098027. Overview, the CHAM model for self-organisation (sec. VI-A/B) and the agility scenarios. http://www.cui.unige.ch/~dimarzo/papers/SMCC2011.pdf
  • Frei, R., Serbanuta, T. F. & Di Marzo Serugendo, G. soas-maude 1.0, the authors' Maude specification (code.google.com/p/soas-maude, https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/soas-maude/soas-maude-1.0.zip, sha1 90d77bf572fa36433c2283cbb13abc0361d81a87). Source of the modules, parts, GAPs, patterns and of every rule this module implements; re-run here with Maude 3.5.1 to check the numbers below.

Banzhaf & Yamamoto, Artificial Chemistries (2015), §20.1

Preview at default parameters

582 species · 1326 reactions · status complete · seed 1

gap2 + r3 -> r3 + gap2 + gap2->t(2)[r3]
gap2 + r3 -> r3 + gap2 + gap2->t(3)[r3]
gap2 + r3 -> r3 + gap2 + gap2->t(4)[r3]
gap2 + r3 -> r3 + gap2 + gap2->t(5)[r3]
gap2 + r1 -> r1 + gap2 + gap2->t(2)[r1]
gap2 + r1 -> r1 + gap2 + gap2->t(3)[r1]
gap2 + r1 -> r1 + gap2 + gap2->t(4)[r1]
gap2 + r1 -> r1 + gap2 + gap2->t(5)[r1]
gap2 + r2 -> r2 + gap2 + gap2->t(2)[r2]
gap2 + r2 -> r2 + gap2 + gap2->t(3)[r2]
gap2 + r2 -> r2 + gap2 + gap2->t(4)[r2]
gap2 + r2 -> r2 + gap2 + gap2->t(5)[r2]
gap2 + a1 -> a1 + gap2 + gap2->t(2)[a1]
gap2 + a1 -> a1 + gap2 + gap2->t(3)[a1]
gap2 + a1 -> a1 + gap2 + gap2->t(4)[a1]
gap2 + a1 -> a1 + gap2 + gap2->t(5)[a1]
gap2 + a4 -> a4 + gap2 + gap2->t(2)[a4]
gap2 + a4 -> a4 + gap2 + gap2->t(3)[a4]
gap2 + a4 -> a4 + gap2 + gap2->t(4)[a4]
gap2 + a4 -> a4 + gap2 + gap2->t(5)[a4]
gap2 + a7 -> a7 + gap2 + gap2->t(2)[a7]
gap2 + a7 -> a7 + gap2 + gap2->t(3)[a7]
gap2 + a7 -> a7 + gap2 + gap2->t(4)[a7]
gap2 + a7 -> a7 + gap2 + gap2->t(5)[a7]
gap2 + f1 -> f1 + gap2 + gap2->t(2)[f1]
gap2 + f1 -> f1 + gap2 + gap2->t(4)[f1]
gap2 + f2 -> f2 + gap2 + gap2->t(3)[f2]
gap2 + f3 -> f3 + gap2 + gap2->t(2)[f3]
gap2 + f3 -> f3 + gap2 + gap2->t(4)[f3]
gap2 + f4 -> f4 + gap2 + gap2->t(5)[f4]
gap2 + g1 -> g1 + gap2 + gap2->t(2)[g1]
gap2 + g1 -> g1 + gap2 + gap2->t(3)[g1]
gap2 + g2 -> g2 + gap2 + gap2->t(3)[g2]
gap2 + g3 -> g3 + gap2 + gap2->t(4)[g3]
gap2 + g4 -> g4 + gap2 + gap2->t(5)[g4]
gap2 + unassigned-human -> unassigned-human + gap2 + gap2->t(1)[unassigned-human]
gap2 + unassigned-human -> unassigned-human + gap2 + gap2->t(6)[unassigned-human]
f1 + gap2->t(2)[r3] -> f1 + gap2->t(2)[r3] + gap2->t(2)[f1,r3]
f3 + gap2->t(2)[r3] -> f3 + gap2->t(2)[r3] + gap2->t(2)[f3,r3]
g1 + gap2->t(2)[r3] -> g1 + gap2->t(2)[r3] + gap2->t(2)[g1,r3]
… 1286 more

Generated by the uploader with chemart push; the hub never runs uploaded code.