Context
A bug was identified and fixed in PR #180 where retirementPeriods lookups were using the aggregated region variable r instead of the concrete region reg, causing end-of-life emissions to be incorrectly dropped for grouped/global emission limits.
Related PR: #180
Related discussion: #180 (comment)
Documentation Needed
The documentation should clarify how group region constraints interact with exchange technologies:
-
Group Region Constraints: When using group region constraints (e.g., r='Mexico+US+Canada'), exchange technology keys must be explicitly included in the region string for those flows to be counted.
-
Exchange Technology Keys: For example, to properly constrain flows including exchange technologies between Mexico, US, and Canada, the region string would need to be: 'Mexico+US+Canada+Mexico-US+US-Mexico+US-Canada+Canada-US+Mexico-Canada+Canada-Mexico'
-
Implicit Behavior: This is subtle behavior that users should be aware of when setting up emission limits or other constraints that use group regions.
Suggested Documentation Updates
- Add a section explaining group region constraints in the relevant constraint documentation
- Provide examples showing the proper format for region strings when exchange technologies are involved
- Clarify the difference between individual regions, grouped regions, and 'global' constraints
Credit
Thanks to @idelder for identifying the subtle exchange technology behavior.
Context
A bug was identified and fixed in PR #180 where
retirementPeriodslookups were using the aggregated region variablerinstead of the concrete regionreg, causing end-of-life emissions to be incorrectly dropped for grouped/global emission limits.Related PR: #180
Related discussion: #180 (comment)
Documentation Needed
The documentation should clarify how group region constraints interact with exchange technologies:
Group Region Constraints: When using group region constraints (e.g.,
r='Mexico+US+Canada'), exchange technology keys must be explicitly included in the region string for those flows to be counted.Exchange Technology Keys: For example, to properly constrain flows including exchange technologies between Mexico, US, and Canada, the region string would need to be:
'Mexico+US+Canada+Mexico-US+US-Mexico+US-Canada+Canada-US+Mexico-Canada+Canada-Mexico'Implicit Behavior: This is subtle behavior that users should be aware of when setting up emission limits or other constraints that use group regions.
Suggested Documentation Updates
Credit
Thanks to @idelder for identifying the subtle exchange technology behavior.