feat: unit-committed affine coupling groups (on/off + min-load + no-load base)#2336
Open
Flix6x wants to merge 1 commit into
Open
feat: unit-committed affine coupling groups (on/off + min-load + no-load base)#2336Flix6x wants to merge 1 commit into
Flix6x wants to merge 1 commit into
Conversation
…oad base) Extend the coupling primitive (#2218) so a converter (e.g. a cogeneration unit) can be modelled with an on/off binary, a minimum level when on, and a per-port no-load base gated by that binary. When a coupling group is unit-committed, the solver adds a per-timestep binary u_g[j] and a marginal level alpha_g[j] >= 0 with min_g * u_g <= alpha_g <= max_g * u_g and, for every port d, P[d,j] == coeff_d * alpha_g[j] + base_d * u_g[j]. This turns the LP into a MILP only when a group is unit-committed; purely proportional coupling is unchanged. Schema: add a per-port `coupling-base` (signed power quantity, sign follows the port's flow direction; default 0) and a `coupling-min` power quantity on the group's reference port (|coeff| == 1). Presence of `coupling-min` (or any non-zero `coupling-base`) marks the group unit-committed; max_g comes from the reference port's `power-capacity`. Both are carried through DeviceInventory (coupling_uc, coupling_bases) and storage.py to device_scheduler. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016MLCUiSdXDqDBmg8GbYp1B Signed-off-by: F.N. Claessen <claessen@seita.nl>
Documentation build overview
14 files changed ·
|
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.
Extends the coupling primitive (#2218) with unit commitment: a coupling group can now have an on/off binary, a minimum level when on, and a per-port no-load base gated by that binary.
What it does
When a coupling group is unit-committed, the solver introduces a per-timestep binary
u_g[j] ∈ {0,1}and a marginal levelalpha_g[j] ≥ 0, with:min_g * u_g[j] <= alpha_g[j] <= max_g * u_g[j]—alphais 0 when off, and at least the minimum level when on;din the group:P[d,j] == coeff_d * alpha_g[j] + base_d * u_g[j],where
coeff_dis the existing signed coupling coefficient andbase_dis the new signed per-port no-load base. This makes the affine cogeneration/CHP model exact, including no-load fuel: in an unprofitable step the whole unit idles (all ports exactly 0, no no-load fuel burned), and when running it stays at or above the minimum level.Purely proportional (non-UC) coupling is unchanged: the problem stays an LP unless some group is unit-committed (a group becomes unit-committed only when
coupling-minis set or a non-zerocoupling-baseis given). Minimum up/down times are out of scope.Schema
coupling-base(per port): a signed power quantity whose direction follows the port's flow direction (likecoupling-coefficient); default 0.coupling-min(on the group's reference port, the port with |coefficient| = 1): a power quantity that sets the group minimum and enables unit commitment.max_gcomes from the reference port'spower-capacity.Both fields are documented in
metadata.py, added to the storage flex-model schemas, and reflected inopenapi-specs.json. They are carried throughDeviceInventory(coupling_uc,coupling_bases) andstorage.pytodevice_scheduler.Tests
Stacked on #2218.
🤖 Generated with Claude Code