New tranching approach#1395
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
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.
| // 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), |
There was a problem hiding this comment.
There will be more to add to the release notes. Best to do this just before making a release, as we've done in the past.
Description
Implements the second tranching idea discussed in #1358 (at the bottom), 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 testingBased on a discussion with Adam on teams, we've decided that divisible assets should be appraised one unit at a time.
I've had to turn off tests for
circularityandcircularity_npvas these are failing. We have an issue open for this (#1368).Fixes #1358
Type of change
Key checklist
$ cargo test$ cargo docpresent in the previous release
Further checks