couple

Contents

couple#

hybrid_aif.composition.couple(components, bindings=(), fixed=None)[source]#

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

components maps a name to (System, SystemParams); the components stay leaves of the result, each with its own planner configuration (Subsystem.config), its own habit, precision, durations and scoring (SystemParams.parts) and its own recognition, with Subsystem.boundary == "coupled" (not nested()). A bindings entry is an Identify of an out-port (an action node or an emission) with an in-port (a modality, or a control node: a driven control node, which carries the out-port’s realised value and has no action node of its own), between ports of different components, or a Clamp; fixed maps a discrete control node ("world.u_move") to the level, or the distribution over levels, it is held at, as a Clamp does. Every other binding is refused, naming merge(): a structural or belief-read Link, an Identify of two parameter variables.

A coupling is the splice of its components followed by port identifications: |A| + |B| - k variables for components of |A| and |B| variables and k identifications, a variable one out-port feeds to several in-ports counted once. It plans nothing as one mind: a planner field its leaves share it states, and holds UNSET where they differ, a face needing it refusing. A coupling may be merged and a merge coupled. A black box (black_box(), an external process declared by its ports alone) is a component like any other: its in-ports are control nodes an Identify drives, its out-ports emissions an Identify feeds a modality or a control node from, and a Clamp on an in-port is refused.

Refused, each with its fix named: a component that is not (System, SystemParams); an unknown component or port (the sentence lists the candidates); an identification of two ports of different types; an in-port identified twice; a binding that would drop an actuator kernel. run() refuses a coupling with an in-port nothing feeds.

Scope: a modality is typed by its likelihood, so a component couples when each of its modalities has a tabular, neural (MLPConditional) or linear-Gaussian likelihood; an amortized component (a PredictorHead likelihood) cannot be coupled.