Enable capacity growth constraints#1424
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## add-total-capacity-constraint #1424 +/- ##
=================================================================
+ Coverage 86.79% 86.90% +0.10%
=================================================================
Files 59 59
Lines 8375 8391 +16
Branches 8375 8391 +16
=================================================================
+ Hits 7269 7292 +23
+ Misses 790 783 -7
Partials 316 316 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tsmbland
left a comment
There was a problem hiding this comment.
Looks good. Note that without a seed parameter (like we have in MUSE1), the growth constraint is pretty useless as it completely blocks investment in processes that aren't already invested in (e.g. 50% growth on 0 is 0). Could you add that next? I think it should be optional and default to 1. It's likely that once these are all implemented the Investments section of the docs will be fleshed out to explain it all, so the schema can be kept minimal
| let mut logger = Logger::start(); | ||
| let _ = validate_raw_constraint(CapacityPerYear(10.0), Some(Dimensionless(5.0)), None); | ||
| assert_eq!( | ||
| logger.pop().unwrap().args(), |
There was a problem hiding this comment.
I'm surprised we've never tested log messages before. This seems like a reasonable way to do it
Yep, have created issue #1425 and will tackle that now. |
Description
This PR enables the option to provide capacity growth constraints.
capacity_growth_limitcolumncapacity_growth_limitfield of theProcessInvestmentConstraintRawstruct.None, are non-negative and finite. I've also added a check during validation that logs a warning if a fraction greater than 1 (i.e. a percentage greater than 100%) is provided.examples/muse1_default/process_investment_constraints.csvprocess_investment_constraints.csvinput files has been updated with details of this new columnFixes #1415
Type of change
Key checklist
$ cargo test$ cargo docpresent in the previous release
Further checks