-
Notifications
You must be signed in to change notification settings - Fork 52
fix: harden multi-commodity flex-context (correctness + API decisions) ahead of v1 #2271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 150 commits
Commits
Show all changes
156 commits
Select commit
Hold shift + click to select a range
9dd779a
docs: new section describing commitments
Flix6x 13e9308
docs: rewrite the overview in commitments section
Flix6x 1179198
docs: keep ems variables, but explain them as representing the site c…
Flix6x 1b10360
docs: cross-reference the commitments section and the linear problem …
Flix6x 0d25b25
Merge remote-tracking branch 'refs/remotes/origin/main' into docs/com…
Flix6x 6f6e52b
fix: cross-references
Flix6x 3599379
docs: add commitments section to index
Flix6x ce1533d
Merge remote-tracking branch 'refs/remotes/origin/main' into docs/com…
Flix6x 84fbd5a
feat: add a util function for printing out commitments in a tabulated…
Ahmad-Wahid 90177bf
refactor: move pretty printing method to class
Flix6x 9f34676
feat: Commitment supports device groups
Flix6x 43107c8
feat: start testing device grouping
Flix6x b90d7f0
dev: test multi-feed
Flix6x 4179981
update the ids of devices to be integers
Ahmad-Wahid 8b108ed
feat: function that group commitment quantities
Ahmad-Wahid 485349e
add commitments for multi group
Ahmad-Wahid 81bb9ec
fix: get unique list of devices for a frame column
Ahmad-Wahid 334e4d3
fix: create util functions that extract devices for a list of values …
Ahmad-Wahid f738d9f
fix: create a series for a list of grouped devices
Ahmad-Wahid 620c6dc
drop outdated comments
Ahmad-Wahid 40eb747
use commitment costs and add asserts for electricity and gas
Ahmad-Wahid 708d869
and an assert for commodity costs
Ahmad-Wahid ce307f8
add an extra assert on costs
Ahmad-Wahid 5be555b
support commodity based EMS flow commitments and grouped devices
Ahmad-Wahid 6f2d745
Add commodity field and support multi-device commitments
Ahmad-Wahid 1d63893
test shared buffer and multi-comodity commitments
Ahmad-Wahid 8c9b1b5
remove hard check for commodity to make backward compatible
Ahmad-Wahid a8f3b89
update the function to support backward compatibility
Ahmad-Wahid be09c4d
feat: add commodity field to the flexmodel and DBstorage-flex-model s…
Ahmad-Wahid 07822eb
fix: use devices as index rather than time series
Flix6x 92eabc7
fix: exclude gas-power devices from electricity commitments
Flix6x ee33fa2
Merge remote-tracking branch 'origin/main' into feat/switching-betwee…
Flix6x f9df705
Merge branch 'feat/switching-between-gas-and-electricity' into feat/m…
Flix6x 325bfe8
feat: add gas-price field to the Flex-context schema
Ahmad-Wahid 9261629
apply black
Ahmad-Wahid 9dd5802
feat: add a test case for two flexible devices with commodity
Ahmad-Wahid b22c6d7
use expected datatypes
Ahmad-Wahid c88af5c
feat: split commitments per commodity
Ahmad-Wahid c2341f1
feat: split commitments per commodity
Ahmad-Wahid 88d4be0
Merge remote-tracking branch 'origin/feat/multi-commodity' into feat/…
Ahmad-Wahid be05a19
Revert "use expected datatypes"
Ahmad-Wahid f4ffd8a
feat: add a test case for different commodities
Ahmad-Wahid c43d2ad
fix: do not produce gas
Flix6x 0aa5b2b
feat: create a flow commitment for prefering to charge sooner devices
Ahmad-Wahid a48c6ba
add soc constraints for boiler
Ahmad-Wahid c58965f
add some assert statments
Ahmad-Wahid 515f34a
update and add new assertions with clear explanation
Ahmad-Wahid 4d77344
update the docstring
Ahmad-Wahid 2becd02
refactor: move tiny-price-slope decleration out of the for loop
Ahmad-Wahid d9d4f94
Revert "refactor: move tiny-price-slope decleration out of the for loop"
Ahmad-Wahid 2a22fae
refactor: move tiny-price-slope decleration out of the for loop
Ahmad-Wahid f38d6d8
fix: add data_key attr
Ahmad-Wahid 007e514
add missing commodity description and it's field in ui flexmodel schema
Ahmad-Wahid 0bff8bc
fix: add missing gas-price field in UI Flexcontext schema
Ahmad-Wahid 82f807e
fix: wrong timezone; the test relied on the preference to charge soon…
Flix6x 128550f
feat: move preference to charge sooner and discharge later into a Sto…
Flix6x 130b9dd
fix: test case no longer relies on arbitrage opportunity coming from …
Flix6x 1eab828
feat: check for optimal schedule
Flix6x b9bc4a9
feat: prefer a full storage earlier over later
Flix6x 57df5c3
docs: update commitment name and inline comments
Flix6x ce71637
docs: touch up test explanation
Flix6x f6183df
fix: update test case given preference for a full battery
Flix6x ed471a8
delete: clean up comment
Flix6x 7611fb9
feat: model the preference to curtail later within the same StockComm…
Flix6x bf16e63
fix: reduce tiny price slope
Flix6x 06c30dc
docs: delete duplicate changelog entry
Flix6x 0125e28
Merge remote-tracking branch 'origin/main' into feat/full-soc-preference
Flix6x d99089b
docs: fix broken link
Flix6x cf01f1d
Revert "fix: reduce tiny price slope"
Flix6x bdbdead
fix: soc unit conversion
Flix6x f987706
fix: adapt test to check for 1 hour of free energy at 15-min scheduli…
Flix6x 7acbc99
Merge remote-tracking branch 'origin/feat/full-soc-preference' into f…
Flix6x 12cf595
Merge remote-tracking branch 'origin/main' into feat/switching-betwee…
Flix6x c09371a
Merge branch 'feat/switching-between-gas-and-electricity' into feat/m…
Flix6x 534179a
style: black
Flix6x 19dc4dc
Merge remote-tracking branch 'origin/feat/switching-between-gas-and-e…
Ahmad-Wahid e4c43ea
fix: check curtailment preference per distinct device
Flix6x b3138c3
fix: set tight tolerance for HiGHS solver
Flix6x 8eff839
refactor: merge if-blocks
Flix6x b0074d4
fix: update test_two_flexible_assets_with_commodity
Flix6x ae23ef6
Merge remote-tracking branch 'origin/feat/multi-commodity' into feat/…
Ahmad-Wahid 05aed7e
fix: check curtailment preference per distinct device
Flix6x e55f638
fix: set tight tolerance for HiGHS solver
Flix6x 764712f
refactor: merge if-blocks
Flix6x 9070eae
fix: use iloc
Flix6x 857e9c1
fix: diminish tiny price slope by number of planning steps
Flix6x 54c9c36
refactor: always diminish tiny price slope by number of planning step…
Flix6x 158c7a0
chore: increment StorageScheduler version
Flix6x 3df2142
Merge remote-tracking branch 'origin/feat/full-soc-preference' into f…
Flix6x decf794
Merge remote-tracking branch 'origin/main' into feat/multi-commodity
Flix6x 261ed3a
Merge branch 'feat/full-soc-preference' into feat/switching-between-g…
Flix6x a16ec74
Merge branch 'feat/switching-between-gas-and-electricity' into feat/m…
Flix6x 021543c
Merge remote-tracking branch 'origin/feat/multi-commodity' into feat/…
Ahmad-Wahid 66e9a8b
Merge remote-tracking branch 'origin/main' into feat/switching-betwee…
Flix6x eda0ec7
Merge branch 'feat/switching-between-gas-and-electricity' into feat/m…
Flix6x b092aa1
fix: use approximation to compare battery and heat pump costs
Ahmad-Wahid b20465e
update the assert statements with prefered to charge battery sooner t…
Ahmad-Wahid 031a6e8
fix: update the expected ev and battery costs
Ahmad-Wahid de4981e
fix: add device id to get costs for the given device
Ahmad-Wahid 1ec0b2c
Merge remote-tracking branch 'origin/main' into feat/switching-betwee…
Flix6x 49df3a6
feat: rewrite test to not rely on multi-commodity
Flix6x a518437
feat: rewrite test to prove that only when both HPs share a single co…
Flix6x 4258636
fix: do not coerce device_group into a time series
Flix6x b4f8b2b
docs: changelog entry
Flix6x 6e3a5a4
docs: pretty_print is not specifically for FlowCommitments
Flix6x 7eb1319
docs: add (back) inline dev notes
Flix6x a298dc7
feat: strengthen asserts
Flix6x 7f15c13
feat: add check for exact electricity costs expected
Flix6x ffd0d86
fix: sum over electricity costs; and move to StockCommitment to model…
Flix6x a33790a
fix: replace vague assert with explicit asserts
Flix6x 6b6a474
docs: lose confusing comment
Flix6x 70e1af6
fix: backwards compatibility in case no device is specified;
Flix6x 792d2df
fix: when device is present but device_group is absent, fall back to …
Flix6x a9174a5
dev: update expectations of how costs are shared between EV and battery
Flix6x 864a98f
fix commodity-level commitments by grouping devices and aligning devi…
Ahmad-Wahid c885b04
update the test cases for net commodity consumption and production
Ahmad-Wahid 55075d5
fix: merge conflicts
Ahmad-Wahid 7deff15
Merge remote-tracking branch 'origin/main' into feat/switching-betwee…
Flix6x 3e20ce0
Merge remote-tracking branch 'origin/feat/switching-between-gas-and-e…
Flix6x afba390
Merge remote-tracking branch 'origin/main' into feat/multi-commodity
Flix6x 7e60e2d
fix: update the test cases according device level costs
Ahmad-Wahid 6c82e1c
docs/scheduling: add COMMODITY and GAS_PRICE metadata field documenta…
Ahmad-Wahid 581ff05
Feat: Support shared storage (multi‑feed stock) (#2001)
Ahmad-Wahid 0c84fb9
Merge remote-tracking branch 'origin/main' into feat/multi-commodity
Flix6x 75392b9
docs: changelog entry
Flix6x b3e12bd
fix(tests): unique public asset names in commitment tests to satisfy …
Flix6x 107ab37
fix: consolidate currency validation across commodity flex-contexts
Flix6x 4d7eef5
feat!: default top-level relax-constraints to True
Flix6x cec885b
fix: support per-commodity inflexible-device-sensors and all-gas port…
Flix6x 95965a9
fix: default device commodity to electricity and match commitment com…
Flix6x c2e4f4e
fix: fix dead cross-commodity currency check in list-form flex-context
Flix6x 6e890a6
fix: restrict aggregate-power to electricity devices
Flix6x b976b53
fix: reject duplicate commodities in flex-context commodities list
Flix6x 1381b14
feat: reject non-electricity semantics in the single-dict flex-context
Flix6x 777bc08
fix: raise ValidationError for malformed flex-context input
Flix6x 8210c68
refactor: drop dead 'types' comment blocks in UI_FLEX_CONTEXT_SCHEMA
Flix6x 04dfdd0
test: add schema-level regression tests for hardening fixes
Flix6x 5ec17ae
test: add scheduler-level regression tests for gas-only and per-commo…
Flix6x 65f0fe7
docs: changelog entry for multi-commodity hardening fixes
Flix6x d39a6a2
fix: count only device models, not stock entries, when enumerating de…
Flix6x 39e860c
Merge branch 'feat/multi-commodity' into fix/multi-commodity-hardening
Flix6x a00ab9a
fix: declare commodity field on FlexContextSchema
Flix6x 5d19054
fix: tolerate commodities list combined with top-level flex-context f…
Flix6x f4a8262
refactor: use units_are_convertible for scheduler-side currency check…
Flix6x 3c544f2
test: strengthen per-commodity inflexible sensor test; cover electric…
Flix6x 2724920
fix: keep deprecated price sensors working and fix breach-price error…
Flix6x 3c7bf96
fix: skip commodity device groups without devices in _prepare
Flix6x 97b8b5f
test: pin relax-constraints False in tests asserting hard-capacity se…
Flix6x 7e22cff
test: exclude the commodity field from the UI flex-context schema guard
Flix6x 9592a8e
test: fix sign convention of inflexible gas load beliefs
Flix6x 6937bee
docs: reorder and consolidate changelog entries per self-review
Flix6x 50b1b1d
docs: restore intentional 'types' notes on UI_FLEX_CONTEXT_SCHEMA agg…
Flix6x eddefbd
Merge remote-tracking branch 'origin/main' into feat/multi-commodity
Flix6x 022e5c0
fix: resolve CI failures from merge conflict between #1946 and #2072 …
Copilot ab2f01a
Merge remote-tracking branch 'origin/feat/multi-commodity' into fix/m…
Flix6x f886faf
Merge remote-tracking branch 'origin/main' into fix/multi-commodity-h…
Flix6x File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.