sim_compose
Instantiate a registry component into a model and store the result as a NEW content-addressed model you own (lineage recorded when composing onto an existing id). Omit id to start a model from the component alone; pass attach to fuse a component port onto one of the model's existing places (e.g. attach {"queue": "tickets_queue"} wires a hazard onto the service's queue). Prefix namespaces the created elements (defaults to the component name). Three calls build a working helpdesk: arrivals, then service attached to its queue, then hazard attached to the same queue — the result passes diagnose because the discipline is in the template.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | model to compose onto; omit to start fresh | |
| name | No | model name for the stored result (kept from the base when composing onto an id) | |
| attach | No | JSON object mapping port name -> existing place id | |
| params | No | JSON object overriding param defaults, e.g. {"staff": 3} | |
| prefix | No | instance prefix for created elements (default: component name) | |
| component | Yes | registry component name (see sim_components) |