test: multi-session same-sensor schedules accumulate (sum) - #2344
Conversation
Documentation build overview
102 files changed ·
|
d446240 to
6632b8a
Compare
6632b8a to
c59ede3
Compare
|
switching the asset to a charge point makes sense — there's no charge point fixture in the planning conftest yet ( on the overlapping test: the point of this pr is that two sessions on one sensor sum instead of overwrite (#1947). if that case moves to different power sensors it stops covering that. do you want the overlapping test dropped as unrealistic, or rewritten as a charge point with two connectors on separate sensors? happy either way, just don't want to guess. |
|
Thanks for pointing to the issue. The overlapping sessions example is wrong there. We should have separate power sensors. |
|
The main goal of that issue is to fix the non-overlapping sessions on the same power sensor. I have corrected the test case, maybe that helps you. |
|
the two-connector test exercises the charge point's site-capacity sharing, not the same-sensor accumulation from #1947/#1948 (that's still covered by the non-overlap test, but never with both sessions non-zero on the same tick). want a same-sensor overlap case added alongside it, or is the non-overlap coverage enough? |
813ce6e to
ff465b9
Compare
|
Thanks @Ahmad-Wahid, fixed the three points. Switched to a charge point with two connectors (ff465b9), separate sensors for the overlap case, and rebased on main on 2026-08-01 with checks green. Kept single-sensor non-overlap as the #1947 regression. Overlap stays two-connector as in the updated issue. Let me know if you want same-sensor overlap added too. Fixes #1947 |
874af55 to
eec4b44
Compare
|
rebased onto current main with signoff, merge conflicts cleared. multi-session tests still pass locally. |
|
@Ahmad-Wahid ready when you are (you mentioned Monday). eec4b44 has the earlier feedback:
CI green on head. |
I will review it on Monday. |
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>
Per review: an EVSE session's generic asset should be a charge point, not a building, and two sessions cannot physically overlap on the same connector's power sensor. Add a charge_point fixture and rewrite the overlapping-sessions test to use two connectors (separate power sensors) on one charge point, sharing its site-power-capacity - which is what actually makes overlap physically meaningful. The non-overlapping test keeps the single shared sensor, since that's the actual FlexMeasures#1947 regression, just moved onto the charge_point asset. Signed-off-by: Sankalp Thakur <sankalphimself@gmail.com>
Review asked for different power sensors on a charge point, with each connector's power-capacity decreased during the shared hours. Drop the site-cap pin and pre-allocate those windows in the flex-models instead. Signed-off-by: Sankalp Thakur <sankalphimself@gmail.com>
eec4b44 to
3d525f4
Compare
|
rewrote the overlap case so each connector's power-capacity is pre-split during the shared hours (the decrease you described), instead of pinning both with site-power-capacity. same-sensor non-overlap is unchanged. 3d525f4 |
Signed-off-by: Sankalp Thakur <sankalphimself@gmail.com>
|
cut the cross-reference lines in both docstrings, kept the rest. de73133. |
Description
Regression tests for multi flex-model sessions after #1948:
Test-only. DCO signed.
Validation
uv run pytest flexmeasures/data/models/planning/tests/test_storage.py -k multiple_sessions(2 passed)AI/LLM disclosure