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

fix: Clamp storage volumes to be within min & max volume ranges. #267

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

jetuk
Copy link
Member

@jetuk jetuk commented Oct 11, 2024

This accounts for small floating point rounding errors and tolerances from LP results. In some cases the resulting volume will be a rounding error above or below the bounds.

This also replicates behaviour from v1.

@jetuk jetuk requested a review from Batch21 October 11, 2024 13:18
This accounts for small floating point rounding errors and
tolerances from LP results. In some cases the resulting
volume will be a rounding error above or below the bounds.

This also replicates behaviour from v1.
@jetuk jetuk force-pushed the clamp-storage-volumes branch from d737cbb to d057415 Compare October 15, 2024 21:23
Copy link
Contributor

@Batch21 Batch21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. We also discussed clamping max volume from below to replicate v1 behaviour. Could be important for models that have control curves containing values of 1.0. But maybe something for another PR?

@jetuk
Copy link
Member Author

jetuk commented Oct 16, 2024

I've updated this slightly to panic if the volume is too far out of range.

@jetuk jetuk merged commit 0c16cd0 into main Oct 18, 2024
7 checks passed
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.

2 participants