Skip to content

Commit

Permalink
Fix some audit, rdd, and eio diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
amirroth committed Dec 9, 2024
1 parent aa645ef commit b8b9473
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
15 changes: 9 additions & 6 deletions src/EnergyPlus/Pumps.cc
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ void GetPumpInput(EnergyPlusData &state)
thisPump.HasVFD = true;
thisPump.VFD.VFDControlType =
static_cast<ControlTypeVFD>(getEnumValue(controlTypeVFDNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(7))));

switch (thisPump.VFD.VFDControlType) {

case ControlTypeVFD::VFDManual: {
Expand All @@ -412,11 +413,14 @@ void GetPumpInput(EnergyPlusData &state)
Sched::ShowSevereBadMin(state, eoh, thisInput->cAlphaFieldNames(8), thisInput->cAlphaArgs(8), Clusive::Ex, 0.0);
ErrorsFound = true;
}

thisPump.VFD.minRPMSched = Sched::GetScheduleAlwaysOff(state);
thisPump.VFD.maxRPMSched = Sched::GetScheduleAlwaysOff(state);
} break;

case ControlTypeVFD::VFDAutomatic: {
if (thisInput->lAlphaFieldBlanks(9)) {
ShowSevereEmptyField(state, eoh, thisInput->cAlphaFieldNames(9));
ShowSevereEmptyField(state, eoh, thisInput->cAlphaFieldNames(9));
ErrorsFound = true;
} else if ((thisPump.VFD.lowerPsetSched = Sched::GetSchedule(state, thisInput->cAlphaArgs(9))) == nullptr) {
ShowSevereItemNotFound(state, eoh, thisInput->cAlphaFieldNames(9), thisInput->cAlphaArgs(9));
Expand All @@ -432,8 +436,7 @@ void GetPumpInput(EnergyPlusData &state)
}

if (thisInput->lAlphaFieldBlanks(11)) {
ShowSevereEmptyField(state, eoh, thisInput->cAlphaFieldNames(11));
ErrorsFound = true;
thisPump.VFD.minRPMSched = Sched::GetScheduleAlwaysOff(state);
} else if ((thisPump.VFD.minRPMSched = Sched::GetSchedule(state, thisInput->cAlphaArgs(11))) == nullptr) {
ShowSevereItemNotFound(state, eoh, thisInput->cAlphaFieldNames(11), thisInput->cAlphaArgs(11));
ErrorsFound = true;
Expand All @@ -443,8 +446,7 @@ void GetPumpInput(EnergyPlusData &state)
}

if (thisInput->lAlphaFieldBlanks(12)) {
ShowSevereEmptyField(state, eoh, thisInput->cAlphaFieldNames(12));
ErrorsFound = true;
thisPump.VFD.maxRPMSched = Sched::GetScheduleAlwaysOff(state);
} else if ((thisPump.VFD.maxRPMSched = Sched::GetSchedule(state, thisInput->cAlphaArgs(12))) == nullptr) {
ShowSevereItemNotFound(state, eoh, thisInput->cAlphaFieldNames(12), thisInput->cAlphaArgs(12));
ErrorsFound = true;
Expand Down Expand Up @@ -599,7 +601,8 @@ void GetPumpInput(EnergyPlusData &state)
}

// Input the optional schedule for the pump
if (thisInput->lAlphaFieldBlanks(5)) { // Initialized to zero, don't get a schedule for an empty
if (thisInput->lAlphaFieldBlanks(5)) {
thisPump.sched = Sched::GetScheduleAlwaysOff(state);
} else if ((thisPump.sched = Sched::GetSchedule(state, thisInput->cAlphaArgs(5))) == nullptr) {
ShowWarningItemNotFound(state, eoh, thisInput->cAlphaFieldNames(5), thisInput->cAlphaArgs(5), "");
}
Expand Down
9 changes: 6 additions & 3 deletions src/EnergyPlus/ScheduleManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2136,7 +2136,7 @@ namespace Sched {
++NumF;
}
}
TimeHHMM(NumF) = format("{}:{}", HrField[hr], ShowMinute(s_glob->TimeStepsInHour));
TimeHHMM(NumF) = format("{}:{}", HrField[hr+1], ShowMinute(s_glob->TimeStepsInHour));
++NumF;
}
--NumF;
Expand Down Expand Up @@ -2213,7 +2213,7 @@ namespace Sched {
} break;

case ReportLevel::TimeStep: {
for (int hr = 1; hr < Constant::iHoursInDay; ++hr) {
for (int hr = 0; hr < Constant::iHoursInDay; ++hr) {
for (int ts = 0; ts < s_glob->TimeStepsInHour; ++ts) {
print(state.files.eio, SchDFmtdata, RoundTSValue(ts+1, hr+1));
}
Expand Down Expand Up @@ -3500,7 +3500,10 @@ namespace Sched {
auto const &s_sched = state.dataSched;

if (s_sched->DoScheduleReportingSetup) { // CurrentModuleObject='Any Schedule'
for (auto *sched : s_sched->schedules) {
for (auto *sched : s_sched->schedules) {
// No variables for the built-in AlwaysOn and AlwaysOff schedules
if (sched->Num == SchedNum_AlwaysOff || sched->Num == SchedNum_AlwaysOn) continue;

// Set Up Reporting
SetupOutputVariable(state,
"Schedule Value",
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/WeatherManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6665,7 +6665,7 @@ namespace Weather {
ErrorsFound = true;
} else {
if (envFound != 0) {
if (std::find(state.dataWeather->spSiteSchedNums.begin(), state.dataWeather->spSiteSchedNums.end(), Found) ==
if (std::find(state.dataWeather->spSiteSchedNums.begin(), state.dataWeather->spSiteSchedNums.end(), wpSkyTemp.sched->Num) ==
state.dataWeather->spSiteSchedNums.end()) {
state.dataWeather->spSiteSchedNums.emplace_back(wpSkyTemp.sched->Num);
SetupOutputVariable(state,
Expand Down

3 comments on commit b8b9473

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

ScheduleAPI (amirroth) - x86_64-Linux-Ubuntu-24.04-gcc-13.2: OK (2861 of 2918 tests passed, 0 test warnings)

Failures:\n

API Test Summary

  • Passed: 14
  • Subprocess aborted: 2

EnergyPlusFixture Test Summary

  • Passed: 1600
  • Failed: 2
  • Subprocess aborted: 3

integration Test Summary

  • Passed: 752
  • Failed: 49

performance Test Summary

  • Passed: 16
  • Failed: 1

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

ScheduleAPI (amirroth) - x86_64-Linux-Ubuntu-24.04-gcc-13.2-UnitTestsCoverage-RelWithDebInfo: OK (2093 of 2100 tests passed, 0 test warnings)

Failures:\n

API Test Summary

  • Passed: 14
  • Subprocess aborted: 2

EnergyPlusFixture Test Summary

  • Passed: 1600
  • Failed: 2
  • Subprocess aborted: 3

Build Badge Test Badge Coverage Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

ScheduleAPI (amirroth) - x86_64-Linux-Ubuntu-24.04-gcc-13.2-IntegrationCoverage-RelWithDebInfo: OK (753 of 801 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 753
  • Failed: 48

Build Badge Test Badge Coverage Badge

Please sign in to comment.