Lemonergy · Studio block
Bus assignment
Replaces selected bus fields while preserving every other field.
- Implementation ID
bus-assign- Reviewed
- 2026-10-27
Behavior
Replacement ports inherit the exact declared field types. The original bus value remains unchanged for other consumers.
Interface
| Name | Direction | Unit | Meaning |
|---|---|---|---|
bus | input | 1 | pack; named bus with declared typed fields. |
state.soc | input | fraction | Replace state.soc; real signal. |
bus | output | 1 | pack; named bus with declared typed fields. |
Parameters
Defaults are initial model values. Select values for your own model and operating conditions.
| Parameter | Unit | Default | Meaning and limits |
|---|---|---|---|
Bus declarationbus | 1 | pack | Explicit bus used by this worked model. |
Replacement field pathsfields | 1 | ["state.soc"] | Explicit fields used by this worked model. |
Equations and rules
updated[field] = replacement for selected fields; original[field] otherwise
Worked example
Update nested battery telemetry
Initial-SOC = 0.5; Updated-SOC = 0.6; Cell-voltage = 3.7. Before at 1 s = 0.5; After at 1 s = 0.6.
Open Studio example after release →| Output | Time (s) | Expected value | Unit | Absolute tolerance |
|---|---|---|---|---|
BeforeBefore | 1 | 0.5 | fraction | 1e-09 |
AfterAfter | 1 | 0.6 | fraction | 1e-09 |
Use in a workflow
Update nested battery telemetry
Replaces selected bus fields while preserving every other field.
- Bus assignment: Replacement ports inherit the exact declared field types. The original bus value remains unchanged for other consumers.
- Use the block reference for settings and connections.
- Implementation tested locally; public release pending.
Connected concepts
Limits and interpretation
- A field and one of its descendants cannot be replaced in the same assignment; replacement paths must be distinct.
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)