Skip to content

Fix: power capacity does not need to be mandatory#2222

Merged
Flix6x merged 19 commits into
mainfrom
fix/power-capacity-does-not-need-to-be-mandatory
Jun 16, 2026
Merged

Fix: power capacity does not need to be mandatory#2222
Flix6x merged 19 commits into
mainfrom
fix/power-capacity-does-not-need-to-be-mandatory

Conversation

@BelhsanHmida

Copy link
Copy Markdown
Contributor

Description

  • Let storage scheduling continue when a flex-model omits power-capacity.
  • Infer the symmetric device-level power limit from the greatest of consumption-capacity and production-capacity when both directional capacities are configured.
  • Keep the existing site-power-capacity fallback after the directional-capacity fallback.
  • Clarified the scheduling metadata for power-capacity, consumption-capacity, and production-capacity.
  • Added changelog entry.

Look & Feel

N/A. This is scheduler behavior and documentation only.

How to test

pytest -k "device_power_capacity_uses_greatest_directional_capacity_before_site_fallback"

Manual check:

  • With no power-capacity, production_capacity = 300 kW, and consumption_capacity = 700 kW, _get_device_power_capacity returned a 96-step capacity series whose values are close to 0.7 MW.
  • The method logged the expected missing power-capacity warning instead of raising the previous error.

Related Items

Closes SeitaBV/ems#210


Sign-off

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on code under GPL or other license that is incompatible with FlexMeasures

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
@BelhsanHmida BelhsanHmida self-assigned this Jun 4, 2026
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
@BelhsanHmida BelhsanHmida requested a review from Flix6x June 4, 2026 01:32
@Flix6x Flix6x added this to the 1.0.0 milestone Jun 4, 2026
Comment thread flexmeasures/data/schemas/scheduling/metadata.py Outdated
Comment thread flexmeasures/data/schemas/scheduling/metadata.py Outdated
Comment thread flexmeasures/data/models/planning/storage.py Outdated
BelhsanHmida and others added 2 commits June 4, 2026 21:24
Co-authored-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com>
Signed-off-by: Mohamed Belhsan Hmida <149331360+BelhsanHmida@users.noreply.github.com>
Co-authored-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com>
Signed-off-by: Mohamed Belhsan Hmida <149331360+BelhsanHmida@users.noreply.github.com>
@BelhsanHmida BelhsanHmida requested a review from Flix6x June 5, 2026 11:39
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Comment thread documentation/changelog.rst Outdated
Comment thread flexmeasures/data/models/planning/tests/test_solver.py Outdated
Comment thread flexmeasures/data/models/planning/tests/test_solver.py Outdated
Comment thread flexmeasures/data/models/planning/tests/test_solver.py Outdated
Comment thread flexmeasures/data/models/planning/storage.py Outdated
Comment thread flexmeasures/data/models/planning/storage.py Outdated
Comment thread flexmeasures/data/schemas/scheduling/metadata.py Outdated
Comment thread flexmeasures/data/schemas/scheduling/metadata.py Outdated
Comment thread flexmeasures/data/schemas/scheduling/metadata.py
BelhsanHmida and others added 8 commits June 14, 2026 04:23
Co-authored-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com>
Signed-off-by: Mohamed Belhsan Hmida <149331360+BelhsanHmida@users.noreply.github.com>
Co-authored-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com>
Signed-off-by: Mohamed Belhsan Hmida <149331360+BelhsanHmida@users.noreply.github.com>
Co-authored-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com>
Signed-off-by: Mohamed Belhsan Hmida <149331360+BelhsanHmida@users.noreply.github.com>
Co-authored-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com>
Signed-off-by: Mohamed Belhsan Hmida <149331360+BelhsanHmida@users.noreply.github.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
@BelhsanHmida BelhsanHmida requested a review from Flix6x June 14, 2026 10:48

@Flix6x Flix6x left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, great work.

@Flix6x Flix6x merged commit 693d1ab into main Jun 16, 2026
12 checks passed
@Flix6x Flix6x deleted the fix/power-capacity-does-not-need-to-be-mandatory branch June 16, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants