Skip to content

Documentation: Clarify group region constraints and exchange technology behavior #181

@coderabbitai

Description

@coderabbitai

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:

  1. 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.

  2. 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'

  3. 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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions