Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
8edbf8a
feat: start test cases for deserializing time series data to BeliefsD…
Flix6x Nov 21, 2025
3b2770f
fix: update type annotation
Flix6x Nov 21, 2025
34a2dc5
feat: handle resampling after converting to a BeliefsDataFrame
Flix6x Nov 21, 2025
8d2d2d3
fix: catch NotImplementedError to fix failing test
Flix6x Nov 21, 2025
86ad774
feat: two more test cases
Flix6x Nov 21, 2025
30fb2ad
fix: update test expectations
Flix6x Nov 21, 2025
7f0caa1
Merge branch 'main' into mohamed/dev/floor-event-start
BelhsanHmida May 1, 2026
6c08284
fix: floor direct POST sensor data starts
BelhsanHmida May 2, 2026
f590e58
fix: floor uploaded sensor data datetimes
BelhsanHmida May 2, 2026
0566ceb
fix: floor flex-model scheduling datetimes
BelhsanHmida May 2, 2026
4afd828
Merge remote-tracking branch 'origin/main' into mohamed/dev/floor-eve…
BelhsanHmida May 5, 2026
a857806
fix: preserve 422 validation for invalid flex-model datetimes
BelhsanHmida May 9, 2026
f30429c
style: apply pre-commit
BelhsanHmida May 9, 2026
3a56e0c
fix: return 422 for invalid flex-model timed-event datetimes
Copilot May 9, 2026
dd2fcc4
test: refine invalid flex-model datetime regression assertion
Copilot May 9, 2026
aa93fe1
test: make flex-model datetime error assertion less brittle
Copilot May 9, 2026
e0f88a8
test: assert error payload shape for invalid flex-model datetime
Copilot May 9, 2026
aaebfaa
refactor: simplify test, incl. by not mixing timezone offsets
Flix6x May 12, 2026
43fe0b5
refactor: rename variable to match variable name in test_trigger_sche…
Flix6x May 12, 2026
9624f09
refactor: use search method over writing custom query
Flix6x May 12, 2026
860c700
feat: test resampling from 5 to 15 minutes
Flix6x May 12, 2026
2228410
docs: document flex-model datetime flooring helper
BelhsanHmida May 15, 2026
0d92e52
test: clarify sensor_index assumptions in upload tests
BelhsanHmida May 15, 2026
b7d3cf0
feat: handle floored downsampling posts
BelhsanHmida May 17, 2026
531d2db
test: cover datetime flooring opt-out
BelhsanHmida May 17, 2026
067bd92
fix: reject flooring event collisions
BelhsanHmida May 17, 2026
fa31e0e
docs: document datetime flooring attribute
BelhsanHmida May 17, 2026
cd4cfd2
docs: add changelog entry
BelhsanHmida May 17, 2026
d4e56bc
Merge branch 'main' into mohamed/dev/floor-event-start
BelhsanHmida May 17, 2026
c66b334
Merge remote-tracking branch 'origin/main' into mohamed/dev/floor-eve…
BelhsanHmida May 21, 2026
d4ee945
docs: align sensor data resampling docs
BelhsanHmida May 21, 2026
61583e3
fix: preserve submitted flex-model in schedule jobs
BelhsanHmida May 22, 2026
2eceadf
feat: keep storage soc event times in schema
BelhsanHmida May 22, 2026
1d37e4f
feat: project off-tick soc constraints to grid
BelhsanHmida May 22, 2026
a7b01a6
test: cover off-tick soc target projection
BelhsanHmida May 22, 2026
7dea2a7
fix: relax off-tick soc constraints by default
BelhsanHmida May 22, 2026
e7b9ee1
test: cover off-tick soc relaxation
BelhsanHmida May 22, 2026
03cf1e2
fix: preserve non-event soc constraints
BelhsanHmida May 22, 2026
9e26e03
fix: normalize off-tick soc on schedule grid
BelhsanHmida May 22, 2026
9e4e709
test: cover off-tick soc bounds
BelhsanHmida May 22, 2026
32a3d2b
test: tolerate upload conversion precision
BelhsanHmida May 22, 2026
10fc632
test: compare quantities by value
BelhsanHmida May 22, 2026
56ad4eb
test: avoid exact quantity string comparison
BelhsanHmida May 22, 2026
9268de8
fix: skip flooring for instantaneous sensors
BelhsanHmida May 26, 2026
7c0c9b4
test: fetch upload sensors by name
BelhsanHmida May 26, 2026
baf5543
Update flexmeasures/api/v3_0/tests/test_sensor_data.py
BelhsanHmida May 26, 2026
8b2bb7e
Update flexmeasures/api/v3_0/tests/test_sensor_data.py
BelhsanHmida May 27, 2026
6fd5cec
Merge remote-tracking branch 'origin/mohamed/dev/floor-event-start' i…
BelhsanHmida May 28, 2026
f1a852e
Merge remote-tracking branch 'origin/main' into feat/offtick-soc-norm…
BelhsanHmida Jun 4, 2026
26a8e22
docs: update changelog for soc projection
BelhsanHmida Jun 5, 2026
95e5922
docs: clarify soc projection terminology
BelhsanHmida Jun 5, 2026
8b07cfa
refactor: rename soc normalization to projection
BelhsanHmida Jun 5, 2026
6568284
test: explain soc projection assertions
BelhsanHmida Jun 5, 2026
2a3309b
Update flexmeasures/data/models/planning/storage.py
BelhsanHmida Jun 5, 2026
0ab3ccd
docs: explain soc constraint projection policy
BelhsanHmida Jun 5, 2026
26c85a6
fix: support missing soc bounds in projection
BelhsanHmida Jun 5, 2026
dc2bf9a
refactor: move off-tick soc detection to scheduling schema
BelhsanHmida Jun 5, 2026
b3b2d2b
refactor: make soc projection policy explicit
BelhsanHmida Jun 5, 2026
5752aa5
Merge branch 'main' into feat/offtick-soc-normalization
BelhsanHmida Jul 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion documentation/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ v1.0.0 | July XX, 2026

