Lemonergy · Studio block

Storage declaration

Declares local typed storage with an initial snapshot and sample period.

Implementation ID
data-store-memory
Reviewed
2026-10-27

Behavior

Each model instance owns independent storage. Readers see the old snapshot during a sample; an enabled writer prepares the next one.

Interface

Storage declaration interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.Storage declarationStudio block
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.

This reference describes a studio block; its configuration fields are listed below. It has no connected Studio ports.

Parameters

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

Configuration fields
ParameterUnitDefaultMeaning and limits
Local storage name
store
1counterExplicit store used by this worked model.
Physical quantity
quantity
1dimensionlessExplicit quantity used by this worked model.
Signal dimensions
shape
1[]Explicit shape used by this worked model.
Element type
elementType
1realExplicit elementType used by this worked model.
Initial snapshot
initial
1[0]Explicit initial used by this worked model.
Sample period
sampleTimeS
s0.1Explicit sampleTimeS used by this worked model.

Equations and rules

  • snapshot[0] = initial
  • snapshot[k+1] = write[k] if enabled; snapshot[k] otherwise

Worked example

Read and update local sampled storage

Increment = 1. Stored-value at 0.2 s = 2.

Open Studio example after release →
Numerical checks for the bundled synthetic example
OutputTime (s)Expected valueUnitAbsolute tolerance
Stored-value
Stored-value
0.2211e-09

Use in a workflow

Read and update local sampled storage

Declares local typed storage with an initial snapshot and sample period.

  1. Storage declaration: Each model instance owns independent storage. Readers see the old snapshot during a sample; an enabled writer prepares the next one.
    • Use the block reference for settings and connections.
    • Implementation tested locally; public release pending.
Open Studio example after release

Connected concepts

Limits and interpretation

  • Exactly one local declaration and at most one writer per storage name. No global cross-model storage or same-sample write visibility.

Reference basis

This software operation is defined by its public contract and worked example; no external research result is claimed.

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)