Composing systems

Composing systems#

Several Systems become one in two ways. merge makes them one particle: a namespaced composite whose components share a single blanket. couple keeps each a separate particle and joins them through their ports. Bindings (Link, Identify, Clamp) say which variables of one component are read by, driven by or identified with those of another. black_box stands in for a process declared by its ports alone.

Making a composite#

merge

Merge components into one composite (System, SystemParams); see the module docstring.

couple

Components coupled through their ports into one (System, SystemParams).

black_box

An external process declared by its ports alone, as (System, SystemParams).

with_mirror

system coupled with its own mirror: the closed System of a model and the world it models.

nested

Whether component name is nested in the merge: it keeps a blanket of its own inside the particle, every binding across its boundary being a belief read (a Link with a realise) or a link from an action node into a control node, and at least one binding crossing it.

subsystem

One mind's bona-fide (System, SystemParams), derived from the composite and its metadata.

subsystem_states

Composite state factor indices one mind's view carries, in composite order.

write_back

params with the parameter variables the view of name learned set to after's.

Bindings#

Link

An arc of the graphical model of the whole: source to target.

Identify

Two parameter variables identified as one, or an out-port identified with an in-port.

Clamp

A control node no planner chooses and no link drives, clamped at a constant.

Reading a composite#

namespaced_key

Qualify one key of the key grammar with a subsystem prefix, on its name segment.

driven_nodes

The control nodes of component name (every component's when None) that a variable drives, each with its variable: an action node or an emission another slot generates (System.observes).

is_black_box

Whether system states nothing but black-box ports: a black box (black_box()), a view of one taken from a coupling, or a coupling or merge of black boxes alone (no state factor, no modality, every control node and emission a port).

resolved_epistemic

A component's epistemic selector as an explicit tuple of literal keys.

joint_planner

The planning problem of node of a merged or coupled System, as one mind.