ModelCatalogBuilder

The engine that assembles a ModelCatalog for a model. It is both the ElementCatalogScope fed to each element's ModelElement.specifyCatalog during roll-up and the CatalogCurationScope fed to each Model.curateCatalog block during model-level curation. Created and driven only by Model; never constructed directly.

Assembly is two-phase (see assemble):

  1. Element roll-up (lenient): the element tree is walked in creation order and each element's specifyCatalog contributes nominations, each tagged with the contributing element's id (provenance). Because model-element names are unique, nominated keys are globally unique, so cross-element collisions cannot occur; should two elements nominate the same item (e.g. a parent and its child both nominate the child's response), the first wins. An invalid element nomination is recorded as a problem and skipped — never thrown — so a buggy reusable element cannot crash a consuming model.

  2. Model curation (strict): each curateCatalog block runs, able to add (overriding an element's nomination of the same key — model metadata wins), remove, or clear. An invalid model-level nomination throws.

Provenance is kept only here; it powers denominateAllFrom / denominateSubtree and never enters the serialized ModelCatalog.

Functions

Link copied to clipboard
open override fun clearElementNominations()

Drop ALL element-declared nominations, leaving only what this block adds.

Link copied to clipboard
open override fun denominateAllFrom(element: ModelElement)

Remove every nomination contributed by element's own specifyCatalog.

Link copied to clipboard
open override fun denominateInput(key: String)

Remove the nominated input with this key, if present.

Link copied to clipboard
open override fun denominateInputs(predicate: (NominatedInput) -> Boolean)

Remove every nominated input matching predicate.

Link copied to clipboard
open override fun denominateOutput(name: String)

Remove the nominated output with this name, if present.

Link copied to clipboard
open override fun denominateOutputs(predicate: (NominatedOutput) -> Boolean)

Remove every nominated output matching predicate.

Link copied to clipboard
open override fun denominateSubtree(element: ModelElement)

Remove every nomination contributed by element or any element beneath it.

Link copied to clipboard
open override fun input(key: String, configure: NominationSpec.() -> Unit)

Nominate a numeric/string/JSON control by its key ("elementName.propertyName").

Link copied to clipboard
open override fun output(name: String, configure: NominationSpec.() -> Unit)

Nominate a response or counter by name.

Link copied to clipboard
open override fun rvParameter(rvName: String, paramName: String, configure: NominationSpec.() -> Unit)

Nominate a random-variable parameter (e.g. rvParameter("ServiceTimeRV", "mean")).