Change default pricing strategy to "full_average"#1281
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1281 +/- ##
==========================================
- Coverage 89.57% 89.46% -0.11%
==========================================
Files 57 57
Lines 8361 8361
Branches 8361 8361
==========================================
- Hits 7489 7480 -9
- Misses 571 581 +10
+ Partials 301 300 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates MUSE2’s default commodity pricing behavior by switching SED/SVD commodities from shadow pricing to full_average pricing, and refreshes example/regression artifacts to match the resulting model outputs. This aligns the out-of-the-box behavior with the intended newer pricing approach while keeping the circularity example runnable by overriding pricing where circular dependencies exist.
Changes:
- Switched the default
PricingStrategyfor SED/SVD commodities toFullCostAverage(full_averagein inputs). - Updated the
circularityexample to explicitly useshadowpricing for circular commodities and widenedcapacity_margin. - Refreshed regression expected outputs and re-enabled the
two_regionsregression test across architectures.
Reviewed changes
Copilot reviewed 39 out of 43 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/input/commodity.rs |
Changes default pricing strategy for SED/SVD commodities to FullCostAverage. |
schemas/input/commodities.yaml |
Updates schema docs to reflect the new default pricing_strategy for SED/SVD. |
examples/circularity/README.txt |
Documents circularity pricing override and capacity_margin adjustment. |
examples/circularity/model.toml |
Sets a wider capacity_margin to ensure the example solves under new defaults. |
examples/circularity/commodities.csv |
Adds per-commodity pricing overrides for circularity-related commodities. |
docs/release_notes/upcoming.md |
Adds a breaking-change release note entry for the new default pricing strategy. |
tests/regression.rs |
Re-enables two_regions regression test on all architectures (removes x86_64 gating). |
tests/data/two_regions/commodity_prices.csv |
Updates expected commodity price outputs for two_regions. |
tests/data/two_regions/assets.csv |
Updates expected asset build-out for two_regions. |
tests/data/two_outputs/assets.csv |
Updates expected asset build-out for two_outputs. |
tests/data/simple/debug_solver.csv |
Updates expected debug solver objective traces for simple. |
tests/data/simple/debug_appraisal_results.csv |
Updates expected appraisal debug outputs for simple. |
tests/data/simple/commodity_prices.csv |
Updates expected commodity prices for simple. |
tests/data/simple/assets.csv |
Updates expected asset build-out for simple. |
tests/data/simple_npv/commodity_prices.csv |
Updates expected commodity prices for simple_npv patched example. |
tests/data/simple_npv/assets.csv |
Updates expected asset build-out for simple_npv patched example. |
tests/data/simple_marginal/commodity_prices.csv |
Updates expected prices for simple_marginal patched example. |
tests/data/simple_marginal/commodity_flows.csv |
Updates expected flows for simple_marginal patched example. |
tests/data/simple_ironing_out/commodity_prices.csv |
Updates expected prices for simple_ironing_out patched example. |
tests/data/simple_ironing_out/assets.csv |
Updates expected assets for simple_ironing_out patched example. |
tests/data/simple_full/commodity_prices.csv |
Updates expected prices for simple_full patched example. |
tests/data/simple_full/commodity_flows.csv |
Updates expected flows for simple_full patched example. |
tests/data/simple_divisible/commodity_prices.csv |
Updates expected prices for simple_divisible patched example. |
tests/data/simple_divisible/assets.csv |
Updates expected assets for simple_divisible patched example. |
tests/data/muse1_default/commodity_prices.csv |
Updates expected prices for muse1_default. |
tests/data/muse1_default/assets.csv |
Updates expected assets for muse1_default. |
tests/data/missing_commodity/assets.csv |
Updates expected assets for missing_commodity. |
tests/data/circularity/assets.csv |
Updates expected assets for circularity example/regression case. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
alexdewar
left a comment
There was a problem hiding this comment.
I skimmed the output files, but haven't gone through them in detail. Hopefully there isn't anything too wacky in there... If so, I guess we'll catch it further down the line! Adam mentioned he was going to look at it in more detail with someone in the summer.
Anyway, I'm happy with all this in principle. It's nice that we can unhide that regression test now on macs too.
Description
Changes the default strategy for SED/SVD commodities from "shadow" to "full_average".
Since this strategy isn't yet supported for commodities involved in circularities, I've modified the "circularities" example model to revert to "shadow" pricing for electricity and hydrogen. I also had to widen the
capacity_marginto get this model to run - not necessarily surprising since the new pricing strategy changes investment choices so the cycle balancing is working on a different system. I've added a note about both of these in the model's README.While I was at it, I re-enabled the regression test for "two_regions" on mac - it works now (not that the underlying problem is fixed (#1174), we've just changed the model so the problem no longer reveals itself)
Fixes #1173
Fixes #1197
Type of change
Key checklist
$ cargo test$ cargo docpresent in the previous release
Further checks