From 9ced5f08b834cd300342de6889160903b1d59b12 Mon Sep 17 00:00:00 2001 From: kevin-moos Date: Mon, 23 Feb 2026 20:33:45 -0600 Subject: [PATCH 1/6] HybridUnitaryHVAC - clean up warning messages --- src/EnergyPlus/HybridEvapCoolingModel.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/EnergyPlus/HybridEvapCoolingModel.cc b/src/EnergyPlus/HybridEvapCoolingModel.cc index bd46a6c0760..9492a725f7c 100644 --- a/src/EnergyPlus/HybridEvapCoolingModel.cc +++ b/src/EnergyPlus/HybridEvapCoolingModel.cc @@ -1627,7 +1627,7 @@ namespace HybridEvapCoolingModel { if ((TimeElapsed > 24) && WarnOnceFlag && !state.dataGlobal->WarmupFlag) { if (count_EnvironmentConditionsNotMet > 0) { ShowWarningError(state, - format("In day {:.1R} was unable to operate for of simulation, {}{:.1R} timesteps because environment conditions " + format("In day {:.1R} of simulation, {} was unable to operate for {:.1R} timesteps because environment conditions " "were beyond the allowable operating range for any mode.", (Real64)state.dataGlobal->DayOfSim, Name, @@ -1635,8 +1635,8 @@ namespace HybridEvapCoolingModel { } if (count_SAHR_OC_MetOnce > 0) { ShowWarningError(state, - format("In day {:.1R} of simulation, {} failed to meet supply air humidity ratio for {:.1R} time steps. For these " - "time steps For these time steps was set to mode 0{}", + format("In day {:.1R} of simulation, {} failed to meet supply air humidity ratio for {:.1R} timesteps. For these " + "time steps {} was set to mode 0.", (Real64)state.dataGlobal->DayOfSim, Name, Real64(count_SAHR_OC_MetOnce), @@ -1644,8 +1644,8 @@ namespace HybridEvapCoolingModel { } if (count_SAT_OC_MetOnce > 0) { ShowWarningError(state, - format("In day {:.1R} of simulation, {} failed to meet supply air temperature constraints for {:.1R} time steps. " - "For these time steps For these time steps{} was set to mode 0", + format("In day {:.1R} of simulation, {} failed to meet supply air temperature constraints for {:.1R} timesteps. " + "For these time steps {} was set to mode 0.", (Real64)state.dataGlobal->DayOfSim, Name, Real64(count_SAT_OC_MetOnce), @@ -1653,7 +1653,7 @@ namespace HybridEvapCoolingModel { } ShowWarningError(state, - format("In day {:.1R} of simulation, {} failed to satisfy sensible load for {:.1R} time steps. For these time steps " + format("In day {:.1R} of simulation, {} failed to satisfy sensible load for {:.1R} timesteps. For these timesteps " "settings were selected to provide as much sensible cooling or heating as possible, given other constraints.", (Real64)state.dataGlobal->DayOfSim, Name, From e644fd7e84d6100a8bc7668263fd852269087920 Mon Sep 17 00:00:00 2001 From: kevin-moos Date: Mon, 23 Feb 2026 20:55:47 -0600 Subject: [PATCH 2/6] HybridUnitaryHVAC - fix spelling error in variable name --- src/EnergyPlus/HybridEvapCoolingModel.cc | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/EnergyPlus/HybridEvapCoolingModel.cc b/src/EnergyPlus/HybridEvapCoolingModel.cc index 9492a725f7c..63c723c54c0 100644 --- a/src/EnergyPlus/HybridEvapCoolingModel.cc +++ b/src/EnergyPlus/HybridEvapCoolingModel.cc @@ -1247,7 +1247,7 @@ namespace HybridEvapCoolingModel { // SUBROUTINE LOCAL VARIABLE DECLARATIONS: bool DidWeMeetLoad = false; - bool DidWeMeetHumidificaiton = false; + bool DidWeMeetHumidification = false; bool DidWePartlyMeetLoad = false; Real64 OptimalSetting_RunFractionTotalFuel = IMPLAUSIBLE_POWER; Real64 Tma; @@ -1483,16 +1483,12 @@ namespace HybridEvapCoolingModel { } bool Humidification_load_met = false; - - Real64 RequestedDeHumidificationLoad = StepIns.ZoneDehumidificationLoad; - if (DehumidificationRequested && latentRoomORZone > RequestedDeHumidificationLoad) { + if (DehumidificationRequested && latentRoomORZone > StepIns.ZoneDehumidificationLoad) { Humidification_load_met = true; } - Real64 RequestedHumidificationLoad = StepIns.ZoneMoistureLoad; - if (HumidificationRequested && latentRoomORZone < RequestedHumidificationLoad) { + if (HumidificationRequested && latentRoomORZone < StepIns.ZoneMoistureLoad) { Humidification_load_met = true; } - if (!(HumidificationRequested || DehumidificationRequested)) { Humidification_load_met = true; } @@ -1531,10 +1527,10 @@ namespace HybridEvapCoolingModel { OptimalSetting_RunFractionTotalFuel = RunFractionTotalFuel; OptimalSetting = thisSetting; DidWeMeetLoad = true; - DidWeMeetHumidificaiton = true; + DidWeMeetHumidification = true; } } else { - if (!DidWeMeetLoad && !DidWeMeetHumidificaiton) { + if (!DidWeMeetLoad && !DidWeMeetHumidification) { bool store_best_attempt = false; if (Conditioning_load_met) { From 8853f7bb0027736c053f1d2ba54c140d663e14e6 Mon Sep 17 00:00:00 2001 From: kevin-moos Date: Wed, 29 Apr 2026 16:06:24 -0500 Subject: [PATCH 3/6] Fix merge conflict --- src/EnergyPlus/HybridEvapCoolingModel.cc | 153 ++++++++++++----------- 1 file changed, 82 insertions(+), 71 deletions(-) diff --git a/src/EnergyPlus/HybridEvapCoolingModel.cc b/src/EnergyPlus/HybridEvapCoolingModel.cc index 63c723c54c0..8a7e1e59576 100644 --- a/src/EnergyPlus/HybridEvapCoolingModel.cc +++ b/src/EnergyPlus/HybridEvapCoolingModel.cc @@ -464,8 +464,8 @@ namespace HybridEvapCoolingModel { } else { curveID = GetCurveIndex(state, Alphas(inter_Alpha)); if (curveID == 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; InitializeCurve(TEMP_CURVE, -1); } else { @@ -482,8 +482,8 @@ namespace HybridEvapCoolingModel { } else { curveID = GetCurveIndex(state, Alphas(inter_Alpha)); if (curveID == 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; InitializeCurve(W_CURVE, -1); } else { @@ -498,8 +498,8 @@ namespace HybridEvapCoolingModel { } else { curveID = GetCurveIndex(state, Alphas(inter_Alpha)); if (curveID == 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; InitializeCurve(POWER_CURVE, -1); } else { @@ -514,8 +514,8 @@ namespace HybridEvapCoolingModel { } else { curveID = GetCurveIndex(state, Alphas(inter_Alpha)); if (curveID == 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; InitializeCurve(SUPPLY_FAN_POWER, -1); } else { @@ -530,8 +530,8 @@ namespace HybridEvapCoolingModel { } else { curveID = GetCurveIndex(state, Alphas(inter_Alpha)); if (curveID == 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; InitializeCurve(EXTERNAL_STATIC_PRESSURE, -1); } else { @@ -547,8 +547,8 @@ namespace HybridEvapCoolingModel { } else { curveID = GetCurveIndex(state, Alphas(inter_Alpha)); if (curveID == 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; InitializeCurve(SECOND_FUEL_USE, -1); } else { @@ -563,8 +563,8 @@ namespace HybridEvapCoolingModel { } else { curveID = GetCurveIndex(state, Alphas(inter_Alpha)); if (curveID == 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; InitializeCurve(THIRD_FUEL_USE, -1); } else { @@ -579,8 +579,8 @@ namespace HybridEvapCoolingModel { } else { curveID = GetCurveIndex(state, Alphas(inter_Alpha)); if (curveID == 0) { - ShowSevereError(state, format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFields(inter_Alpha), Alphas(inter_Alpha))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; InitializeCurve(WATER_USE, -1); } else { @@ -595,8 +595,8 @@ namespace HybridEvapCoolingModel { // N9, \field Mode1 Maximum Outdoor Air Temperature bool ok = InitializeOutdoorAirTemperatureConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } inter_Number = inter_Number + 2; @@ -604,8 +604,8 @@ namespace HybridEvapCoolingModel { // N11, \field Mode1 Maximum Outdoor Air Humidity Ratio ok = InitializeOutdoorAirHumidityRatioConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } inter_Number = inter_Number + 2; @@ -613,8 +613,8 @@ namespace HybridEvapCoolingModel { // N13, \field Mode1 Maximum Outdoor Air Relative Humidity ok = InitializeOutdoorAirRelativeHumidityConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } inter_Number = inter_Number + 2; @@ -622,8 +622,8 @@ namespace HybridEvapCoolingModel { // N15, \field Mode1 Maximum Return Air Temperature ok = InitializeReturnAirTemperatureConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } inter_Number = inter_Number + 2; @@ -631,8 +631,8 @@ namespace HybridEvapCoolingModel { // N17, \field Mode1 Maximum Return Air Humidity Ratio ok = InitializeReturnAirHumidityRatioConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, EnergyPlus::format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } inter_Number = inter_Number + 2; @@ -641,12 +641,12 @@ namespace HybridEvapCoolingModel { ok = InitializeReturnAirRelativeHumidityConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { ShowSevereError(state, - format("Invalid {}={}Or Invalid{}={}", - cAlphaFields(inter_Number), - Alphas(inter_Number), - cAlphaFields(inter_Number + 1), - Alphas(inter_Number + 1))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + EnergyPlus::format("Invalid {}={}Or Invalid{}={}", + cAlphaFields(inter_Number), + Alphas(inter_Number), + cAlphaFields(inter_Number + 1), + Alphas(inter_Number + 1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } inter_Number = inter_Number + 2; @@ -655,8 +655,9 @@ namespace HybridEvapCoolingModel { ok = InitializeOSAFConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, format("Error in OSAFConstraints{}through{}", cAlphaFields(inter_Number), cAlphaFields(inter_Number + 1))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, + EnergyPlus::format("Error in OSAFConstraints{}through{}", cAlphaFields(inter_Number), cAlphaFields(inter_Number + 1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } // N22, \field Mode1 Minimum Supply Air Mass Flow Rate Ratio @@ -664,8 +665,9 @@ namespace HybridEvapCoolingModel { inter_Number = inter_Number + 2; ok = InitializeMsaRatioConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, format("Error in OSAFConstraints{}through{}", cAlphaFields(inter_Number), cAlphaFields(inter_Number + 1))); - ShowContinueError(state, format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, + EnergyPlus::format("Error in OSAFConstraints{}through{}", cAlphaFields(inter_Number), cAlphaFields(inter_Number + 1))); + ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } (*OperatingModes).push_back(*this); @@ -930,7 +932,8 @@ namespace HybridEvapCoolingModel { Real64 Model::CheckVal_T(EnergyPlusData &state, Real64 T) { if ((T > 100) || (T < 0)) { - ShowWarningError(state, format("Supply air temperature exceeded realistic range error called in {}, check performance curve", Name)); + ShowWarningError(state, + EnergyPlus::format("Supply air temperature exceeded realistic range error called in {}, check performance curve", Name)); } return T; } @@ -1258,15 +1261,17 @@ namespace HybridEvapCoolingModel { Real64 PreviousMaxiumHumidOrDehumidOutput = 0; std::string ObjectID = Name.c_str(); if (StepIns.RHosa > 1) { - ShowSevereError(state, - format("Unitary hybrid system error, required relative humidity value 0-1, called in object{}.Check inputs", ObjectID)); + ShowSevereError( + state, + EnergyPlus::format("Unitary hybrid system error, required relative humidity value 0-1, called in object{}.Check inputs", ObjectID)); assert(true); return -1; } // because it should be fractional, this should only really be possible if its called from a unit test if (StepIns.RHra > 1) { - ShowSevereError(state, - format("Unitary hybrid system error, required relative humidity value 0-1, called in object{}.Check inputs", ObjectID)); + ShowSevereError( + state, + EnergyPlus::format("Unitary hybrid system error, required relative humidity value 0-1, called in object{}.Check inputs", ObjectID)); assert(true); return -1; } // because it should be fractional, this should only really be possible if its called from a unit test @@ -1622,38 +1627,42 @@ namespace HybridEvapCoolingModel { // day, so report", but that doesn't seem to exist. if ((TimeElapsed > 24) && WarnOnceFlag && !state.dataGlobal->WarmupFlag) { if (count_EnvironmentConditionsNotMet > 0) { - ShowWarningError(state, - format("In day {:.1R} of simulation, {} was unable to operate for {:.1R} timesteps because environment conditions " - "were beyond the allowable operating range for any mode.", - (Real64)state.dataGlobal->DayOfSim, - Name, - (Real64)count_EnvironmentConditionsNotMet)); + ShowWarningError( + state, + EnergyPlus::format("In day {:.1R} of simulation, {} was unable to operate for {:.1R} timesteps because environment conditions " + "were beyond the allowable operating range for any mode.", + (Real64)state.dataGlobal->DayOfSim, + Name, + (Real64)count_EnvironmentConditionsNotMet)); } if (count_SAHR_OC_MetOnce > 0) { - ShowWarningError(state, - format("In day {:.1R} of simulation, {} failed to meet supply air humidity ratio for {:.1R} timesteps. For these " - "time steps {} was set to mode 0.", - (Real64)state.dataGlobal->DayOfSim, - Name, - Real64(count_SAHR_OC_MetOnce), - Name)); + ShowWarningError( + state, + EnergyPlus::format("In day {:.1R} of simulation, {} failed to meet supply air humidity ratio for {:.1R} timesteps. For these " + "timesteps {} was set to mode 0.", + (Real64)state.dataGlobal->DayOfSim, + Name, + Real64(count_SAHR_OC_MetOnce), + Name)); } if (count_SAT_OC_MetOnce > 0) { - ShowWarningError(state, - format("In day {:.1R} of simulation, {} failed to meet supply air temperature constraints for {:.1R} timesteps. " - "For these time steps {} was set to mode 0.", - (Real64)state.dataGlobal->DayOfSim, - Name, - Real64(count_SAT_OC_MetOnce), - Name)); + ShowWarningError( + state, + EnergyPlus::format("In day {:.1R} of simulation, {} failed to meet supply air temperature constraints for {:.1R} timesteps. " + "For these timesteps {} was set to mode 0.", + (Real64)state.dataGlobal->DayOfSim, + Name, + Real64(count_SAT_OC_MetOnce), + Name)); } - ShowWarningError(state, - format("In day {:.1R} of simulation, {} failed to satisfy sensible load for {:.1R} timesteps. For these timesteps " - "settings were selected to provide as much sensible cooling or heating as possible, given other constraints.", - (Real64)state.dataGlobal->DayOfSim, - Name, - (Real64)count_DidWeNotMeetLoad)); + ShowWarningError( + state, + EnergyPlus::format("In day {:.1R} of simulation, {} failed to satisfy sensible load for {:.1R} timesteps. For these timesteps " + "settings were selected to provide as much sensible cooling or heating as possible, given other constraints.", + (Real64)state.dataGlobal->DayOfSim, + Name, + (Real64)count_DidWeNotMeetLoad)); count_SAT_OC_MetOnce = 0; count_DidWeNotMeetLoad = 0; @@ -1836,8 +1845,9 @@ namespace HybridEvapCoolingModel { CMode Mode = *(OperatingModes.begin()); if (SetStandByMode(state, Mode, StepIns.Tosa, Wosa, StepIns.Tra, Wra)) { std::string ObjectID = Name.c_str(); - ShowSevereError(state, - format("Standby mode not defined correctly, as the mode is defined there are zero combinations of acceptable outside air " + ShowSevereError( + state, + EnergyPlus::format("Standby mode not defined correctly, as the mode is defined there are zero combinations of acceptable outside air " "fractions and supply air mass flow rate, called in object {}", ObjectID)); } @@ -1911,8 +1921,9 @@ namespace HybridEvapCoolingModel { if (CoolingRequested || HeatingRequested) { ShowSevereError( state, - format("Outlet air mass flow rate of zero during period with conditioning need, check mode definition. Called in object {}", - Name)); + EnergyPlus::format( + "Outlet air mass flow rate of zero during period with conditioning need, check mode definition. Called in object {}", + Name)); } averageOSAF = 1; } From b1a29a469087503dc03021bdad55d73404011824 Mon Sep 17 00:00:00 2001 From: kevin-moos Date: Wed, 29 Apr 2026 16:11:10 -0500 Subject: [PATCH 4/6] Fix other merge issues --- src/EnergyPlus/HybridEvapCoolingModel.cc | 27 ++++++++++++------------ 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/EnergyPlus/HybridEvapCoolingModel.cc b/src/EnergyPlus/HybridEvapCoolingModel.cc index 8a7e1e59576..520f4d5776d 100644 --- a/src/EnergyPlus/HybridEvapCoolingModel.cc +++ b/src/EnergyPlus/HybridEvapCoolingModel.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2026, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-present, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Energy Innovation, LLC, and other @@ -1278,8 +1278,8 @@ namespace HybridEvapCoolingModel { Real64 Wosa = PsyWFnTdbRhPb(state, StepIns.Tosa, StepIns.RHosa, state.dataEnvrn->OutBaroPress); Real64 Wra = PsyWFnTdbRhPb(state, StepIns.Tra, StepIns.RHra, InletPressure); - bool EnvironmentConditionsMet, EnvironmentConditionsMetOnce, MinVRMet, SAT_OC_Met, SAT_OC_MetOnce, SARH_OC_Met, SAHR_OC_MetOnce; - EnvironmentConditionsMetOnce = SAT_OC_Met = SAT_OC_MetOnce = SARH_OC_Met = SAHR_OC_MetOnce = false; + bool EnvironmentConditionsMet, EnvironmentConditionsMetOnce, MinVRMet, SAT_OC_MetOnce, SAHR_OC_MetOnce; + EnvironmentConditionsMetOnce = SAT_OC_MetOnce = SAHR_OC_MetOnce = false; MinOA_Msa = StepIns.MinimumOA; // Set object version of minimum VR Kg/s @@ -1365,6 +1365,8 @@ namespace HybridEvapCoolingModel { FanHeatTemp = PowerLossToAir / (PsyCpAirFnW(Wsa) * ScaledMsa); Tsa = Tsa + FanHeatTemp; + bool SAT_OC_Met = false; + bool SARH_OC_Met = false; // Check it meets constraints if (MeetsSupplyAirTOC(state, Tsa)) { SAT_OC_Met = SAT_OC_MetOnce = SAT_OC_MetinMode = true; @@ -1550,16 +1552,14 @@ namespace HybridEvapCoolingModel { PreviousMaxiumHumidOrDehumidOutput = latentRoomORZone; } } else { - if (!DidWeMeetLoad) { - if (CoolingRequested && (SensibleRoomORZone > PreviousMaxiumConditioningOutput)) { - store_best_attempt = true; - } - if (HeatingRequested && (SensibleRoomORZone < PreviousMaxiumConditioningOutput)) { - store_best_attempt = true; - } - if (store_best_attempt) { - PreviousMaxiumConditioningOutput = SensibleRoomORZone; - } + if (CoolingRequested && (SensibleRoomORZone > PreviousMaxiumConditioningOutput)) { + store_best_attempt = true; + } + if (HeatingRequested && (SensibleRoomORZone < PreviousMaxiumConditioningOutput)) { + store_best_attempt = true; + } + if (store_best_attempt) { + PreviousMaxiumConditioningOutput = SensibleRoomORZone; } } if (store_best_attempt) { @@ -1917,7 +1917,6 @@ namespace HybridEvapCoolingModel { if (OutletMassFlowRate > 0) { averageOSAF = SupplyVentilationAir / OutletMassFlowRate; } else { - std::string ObjectID = Name.c_str(); if (CoolingRequested || HeatingRequested) { ShowSevereError( state, From b13b2a1120778fc60b07c530b9cd47455e005694 Mon Sep 17 00:00:00 2001 From: kevin-moos Date: Wed, 29 Apr 2026 16:12:36 -0500 Subject: [PATCH 5/6] Fix merge conflict --- src/EnergyPlus/HybridEvapCoolingModel.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EnergyPlus/HybridEvapCoolingModel.cc b/src/EnergyPlus/HybridEvapCoolingModel.cc index 520f4d5776d..c07f00dcf29 100644 --- a/src/EnergyPlus/HybridEvapCoolingModel.cc +++ b/src/EnergyPlus/HybridEvapCoolingModel.cc @@ -1597,7 +1597,7 @@ namespace HybridEvapCoolingModel { CurrentOperatingSettings[1] = oStandBy; } else { // if we partly met the load then do the best we can and run full out in that optimal setting. - if (!DidWeMeetLoad && DidWePartlyMeetLoad) { + if (DidWePartlyMeetLoad) { ErrorCode = 0; count_DidWeNotMeetLoad++; if (OptimalSetting.ElectricalPower == IMPLAUSIBLE_POWER) { From ae217ccc0bdd20d1767e1abede03625672fe6710 Mon Sep 17 00:00:00 2001 From: kevin-moos Date: Wed, 29 Apr 2026 16:48:43 -0500 Subject: [PATCH 6/6] Update unit test to check for warnings when changing operating settings --- .../unit/UnitaryHybridAirConditioner.unit.cc | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tst/EnergyPlus/unit/UnitaryHybridAirConditioner.unit.cc b/tst/EnergyPlus/unit/UnitaryHybridAirConditioner.unit.cc index d46389c9a6c..9bb27fad12f 100644 --- a/tst/EnergyPlus/unit/UnitaryHybridAirConditioner.unit.cc +++ b/tst/EnergyPlus/unit/UnitaryHybridAirConditioner.unit.cc @@ -1432,6 +1432,26 @@ TEST_F(EnergyPlusFixture, Test_UnitaryHybridAirConditioner_ValidateOptionalError delimited_string({" ** Severe ** GetInputZoneHybridUnitaryAirConditioners: ZoneHVAC:HybridUnitaryHVAC = MUNTERSEPX5000 invalid data", " ** ~~~ ** Invalid-not found Design Specification Outdoor Air Object Name=\"SZ DSOA SPACE2-1\"."}); EXPECT_TRUE(compare_err_stream(error_string, true)); + + // Check for warnings when changing operating settings + EnergyPlus::HybridEvapCoolingModel::CStepInputs StepIns; + StepIns.Tosa = 150; + state->dataGlobal->HourOfDay = 1; + state->dataGlobal->TimeStep = 1; + state->dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(1).SetOperatingSetting(*state, StepIns); + state->dataGlobal->HourOfDay = 24; + state->dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(1).SetOperatingSetting(*state, StepIns); + + std::string const warning_string = + delimited_string({" ** Warning ** In day 0.0 of simulation, MUNTERSEPX5000 was unable to operate for 2.0 timesteps because environment " + "conditions were beyond the allowable operating range for any mode.", + " ** Warning ** In day 0.0 of simulation, MUNTERSEPX5000 failed to meet supply air humidity ratio for 2.0 timesteps. For " + "these timesteps MUNTERSEPX5000 was set to mode 0.", + " ** Warning ** In day 0.0 of simulation, MUNTERSEPX5000 failed to meet supply air temperature constraints for 2.0 " + "timesteps. For these timesteps MUNTERSEPX5000 was set to mode 0.", + " ** Warning ** In day 0.0 of simulation, MUNTERSEPX5000 failed to satisfy sensible load for 2.0 timesteps. For these " + "timesteps settings were selected to provide as much sensible cooling or heating as possible, given other constraints."}); + EXPECT_TRUE(compare_err_stream(warning_string, true)); } TEST_F(EnergyPlusFixture, Test_UnitaryHybridAirConditioner_RuntimeFraction_Initialization)