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 capacity rounding #1800

Merged
merged 2 commits into from
Sep 3, 2024
Merged

Fix capacity rounding #1800

merged 2 commits into from
Sep 3, 2024

Conversation

mdahlhausen
Copy link
Collaborator

@mdahlhausen mdahlhausen commented Aug 30, 2024

Pull request overview

The capacity rounding in case of integer may incorrectly return a larger size class if the capacity is near the threshold. Instead, round to the nearest integer and explicitly convert to a float.

Pull Request Author

  • Method changes or additions
  • All new and existing tests passes

Review Checklist

This will not be exhaustively relevant to every PR.

  • Perform a code review on GitHub
  • All related changes have been implemented: method additions, changes, tests
  • If fixing a defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • CI status: all green or justified

The capacity rounding in case of integer may incorrectly return a larger size class if the capacity is near the threshold. Instead, round to the nearest integer and explicitly convert to a float. Fixes issue #1677.
Convert capacity to float instead of rounding to nearest integer, which doesn't work for motor sizing where motor horsepower is typically fractional.
@mdahlhausen mdahlhausen merged commit 2ff41b2 into master Sep 3, 2024
1 of 2 checks passed
@mdahlhausen mdahlhausen deleted the fix/issue1677 branch September 3, 2024 15:49
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.

model_find_object does not handle capacity correctly
1 participant