Second new tranching approach#1395
Open
tsmbland wants to merge 4 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1395 +/- ##
==========================================
- Coverage 89.42% 86.77% -2.66%
==========================================
Files 58 58
Lines 8367 8376 +9
Branches 8367 8376 +9
==========================================
- Hits 7482 7268 -214
- Misses 564 792 +228
+ Partials 321 316 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ce1fad6 to
4af71c6
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Implements a revised tranching approach for candidate asset sizing in the investment loop by assigning candidate capacities from an annual-demand-based characteristic capacity scale, then applying capacity_limit_factor as the per-round appraisal fraction.
Changes:
- Add an annual-demand-based capacity scaling helper and use it to size candidate assets during option generation.
- Adjust the default
capacity_limit_factor(0.1 → 0.05) to reflect the new capacity scaling behaviour. - Update the model schema documentation for
capacity_limit_factorto describe the new meaning.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/simulation/investment.rs | Introduces annual-demand-based candidate capacity scaling and adds tests around the new helper. |
| src/model/parameters.rs | Changes the default value of capacity_limit_factor to align with the new tranching increments. |
| schemas/input/model.yaml | Updates schema docs/default for capacity_limit_factor to match the new candidate sizing approach. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
118
to
122
| // Default values for optional parameters | ||
| allow_dangerous_options: false, | ||
| candidate_asset_capacity: Capacity(1e-4), | ||
| capacity_limit_factor: Dimensionless(0.1), | ||
| capacity_limit_factor: Dimensionless(0.05), | ||
| value_of_lost_load: MoneyPerFlow(1e9), |
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
Implements the second tranching idea discussed in #1358, which uses a dynamic capacity approach, where candidate asset capacities are set according to annual demand:
capacity = capacity_limit_factor * annual_demand / max_annual_supply_per_capacityThis is similar to the current demand-limiting-capacity approach, but slightly safer as it cannot be throw off by extreme demand/availability values in any particular timeslices.
Also changing
capacity_limit_factorto 0.05, as suggested by Adam, but we may change this after more testingTODO: need to update regression test results, and disallow tests for
circularityandcircularity_npvas these are failing (much like #1357)Fixes #1358
Type of change
Key checklist
$ cargo test$ cargo docpresent in the previous release
Further checks