Repository navigation
Backport PR #2884: Restore the soc-min default of 0 for storage (#2884) - #2951
Merged
Merged
Conversation
* fix: default soc-min to 0 for storage whose state of charge is known Since #2221 (v1.0.0), a storage flex-model without soc-min had no lower bound, so a battery could be scheduled into a negative state of charge. The default now lives in default_soc_min(), which issue #2847 can make unit-aware: 0 is a physical floor for energy stocks, but not for fill levels in, say, degrees Celsius. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DWv6v4StnVB9FyGWKK2tMc Signed-off-by: F.N. Claessen <claessen@seita.nl> * fix: give the toy battery a soc-min of 0 kWh The toy account's battery set soc-max but no soc-min, so scheduling it without a soc-min in the request let it discharge into a negative state of charge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DWv6v4StnVB9FyGWKK2tMc Signed-off-by: F.N. Claessen <claessen@seita.nl> * docs: changelog entries for PR #2884 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DWv6v4StnVB9FyGWKK2tMc Signed-off-by: F.N. Claessen <claessen@seita.nl> * docs: move the PR #2884 changelog entry to a new v1.0.3 section The fix is to be backported to the 1.0.x branch, so list it under the oldest release that will ship it, as was done for v1.0.2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DWv6v4StnVB9FyGWKK2tMc Signed-off-by: F.N. Claessen <claessen@seita.nl> * docs: move the PR #2884 changelog entry from an unreleased v1.0.3 section to v1.0.4 v1.0.3 was released on November 23 without this fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: say in the PR #2884 changelog entry what happens to a soc-usage beyond the stock Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: say the soc-min default of 0 applies to energy units only So the description does not over-promise once a state of charge may come in other units (#2847). The OpenAPI spec is regenerated, keeping its version at 1.1.1, as on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: say the PR #2884 changelog entry's point about a negative state of charge once Signed-off-by: F.N. Claessen <claessen@seita.nl> --------- Signed-off-by: F.N. Claessen <claessen@seita.nl> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 2429a0d) Signed-off-by: F.N. Claessen <claessen@seita.nl>
📖 59 files changed · 56 modified · 3 deleted
Preview · build overview · flexmeasures · built Dec. 2, 2026, 2:29 p.m. UTC |
This was referenced Dec 2, 2026
Flix6x
added a commit
that referenced
this pull request
Dec 3, 2026
…ach-price, v1.1.4 does (#2954) The v1.0.4 entry now reads as on the 1.0.x branch (#2952), where a soc-usage beyond the stock makes the schedule infeasible. The main wording moves to a new v1.1.4 section, for the 1.1.x backport (#2951), which has #2920. Signed-off-by: F.N. Claessen <claessen@seita.nl> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review of the backport. The cherry-pick of 2429a0d is faithful. The code, the toy battery's flex-model, the
Retitled to this line's backport convention ("Backport PR #2884: …"), so the squash commit reads like the earlier backports on |
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.
Backports #2884 (restore the
soc-mindefault of 0 for storage) to the 1.1 line, for v1.1.4.git cherry-pick -x -s 2429a0d8f(#2884's squash commit), signed off. The code, the toy battery's flex-model and the new tests apply as onmain; only these needed resolving:main's wording (1.1.xhas Leave forecast soc-usage or soc-gain out at a price, rather than fail to schedule #2920, so thesoc-delta-breach-pricehalf holds here).v3.0-37 (FlexMeasures v1.1.4)section. Like the 1.0 line's patch releases, it keeps the line's API version, asv3.0-38ismain's.test_scheduling.py: only Restore the soc-min default of 0 for storage #2884's new test is added.main's other tests at the end of the file are for features the 1.1 line doesn't have.soc-mindescription change. Thegenerate-openapi-specshook would have bumped the version to 1.1.4, so it was skipped for this commit.Tested on this branch against a private Postgres: the planning tests, the scheduling schema tests, the schedule API tests and the toy-account CLI tests (results below).
The two new tests (
test_battery_solver_defaults_soc_min_to_zero,test_soc_min_description_scopes_its_default_to_energy_units) fail on this branch without the fix.🤖 Generated with Claude Code