Lemonergy · Studio block

Same-type constraint

Requires two independent signals to have the same numeric type; forwards the first.

Implementation ID
type-duplicate
Reviewed
2026-10-27

Behavior

Checks the numeric type of two independent signals and forwards the first without changing its value.

Interface

Same-type constraint interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.Same-type constraintStudio blockin0in1out0
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
in0input1Input 1; i32 signal.
in1input1Input 2; i32 signal.
out0output1Output 1; i32 signal.

Parameters

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

Configuration fields
ParameterUnitDefaultMeaning and limits
first quantity
first.quantity
1dimensionlessExplicit first quantity in the worked model.
first shape
first.shape
1[]Explicit first shape in the worked model.
first element Type
first.elementType
1realExplicit first elementType in the worked model.
second quantity
second.quantity
1dimensionlessExplicit second quantity in the worked model.
second shape
second.shape
1[]Explicit second shape in the worked model.
second element Type
second.elementType
1realExplicit second elementType in the worked model.

Equations and rules

  • type(first) = type(second); y = first

Worked example

Same-type constraint — executable model

Two signed32 inputs10 and20 pass; the output is10. Changing the second input to real-valued storage is rejected.

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

Use in a workflow

Same-type constraint — executable model

Requires two independent signals to have the same numeric type; forwards the first.

  1. Same-type constraint: Checks the numeric type of two independent signals and forwards the first without changing its value.
    • Use the block reference for settings and connections.
    • Implementation tested locally; public release pending.
Open Studio example after release

Connected concepts

Limits and interpretation

  • Type equality includes enumeration identity and scaled-integer metadata. Different quantities or dimensions may still be independent inputs; this is a numeric-type constraint.

Reference basis

This compiler and software type contract is defined by the documented behavior and executable example; no external research result or full external API parity 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)