Lemonergy · Studio block

Multiport switch

Routes one whole data port selected by a zero-based integer. Out-of-range indices stop the run.

Implementation ID
native-multiport-switch
Reviewed
2026-10-27

Behavior

y = data[index], where index is a zero-based signed integer.

Interface

Multiport switch interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.Multiport switchStudio blockin0in1in2out0
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
in0input1Index; i32 scalar.
in1input1First signal; real 3 array.
in2input1Second signal; real 3 array.
out0output1Selected signal; real 3 array.

Parameters

No configurable parameters for this component.

Equations and rules

  • y = data[index], where index is a zero-based signed integer

Worked example

Multiport switch — worked example

Index = 1; First signal = [1,2,3]; Second signal = [4,5,6]. Selected signal at 0 s = [4,5,6].

Open Studio example after release →
Numerical checks for the bundled synthetic example
OutputTime (s)Expected valueUnitAbsolute tolerance
Selected signal
out0
0[4, 5, 6]11e-09

Explore the recorded outputs

Multiport switch recorded example

Multiport switch [1]
Multiport switch [1] against timeRecorded synthetic simulation values. Time in seconds; output in —.3.503.750.2540.54.250.754.51—Time (s)
Multiport switch [1]: 4 — at 0 s

2 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

Multiport switch — worked example

Routes one whole data port selected by a zero-based integer. Out-of-range indices stop the run.

  1. Multiport switch: y = data[index], where index is a zero-based signed integer.
    • Use the block reference for settings and connections.
    • Implementation tested locally; public release pending.
Open Studio example after release

Connected concepts

Limits and interpretation

  • All data inputs must have exactly the output shape, quantity and element type; an invalid index stops execution.

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)