Fix issues with meters reporting during warmup #11170
Conversation
|
@lymereJ @Myoldmopar it has been 28 days since this pull request was last updated. |
lymereJ
left a comment
There was a problem hiding this comment.
Code walk-through:
| if (state.dataSysVars->ReportDuringWarmup) { | ||
| OutputProcessor::ResetAccumulationWhenWarmupComplete(state); | ||
| } |
There was a problem hiding this comment.
Use (unused) existing function to reset the meters when warmup is complete.
There was a problem hiding this comment.
Pretty slick placement of this meter reset. I would rather see this in UpdateMeters but it would require another flag and reset logic for that flag. So this is fine.
if (state.dataGlobal->WarmupFlag) {
state.dataOutputProcessor.resetMeters = true; <- new flag
return;
}
if (state.dataOutputProcessor.resetMeters) {
ResetAccumulationWhenWarmupComplete(state);
state.dataOutputProcessor.resetMeters = false;
}
| EXPECT_NEAR(state->dataUnitarySystems->unitarySys[0].m_DesignCoolingCapacity, 24883.6371, 0.05); | ||
|
|
||
| // Check meter accumulation | ||
| // Lights are 1W so the meter should be 3600 [J] * 24 hours | ||
| EXPECT_TRUE(state->dataOutputProcessor->meters[4]->periodFinYrSM.Value == 3600 * 24); |
There was a problem hiding this comment.
Piggy-back on an existing unit test; A 1 W light object is used to check that the meters are being reset.
|
The defect file was updated to v25.2: defect_file_252.txt. When using this branch, the results are the same whether
These are the same results that we get when using |
mitchute
left a comment
There was a problem hiding this comment.
This looks good. Tests all run and pass locally after pulling in develop. No need to do that again here. Merging.

Pull request overview
Output:Diagnostics'sReportDuringWarmupoption impact annual energy use #11141Description of the purpose of this PR
Pull Request Author
Reviewer