Generalise reserve margin constraints for region/tech groups - #361
Generalise reserve margin constraints for region/tech groups#361idelder wants to merge 26 commits into
Conversation
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
…ctions Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
… unique elements Signed-off-by: Davey Elder <iandavidelder@gmail.com>
…o change to sets Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
… (replaced by limit_activity_share) Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Stacked on PR #350
Generalises the reserve margin constraints to allow reserves over groups of regions. Also now uses tech groups instead of the unique reserve set. Finally, makes operating_reserve_margin and planning_reserve_margin separate constraints that can be applied at the same time (rather than switched in config)
This allows:
Added a reserve test that checks against a cached LP file for identical model formulation. Any changes are diagnosably printed on test failure.
Added a v4.1 schema for this change and v4->v4.1 migrator with test.
As a result, the rps_requirement constraint (already deprecated) was removed as it depended on the now-absent tech_reserve set. This constraint is structurally identical to the limit_activity_share constraint now anyway and the migrator moves rps_requirement to limit_activity_share by creating a tech group for the past tech_reserve set.
Also did some refactoring and docs rework to try to clarify how all this is supposed to work. These constraints were a magnet for bugs in the past.
New docs for group summation
New docs for mathematical formulation
Used the LP file comparer to confirm that, except for the one bug fixed, this version produces identical constraints.
One bug found:
Exchange techs are allowed to be annual. The previous reserve margin constraint did not sum annual exchange flows for its proxy demand.