{
  "node": {
    "id": "block:native-uniform-random",
    "type": "Block",
    "label": "Uniform random source",
    "properties": {
      "id": "native-uniform-random",
      "name": "Uniform random source",
      "kind": "studio",
      "summary": "Produces reproducible uniform samples from a nonzero 32-bit seed and holds each sample until the next instant.",
      "behavior": "x ^= x << 13; x ^= x >> 17; x ^= x << 5, using a 32-bit word. r = (x + 1)/(2³² + 1); y = lower + r(upper − lower).",
      "ports": [
        {
          "name": "out0",
          "direction": "output",
          "unit": "1",
          "description": "Signal; real scalar.",
          "shape": [],
          "elementType": "real"
        }
      ],
      "parameters": [
        {
          "key": "sampleTimeS",
          "label": "Sample period",
          "unit": "s",
          "default": 0.1,
          "min": 0,
          "description": "Positive interval between sample instants. Values are held between samples."
        },
        {
          "key": "params[0]",
          "label": "Seed (1–4294967295)",
          "unit": "1",
          "default": 1,
          "description": "Configured value for Seed (1–4294967295)."
        },
        {
          "key": "params[1]",
          "label": "Minimum",
          "unit": "1",
          "default": 0,
          "description": "Configured value for Minimum."
        },
        {
          "key": "params[2]",
          "label": "Maximum",
          "unit": "1",
          "default": 1,
          "description": "Configured value for Maximum."
        }
      ],
      "equations": [
        "x ^= x << 13; x ^= x >> 17; x ^= x << 5, using a 32-bit word",
        "r = (x + 1)/(2³² + 1); y = lower + r(upper − lower)"
      ],
      "example": {
        "title": "Uniform random source — worked example",
        "text": "Use the configured source parameters. Signal at 0 s = 0.00006295042111003994.",
        "url": "https://design.lemonergy.com/cosim.html?example=block-native-uniform-random",
        "label": "Open Studio example",
        "inputs": [],
        "checks": [
          {
            "port": "out0",
            "label": "Signal",
            "atS": 0,
            "value": 6.295042111003994e-05,
            "unit": "1",
            "tolerance": 1e-12
          }
        ]
      },
      "limits": [
        "Deterministic simulation noise, not a cryptographic generator. Samples lie strictly between configured bounds; seed zero is invalid."
      ],
      "references": [
        "marsaglia-xorshift-2003"
      ],
      "caseIds": [
        "native-native-uniform-random"
      ],
      "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-uniform-random",
          "url": "https://lemonergy.com/learn/glossary/api/traces/native-uniform-random.json?v=5df313c5ed07",
          "title": "Uniform random source recorded example",
          "exampleId": "block-native-uniform-random",
          "source": "Executed synthetic Lemonergy Studio example",
          "recordedOn": "2026-10-28",
          "points": 11,
          "channels": 1,
          "omittedChannels": 0,
          "interpolation": "step",
          "solver": {
            "method": "dormand-prince-45",
            "reason": "no-continuous-states"
          }
        }
      ],
      "type": "native-uniform-random",
      "implementationId": "native-uniform-random",
      "url": "https://lemonergy.com/learn/glossary/blocks/native-uniform-random/",
      "documentationUrl": "https://lemonergy.com/learn/glossary/blocks/native-uniform-random/",
      "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-uniform-random"
        ]
      }
    }
  },
  "incoming": [
    {
      "id": "edge:usesBlock/native-native-uniform-random/0",
      "type": "usesBlock",
      "source": "workflow:native-native-uniform-random",
      "target": "block:native-uniform-random",
      "properties": {
        "sourceFile": "wiki-blocks.json",
        "position": 0,
        "name": "Uniform random source",
        "type": "native-uniform-random",
        "role": "x ^= x << 13; x ^= x >> 17; x ^= x << 5, using a 32-bit word. r = (x + 1)/(2³² + 1); y = lower + r(upper − lower).",
        "settings": [
          "Use the block reference for settings and connections.",
          "Bundled example verified on the production release of 28 October 2026."
        ]
      }
    }
  ],
  "outgoing": [
    {
      "id": "edge:cites/block:native-uniform-random/reference:marsaglia-xorshift-2003",
      "type": "cites",
      "source": "block:native-uniform-random",
      "target": "reference:marsaglia-xorshift-2003",
      "properties": {
        "sourceFile": "block-library.json",
        "scope": "Scientific or mathematical background; implementation scope is stated by the block contract"
      }
    }
  ],
  "neighbors": [
    {
      "id": "workflow:native-native-uniform-random",
      "type": "Workflow",
      "label": "Uniform random source — worked example",
      "properties": {
        "id": "native-native-uniform-random",
        "title": "Uniform random source — worked example",
        "kind": "studio",
        "summary": "Produces reproducible uniform samples from a nonzero 32-bit seed and holds each sample until the next instant.",
        "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": "Use the configured source parameters. Signal at 0 s = 0.00006295042111003994.",
        "observe": "Inspect the output channels and checks on the block reference page.",
        "limits": "Deterministic simulation noise, not a cryptographic generator. Samples lie strictly between configured bounds; seed zero is invalid.",
        "url": "https://design.lemonergy.com/cosim.html?example=block-native-uniform-random",
        "label": "Open Studio example",
        "evidence": [
          "docs/glossary/native-block-verification.json"
        ]
      }
    },
    {
      "id": "reference:marsaglia-xorshift-2003",
      "type": "Reference",
      "label": "Xorshift RNGs",
      "properties": {
        "title": "Xorshift RNGs",
        "authors": [
          "George Marsaglia"
        ],
        "year": 2003,
        "publisher": "Journal of Statistical Software, 8(14)",
        "url": "https://www.jstatsoft.org/article/view/v008i14",
        "type": "Research article",
        "scope": "Xorshift random number generation; the exact 32-bit shifts and uniform scaling used here are specified by the Lemonergy contract.",
        "accessed": "2026-10-27"
      }
    }
  ]
}