New features
-------------
* Floor off-clock API datetimes to a non-instantaneous sensor's resolution by default when ingesting sensor data, uploading sensor data, and handling scheduler flex-model timed events; configurable with the ``floor_datetimes_to_resolution`` sensor attribute [see `PR #2146 <https://www.github.com/FlexMeasures/flexmeasures/pull/2146>`_ and `PR #2194 <https://www.github.com/FlexMeasures/flexmeasures/pull/2194>`_]
* In the UI, asset and sensor lists can be filtered by ID prefix through API-backed search fields [see `PR #2231 <https://www.github.com/FlexMeasures/flexmeasures/pull/2231>`_]
* Floor off-clock API datetimes to a non-instantaneous sensor's resolution by default when ingesting sensor data, uploading sensor data, and handling scheduler flex-model timed events; configurable with the ``floor_datetimes_to_resolution`` sensor attribute [see `PR #2146 <https://www.github.com/FlexMeasures/flexmeasures/pull/2146>`_]
* Sensor references in flex-model and flex-context support various ways of filtering by source [see `PR #2209 <https://www.github.com/FlexMeasures/flexmeasures/pull/2209>`_]
* Let storage scheduling infer missing ``power-capacity`` from directional device capacities before falling back to site capacity, and default the missing opposite capacity to zero when only a non-zero ``consumption-capacity`` or ``production-capacity`` is configured [see `PR #2222 <https://www.github.com/FlexMeasures/flexmeasures/pull/2222>`_]
* CLI support for adding/editing account attributes [see `PR #2242 <https://www.github.com/FlexMeasures/flexmeasures/pull/2242>`_]
Expand Down
20 changes: 20 additions & 0 deletions documentation/concepts/data-model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,26 @@ Each belief links to a sensor and a data source. Here are two examples:
See also :ref:`one_or_multiple_sensors` for guidance on when such beliefs are best recorded on one shared sensor and when separate sensors are preferable.


.. _projecting_scheduling_constraints:

Projecting scheduling constraints to a fixed resolution
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Schedulers operate on a fixed scheduling resolution, such as 15 minutes.
This means the optimization problem can enforce state-of-charge constraints only on the scheduling ticks implied by that resolution.
When a storage flex-model contains point-like ``soc-targets``, ``soc-minima`` or ``soc-maxima`` between two scheduling ticks, FlexMeasures projects those constraints onto the surrounding ticks instead of simply flooring them.

For an off-tick ``soc-target``, the target value is moved to the next scheduling tick as an exact target.
The previous tick receives lower and upper bounds that reflect how much the asset could still charge or discharge between the previous tick and the original target time.
For off-tick ``soc-minima``, both surrounding ticks receive lower bounds that preserve whether the requested minimum can still be reached.
For off-tick ``soc-maxima``, both surrounding ticks receive upper bounds with the same reachability logic.

The projection uses the ``consumption-capacity`` and ``production-capacity`` active at the relevant ticks.
If multiple projected lower bounds land on the same tick, the highest lower bound is kept.
If multiple projected upper bounds land on the same tick, the lowest upper bound is kept.
Because projection can introduce additional bounds and more complex combinations can become infeasible, FlexMeasures enables ``relax-soc-constraints`` automatically when off-tick SoC constraints are submitted.


.. _signs_of_power_beliefs:

About signs of power & energy values
Expand Down
2 changes: 2 additions & 0 deletions documentation/features/scheduling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ For more details on the possible formats for field values, see :ref:`variable_qu

.. [#minimum_overlap] In case this field defines partially overlapping time periods, the minimum value is selected. See :ref:`variable_quantities`.

.. [#projecting_scheduling_constraints] Off-tick ``soc-targets``, ``soc-minima`` and ``soc-maxima`` are projected to the surrounding scheduling ticks. See :ref:`projecting_scheduling_constraints`.

For more details on the possible formats for field values, see :ref:`variable_quantities`.

Usually, not the whole flexibility model is needed.
Expand Down
2 changes: 1 addition & 1 deletion flexmeasures/api/v3_0/tests/test_sensors_api_freshdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def test_upload_sensor_data_with_unit_conversion_success(
len(beliefs) == expected_num_beliefs
), f"Fetched {len(beliefs)} beliefs from the database, expecting {expected_num_beliefs}."

assert [b.event_value for b in beliefs] == expected_event_values
assert [b.event_value for b in beliefs] == pytest.approx(expected_event_values)


@pytest.mark.parametrize(
Expand Down
Loading
Loading