Lemonergy · Studio block

Sampled invocation generator

Emits a bounded call count on enabled sample hits, after an integer sample offset; missed disabled hits are not replayed.

Implementation ID
native-call-generator
Reviewed
2026-10-27

Behavior

Emits a bounded call count on enabled sample hits, after an integer sample offset; missed disabled hits are not replayed. Outputs are held between accepted samples; numerical evaluation does not commit hidden state.

Interface

Sampled invocation generator interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.Sampled invocation generatorStudio blockin0out0out1
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
in0input—Enabled; bool scalar.
out0output—Calls; u32 scalar.
out1output—Total calls; u32 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 interval between accepted control samples. Outputs hold between these instants.
Minimum 0
Calls per enabled hit
params[0]
—10–256.
Initial offset in sample hits
params[1]
—0Nonnegative integer; the sample clock continues while disabled.

Equations and rules

  • calls = enabled && hitIndex ≥ offset ? callsPerHit : 0
  • totalCalls ← totalCalls + calls; hitIndex ← hitIndex + 1

Worked example

Sampled invocation generator worked example

Default editable example at the first accepted sample (t = 0 s). The output checks below are execution oracles for this example.

Open Studio example after release →
Numerical checks for the bundled synthetic example
OutputTime (s)Expected valueUnitAbsolute tolerance
Calls
out0
01—1e-08
Total calls
out1
01—1e-08

Explore the recorded outputs

Sampled invocation generator recorded example

Sampled invocation generator / Calls
Sampled invocation generator / Calls against timeRecorded synthetic simulation values. Time in seconds; output in —.0.500.750.5111.251.51.52—Time (s)
Sampled invocation generator / Calls: 1 — 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

Sampled invocation generator worked example

Emits a bounded call count on enabled sample hits, after an integer sample offset; missed disabled hits are not replayed.

  1. Sampled invocation generator: Emits a bounded call count on enabled sample hits, after an integer sample offset; missed disabled hits are not replayed. 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.
Open Studio example after release

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.
  • Calls are explicit unsigned counts at accepted sample hits, not a global event bus. Disabled hits are not replayed. Total count overflow is rejected.

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)