run

Contents

run#

hybrid_aif.composition.run(
system,
params,
ticks,
key,
steps,
clocks=None,
tick_order='simultaneous',
carries=None,
record_carries=False,
)[source]#

Step a closed System for ticks rounds and record a Trajectory.

system is a merge or a coupling whose every modality is fed by an identification (a modality no identification feeds is refused naming it, and the sentence names the fix); params is its parameter home. steps maps each stepped node to its step: a leaf, or a non-leaf node that is then planned as one mind (joint_planner of the node); the keys are an antichain over the System’s components that covers every leaf. The module docstring states the step’s contract, the rounds, the order of the nodes and the keys.

tick_order is "simultaneous", "sequential" or "async". carries seeds the carry of the named stepped nodes (None, the default, lets each step make its own; a seeded carry of a sample() node is a partial point state); record_carries=True keeps every round’s carry in Trajectory.carries. clocks maps a stepped node whose view declares durations to the rounds one unit of duration lasts (1.0 for a node it omits), a positive finite number. A step that learns has its returned parameter variables written back to the home each round (the next view is taken from the new home), and Trajectory.params is the home after the last round.

Refused, each naming the fix: an open System; steps that is not an antichain covering every leaf, that names no component, or that names a non-leaf node and a sample() leaf beneath it; a step that omits an emission or an action node of its node on a round; a cycle of identifications of action nodes with control nodes; clocks or carries naming no stepped node, or clocks naming a node that declares no durations; a duration whose product with its clock is under one round or not a whole number of rounds; an action node of a node with durations under a non-identity actuator. A black box (black_box()) is stepped by a custom step; plan() or sample() on one, a step marked sliced on one, a node planned jointly with one beneath it and an in-port of one that nothing drives are refused.