feat(planning): export commodity_costs in StorageScheduler outputs and persist in job meta (#2416) - #2448
Open
taran-dev4u wants to merge 1 commit into
Open
Conversation
…d persist in job meta (FlexMeasures#2416) Signed-off-by: Taran Mamidala <mamidalataran6333@gmail.com>
taran-dev4u
force-pushed
the
feat/export-per-commodity-costs
branch
from
August 31, 2026 10:09
291edf6 to
8c4ec5e
Compare
Documentation build overview
|
taran-dev4u
marked this pull request as ready for review
September 1, 2026 04:03
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.
Description
Resolves #2416.
Both optimization backends (
linear_optimization.pyandhighspy_optimization.py) compute per-commodity costs (model.commodity_costs), butStorageSchedulerpreviously only exported flatcommitment_costs, and the scheduling service handler only persistedcommitment_costsinto Redis job metadata.This PR:
commodity_costsschedule output dictionary inStorageSchedulerwhen multiple commodities are present or when the commodity is not solely the default electricity, matching the currency unit.make_schedule()inflexmeasures/data/services/scheduling.pyto persistrq_job.meta["scheduler_info"]["commodity_costs"] = result["data"].test_commodity_costs_output_filteringintest_commitments.py, and updates assertions intest_commitments.py,test_storage.py, andtest_scheduling_jobs.py.documentation/changelog.rst.Validation
flexmeasures/data/models/planning/tests/test_commitments.py,flexmeasures/data/models/planning/tests/test_storage.py, andflexmeasures/data/tests/test_scheduling_jobs.py(266 passed).