Animation Layout
The static layout that, together with a .atf trace, lets a renderer draw an animation. Written once (before simulate()) to a .lay.json file. The format is self-describing (NF6): a renderer can produce a basic animation from only the layout and the trace.
Constructors
Properties
Maps an agent statechart state name (matched by substring) to a hex color, for state-based agent styling (8F.1); e.g. "Working" -> "#2ca02c".
Author-controlled conveyor belt routes (10.5): per-segment polylines anchored at stations/locations. Appended last so positional AnimationLayout(...) callers are unaffected.
Guide path drawing (V13), keyed by space name. Appended last (defaulted) so old layouts keep loading.
Guided transporter styling (V13), keyed by transporter name. Appended last (defaulted).
Per-element text-label overrides (10.8/C3): retitle, reposition (dx,dy from the glyph), or hide a label. Appended last so positional AnimationLayout(...) callers are unaffected.
Named spatial locations (LocationIfc): move endpoints, conveyor anchors, agent landmarks — the animation counterpart of a NetworkStation. Appended last (defaulted) for positional-constructor and wire safety, so old layouts keep loading and old code keeps constructing.
Maps an entity's current process name (matched by substring) to a hex color, for process/activity styling (10.1e); e.g. "Triage" -> "#ff7f0e". The entity analogue of agentStateColors. Appended at the end of the constructor so positional AnimationLayout(...) callers are unaffected.
Grid obstacle/cost overlays extracted from (or authored for) the model's geometry, keyed by space name (P5a/G2). Appended last so positional AnimationLayout(...) callers are unaffected.
Functions
The placed position of anchor ref — the location (else the network station) of that name, falling back to the other kind when the declared one isn't placed — or null if neither is placed.
The grid obstacle/cost overlay for the space named spaceName, or null — the consume-side lookup (P5b/G2).
The full poly-line for path in drawing order: for a functional path (its from/to anchors set) the resolved anchor endpoints bracket the waypoints (fromPos, then the waypoints, then toPos); for a legacy decorative path (no anchors) just its own points. Endpoints resolve via anchorPosition, so an endpoints-only functional path (no waypoints) still yields a drawable two-point segment.
Validates this layout against inventory: every queue/resource/movableResource/response binding is checked against the names the model exposes (the same element kinds the animation emitters attach to), and unmatched names are reported with a nearest-name "did you mean?" hint (8K.2a). Response-style bindings (bar/plot/value/summary/histogram) match against responses ∪ counters (both emit response values).
Validates this layout against model by delegating to the AnimationInventory path (validateAgainst(inventory)) — the inventory is the single identifier space (9A.3/9A.5) that both capture selection and layout binding key off, so validation can't drift from what the emitters expose.
Separates scaffold-placed glyphs that landed on top of each other — e.g. a resource-column position that coincides with an MDS-placed DistancesModel station, which made the resource impossible to find (item 5). Stations keep their positions (they anchor agent/transporter rendering); colliding resources and queues are nudged out along a golden-angle spiral until clear.
Writes this layout to path (typically a .lay.json file), UTF-8, pretty-printed.
Writes this layout to path (typically a .lay.toml file) as TOML.