{
  "node": {
    "id": "block:subsystem",
    "type": "Block",
    "label": "Reusable submodel",
    "properties": {
      "kind": "studio",
      "example": {
        "title": "Typed input and output of a reusable submodel",
        "text": "The example selects the doubling submodel. The parent supplies a constant 3 through the named input u. Inside the child, gain 2 produces 6 and the named output y returns it to the parent. The parent Result signal is 6 at 0.2 seconds. Selecting the alternate tripling definition for another run produces 9.",
        "url": "https://design.lemonergy.com/cosim.html?example=routing-variant-subsystem",
        "label": "Open Studio example",
        "inputs": [
          {
            "port": "Input",
            "label": "Parent input",
            "value": 3,
            "unit": "1"
          }
        ],
        "checks": [
          {
            "port": "Result",
            "label": "Parent result after the child output boundary",
            "atS": 0.2,
            "value": 6,
            "unit": "1",
            "tolerance": 1e-09
          }
        ]
      },
      "references": [],
      "referenceNote": "Model hierarchy, named interfaces and instance isolation are software contracts verified by the executable example. No external research result or external API parity is claimed.",
      "id": "subsystem",
      "name": "Reusable submodel",
      "summary": "Groups a model behind named typed inputs and outputs so it can be used as an independent instance inside another model.",
      "behavior": "An instance names a versioned internal definition. Compilation resolves its public ports, applies validated parameter overrides and creates separate runtime states for its internal blocks. Only declared outputs may cross the boundary; port names remain stable through export and import.",
      "ports": [
        {
          "name": "u",
          "direction": "input",
          "unit": "1",
          "description": "Parent input connected to the child input boundary.",
          "shape": [],
          "elementType": "real"
        },
        {
          "name": "y",
          "direction": "output",
          "unit": "1",
          "description": "Child result exposed through the named output boundary.",
          "shape": [],
          "elementType": "real"
        }
      ],
      "parameters": [
        {
          "key": "definition",
          "label": "Definition identifier",
          "unit": "1",
          "default": "double",
          "description": "Identifier of the internal reusable model definition."
        },
        {
          "key": "version",
          "label": "Definition version",
          "unit": "1",
          "default": "1",
          "description": "Exact required definition version; a mismatch is rejected."
        },
        {
          "key": "parameters",
          "label": "Instance parameter overrides",
          "unit": "1",
          "default": {},
          "description": "Validated overrides for declared blocks in this instance; other instances retain their own values and states."
        }
      ],
      "equations": [
        "child input u = parent input",
        "example child output y = 2u",
        "parent Result = child output y"
      ],
      "limits": [
        "Internal versioned definitions share the parent simulation and solver. Separately loaded external models with independent solver settings or lifecycle are not supported.",
        "Containment must be acyclic and at most 16 levels deep. Interfaces, node counts and expanded graphs have explicit finite budgets.",
        "The linked example uses a compile-time selector to choose an ordinary typed submodel; the basic submodel itself does not select variants or provide conditional execution."
      ],
      "caseIds": [
        "native-subsystem"
      ],
      "availability": {
        "status": "released",
        "label": "Available in Lemonergy Studio",
        "detail": "The bundled example is available in the production release verified on 28 October 2026. The parameters and examples here are synthetic teaching fixtures, not a characterized cell or a validated operating limit."
      },
      "evidence": [
        "docs/glossary/native-block-verification.json"
      ],
      "sourceRepository": "Lemonergy Studio public contract",
      "sourceRevision": "verification-2026-10-27",
      "type": "subsystem",
      "implementationId": "subsystem",
      "url": "https://lemonergy.com/learn/glossary/blocks/subsystem/",
      "documentationUrl": "https://lemonergy.com/learn/glossary/blocks/subsystem/",
      "sourceFile": "block-library.json",
      "reviewed": "2026-10-27",
      "releaseEvidence": {
        "environment": "production",
        "status": "verified",
        "revision": "e76cadfc203e15eb41f3478d8b1044a5b851953d",
        "verifiedOn": "2026-10-28",
        "exampleUrls": [
          "https://design.lemonergy.com/cosim.html?example=routing-variant-subsystem"
        ]
      }
    }
  },
  "incoming": [
    {
      "id": "edge:usesBlock/native-subsystem/0",
      "type": "usesBlock",
      "source": "workflow:native-subsystem",
      "target": "block:subsystem",
      "properties": {
        "sourceFile": "wiki-blocks.json",
        "position": 0,
        "name": "Reusable submodel",
        "type": "subsystem",
        "role": "An instance names a versioned internal definition. Compilation resolves its public ports, applies validated parameter overrides and creates separate runtime states for its internal blocks. Only declared outputs may cross the boundary; port names remain stable through export and import.",
        "settings": [
          "Use the block reference for settings and connections.",
          "Bundled example verified on the production release of 28 October 2026."
        ]
      }
    }
  ],
  "outgoing": [],
  "neighbors": [
    {
      "id": "workflow:native-subsystem",
      "type": "Workflow",
      "label": "Typed input and output of a reusable submodel",
      "properties": {
        "id": "native-subsystem",
        "title": "Typed input and output of a reusable submodel",
        "kind": "studio",
        "summary": "Groups a model behind named typed inputs and outputs so it can be used as an independent instance inside another model.",
        "steps": [
          "Review the interface, units and model limits.",
          "Open the Studio example and run its bundled model.",
          "Compare outputs with the numerical checks; change one input and run again."
        ],
        "example": "The example selects the doubling submodel. The parent supplies a constant 3 through the named input u. Inside the child, gain 2 produces 6 and the named output y returns it to the parent. The parent Result signal is 6 at 0.2 seconds. Selecting the alternate tripling definition for another run produces 9.",
        "observe": "Inspect the output channels and checks on the block reference page.",
        "limits": "Internal versioned definitions share the parent simulation and solver. Separately loaded external models with independent solver settings or lifecycle are not supported. Containment must be acyclic and at most 16 levels deep. Interfaces, node counts and expanded graphs have explicit finite budgets. The linked example uses a compile-time selector to choose an ordinary typed submodel; the basic submodel itself does not select variants or provide conditional execution.",
        "url": "https://design.lemonergy.com/cosim.html?example=routing-variant-subsystem",
        "label": "Open Studio example",
        "evidence": [
          "docs/glossary/native-block-verification.json"
        ]
      }
    }
  ]
}
