Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion of factors in RiverSplitWithGaugeNode is incorrect #241

Open
jetuk opened this issue Aug 12, 2024 · 0 comments · May be fixed by #318
Open

Conversion of factors in RiverSplitWithGaugeNode is incorrect #241

jetuk opened this issue Aug 12, 2024 · 0 comments · May be fixed by #318
Labels
bug Something isn't working

Comments

@jetuk
Copy link
Member

jetuk commented Aug 12, 2024

The implementation TryFrom<RiverSplitWithGaugeNodeV1> for RiverSplitWithGaugeNode is not correct. The representation of the factors is the not the same between v1.x and v2.x of Pywr. v2.x requires factors as a proportion of the main flow. Whereas v1.x requires specifying the factors as ratios.

Possible solutions:

  • Return a ConversionError stating these factors cannot be converted automatically,
  • Update the node to align more closely with v1.x and allow the conversion to be made, or
  • Add interim parameters to calculate the proportion correctly.
@jetuk jetuk added the bug Something isn't working label Aug 12, 2024
jetuk added a commit that referenced this issue Dec 19, 2024
Add a conversion function for the factors on RiverSplitWithGauge.
The factors have changed in this implementation and require
conversion from ratios to proportions. This is only possible
if they existing factors are all constants.

Fixes #241.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant