Fix chart interpolation for rows mixing real sensors with flex-config constants - #2356
Open
sankalpsthakur wants to merge 3 commits into
Open
Conversation
sankalpsthakur
force-pushed
the
fix/2253-constant-sensor-interpolation
branch
from
July 25, 2026 09:54
9aa7117 to
0a72506
Compare
Documentation build overview
140 files changed ·
|
sankalpsthakur
force-pushed
the
fix/2253-constant-sensor-interpolation
branch
2 times, most recently
from
July 30, 2026 09:02
eb7bdbd to
0ae1fec
Compare
Contributor
|
@sankalpsthakur could you share some screenshots after the fixes? |
Contributor
Author
sankalpsthakur
force-pushed
the
fix/2253-constant-sensor-interpolation
branch
from
September 3, 2026 21:00
0ed6666 to
5b858b0
Compare
…rs with flex-config constants Signed-off-by: Sankalp Thakur <sankalphimself@gmail.com>
Signed-off-by: Sankalp Thakur <sankalphimself@gmail.com>
sankalpsthakur
force-pushed
the
fix/2253-constant-sensor-interpolation
branch
from
September 5, 2026 14:51
5b858b0 to
fddcae1
Compare
Signed-off-by: Sankalp Thakur <sankalphimself@gmail.com>
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.


Description
create_line_layerinflexmeasures/data/models/charts/belief_charts.pyso that a chart row's interpolation mode (linearvsstep-after) is decided only by the real sensors in that row, not by fixed-value/constant sensors sourced from flex-model / flex-context (e.g.soc-min,soc-max, capacities). Fixed-value sensors always reportevent_resolution == timedelta(0)by construction (they're synthetic, not backed by timed data), so a row mixing a real, non-instantaneous sensor with any such constant was incorrectly forced tolinearinterpolation instead of the correctstep-after.documentation/changelog.rstLook & Feel
Before/after illustrations were supplied using representative values and the generated interpolation setting. They are illustrative renders, not screenshots of a seeded deployment.
How to test
Run the two new tests in
flexmeasures/data/tests/test_belief_charts.py:test_mixed_row_with_fixed_value_sensor_keeps_step_afteris the regression case: a real 15-min-resolution sensor sharing a row with asoc-minfixed-value constant must producestep-after. Fails onmain(assertslinear == step-after→AssertionError), passes with this fix.test_real_instantaneous_sensor_still_uses_linearis a guard case proving a real instantaneous sensor alone still correctly getslinear.Full chart-module check:
pytest flexmeasures/data/tests/test_belief_charts.py -q(33 passed locally on the current merge). The wider local suite stopped after 130 passes when disk space ran out; a complete local suite pass is unverified.Further Improvements
No further changes proposed here.
Related Items
Fixes #2253
AI/LLM disclosure
Sign-off