-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Prevent Kiva exposed perimeter warning #8073
Conversation
This looks good, but you might consider using |
I would at a minimum suggest declaring the applied tolerance as a const float in the function, or some convenient location, and check if the value is within the tolerance both above as well as below. I assume there are a couple functions like that already in EnergyPlus, but I don't know of any off the top of my head. Plant has an integer based one that just checks a range, not exactly what we're looking for here. |
Ok, I added a const for the tolerance. Note that we're not trying to ensure the value is 1 (within some tolerance) but rather that it does not exceed 1 (including a tolerance). |
Change makes sense, I'm not sure why CI had trouble. Do you anticipate appending a unit test to this fix? |
I wasn't planning on creating a unit test given it's a minor warning bugfix. There is an IDF in the linked GitHub issue that can be used to demonstrate the fix. |
This is totally fine. I verified the fix locally. I'm not sure why CI is struggling with this minimal commit. I'm hesitant to merge. I'll just push one more commit merging develop in and we'll see if it stalls again. |
All good, merging. Thanks @shorowit |
Pull request overview
IDF files using Kiva can potentially generate warnings like this:
In the IDF file provided below, the perimeter of both the
SurfaceProperty:ExposedFoundationPerimeter
andBuildingSurface:Detailed
objects are exactly identical (51.2064 m). Presumably the issue is caused by floating point precision when calculating the perimeter of theBuildingSurface:Detailed
object from its vertices. This PR adds tolerance to the warning.Test file:
in.idf.txt
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.