Skip to content

feat: new mass balance - #127

Draft
JakobBD wants to merge 20 commits into
pik-piam:mainfrom
JakobBD:new_mass_balance
Draft

feat: new mass balance#127
JakobBD wants to merge 20 commits into
pik-piam:mainfrom
JakobBD:new_mass_balance

Conversation

@JakobBD

@JakobBD JakobBD commented Nov 13, 2025

Copy link
Copy Markdown
Collaborator

Purpose of this PR

  • Refactor mass balances: compute mass balance within process, only use MFASystem as a wrapper
  • Introduce more systematic calculation of tolerances for mass balance checks
  • Introduce a config to ... well ... configure the tolerances, and error behaviour. The config can be extended in the future.

Introduces some API breaks.
TODO: check where these are necessary and remove is possible (e.g. introduce alias get_stock_balance/get_mass_balance, only warn on stock balance fails by default)

Needs #123 to #126, so only merge after that.

Type of change

(Make sure to delete from the Type-of-change list the items not relevant to your PR)

  • Bug fix
  • Refactoring
  • New feature
  • Minor change
  • Major change

Checklist:

  • I have updated the in-code documentation of all changed classes and functions
  • I have added in-code documentation and type hints to all new classes and functions
  • I have adapted the howtos
  • I have adapted the examples
  • If this change should entail a version update, I have bumped the version in the pyproject.toml file accordingly

JakobBD and others added 20 commits November 11, 2025 20:51
@JakobBD
JakobBD marked this pull request as draft November 13, 2025 08:29
This was referenced Nov 13, 2025
@JakobBD JakobBD changed the title New mass balance feat: new mass balance Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant