{
  "node": {
    "id": "block:native-type-conversion",
    "type": "Block",
    "label": "Numeric type conversion",
    "properties": {
      "id": "native-type-conversion",
      "name": "Numeric type conversion",
      "kind": "studio",
      "summary": "Converts real, Boolean or 32-bit integer elements. Integer conversion truncates toward zero and saturates at the target bounds.",
      "behavior": "integer output = clamp(trunc(input), target minimum, target maximum). Boolean output = (input ≠ 0).",
      "ports": [
        {
          "name": "in0",
          "direction": "input",
          "unit": "1",
          "description": "Input; real 3 array.",
          "shape": [
            3
          ],
          "elementType": "real"
        },
        {
          "name": "out0",
          "direction": "output",
          "unit": "1",
          "description": "Integer output; i32 3 array.",
          "shape": [
            3
          ],
          "elementType": "i32"
        }
      ],
      "parameters": [],
      "equations": [
        "integer output = clamp(trunc(input), target minimum, target maximum)",
        "Boolean output = (input ≠ 0)"
      ],
      "example": {
        "title": "Numeric type conversion — worked example",
        "text": "Input = [2.9,-4.9,6]. Integer output at 0 s = [2,-4,6].",
        "url": "https://design.lemonergy.com/cosim.html?example=block-native-type-conversion",
        "label": "Open Studio example",
        "inputs": [
          {
            "port": "in0",
            "label": "Input",
            "value": [
              2.9,
              -4.9,
              6
            ],
            "unit": "1"
          }
        ],
        "checks": [
          {
            "port": "out0",
            "label": "Integer output",
            "atS": 0,
            "value": [
              2,
              -4,
              6
            ],
            "unit": "1",
            "tolerance": 1e-09
          }
        ]
      },
      "limits": [
        "Real, Boolean, signed32 and unsigned32 types only; complex and fixed-point scaling conversions are not supported."
      ],
      "references": [],
      "referenceNote": "This software operation is defined by its public contract and worked example; no external research result is claimed.",
      "caseIds": [
        "native-native-type-conversion"
      ],
      "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",
      "exampleTraces": [
        {
          "id": "native-type-conversion",
          "url": "https://lemonergy.com/learn/glossary/api/traces/native-type-conversion.json?v=46035bac500c",
          "title": "Numeric type conversion recorded example",
          "exampleId": "block-native-type-conversion",
          "source": "Executed synthetic Lemonergy Studio example",
          "recordedOn": "2026-10-28",
          "points": 2,
          "channels": 3,
          "omittedChannels": 0,
          "interpolation": "linear",
          "solver": {
            "method": "dormand-prince-45",
            "reason": "no-continuous-states"
          }
        }
      ],
      "type": "native-type-conversion",
      "implementationId": "native-type-conversion",
      "url": "https://lemonergy.com/learn/glossary/blocks/native-type-conversion/",
      "documentationUrl": "https://lemonergy.com/learn/glossary/blocks/native-type-conversion/",
      "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=block-native-type-conversion"
        ]
      }
    }
  },
  "incoming": [
    {
      "id": "edge:usesBlock/native-native-type-conversion/0",
      "type": "usesBlock",
      "source": "workflow:native-native-type-conversion",
      "target": "block:native-type-conversion",
      "properties": {
        "sourceFile": "wiki-blocks.json",
        "position": 0,
        "name": "Numeric type conversion",
        "type": "native-type-conversion",
        "role": "integer output = clamp(trunc(input), target minimum, target maximum). Boolean output = (input ≠ 0).",
        "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-native-type-conversion",
      "type": "Workflow",
      "label": "Numeric type conversion — worked example",
      "properties": {
        "id": "native-native-type-conversion",
        "title": "Numeric type conversion — worked example",
        "kind": "studio",
        "summary": "Converts real, Boolean or 32-bit integer elements. Integer conversion truncates toward zero and saturates at the target bounds.",
        "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": "Input = [2.9,-4.9,6]. Integer output at 0 s = [2,-4,6].",
        "observe": "Inspect the output channels and checks on the block reference page.",
        "limits": "Real, Boolean, signed32 and unsigned32 types only; complex and fixed-point scaling conversions are not supported.",
        "url": "https://design.lemonergy.com/cosim.html?example=block-native-type-conversion",
        "label": "Open Studio example",
        "evidence": [
          "docs/glossary/native-block-verification.json"
        ]
      }
    }
  ]
}
