Skip to content

Fix bug in aggregate_enduses#709

Merged
tsmbland merged 3 commits intomainfrom
enduse-fix
May 13, 2025
Merged

Fix bug in aggregate_enduses#709
tsmbland merged 3 commits intomainfrom
enduse-fix

Conversation

@tsmbland
Copy link
Copy Markdown
Collaborator

@tsmbland tsmbland commented May 13, 2025

Description

There was a mistake in aggregate_enduses introduced in #703. As well as checking which commodities are enduses (using is_enduse), we also need to check that technologies in the subsector produce these commodities (i.e. positive fixed_outputs)

Fixes #707

Type of change

  • New feature (non-breaking change which adds functionality)
  • Optimization (non-breaking, back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Key checklist

  • All tests pass: $ python -m pytest
  • The documentation builds and looks OK: $ python -m sphinx -b html docs docs/build

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@tsmbland tsmbland marked this pull request as ready for review May 13, 2025 08:18
@tsmbland tsmbland requested a review from martinstringer May 13, 2025 08:19
@tsmbland tsmbland merged commit e8c0d86 into main May 13, 2025
14 checks passed
@tsmbland tsmbland deleted the enduse-fix branch May 13, 2025 10:02
@github-project-automation github-project-automation Bot moved this to ✅ Done in MUSE May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Commodities for subsectors not deduced correctly when they share a common agent

2 participants