Usability improvements for power bonds and ECCO - #805
Open
restenb wants to merge 13 commits into
Open
Conversation
…of the bond into the algorithm
davidhjp01
reviewed
Aug 18, 2026
davidhjp01
reviewed
Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I wanted to improve the usability of the current implementation a bit, as it had some notable warts. This PR therefore makes the following changes:
causalityattribute from the<Variable>element in the XML. This was always unnecessary as the causality can be read directly from the model description which has already been parsed.ecco_algorithmare addressable by the configured name of the bond to avoid having to deal with opaque indices.power_bond_infoandpower_bond_statefor collecting the information (the configured bond name and it's associatedvariable_ids), and the runtime state associated with each power bond. There is also more state now added to these structs, in particular accumulated energy residual pr. bond, and the per-bond error contribution to the error estimate used to adjust the time steps. This provides necessary visibility into which bond(s) are contributing the most to the overall error. More state from the algorithm can easily be exposed via the same mechanism.ecco_observerinstead for observing power bonds and their states, and associated test. The observer also supports a ring buffer with configurable size (like thetime_series_observer), and simple energy statistics (max/min/mean/RMS), useful for tracking how well the algorithm performs over an entire run.Note: As there are some minor breaking changes with new tests added in #803, I suggest merging that first and I will update the tests.