Lemonergy · Studio block

Scoped parameter writer

Writes a stored parameter of one declared child at accepted samples, then executes that child with the updated parameter.

Implementation ID
native-parameter-writer
Reviewed
2026-10-27

Behavior

Writes a stored parameter of one declared child at accepted samples, then executes that child with the updated parameter. Trial evaluations read the held output without mutating state.

Interface

Scoped parameter writer interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.Scoped parameter writerStudio blockin0in1in2out0out1out2
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
in0input—Value; real scalar.
in1input—New parameter value; real scalar.
in2input—Write enabled; bool scalar.
out0output—Scaled; real scalar.
out1output—Applied parameter value; real scalar.
out2output—Write accepted; bool scalar.

Parameters

Defaults are initial model values. Select values for your own model and operating conditions.

Configuration fields
ParameterUnitDefaultMeaning and limits
Sample period
sampleTimeS
s1Positive period between accepted updates; outputs hold between updates.
Initial held output
tables[0]
—[0]Output held before the first accepted update, with one value per output lane.
Declared child operation
nested
—Adjustable gainThe locally owned target operation. Its parameters, initial state, and typed ports are configured explicitly.

Equations and rules

  • On an enabled write: stored parameter ← new value
  • Execute the declared child using the stored parameter; retain that parameter while writes are disabled
  • For a gain child: y = stored gain × input

Worked example

Scoped parameter writer worked example

Input 3 and an enabled gain write of 5 produce output 15. Later samples retain gain 5 when the write flag is false.

Open Studio example after release →
Numerical checks for the bundled synthetic example
OutputTime (s)Expected valueUnitAbsolute tolerance
Scaled
out0
015—1e-08
Applied parameter value
out1
05—1e-08
Write accepted
out2
01—1e-08

Explore the recorded outputs

Scoped parameter writer recorded example

Scoped parameter writer / Scaled
Scoped parameter writer / Scaled against timeRecorded synthetic simulation values. Time in seconds; output in —.14.25014.6250.515115.3751.515.752—Time (s)
Scoped parameter writer / Scaled: 15 — at 0 s

3 actual recorded samples. Lines are visual guides between samples. Synthetic example, not measured cell data.

Download the recorded samples (JSON) · Open this Studio example after release

Use in a workflow

Scoped parameter writer worked example

Writes a stored parameter of one declared child at accepted samples, then executes that child with the updated parameter.

  1. Scoped parameter writer: Writes a stored parameter of one declared child at accepted samples, then executes that child with the updated parameter. Trial evaluations read the held output without mutating state.
    • Use the block reference for settings and connections.
    • Implementation tested locally; public release pending.
Open Studio example after release

Connected concepts

Limits and interpretation

  • One explicitly configured gain, bias, or discrete-integrator gain is writable. There is no arbitrary external-block lookup, global parameter mutation, or structural reconfiguration.
  • Writes occur before the child executes at the accepted sample. Child memory persists across writes. A failed child evaluation commits neither the parameter nor child memory.
  • The write port carries the numeric parameter value; no unit conversion is performed. A discrete child advances once per wrapper invocation using its declared period.

Scientific and mathematical references

These sources explain the scientific and mathematical background. The behavior, interface and limits above define the Lemonergy implementation; a citation does not imply every model option in the source is implemented.

  1. Synchronous Data Flow

    Edward A. Lee, David G. Messerschmitt · Proceedings of the IEEE, 75(9), 1235–1245 · 1987

    Technical reference · Background on actor firing and explicit dataflow. The sampled conditional semantics documented here are Lemonergy design choices, not a claim of a complete SDF implementation.

Implementation sources

This reference follows the public interface and locally verified numerical checks for an upcoming release.

Contract: Lemonergy Studio public contract · Verification record: verification-2026-10-27

  • docs/glossary/native-block-verification.json

This implementation and its workflow uses (JSON) · Knowledge graph (JSON-LD)