test: multi-session same-sensor schedules accumulate (sum)#2344
Open
sankalpsthakur wants to merge 3 commits into
Open
test: multi-session same-sensor schedules accumulate (sum)#2344sankalpsthakur wants to merge 3 commits into
sankalpsthakur wants to merge 3 commits into
Conversation
Documentation build overview
|
sankalpsthakur
force-pushed
the
test-1947-multi-session-same-sensor
branch
2 times, most recently
from
July 22, 2026 18:24
81ae216 to
b7b2d6d
Compare
Regression for FlexMeasures#1947 after core fix FlexMeasures#1948: two flex-model sessions sharing one power sensor must return a summed schedule, not overwrite. Signed-off-by: Sankalp Thakur <sankalphimself@gmail.com>
Strengthen the non-overlap regression with per-half assertions and add a companion case where capacity is pre-split across concurrent sessions on one power sensor (sum, not overwrite). Signed-off-by: Sankalp Thakur <sankalphimself@gmail.com>
Signed-off-by: Sankalp Thakur <sankalphimself@gmail.com>
sankalpsthakur
force-pushed
the
test-1947-multi-session-same-sensor
branch
from
July 22, 2026 19:03
d446240 to
6632b8a
Compare
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
StorageSchedulerto correctly combine multiple sessions targeting the same sensor #1948StorageSchedulerto correctly combine multiple sessions targeting the same sensor #1948 already changelogged the behaviour)Fixes #1947
Completes the regression-test slice discussed after #1948. Documentation example deferred pending product discussion (nhoening).
Core fix was #1948 (
storage_schedule[sensor] += ...). This PR only locks that in with focused tests maintainers asked for (high value / low effort).Impact
Severity: silent schedule loss — with multiple flex-model entries on one power sensor (common for EV sessions on a single charge point), only the last session's schedule was kept. Earlier sessions were overwritten with no error.
Before #1948: two non-overlapping 2 kWh sessions on one sensor → ~2 kWh delivered (first half zeros). After: ~4 kWh (both halves active).
Look & Feel
N/A (test-only).
Non-overlapping
[1, 1, 1, 1]kW, total energy 4 kWhStorageSchedulerto correctly combine multiple sessions targeting the same sensor #1948): would keep only the last session (~2 kWh, zeros in the first half)Overlapping (capacity pre-split)
Both sessions active all 4 hours at 0.5 kW each (pre-allocation per Flix6x on #1947):
[1, 1, 1, 1]kW (~4 kWh)How to test
Further Improvements
Related Items
StorageSchedulerto correctly combine multiple sessions targeting the same sensor #1948)StorageSchedulerto correctly combine multiple sessions targeting the same sensor #1948Sign-off