Lemonergy · Studio block
Enabled kernel
Runs one discrete or stateless child only while enabled; disabled samples retain child memory and held output.
- Implementation ID
native-enabled-submodel- Reviewed
- 2026-10-27
Behavior
Runs one discrete or stateless child only while enabled; disabled samples retain child memory and held output. Outputs are held between accepted samples; numerical evaluation does not commit hidden state.
Interface
| Name | Direction | Unit | Meaning |
|---|---|---|---|
in0 | input | — | Value; real scalar. |
in1 | input | — | Enabled; bool scalar. |
out0 | output | — | Integral; real scalar. |
out1 | output | — | Invocations this sample; u32 scalar. |
Parameters
Defaults are initial model values. Select values for your own model and operating conditions.
| Parameter | Unit | Default | Meaning and limits |
|---|---|---|---|
Sample periodsampleTimeS | s | 1 | Positive interval between accepted control samples. Outputs hold between these instants. Minimum 0 |
Reset on enableparams[0] | — | 0 | 0 retain state; 1 reset child memory on a false-to-true enable transition. |
Disabled outputparams[1] | — | 0 | 0 hold last output; 1 publish the configured initial output while retaining child state. |
Child operationnested | — | Discrete integrator | One configurable native computation operation. Its declared input/output types must match the wrapper. |
Initial held outputstables[0] | — | [0] | Initial values for all child output lanes, in output order. For independent elements, supply one value per element. |
Equations and rules
enabled: (state, output) ← child(state, input); disabled: retain stateOptional enable-edge reset restores the child initial state before execution
Worked example
Enabled kernel worked example
Default editable example at the first accepted sample (t = 0 s). Child operation: discrete integrator. The output checks below are execution oracles for this example.
Open Studio example after release →| Output | Time (s) | Expected value | Unit | Absolute tolerance |
|---|---|---|---|---|
Integralout0 | 0 | 1 | — | 1e-08 |
Invocations this sampleout1 | 0 | 1 | — | 1e-08 |
Explore the recorded outputs
Enabled kernel recorded example
Enabled kernel / Integral3 actual recorded samples. Lines are visual guides between samples. Synthetic example, not measured cell data.
Read the selected signal as a table
| Time (s) | Value |
|---|
Download the recorded samples (JSON) · Open this Studio example after release
Use in a workflow
Enabled kernel worked example
Runs one discrete or stateless child only while enabled; disabled samples retain child memory and held output.
- Enabled kernel: Runs one discrete or stateless child only while enabled; disabled samples retain child memory and held output. Outputs are held between accepted samples; numerical evaluation does not commit hidden state.
- Use the block reference for settings and connections.
- Implementation tested locally; public release pending.
Connected concepts
Limits and interpretation
- Control executes on an explicit sampled clock. Continuous states, history/delay kernels, residual equations, and event-source children are not supported.
- The wrapper contains one original computation operation; arbitrary multi-block submodels are not supported.
- A sampled child advances once per invocation using its own declared period. Repeated calls share the same outer timestamp and do not advance physical time.
- Reset-on-enable is optional; publishing the initial output while disabled does not itself reset child state.
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.
- Statecharts: A visual formalism for complex systems
David Harel · Science of Computer Programming, 8(3), 231–274 · 1987
Technical reference · Background on explicit states and events. Lemonergy bounded control blocks are not a complete Statecharts 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)