Skip to content

Confine device power to operation-mode power bands#2278

Open
Flix6x wants to merge 2 commits into
mainfrom
feat/2113-operation-mode-power-bands
Open

Confine device power to operation-mode power bands#2278
Flix6x wants to merge 2 commits into
mainfrom
feat/2113-operation-mode-power-bands

Conversation

@Flix6x

@Flix6x Flix6x commented Jul 10, 2026

Copy link
Copy Markdown
Member

Description

Adds support for devices whose power is not free to modulate within [0, P_max], but is confined to a set of power bands — e.g. a device that is either off or running at (or above) some minimum power. Fixes #2113.

Following the S2 standard's FRBC OperationMode terminology, the storage flex-model gains an operation-modes field: a list of signed power ranges (positive is consumption, negative is production). The device must operate within one of the declared ranges at every time step:

"operation-modes": [
    {"power-range": ["0 W", "0 W"]},
    {"power-range": ["883.7 W", "883.7 W"]}
]

In the device_scheduler, this adds one binary variable per device per band per time step (exactly one band active; device power bounded by the active band's range), turning the LP into a MILP when the field is used. Without the field, the model is unchanged.

Motivation / validation

When a control layer (e.g. an S2 CEM/RM pair) receives a fractional schedule for an on/off device, it has to round it — typically up — which can overshoot site capacity limits. In a two-house community co-simulation with on/off heaters, a community-level capacity breach could not be resolved because the scheduler kept planning fractional heater power that was implemented as full-on blocks. With this field, the schedule only contains implementable power values; in that same co-simulation the breach was fully resolved (community peak landed exactly on the inflexible-load floor), with no observed solver slowdown (~10s solves, HiGHS, 96 time steps).

Scope

  • New OperationModeSchema + operation-modes field in the storage flex-model schema (documented via the metadata module, so it shows up in the docs table and OpenAPI specs).
  • device_power_bands argument on device_scheduler, wired through StorageScheduler._prepare/compute.
  • Docs: field documented in the storage flex-model table (with S2 reference) + changelog entry.
  • Tests: flexmeasures/data/models/planning/tests/test_operation_modes.py (on/off band, min-power band, and a no-bands sanity check).

🤖 Generated with Claude Code

Flix6x and others added 2 commits July 10, 2026 17:36
New storage flex-model field "operation-modes" (S2 terminology): a list of
signed power ranges; the device must operate within one of them at every time
step. Adds one binary per device per band per time step to the device
scheduler, so devices that cannot modulate below a minimum power (or are
strictly on/off) no longer receive fractional schedules that their control
layer must round up, overshooting site capacity limits.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds the field to the storage flex-model table (via a new OPERATION_MODES
MetaData entry, which the schema now also uses for its API docs), including
the sign convention, an on/off device example, the MILP note, and a reference
to the S2 standard's FRBC OperationMode concept. Also adds a changelog entry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@read-the-docs-community

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: non-zero minimum power of flexible devices

1 participant