{
  "node": {
    "id": "block:scaled-constant",
    "type": "Block",
    "label": "Scaled integer constant",
    "properties": {
      "id": "scaled-constant",
      "name": "Scaled integer constant",
      "kind": "studio",
      "summary": "Encodes exact real-world values as integer codes with an explicit slope and bias.",
      "behavior": "Stores exactly representable real-world values as signed32 or unsigned32 integer codes with declared slope and bias.",
      "ports": [
        {
          "name": "out0",
          "direction": "output",
          "unit": "1",
          "description": "Output 1; i32 signal.",
          "shape": [
            2
          ],
          "elementType": "i32"
        }
      ],
      "parameters": [
        {
          "key": "quantity",
          "label": "quantity",
          "unit": "1",
          "default": "dimensionless",
          "description": "Explicit quantity in the worked model."
        },
        {
          "key": "shape",
          "label": "shape",
          "unit": "1",
          "default": [
            2
          ],
          "description": "Explicit shape in the worked model."
        },
        {
          "key": "elementType",
          "label": "element Type",
          "unit": "1",
          "default": "i32",
          "description": "Explicit elementType in the worked model."
        },
        {
          "key": "slope",
          "label": "slope",
          "unit": "1",
          "default": 0.25,
          "description": "Explicit slope in the worked model."
        },
        {
          "key": "bias",
          "label": "bias",
          "unit": "1",
          "default": 0,
          "description": "Explicit bias in the worked model."
        },
        {
          "key": "values",
          "label": "values",
          "unit": "1",
          "default": [
            1.5,
            -0.5
          ],
          "description": "Explicit values in the worked model."
        }
      ],
      "equations": [
        "real-world value = slope × stored code + bias",
        "stored code = (value − bias)/slope"
      ],
      "example": {
        "title": "Scaled integer constant — executable model",
        "text": "Values[1.5,−0.5] with slope0.25 and bias0 have raw codes[6,−2].",
        "url": "https://design.lemonergy.com/cosim.html?example=routing-scaled-constant",
        "label": "Open Studio example",
        "inputs": [],
        "checks": [
          {
            "port": "Result",
            "label": "Result",
            "atS": 0.2,
            "value": 6,
            "unit": "1",
            "tolerance": 1e-09
          },
          {
            "port": "Result/out0/1",
            "label": "Second integer code",
            "atS": 0.2,
            "value": -2,
            "unit": "1",
            "tolerance": 1e-09
          }
        ]
      },
      "limits": [
        "Values must be exactly representable and within storage bounds. This supplies a bounded scaled-integer source, not a general fixed-point arithmetic library."
      ],
      "references": [],
      "referenceNote": "This compiler and software type contract is defined by the documented behavior and executable example; no external research result or full external API parity is claimed.",
      "caseIds": [
        "native-scaled-constant"
      ],
      "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": "scaled-constant",
      "implementationId": "scaled-constant",
      "url": "https://lemonergy.com/learn/glossary/blocks/scaled-constant/",
      "documentationUrl": "https://lemonergy.com/learn/glossary/blocks/scaled-constant/",
      "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-scaled-constant"
        ]
      }
    }
  },
  "incoming": [
    {
      "id": "edge:usesBlock/native-scaled-constant/0",
      "type": "usesBlock",
      "source": "workflow:native-scaled-constant",
      "target": "block:scaled-constant",
      "properties": {
        "sourceFile": "wiki-blocks.json",
        "position": 0,
        "name": "Scaled integer constant",
        "type": "scaled-constant",
        "role": "Stores exactly representable real-world values as signed32 or unsigned32 integer codes with declared slope and bias.",
        "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-scaled-constant",
      "type": "Workflow",
      "label": "Scaled integer constant — executable model",
      "properties": {
        "id": "native-scaled-constant",
        "title": "Scaled integer constant — executable model",
        "kind": "studio",
        "summary": "Encodes exact real-world values as integer codes with an explicit slope and bias.",
        "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": "Values[1.5,−0.5] with slope0.25 and bias0 have raw codes[6,−2].",
        "observe": "Inspect the output channels and checks on the block reference page.",
        "limits": "Values must be exactly representable and within storage bounds. This supplies a bounded scaled-integer source, not a general fixed-point arithmetic library.",
        "url": "https://design.lemonergy.com/cosim.html?example=routing-scaled-constant",
        "label": "Open Studio example",
        "evidence": [
          "docs/glossary/native-block-verification.json"
        ]
      }
    }
  ]
}
