-
Notifications
You must be signed in to change notification settings - Fork 422
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
Produce Convexity Check Warning Only When Appropriate #10621
Produce Convexity Check Warning Only When Appropriate #10621
Conversation
This commit splits GetShadowingInput into two separate routines and will test to see if the split has been done correctly. The split is important because the actual getting of the input needs to be moved up in the order of calls to resolve this defect, but some of the processing needs to stay where it is at because it needs zones and surfaces read in.
The previous version of GetShadowingInput obtained the ShadowCalculation input but then also did some processing. In order to solve #10299, these needed to be separated so that when surfaces are read in that it knows the ShadowCalculation input and thus can produce error messages appropriately. This commit separates the two parts of the previous routine into two routines which are now called at the appropriate places. The next step will be to implement the solution and create a unit test.
Fix to the problem. Testing reveals that the code now does what it is supposed to do. Also, reversed some changes to an existing unit test as the changes were causing some issues in the test suite. Hopefully this makes those issues disappear.
Addition of new unit tests and fixes to the one that doesn't work properly for Windows (experimental solution based on surrounding code). If this works, this is a potential pull request version.
Backed out something that was tried but resulted in more issues.
Correction of enum comparisons to eliminate errors in energyplus_tests
An error message was being skipped because of the movement of the Get part of the old routine. anyScheduledShadingSurface was not set yet so the error message was never produced. This change should fix this problem and eliminate the change in the .err file for SolarShadingTestGPU.idf.
A couple of issues were seen in ci results. This commit is an attempt to fix them.
Last round was closer to getting rid of all of the unit test fails. Hopefully this gets everything fixed up and ready to go.
A get flag was added early on during work on this defect. It is not necessary and may be causing some issues with API runs. Even if that isn't the problem, there is no reason to keep this flag/code--it's unnecessary.
Missed clang formatting on a file...
bool DisableSelfShadingBetweenGroup = false; | ||
|
||
int shadingGroupsNum = 0; // number of shading groups | ||
Array1D_string zoneName; // array of zone names in user input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems odd that all of these shading variables are in DataSystemVariables
instead of SolarShading
. I'm not suggesting you have to move these in this PR, but 'zoneName' needs to be more specific, like shadingGroupZoneListNames
.
Also, if you make this a std::vector
and push to it when reading the input, then you can use it's size and drop shadingGroupsNum
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I don't know why these are in DataSystemVariables and not SolarShading. I guess I was looking to solve the problem and wasn't too concerned about the location of the variables (thought there must have been some reason--probably not a great assumption).
So, just to clarify and get this to move forward...you would like to see the zoneName changed to shadingGroupZoneListNames. You would also like to see this converted to a vector as part of this work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, just to clarify and get this to move forward...you would like to see the zoneName changed to shadingGroupZoneListNames.
Yes, please.
You would also like to see this converted to a vector as part of this work?
That's up to you for this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable name change made in the latest commit. Hopefully the ci comes back with all green as before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, after some back and forth and some weird goings on yesterday, the variable name change has been made and ci is coming back like it should with only the EIO changes (only changes in the info location--values the same). All good?
if (Found != 0) DisableSelfShadingGroups(i) = Found; | ||
} | ||
|
||
for (int SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; SurfNum++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is existing code, and it's not a frequently used option, but this could be so much more efficient. Instead of looping through all of the zonegroups for each surface, this could simply go through the zones in each zonelist and loop over the exterior surrfaces in each zone (Zone.vZoneHTSurfaceList
). Mostly just noting this here, since this seemingly simple fix has already had a lot of scope creep.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that this would be much more efficient. I'd like to have us make a mental note of this and deal with it at a later date if you are okay with that. I wonder if there are more places where we could be much more efficient and we don't even realize it. If only we all had the time to do that sort of efficiency review in the code...
Addressed review request to change the name of a variable to be more descriptive.
Something not quite right about this simply variable name change. Things went from expected diffs only to "unexpected" diffs.
Trying again to rename a variable. This seemed to cause a lot of issues yesterday, but was that because of changes to develop that were happening at the same time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with holding off on the efficiency refactor that was brought up by @mjwitte. Let's just try to get this merged if it's ready. I'll test it out.
Yeah, it's all testing fine, and CI is all happy. I'll merge this one. Thanks @RKStrand |
Pull request overview
NOTE: ENHANCEMENTS MUST FOLLOW A SUBMISSION PROCESS INCLUDING A FEATURE PROPOSAL AND DESIGN DOCUMENT PRIOR TO SUBMITTING CODE
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.